19 #ifndef TORC_BITSTREAM_VIRTEX5_HPP
20 #define TORC_BITSTREAM_VIRTEX5_HPP
22 #include <boost/cstdint.hpp>
23 #include <boost/filesystem.hpp>
28 namespace torc {
namespace architecture {
class DDB; } }
33 namespace bitstream {
class Virtex5UnitTest; }
34 namespace bitstream {
class Virtex5FarUnitTest; }
187 return deleteFramePackets4567<Virtex5>();
200 return generatePartialBitstreamPackets4567<Virtex5>(inFrameInclusion,
245 outMajorIndex = inFrameIndex - outMinorIndex;
250 #define DEPRECATED __attribute__ ((deprecated))
298 if(diffBlockType)
return diffBlockType < 0;
300 if(diffTopBottom)
return diffTopBottom < 0;
302 if(diffRow)
return diffRow < 0;
304 if(diffMajor)
return diffMajor < 0;
379 #endif // TORC_BITSTREAM_VIRTEX5_HPP
virtual bool operator==(const VirtexFrameAddress &vrhs) const
ColumnDefVector mColumnDefs
Column type widths.
static const Subfield sMASK0[]
Control Mask Register (MASK) subfields.
ECommand
Configuration command enumeration for eRegisterCMD.
FrameAddressToIndex mFrameAddressToIndex
Map of frame addressee to frame indexes.
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses.
static uint32_t makeSubfield(ERegister inRegister, const std::string &inSubfield, const std::string &inSetting)
Return the masked value for a subfield of the specified register.
uint32_t mFrameRow
Frame row.
virtual void readFramePackets(void)
Read frame data into the frame blocks structure.
TileTypeNameToColumnType mTileTypeNameToColumnType
virtual void splitFrameIndex(uint32_t inFrameIndex, uint32_t &outMajorIndex, uint32_t &outMinorIndex)
Split the given frame index into the base index of the major frame and the index of the minor frame...
EFar
Frame Address Register subfields.
IndexVector mBitColumnIndexes[Virtex5::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
Header for the VirtexBitstream class.
friend class torc::bitstream::bitstream::Virtex5UnitTest
FrameRowDesignator(EFarTopBottom inTopBottom, uint32_t inFrameRow, uint32_t inXdlBaseRow)
Constructor.
static const char * sRegisterName[eRegisterCount]
Configuration register names.
EFarTopBottom
Frame Address Register top and bottom constants.
EFrameInclude
The frames to include in a partial bitstream. Use eFrameIncludeOnlyDirtyFrames to include only dirty...
static const Subfield sCOR0[]
Configuration Options Register 0 (COR) subfields.
static const Subfield sTIMER[]
Watchdog Timer Register (TIMER) subfields.
boost::uint32_t uint32_t
Imported type name.
friend std::ostream & operator<<(std::ostream &os, const Virtex5 &rhs)
Insert the bitstream header into an output stream.
FrameIndexToAddress mFrameIndexToAddress
Map of frame indexes to frame addresses.
Virtex5(void)
Basic constructor.
FrameAddress(EFarTopBottom inTopBottom, EFarBlockType inBlockType, uint32_t inRow, uint32_t inMajor, uint32_t inMinor)
EFarBlockType
Frame Address Register block type constants.
static const Subfield sCOR1[]
Configuration Options Register 1 (COR) subfields.
Bitstream column definition for Xilinx bitstreams. For every block type 0 through 8...
IndexVector mXdlColumnIndexes[Virtex5::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
std::map< uint32_t, Virtex5::FrameAddress > FrameIndexToAddress
Map from frame index to frame address.
static const Subfield sSTAT[]
Status Register (STAT) subfields.
ERegister
Configuration register enumeration.
friend std::ostream & operator<<(std::ostream &os, const Virtex5::FrameAddress &rhs)
Frame row designator: top/bottom flag and row index.
virtual void assign(uint32_t inAddress)
virtual VirtexPacketVector generateFullBitstreamPrefix(void)
Return a packet vector with the full bitstream prefix.
static const Subfield sCTL1[]
Control Register 1 (CTL) subfields.
boost::uint32_t uint32_t
Imported type name.
virtual uint32_t getFrameRowCount(void) const
Return the number of frame rows for the current device.
static const char * sPacketTypeName[ePacketTypeCount]
Packet type names.
std::map< uint32_t, FrameRowDesignator > mXdlRowToFrameRowDesignator
Map of XDL tile rows to frame designators.
Virtex Frame Address base-class.
static const char * sOpcodeName[eOpcodeCount]
Packet opcode names.
DEPRECATED void updateFullFrameBlocks(void)
Transfers frame block data into the full bitstream frame packet.
virtual VirtexPacketVector generateFullBitstreamPackets(void)
Return a packet vector with full frame data.
void testVirtex5Device(const std::string &inDeviceName, const boost::filesystem::path &inWorkingPath)
virtual VirtexPacketVector::iterator deleteFramePackets(void)
Discard the existing frame packets and return an iterator to the start position.
static const char * sCommandName[eCommandCount]
Configuration command names.
static const Subfield sBOOTSTS[]
Boot History Status Register (BOOTSTS) subfields.
EBitstreamType
The bitstream type to generate. Use eBitstreamFull to fully reconfigure a device, eBitstreamTypePartialActive to partially reconfigure it while it continues to run, or eBitstreamTypePartialShutdown to partially recongifure it after shutting it down.
uint32_t mBlockFrameIndexBounds[Virtex5::eFarBlockTypeCount]
Array to hold frame index boundaries for blocks.
void testVirtex5FullMapping(const boost::filesystem::path &inWorkingPath)
boost::filesystem::path path
virtual VirtexPacketVector generatePartialBitstreamPrefix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream prefix.
VirtexFrameBlocks getXdlFrames(uint32_t inXdlRow, uint32_t inXdlCol, uint32_t &outBeginBit, uint32_t &outEndBit, uint32_t inBlockCount=eBlockTypeCount)
Returns frames for specified XDL tile coordinates. inXldRow The XDL row coordinate. inXdlCol The XDL column coordinate. outBeginBit The bit index of the beginning of the requested tile. outEndBit The bit index of the end of the requested tile. inBlockCount The highest block type requested (8 for Xilinx architectures).
std::vector< VirtexPacket > VirtexPacketVector
Vector of Virtex packets.
std::map< Virtex5::FrameAddress, uint32_t > FrameAddressToIndex
Map from frame address to frame index.
EFarTopBottom mTopBottom
Top/bottom flag.
uint32_t mFrameRowCount
Number of frame rows.
FrameRowDesignator(void)
Default constructor.
static const Subfield sWBSTAR[]
Warm Boot Start Address Register (WBSTAR) subfields.
DEPRECATED void initializeFullFrameBlocks(void)
Loads full bitstream frames into block data structure.
virtual bool operator<(const VirtexFrameAddress &vrhs) const
bool operator<(const FrameRowDesignator &rhs) const
Comparison operator (for map operations).
boost::uint32_t uint32_t
Imported type name.
void testVirtex5PartialMapping(const boost::filesystem::path &inWorkingPath)
EColumnType
Major column types.
virtual VirtexPacketVector generatePartialBitstreamPackets(EFrameInclude inFrameInclusion)
Return a packet vector with partial frame data.
VirtexFrameBlocks getBitstreamFrames(EFarTopBottom inTopBottom, uint32_t inFrameRow, uint32_t inBitCol, uint32_t inBlockCount=eBlockTypeCount)
Returns frames for specified bitstream tile column. inTopBottom The top or bottom half of the device...
friend class torc::bitstream::bitstream::Virtex5FarUnitTest
std::map< uint32_t, uint32_t > mBitColumnToXdlColumn
Map of bitstream column indexes to XDL column indexes.
virtual VirtexPacketVector generatePartialBitstreamSuffix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream suffix.
uint32_t mXdlBaseRow
Base XDL row.
std::vector< uint32_t > IndexVector
Array of vectors to store frame indexes of each block type.
virtual VirtexPacketVector generateFullBitstreamSuffix(void)
Return a packet vector with the full bitstream suffix.
uint32_t getPrimaryXdlColumn(uint32_t inXdlCol)
Returns the primary column corresponding to the given column. If immediately to the left of a BRAM...
Header for the VirtexBitstream class.
virtual uint32_t getFrameLength(void) const
Return the frame length for the current device.
virtual uint32_t getRowPadFrames(void) const
Return the number of pad frames after each row.
static const Subfield sCTL0[]
Control Register 0 (CTL) subfields.
FrameAddress(uint32_t inAddress)
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.