19 #ifndef TORC_BITSTREAM_VIRTEX7_HPP
20 #define TORC_BITSTREAM_VIRTEX7_HPP
22 #include <boost/cstdint.hpp>
23 #include <boost/filesystem.hpp>
27 namespace torc {
namespace architecture {
class DDB; } }
33 namespace bitstream {
class Virtex7UnitTest; }
34 namespace bitstream {
class Virtex7FarUnitTest; }
35 namespace bitstream {
class Zynq7000DebugUnitTest; }
214 virtual void updateFullBitstreamPackets(void);
218 virtual void updatePartialBitstreamPackets(EBitstreamType inBitstreamType,
219 EFrameInclude inFrameInclusion);
221 virtual void generateFullBitstreamPackets(void);
225 virtual void generatePartialBitstreamPackets(EBitstreamType inBitstreamType,
226 EFrameInclude inFrameInclusion);
230 return deleteFramePackets4567<Virtex7>();
243 return generatePartialBitstreamPackets4567<Virtex7>(inFrameInclusion,
288 outMajorIndex = inFrameIndex - outMinorIndex;
293 #define DEPRECATED __attribute__ ((deprecated))
338 if(diffBlockType)
return diffBlockType < 0;
340 if(diffTopBottom)
return diffTopBottom < 0;
342 if(diffRow)
return diffRow < 0;
344 if(diffMajor)
return diffMajor < 0;
434 #endif // TORC_BITSTREAM_VIRTEX7_HPP
ColumnDefVector mColumnDefs
Column type widths.
uint32_t mFrameRow
Frame row.
TileTypeNameToColumnType mTileTypeNameToColumnType
virtual VirtexPacketVector generatePartialBitstreamSuffix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream suffix.
FrameAddress(uint32_t inAddress)
virtual VirtexPacketVector generateFullBitstreamSuffix(void)
Return a packet vector with the full bitstream suffix.
Header for the VirtexBitstream class.
BitColumnToXdlColumn mBitColumnToXdlColumn
Map of bitstream column indexes to XDL column indexes.
FrameRowDesignator(EFarTopBottom inTopBottom, uint32_t inFrameRow, uint32_t inXdlBaseRow, uint32_t inColumnVectorBase)
Constructor.
FrameRowDesignatorVector mXdlRowToFrameRowDesignator
Vector of FrameRowDesignator entries for each XDL row.
EFarTopBottom mTopBottom
Top/bottom flag.
Frame row designator: top/bottom flag and row index.
virtual void readFramePackets(void)
Read frame data into the frame blocks structure.
friend std::ostream & operator<<(std::ostream &os, const Virtex7::FrameAddress &rhs)
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally useful only for int...
virtual VirtexPacketVector generateFullBitstreamPrefix(void)
Return a packet vector with the full bitstream prefix.
FrameRowDesignator(void)
Default constructor.
friend class torc::bitstream::bitstream::Zynq7000DebugUnitTest
EFrameInclude
The frames to include in a partial bitstream. Use eFrameIncludeOnlyDirtyFrames to include only dirty...
std::map< Virtex7::FrameAddress, uint32_t > FrameAddressToIndex
Map from frame address to frame index.
uint32_t getPrimaryXdlColumn(uint32_t inXdlRow, uint32_t inXdlCol)
Returns the primary column corresponding to the given tile. If the specified tile falls in an INT_L ...
boost::uint32_t uint32_t
Imported type name.
friend class torc::bitstream::bitstream::Virtex7FarUnitTest
ECommand
Configuration register enumeration.
virtual VirtexPacketVector::iterator deleteFramePackets(void)
Discard the existing frame packets and return an iterator to the start position.
virtual uint32_t getFrameLength(void) const
Return the frame length for the current device.
Bitstream column definition for Xilinx bitstreams. For every block type 0 through 8...
virtual VirtexPacketVector generatePartialBitstreamPackets(EFrameInclude inFrameInclusion)
Return a packet vector with partial frame data.
static const Subfield sMASK0[]
Control Mask Register (MASK) subfields.
friend std::ostream & operator<<(std::ostream &os, const Virtex7 &rhs)
Insert the bitstream header into and output stream.
static const Subfield sSTAT[]
Status Register (STAT) subfields.
static const Subfield sBOOTSTS[]
Boot History Status Register (BOOTSTS) subfields.
EFarBlockType
Frame Address Register block type constants.
ERegister
Configuration register enumeration.
static const Subfield sTIMER[]
Watchdog Timer Register (TIMER) subfields.
bool operator<(const FrameAddress &rhs) const
uint32_t mXdlBaseRow
Base XDL row.
void testVirtex7Device(const std::string &inDeviceName, const boost::filesystem::path &inWorkingPath)
boost::uint32_t uint32_t
Imported type name.
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).
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.
DEPRECATED void updateFullFrameBlocks(void)
Transfers frame block data into the full bitstream frame packet.
DEPRECATED void initializeFullFrameBlocks(void)
Loads full bitstream frames into block data structure.
static const Subfield sWBSTAR[]
Warm Boot Start Address Register (WBSTAR) subfields.
uint32_t mTopRowCount
The number of top bitstream rows.
FrameAddress(EFarTopBottom inTopBottom, EFarBlockType inBlockType, uint32_t inRow, uint32_t inMajor, uint32_t inMinor)
FrameIndexToAddress mFrameIndexToAddress
Map of frame indexes to frame addresses.
static const Subfield sCOR1[]
Configurations Options Register 1 (COR) subfields.
uint32_t mColumnVectorBase
Offset for this row into the column type vector.
std::vector< uint32_t > IndexVector
Vector of frame indexes.
std::map< uint32_t, Virtex7::FrameAddress > FrameIndexToAddress
Map from frame index to frame address.
EFarTopBottom
Frame Address Register top and bottom constants.
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.
static const char * sPacketTypeName[ePacketTypeCount]
Configuration controller registers.
static const char * sCommandName[eCommandCount]
Configuration Command names.
bool operator<(const FrameRowDesignator &rhs) const
Comparison operator (for map operations).
IndexVector mXdlColumnIndexes[Virtex7::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
boost::filesystem::path path
uint32_t mFrameRowCount
Number of frame rows.
void setRowCounts(const string &inDeviceName)
Set the number of top and bottom bitstream rows.
std::vector< VirtexPacket > VirtexPacketVector
Vector of Virtex packets.
std::map< uint32_t, uint32_t > BitColumnToXdlColumn
Map from bitstream column index to XDL column index.
static const Subfield sCTL1[]
Control Register 1 (CTL) subfields.
virtual uint32_t getFrameRowCount(void) const
Return the number of frame rows for the current device.
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...
virtual uint32_t getRowPadFrames(void) const
Return the number of pad frames after each row.
uint32_t mBottomRowCount
The number of bottom bitstream rows.
friend class torc::bitstream::bitstream::Virtex7UnitTest
static const char * sRegisterName[eRegisterCount]
Configuration Register names.
virtual VirtexPacketVector generatePartialBitstreamPrefix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream prefix.
uint32_t mBlockFrameIndexBounds[Virtex7::eFarBlockTypeCount]
Array to hold frame index boundaries for blocks.
static const Subfield sCTL0[]
Control Register 0 (CTL) subfields.
EColumnType
Major Column Types.
EFar
Frame Address Register subfields.
static const char * sOpcodeName[eOpcodeCount]
Packet Opcode names.
Virtex7(void)
Basic Constructor.
std::vector< FrameRowDesignator > FrameRowDesignatorVector
Vector of FrameRowDesignator entries.
bool operator==(const FrameAddress &rhs) const
void assign(uint32_t inAddress)
IndexVector mBitColumnIndexes[Virtex7::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
static const Subfield sCOR0[]
Configurations Options Register 0 (COR) subfields.
FrameAddressToIndex mFrameAddressToIndex
Map of frame addresses to frame indexes.
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...
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the Device Information.
virtual VirtexPacketVector generateFullBitstreamPackets(void)
Return a packet vector with full frame data.