Bitstream Interpretation Library (BIL)
0.1
|
Models an address in Virtex-5 configuration memory. More...
#include <configuration/V5FrameAddress.hpp>
Public Member Functions | |
V5FrameAddress () | |
Constructs a new V5FrameAddress instance. | |
V5FrameAddress (const V5AddressLayout *layout) | |
Constructs a new V5FrameAddress instance. | |
void | addressLayout (const V5AddressLayout *layout) |
Sets address layout used by device dependent methods. | |
const V5AddressLayout * | addressLayout () const |
Gets address layout used by device dependent methods. | |
void | block (V5CfgBlock::block_t block) |
Sets the block subspace the address points to. | |
V5CfgBlock::block_t | block () const |
Gets the block subspace the address points to. | |
void | lowerHalf (bool lower) |
Sets if address points to upper or lower half of the FPGA. | |
bool | lowerHalf () const |
Gets if address points to upper or lower half of the FPGA. | |
void | rowIndex (unsigned char ri) |
Sets index of the row the address points to. | |
unsigned char | rowIndex () const |
Gets index of the row the address points to. | |
void | columnIndex (unsigned char ci) |
Sets index of the column the address points to. | |
unsigned char | columnIndex () const |
Gets index of the column the address points to. | |
void | frameIndex (unsigned char fi) |
Sets index of the frame the address points to. | |
unsigned char | frameIndex () const |
Gets index of the frame the address points to. | |
void | first () |
Sets first address in address space. | |
void | last () |
Sets last address in address space. | |
bool | next () |
Increments the address by one. | |
bool | isValid () const |
Tells if address is valid under current address layout. | |
V5CfgColumn::column_t | columnType () const |
Tells the column type of the resource the address points to. | |
void | rawAddress (boost::uint32_t ra) |
Sets address from the raw 32 bit address representation. | |
boost::uint32_t | rawAddress () const |
Gets the raw 32 bit address representation. |
Static Public Attributes | |
static const unsigned | BLOCK_MAX = 7 |
Maximum allowed block value. | |
static const unsigned | ROWINDEX_MAX = V5AddressLayout::ROWCOUNT_MAX - 1 |
Maximum allowed row index value. | |
static const unsigned | COLUMNINDEX_MAX = V5AddressLayout::COLUMNCOUNT_MAX - 1 |
Maximum allowed column index value. | |
static const unsigned | FRAMEINDEX_MAX = 127 |
Maximum allowed frame index value. |
Friends | |
bool | operator== (const V5FrameAddress &fa1, const V5FrameAddress &fa2) |
Tests two V5FrameAddress instances for memberwise equality. | |
bool | operator< (const V5FrameAddress &fa1, const V5FrameAddress &fa2) |
Tests two V5FrameAddress instances for memberwise <. |
Models an address in Virtex-5 configuration memory.
Virtex-5 device frame addresses are made up from five integer parts that count upwards as frame address increases. Between the various Virtex-5 models these parts count up to different limits depending on the resources this model has. The V5FrameAddress instances can be configured with a pointer to a V5AddressLayout instance, which provides these model specific limits and the address counting scheme.
Definition at line 28 of file V5FrameAddress.hpp.
V5FrameAddress::V5FrameAddress | ( | ) |
Constructs a new V5FrameAddress instance.
Definition at line 22 of file V5FrameAddress.cpp.
|
explicit |
Constructs a new V5FrameAddress instance.
layout | see addressLayout(). |
Definition at line 35 of file V5FrameAddress.cpp.
void V5FrameAddress::addressLayout | ( | const V5AddressLayout * | layout | ) |
Sets address layout used by device dependent methods.
In order to hold the V5FrameAddress instances small, they do not contain a copy of the address layout for further use. Instead, they just hold a pointer to an external address layout instance. This pointer can also be 0 for all operations that do not require an address layout; operations which require an address layout will then throw an exception.
layout | Pointer to address layout. |
Definition at line 48 of file V5FrameAddress.cpp.
const V5AddressLayout * V5FrameAddress::addressLayout | ( | ) | const |
Gets address layout used by device dependent methods.
Definition at line 54 of file V5FrameAddress.cpp.
void V5FrameAddress::block | ( | V5CfgBlock::block_t | block | ) |
Sets the block subspace the address points to.
block | The block. |
. |
Definition at line 60 of file V5FrameAddress.cpp.
V5CfgBlock::block_t V5FrameAddress::block | ( | ) | const |
Gets the block subspace the address points to.
Definition at line 67 of file V5FrameAddress.cpp.
void V5FrameAddress::lowerHalf | ( | bool | lower | ) |
Sets if address points to upper or lower half of the FPGA.
lower | True, if address points to lower half; false otherwise. |
Definition at line 73 of file V5FrameAddress.cpp.
bool V5FrameAddress::lowerHalf | ( | ) | const |
Gets if address points to upper or lower half of the FPGA.
Definition at line 79 of file V5FrameAddress.cpp.
void V5FrameAddress::rowIndex | ( | unsigned char | ri | ) |
Sets index of the row the address points to.
ri | The row index. |
. |
Definition at line 85 of file V5FrameAddress.cpp.
unsigned char V5FrameAddress::rowIndex | ( | ) | const |
Gets index of the row the address points to.
Definition at line 92 of file V5FrameAddress.cpp.
void V5FrameAddress::columnIndex | ( | unsigned char | ci | ) |
Sets index of the column the address points to.
ci | The column index. |
. |
Definition at line 98 of file V5FrameAddress.cpp.
unsigned char V5FrameAddress::columnIndex | ( | ) | const |
Gets index of the column the address points to.
Definition at line 105 of file V5FrameAddress.cpp.
void V5FrameAddress::frameIndex | ( | unsigned char | fi | ) |
Sets index of the frame the address points to.
fi | The frame index. |
. |
Definition at line 111 of file V5FrameAddress.cpp.
unsigned char V5FrameAddress::frameIndex | ( | ) | const |
Gets index of the frame the address points to.
Definition at line 118 of file V5FrameAddress.cpp.
void V5FrameAddress::first | ( | ) |
Sets first address in address space.
The first address is the same for all devices, so an address layout need not to be set for this method to work.
Definition at line 124 of file V5FrameAddress.cpp.
void V5FrameAddress::last | ( | ) |
Sets last address in address space.
The last address is varies between the devices, so an address layout has to be set for this method to work.
. |
Definition at line 134 of file V5FrameAddress.cpp.
bool V5FrameAddress::next | ( | ) |
Increments the address by one.
The address has to be valid.
. |
Definition at line 149 of file V5FrameAddress.cpp.
bool V5FrameAddress::isValid | ( | ) | const |
Tells if address is valid under current address layout.
The address is valid only if addressLayout() is not 0, and all address parts are inside their valid ranges given by the address layout.
Definition at line 192 of file V5FrameAddress.cpp.
V5CfgColumn::column_t V5FrameAddress::columnType | ( | ) | const |
Tells the column type of the resource the address points to.
. |
Definition at line 210 of file V5FrameAddress.cpp.
void V5FrameAddress::rawAddress | ( | boost::uint32_t | ra | ) |
Sets address from the raw 32 bit address representation.
ra | Raw 32 bit address. |
Definition at line 228 of file V5FrameAddress.cpp.
boost::uint32_t V5FrameAddress::rawAddress | ( | ) | const |
Gets the raw 32 bit address representation.
Definition at line 239 of file V5FrameAddress.cpp.
|
friend |
Tests two V5FrameAddress instances for memberwise equality.
Definition at line 261 of file V5FrameAddress.hpp.
|
friend |
Tests two V5FrameAddress instances for memberwise <.
Definition at line 278 of file V5FrameAddress.hpp.
|
static |
Maximum allowed block value.
Definition at line 75 of file V5FrameAddress.hpp.
|
static |
Maximum allowed row index value.
Definition at line 113 of file V5FrameAddress.hpp.
|
static |
Maximum allowed column index value.
Definition at line 134 of file V5FrameAddress.hpp.
|
static |
Maximum allowed frame index value.
Definition at line 155 of file V5FrameAddress.hpp.