Bitstream Interpretation Library (BIL)  0.1
Public Types | Public Member Functions
bil::V5Configuration Class Reference

Configuration of a Virtex-5 device. More...

#include <configuration/V5Configuration.hpp>

List of all members.

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.
V5Configurationoperator= (const V5Configuration &src)
 Assigns a V5Configuration instance to another.
void addressLayout (const V5AddressLayout &layout)
 Sets address layout used for the frame addresses.
const V5AddressLayoutaddressLayout () 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.
V5CfgFramelookup (const V5FrameAddress &address)
 Looks up a frame by address.
const V5CfgFramelookup (const V5FrameAddress &address) const
 Looks up a read only frame by address.

Detailed Description

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.


Member Typedef Documentation

type for contained frame address/frame pairs

Definition at line 128 of file V5Configuration.hpp.

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.


Constructor & Destructor Documentation

V5Configuration::V5Configuration ( )

Constructs a new V5Configuration instance.

Definition at line 14 of file V5Configuration.cpp.

V5Configuration::V5Configuration ( const V5AddressLayout layout)
explicit

Constructs a new V5Configuration instance.

Parameters:
layoutSee addressLayout().

Definition at line 22 of file V5Configuration.cpp.

V5Configuration::V5Configuration ( const V5Configuration src)

Copy constructs a new V5Configuration instance.

Parameters:
srcReference to V5Configuration instance from which to copy.

Definition at line 30 of file V5Configuration.cpp.


Member Function Documentation

V5Configuration & V5Configuration::operator= ( const V5Configuration src)

Assigns a V5Configuration instance to another.

Parameters:
srcReference to V5Configuration instance from which to copy.
Returns:
Reference to instance that has been assigned to.

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.

Parameters:
layoutNew address layout.

Definition at line 73 of file V5Configuration.cpp.

const V5AddressLayout & V5Configuration::addressLayout ( ) const

Gets address layout used for the frame addresses.

Returns:
A reference to currently used address layout.

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.

Parameters:
addressFrame address to insert at.
frameV5CfgFrame instance that will be copied.
Returns:
True, if given address was not occupied, false otherwise.
Exceptions:
.

Definition at line 89 of file V5Configuration.cpp.

bool V5Configuration::erase ( const V5FrameAddress address)

Erases a frame address/frame pair.

Parameters:
addressFrame address of pair to erase.
Returns:
True, if designated frame address/frame pair existed; false otherwise.

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.

Returns:
Number of contained pairs.

Definition at line 127 of file V5Configuration.cpp.

V5Configuration::pairptrs_t V5Configuration::contents ( )

Gets references to all frame address/frame pairs.

Returns:
Vector filled with references to pairs. Each reference is valid until referenced instance is not erased.
Exceptions:
.

Definition at line 133 of file V5Configuration.cpp.

V5Configuration::pairconstptrs_t V5Configuration::contents ( ) const

Gets references to all frame address/frame pairs read only.

Returns:
Vector filled with read only references to pairs. Each reference is valid until referenced instance is not erased.
Exceptions:
.

Definition at line 149 of file V5Configuration.cpp.

V5CfgFrame * V5Configuration::lookup ( const V5FrameAddress address)

Looks up a frame by address.

Parameters:
addressAddress of frame to query.
Returns:
Pointer to the queried frame if found, 0 otherwise. Valid until that frame is erased or replaced.

Definition at line 165 of file V5Configuration.cpp.

const V5CfgFrame * V5Configuration::lookup ( const V5FrameAddress address) const

Looks up a read only frame by address.

Parameters:
addressAddress of frame to query.
Returns:
Pointer to the queried frame if found, 0 otherwise. Valid until that frame is erased or replaced.

Definition at line 175 of file V5Configuration.cpp.


The documentation for this class was generated from the following files: