Bitstream Interpretation Library (BIL)  0.1
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
bil::V5AddressLayout Class Reference

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

#include <configuration/V5AddressLayout.hpp>

List of all members.

Public Member Functions

 V5AddressLayout ()
 Constructs a new V5AddressLayout instance.
 V5AddressLayout (unsigned upperRowCount, unsigned lowerRowCount, const V5CfgColumnSequence &columnSequence)
 Constructs a new V5AddressLayout instance.
void upperRowCount (unsigned count)
 Sets number of rows in upper half of the FPGA.
unsigned upperRowCount () const
 Gets number of rows in upper half of the FPGA.
void lowerRowCount (unsigned count)
 Sets number of rows in lower half of the FPGA.
unsigned lowerRowCount () const
 Gets number of rows in lower half of the FPGA.
void columnSequence (const V5CfgColumnSequence &columns)
 Sets column sequence.
const V5CfgColumnSequencecolumnSequence () const
 Gets column sequence.
unsigned rowCount (bool lowerHalf) const
 Gets number of rows in upper or lower half of the FPGA.
unsigned columnCount (V5CfgBlock::block_t block) const
 Gets number of columns in the specified block.
unsigned frameCount (V5CfgBlock::block_t block, V5CfgColumn::column_t column) const
 Gets number of frames a resource of specified column type in specified block is configured with.
V5CfgColumn::column_t columnType (V5CfgBlock::block_t block, size_t columnIndex) const
 Gets type of specified column in specified block.

Static Public Attributes

static const unsigned ROWCOUNT_MAX = 31
 Maximum allowed value for upper and lower row count.
static const unsigned COLUMNCOUNT_MAX = 255
 Maximum allowed value for column count.

Protected Member Functions

unsigned countBRAMs (const V5CfgColumnSequence &columns) const
 Counts the number of block RAM columns in given row.

Friends

bool operator== (const V5AddressLayout &al1, const V5AddressLayout &al2)
 Tests two V5AddressLayout instances for memberwise equality.
void writeBinary (const V5AddressLayout &data, std::ostream &outputStream)
 Writes data from a V5AddressLayout into a binary stream.
void readBinary (V5AddressLayout &data, std::istream &inputStream)
 Reads data into a V5AddressLayout from a binary stream.

Detailed Description

Configuration address layout of a Virtex-5 device.

All devices in the Virtex-5 series share the same configuration memory addressing concept, but number and addressing/placement of the resources to configure differ. This class can be filled with data describing how configuration memory of a specific device is laid out: i.e. which resources are located at which addresses, and which addresses are valid.

Definition at line 26 of file V5AddressLayout.hpp.


Constructor & Destructor Documentation

V5AddressLayout::V5AddressLayout ( )

Constructs a new V5AddressLayout instance.

Definition at line 28 of file V5AddressLayout.cpp.

V5AddressLayout::V5AddressLayout ( unsigned  upperRowCount,
unsigned  lowerRowCount,
const V5CfgColumnSequence columnSequence 
)

Constructs a new V5AddressLayout instance.

Parameters:
upperRowCountSee upperRowCount().
lowerRowCountSee lowerRowCount().
columnSequenceSee columnSequence().

Definition at line 38 of file V5AddressLayout.cpp.


Member Function Documentation

void V5AddressLayout::upperRowCount ( unsigned  count)

Sets number of rows in upper half of the FPGA.

Upper rows are indexed from 0 to number of upper rows - 1. They start in the FPGA's middle and run to the upper border.

Parameters:
countNumber of upper rows.
Exceptions:
.

Definition at line 56 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::upperRowCount ( ) const

Gets number of rows in upper half of the FPGA.

Returns:
Number of upper rows.

Definition at line 65 of file V5AddressLayout.cpp.

void V5AddressLayout::lowerRowCount ( unsigned  count)

Sets number of rows in lower half of the FPGA.

Lower rows are indexed from 0 to number of lower rows - 1. They start in the FPGA's middle and run to the lower border.

Parameters:
countNumber of lower rows.
Exceptions:
.

Definition at line 71 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::lowerRowCount ( ) const

Gets number of rows in lower half of the FPGA.

Returns:
Number of lower rows.

Definition at line 80 of file V5AddressLayout.cpp.

void V5AddressLayout::columnSequence ( const V5CfgColumnSequence columns)

Sets column sequence.

The given column sequence is copied and then interpreted as if it was in INTERCONNECT_AND_CFG block. Column sequences for the other blocks are deduced from this.

Parameters:
columnsColumn sequence.
Exceptions:
.

Definition at line 86 of file V5AddressLayout.cpp.

const V5CfgColumnSequence & V5AddressLayout::columnSequence ( ) const

Gets column sequence.

Result is a read only reference to the V5CfgColumnSequence instance owned by the V5AddressLayout.

Returns:
Column sequence of a row in INTERCONNECT_AND_CFG block.

Definition at line 96 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::rowCount ( bool  lowerHalf) const

Gets number of rows in upper or lower half of the FPGA.

The total row count equals rowCount(false) + rowCount(true).

Parameters:
lowerHalfFlag designating upper or lower half.
Returns:
Number of rows in designated half of the FPGA.

Definition at line 102 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::columnCount ( V5CfgBlock::block_t  block) const

Gets number of columns in the specified block.

Parameters:
blockBlock to query.
Returns:
Number of columns.

Definition at line 109 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::frameCount ( V5CfgBlock::block_t  block,
V5CfgColumn::column_t  column 
) const

Gets number of frames a resource of specified column type in specified block is configured with.

Parameters:
blockBlock the column/resource is in.
columnColumn type of the resource.
Returns:
Number of frames the resource is configured with.

Definition at line 128 of file V5AddressLayout.cpp.

V5CfgColumn::column_t V5AddressLayout::columnType ( V5CfgBlock::block_t  block,
size_t  columnIndex 
) const

Gets type of specified column in specified block.

Parameters:
blockBlock the column is in.
columnIndexIndex of column to query.
Returns:
Type of the column in question.
Exceptions:
.

Definition at line 177 of file V5AddressLayout.cpp.

unsigned V5AddressLayout::countBRAMs ( const V5CfgColumnSequence columns) const
protected

Counts the number of block RAM columns in given row.

Parameters:
columnsRow in which to count.
Returns:
Number of block RAM columns.

Definition at line 202 of file V5AddressLayout.cpp.


Friends And Related Function Documentation

bool operator== ( const V5AddressLayout al1,
const V5AddressLayout al2 
)
friend

Tests two V5AddressLayout instances for memberwise equality.

Definition at line 181 of file V5AddressLayout.hpp.

void writeBinary ( const V5AddressLayout data,
std::ostream &  outputStream 
)
friend

Writes data from a V5AddressLayout into a binary stream.

Parameters:
dataThe V5AddressLayout to write.
outputStreamThe stream to write into.
Exceptions:
.
void readBinary ( V5AddressLayout data,
std::istream &  inputStream 
)
friend

Reads data into a V5AddressLayout from a binary stream.

Parameters:
dataThe V5AddressLayout to read into.
inputStreamThe stream to read from.
Exceptions:
.

Member Data Documentation

const unsigned bil::V5AddressLayout::ROWCOUNT_MAX = 31
static

Maximum allowed value for upper and lower row count.

Definition at line 52 of file V5AddressLayout.hpp.

const unsigned bil::V5AddressLayout::COLUMNCOUNT_MAX = 255
static

Maximum allowed value for column count.

Definition at line 95 of file V5AddressLayout.hpp.


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