Bitstream Interpretation Library (BIL)
0.1
|
Configuration of a Virtex-5 device. More...
#include <configuration/V5Configuration.hpp>
Public Types | |
typedef std::pair< const V5FrameAddress, V5CfgFrame > | pair_t |
type for contained frame address/frame pairs | |
typedef std::vector< pair_t * > | pairptrs_t |
type for pointers to frame address/frame pairs | |
typedef std::vector< const pair_t * > | pairconstptrs_t |
type for const pointers to frame address/frame pairs |
Public Member Functions | |
V5Configuration () | |
Constructs a new V5Configuration instance. | |
V5Configuration (const V5AddressLayout &layout) | |
Constructs a new V5Configuration instance. | |
V5Configuration (const V5Configuration &src) | |
Copy constructs a new V5Configuration instance. | |
V5Configuration & | operator= (const V5Configuration &src) |
Assigns a V5Configuration instance to another. | |
void | addressLayout (const V5AddressLayout &layout) |
Sets address layout used for the frame addresses. | |
const V5AddressLayout & | addressLayout () const |
Gets address layout used for the frame addresses. | |
bool | insert (const V5FrameAddress &address, const V5CfgFrame &frame) |
Inserts a frame address/frame pair. If there is already another frame address/frame pair with same address, it gets replaced by the new pair. | |
bool | erase (const V5FrameAddress &address) |
Erases a frame address/frame pair. | |
void | clear () |
Erases all frame address/frame pairs. | |
size_t | size () const |
Gets count of contained frame address/frame pairs. | |
pairptrs_t | contents () |
Gets references to all frame address/frame pairs. | |
pairconstptrs_t | contents () const |
Gets references to all frame address/frame pairs read only. | |
V5CfgFrame * | lookup (const V5FrameAddress &address) |
Looks up a frame by address. | |
const V5CfgFrame * | lookup (const V5FrameAddress &address) const |
Looks up a read only frame by address. |
Configuration of a Virtex-5 device.
Holds the configuration memory contents (complete or only a part) of a Virtex-5 device by storing pairs consisting of a frame address and its associated frame. Theses pairs are sorted by their frame address, and can be quickly looked up by them.
Definition at line 28 of file V5Configuration.hpp.
typedef std::pair<const V5FrameAddress, V5CfgFrame> bil::V5Configuration::pair_t |
type for contained frame address/frame pairs
Definition at line 128 of file V5Configuration.hpp.
typedef std::vector<pair_t*> bil::V5Configuration::pairptrs_t |
type for pointers to frame address/frame pairs
Definition at line 131 of file V5Configuration.hpp.
typedef std::vector<const pair_t*> bil::V5Configuration::pairconstptrs_t |
type for const pointers to frame address/frame pairs
Definition at line 134 of file V5Configuration.hpp.
V5Configuration::V5Configuration | ( | ) |
Constructs a new V5Configuration instance.
Definition at line 14 of file V5Configuration.cpp.
|
explicit |
Constructs a new V5Configuration instance.
layout | See addressLayout(). |
Definition at line 22 of file V5Configuration.cpp.
V5Configuration::V5Configuration | ( | const V5Configuration & | src | ) |
Copy constructs a new V5Configuration instance.
src | Reference to V5Configuration instance from which to copy. |
Definition at line 30 of file V5Configuration.cpp.
V5Configuration & V5Configuration::operator= | ( | const V5Configuration & | src | ) |
Assigns a V5Configuration instance to another.
src | Reference to V5Configuration instance from which to copy. |
Definition at line 49 of file V5Configuration.cpp.
void V5Configuration::addressLayout | ( | const V5AddressLayout & | layout | ) |
Sets address layout used for the frame addresses.
The given layout is copied and all subsequently inserted addresses will be linked to it. If the container is not empty, it will be cleared. Setting an equivalent layout (in terms of operator==) will do nothing.
layout | New address layout. |
Definition at line 73 of file V5Configuration.cpp.
const V5AddressLayout & V5Configuration::addressLayout | ( | ) | const |
Gets address layout used for the frame addresses.
Definition at line 83 of file V5Configuration.cpp.
bool V5Configuration::insert | ( | const V5FrameAddress & | address, |
const V5CfgFrame & | frame | ||
) |
Inserts a frame address/frame pair. If there is already another frame address/frame pair with same address, it gets replaced by the new pair.
Before address gets inserted, it is copied and linked to the current address layout, under that it must be valid.
address | Frame address to insert at. |
frame | V5CfgFrame instance that will be copied. |
. |
Definition at line 89 of file V5Configuration.cpp.
bool V5Configuration::erase | ( | const V5FrameAddress & | address | ) |
Erases a frame address/frame pair.
address | Frame address of pair to erase. |
Definition at line 115 of file V5Configuration.cpp.
void V5Configuration::clear | ( | ) |
Erases all frame address/frame pairs.
Definition at line 121 of file V5Configuration.cpp.
size_t V5Configuration::size | ( | ) | const |
Gets count of contained frame address/frame pairs.
Definition at line 127 of file V5Configuration.cpp.
V5Configuration::pairptrs_t V5Configuration::contents | ( | ) |
Gets references to all frame address/frame pairs.
. |
Definition at line 133 of file V5Configuration.cpp.
V5Configuration::pairconstptrs_t V5Configuration::contents | ( | ) | const |
Gets references to all frame address/frame pairs read only.
. |
Definition at line 149 of file V5Configuration.cpp.
V5CfgFrame * V5Configuration::lookup | ( | const V5FrameAddress & | address | ) |
Looks up a frame by address.
address | Address of frame to query. |
Definition at line 165 of file V5Configuration.cpp.
const V5CfgFrame * V5Configuration::lookup | ( | const V5FrameAddress & | address | ) | const |
Looks up a read only frame by address.
address | Address of frame to query. |
Definition at line 175 of file V5Configuration.cpp.