33 "[UNKNOWN TYPE 0]",
"TYPE1",
"TYPE2",
"[UNKNOWN TYPE 3]",
"[UNKNOWN TYPE 4]",
34 "[UNKNOWN TYPE 5]",
"[UNKNOWN TYPE 6]",
"[UNKNOWN TYPE 7]"
38 "NOP",
"READ",
"WRITE",
"RESERVED"
42 "CRC",
"FAR",
"FDRI",
"FDRO",
"CMD",
"CTL",
"MASK",
"STAT",
"LOUT",
"COR",
"MFWR",
"CBC",
47 "NULL",
"WCFG",
"MFWR",
"LFRM",
"RCFG",
"START",
"RCAP",
"RCRC",
"AGHIGH",
"SWITCH",
48 "GRESTORE",
"SHUTDOWN",
"GCAPTURE",
"DESYNC"
51 #define VALUES (const char*[])
55 {0x00000007, 0,
"GWE_cycle",
"GWE_CYCLE", 5,
58 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
59 {0x00000038, 3,
"GTS_cycle",
"GTS_CYCLE", 4,
62 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
63 {0x000001c0, 6,
"LCK_cycle",
"LOCK_CYCLE", 7,
66 VALUES{
"1",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"NoWait", 0}},
67 {0x00000E00, 9,
"Match_cycle",
"MATCH_CYCLE", 7,
70 VALUES{
"1",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"NoWait", 0}},
71 {0x00007000, 12,
"DONE_cycle",
"DONE_CYCLE", 3,
74 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
75 {0x00018000, 15,
"StartupClk",
"SSCLKSRC", 0,
78 VALUES{
"Cclk",
"UserClk",
"JtagClk",
"JtagClk", 0}},
79 {0x007e0000, 17,
"ConfigRate",
"OSCFSEL", 0,
83 "[UNKNOWN 0]",
"[UNKNOWN 1]",
"[UNKNOWN 2]",
"[UNKNOWN 3]",
84 "[UNKNOWN 4]",
"[UNKNOWN 5]",
"[UNKNOWN 6]",
"[UNKNOWN 7]",
85 "[UNKNOWN 8]",
"[UNKNOWN 9]",
"[UNKNOWN 10]",
"[UNKNOWN 11]",
86 "[UNKNOWN 12]",
"[UNKNOWN 13]",
"[UNKNOWN 14]",
"[UNKNOWN 15]",
87 "[UNKNOWN 16]",
"[UNKNOWN 17]",
"[UNKNOWN 18]",
"[UNKNOWN 19]",
88 "[UNKNOWN 20]",
"[UNKNOWN 21]",
"[UNKNOWN 22]",
"[UNKNOWN 23]",
89 "[UNKNOWN 24]",
"[UNKNOWN 25]",
"[UNKNOWN 26]",
"[UNKNOWN 27]",
90 "[UNKNOWN 28]",
"[UNKNOWN 29]",
"[UNKNOWN 30]",
"[UNKNOWN 31]",
92 {0x00800000, 23,
"Capture",
"SINGLE", 0,
95 VALUES{
"Continuous",
"OneShot", 0}},
96 {0x01000000, 24,
"DriveDone",
"DRIVE_DONE", 0,
100 {0x02000000, 25,
"DonePipe",
"DONE_PIPE", 0,
104 {0x10000000, 28,
"CRC",
"CRC_BYPASS", 0,
107 VALUES{
"Enable",
"Disable", 0}},
114 {0x00000001, 0,
"CRC_error",
"CRC_ERROR", 0,
118 {0x00000002, 1,
"DecryptorSecuritySet",
"PART_SECURED", 0,
122 {0x00000004, 2,
"DCM_locked",
"DCM_LOCK", 0,
126 {0x00000008, 3,
"DCI_matched",
"DCI_MATCH", 0,
130 {0x00000010, 4,
"StartupFinished",
"EOS", 0,
134 {0x00000020, 5,
"GTS_CFG_B",
"GTS_CFG_B", 0,
137 VALUES{
"IoDisabled",
"IoEnabled", 0}},
138 {0x00000040, 6,
"GWE",
"GWE", 0,
142 VALUES{
"WriteDisabled",
"WriteEnabled", 0}},
143 {0x00000080, 7,
"GHIGH_B",
"GHIGH_B", 0,
146 VALUES{
"InterconnectDisabled",
"InterconnectEnabled", 0}},
147 {0x00000700, 8,
"Mode",
"MODE", 0,
150 VALUES{
"MasterSerial",
"SlaveSelectMap32",
"[UNDEFINED 2]",
"MasterSelectMap",
151 "[UNDEFINED 3]",
"JTAG",
"SlaveSelectMap8",
"[UNDEFINED 6]",
"SlaveSerial", 0}},
152 {0x00000800, 11,
"INIT_complete",
"INIT_COMPLETE", 0,
156 {0x00001000, 12,
"INIT",
"INIT", 0,
159 VALUES{
"Deasserted",
"Asserted", 0}},
160 {0x00002000, 13,
"DONE_released",
"RELEASE_DONE", 0,
163 VALUES{
"DrivenLow",
"Released", 0}},
164 {0x00004000, 14,
"DONE",
"DONE", 0,
167 VALUES{
"NotDone",
"Done", 0}},
168 {0x00008000, 15,
"ID_error",
"ID_ERROR", 0,
171 VALUES{
"NoError",
"Error", 0}},
172 {0x00010000, 16,
"Decrypt_error",
"DEC_ERROR", 0,
175 VALUES{
"NoError",
"Error", 0}},
185 {0x00000001, 0,
"GTS_USER_B",
"GTS_USER_B", 0,
188 VALUES{
"IoDisabled",
"IoActive", 0}},
189 {0x00000008, 3,
"Persist",
"PERSIST", 0,
193 {0x00000030, 4,
"Security",
"SBITS", 0,
197 VALUES{
"None",
"Level1",
"Level2",
"Level2", 0}},
198 {0x00000100, 8,
"GLUTMASK",
"GLUTMASK", 0,
203 VALUES{
"Masked",
"Dynamic", 0}},
204 {0x40000000, 30,
"ICAP_sel",
"ICAP_SEL", 0,
207 VALUES{
"Top",
"Bottom", 0}},
213 {0x00000001, 0,
"GTS_USER_B",
"GTS_USER_B", 0,
VALUES{
"Protected",
"Writable", 0}},
214 {0x00000008, 3,
"Persist",
"PERSIST", 0,
VALUES{
"Protected",
"Writable", 0}},
215 {0x00000080, 4,
"Security",
"SBITS", 0,
216 VALUES{
"Protected",
"[UNKNOWN 1]",
"[UNKNOWN 2]",
"Writable", 0}},
217 {0x00000100, 8,
"GLUTMASK",
"GLUTMASK", 0,
VALUES{
"Protected",
"Writable", 0}},
218 {0x40000000, 30,
"ICAP_sel",
"ICAP_SEL", 0,
VALUES{
"Protected",
"Writable", 0}},
233 for(
uint32_t field = 0; subfields[field].
mMask != 0; field++) {
234 const Subfield& subfield = subfields[field];
237 const char** ptr = subfield.
mValues;
238 for(
uint32_t i = 0; *ptr != 0; i++, ptr++) {
239 if(inSetting == *ptr)
return (i << subfield.
mShift) & subfield.
mMask;
257 #ifndef GENERATE_STATIC_DEVICE_INFO
278 using namespace torc::common;
321 typedef std::map<TileTypeIndex, std::string> TileTypeIndexToName;
322 typedef std::map<std::string, TileTypeIndex> TileTypeNameToIndex;
323 TileTypeIndexToName tileTypeIndexToName;
324 TileTypeNameToIndex tileTypeNameToIndex;
326 for(TileTypeIndex tileTypeIndex(0); tileTypeIndex < tileTypeCount; tileTypeIndex++) {
328 tileTypeIndexToName[tileTypeIndex] = tileTypeName;
329 tileTypeNameToIndex[tileTypeName] = tileTypeIndex;
336 columnTypes.resize(colCount);
339 for(TileCol col; col < colCount; col++) {
342 TileTypeIndexToColumnType::iterator ttwp = ttwe;
343 for(TileRow row; row < rowCount; row++) {
355 columnTypes[col] =
static_cast<EColumnType>(ttwp->second);
361 if(blockType == 2)
break;
366 std::fstream tilemapStream(generatedMap.string().c_str(), std::ios::out);
367 for(TileRow row; row < rowCount; row++) {
368 for(TileCol col; col < colCount; col++) {
373 if(col + 1 < colCount) tilemapStream <<
",";
375 tilemapStream << std::endl;
377 tilemapStream.close();
380 setDeviceInfo(DeviceInfo(tileCount, rowCount, colCount, columnTypes));
398 bool blockUsed =
false;
399 for(
uint32_t half = 0; half < 2; half++) {
400 for(
uint32_t farRow = 0; farRow < farRowCount; farRow++) {
410 for(
uint32_t farMinor = 0; farMinor < width; farMinor++) {
412 farRow, farMajor, farMinor);
416 blockFrameIndexBounds++;
424 if(farRow == 0 && half == 0) {
431 if(col == finalColumn) {
441 if(col == finalColumn)
453 if(debug) std::cout <<
"Last frame index: [" << i <<
", " << frameIndex
465 std::cout <<
"Bit Value at index: (" << i <<
", " << j <<
") : " <<
mBitColumnIndexes[i][j] << std::endl;
467 std::cout <<
"Xdl Value at index: (" << i <<
", " << k <<
") : " <<
mXdlColumnIndexes[i][k] << std::endl;
503 packets.push_back(dummy);
505 packets.push_back(nop);
508 packets.push_back(nop);
509 packets.push_back(nop);
528 packets.push_back(nop);
547 packets.insert(packets.end(), 1150, nop);
568 packets.push_back(nop);
602 packets.push_back(nop);
605 packets.insert(packets.end(), 100, nop);
608 packets.push_back(nop);
611 packets.push_back(nop);
617 packets.push_back(nop);
638 packets.insert(packets.end(), 16, nop);
668 packets.push_back(dummy);
670 packets.push_back(nop);
673 packets.push_back(nop);
674 packets.push_back(nop);
695 packets.push_back(nop);
698 packets.insert(packets.end(), 4, nop);
701 packets.push_back(nop);
729 packets.push_back(nop);
733 packets.insert(packets.end(), 101, nop);
738 packets.push_back(nop);
741 packets.push_back(nop);
748 packets.insert(packets.end(), 4, nop);
750 packets.insert(packets.end(), 1, nop);
757 boost::shared_array<uint32_t> frameWords;
759 Virtex4::iterator p = begin();
760 Virtex4::iterator e = end();
783 int32_t bitColumnIndex[inBlockCount];
784 int32_t bitColumnBound[inBlockCount];
785 for(
uint32_t i = 0; i < inBlockCount; i++) {
796 for(
uint32_t i = 0; i < inBlockCount; i++) {
797 int startIndex = bitColumnIndex[i];
798 for(
int j = 0; j < bitColumnBound[i]; j++)
809 int32_t xdlColumnIndex[inBlockCount];
810 int32_t xdlColumnBound[inBlockCount];
811 for(
uint32_t i = 0; i < inBlockCount; i++) {
825 for(
uint32_t i = 0; i < inBlockCount; i++) {
826 int startIndex = xdlColumnIndex[i];
827 for(
int j = 0; j < xdlColumnBound[i]; j++)
ColumnDefVector mColumnDefs
Column type widths.
static const char * sOpcodeName[eOpcodeCount]
Packet opcode names.
virtual VirtexPacketVector generatePartialBitstreamPrefix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream prefix.
Encapsulation of a tile row in an unsigned 16-bit integer.
EFarTopBottom
Frame Address Register top and bottom constants.
virtual uint32_t getFrameRowCount(void) const
Return the number of frame rows for the current device.
TileTypeNameToColumnType mTileTypeNameToColumnType
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.
std::map< uint32_t, uint32_t > mXdlColumnToBitColumn
Map of XDL column indexes to bitstream column indexes.
ERegister
Configuration register enumeration.
Encapsulation of a tile column in an unsigned 16-bit integer.
Device database, including complete wiring and logic support.
FrameIndexToAddress mFrameIndexToAddress
Map of frame indexes to frame addresses.
TileTypeCount getTileTypeCount(void) const
Returns the tile type count for this device.
Header for the Virtex4 class.
TileRow getRowCount(void) const
Returns the row count for this device.
EColumnType
Major column types.
virtual uint32_t getRowPadFrames(void) const
Return the number of pad frames after each row.
Header for the DirectoryTree class.
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally only useful for int...
VirtexFrameBlocks mFrameBlocks
Input Frame blocks.
virtual VirtexPacketVector generatePartialBitstreamSuffix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream suffix.
uint16_t getRowCount(void) const
Returns the row count.
Frame< uint32_t > VirtexFrame
Virtex frame type.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
VirtexFrameBlocks getXdlFrames(uint32_t inBlockCount, uint32_t inXdlCol, uint32_t inFrameRow=0)
Returns frames for queried xdl coordinates.
TileTypeIndexToColumnType mTileTypeIndexToColumnType
virtual VirtexPacketVector generateFullBitstreamSuffix(void)
Return a packet vector with the full bitstream suffix.
Static device information class for Xilinx bitstreams. This class facilitates the creation of frame ...
static const char * sPacketTypeName[ePacketTypeCount]
Packet type names.
uint16_t getColCount(void) const
Returns the column count.
VirtexFrameBlocks getBitstreamFrames(uint32_t inBlockCount, uint32_t inBitCol, uint32_t inFrameRow=0)
Returns frames for queried bitstream coordinates.
static const char * sCommandName[eCommandCount]
Configuration command names.
TileCount getTileCount(void) const
Returns the tile count for this device.
EDevice mDevice
Bitstream device enumeration.
static const Subfield sCTL[]
Control Register (CTL) subfields.
DEPRECATED void initializeFullFrameBlocks(void)
Loads full bitstream frames into block data structure.
uint32_t mFrameRowCount
Number of frame rows.
uint32_t mBlockFrameIndexBounds[Virtex4::eFarBlockTypeCount]
Array to hold frame index boundaries for blocks.
uint32_t mShift
The subfield LSB position.
static const char * sRegisterName[eRegisterCount]
Configuration register names.
const char * mConfigGuideName
The subfield name documented in the configuration guide.
boost::uint32_t uint32_t
Imported type name.
VirtexFrame::word_t word_t
FrameSet word type.
static const Subfield sSTAT[]
Status Register (STAT) subfields.
uint32_t mMask
The subfield bit mask.
FrameAddressToIndex mFrameAddressToIndex
Map of frame addressee to frame indexes.
virtual uint32_t getFrameLength(void) const
Return the frame length for the current device.
EFarBlockType
Frame Address Register block type constants.
DeviceInfo mDeviceInfo
Device information.
Tile map, tile type, and wire information for the family and device.
FrameSet< FRAME_TYPE > mBlock[Bitstream::eBlockTypeCount]
FrameSets for each of the eight block types.
Encapsulation of a tile count in an unsigned 32-bit integer.
Encapsulation of a tile within a device tile map.
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.
const char * getTileTypeName(TileTypeIndex inTileTypeIndex) const
Returns the tile type name for the given tile type index.
const ColumnTypeVector & getColumnTypes(void) const
Returns the column type vector.
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
IndexVector mBitColumnIndexes[Virtex4::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
static const Subfield sMASK[]
Control Mask Register (MASK) subfields.
boost::shared_ptr< VirtexFrame > FrameSharedPtr
Shared pointer encapsulation of a Frame.
std::vector< VirtexPacket > VirtexPacketVector
Vector of Virtex packets.
static VirtexPacket makeType1Write(uint32_t inAddress, uint32_t inWord)
Construct a type 1 write packet.
const char * mBitgenName
The subfield name documented in bitgen.
IndexVector mXdlColumnIndexes[Virtex4::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
static const boost::filesystem::path & getWorkingPath(void)
Returns the absolute path to the working directory.
Encapsulation of a tile type count in an unsigned 16-bit integer.
const WordSharedArray getWords(void) const
brief Returns the raw packet words, including the header word.
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.
TileCol getColCount(void) const
Returns the column count for this device.
Encapsulation of a tile type index in an unsigned 16-bit integer.
static const Subfield sCOR[]
Configuration Options Register (COR) subfields.
boost::uint16_t uint16_t
Imported type name.
Header for the DDB class.
FrameBlocks< VirtexFrame > VirtexFrameBlocks
Virtex frame blocks type.
Template base for encapsulated integers, to enforce strong typing.
void setDeviceInfo(const DeviceInfo &rhs)
Assign static device information for the current bitstream.
Bitstream packet for Virtex class architectures.
static uint32_t makeHeader(EPacketType inType, EOpcode inOpcode, uint32_t inAddress, uint32_t inCount)
Construct a packet header.
boost::uint32_t uint32_t
Imported type name.
const char ** mValues
The allowable subfield values.
virtual VirtexPacketVector generateFullBitstreamPrefix(void)
Return a packet vector with the full bitstream prefix.
TileIndex getTileIndex(TileRow inRow, TileCol inCol) const
Returns the tile index for the given [row,column] pair.
WORD_TYPE word_t
Frame word type.
Device database types for Xilinx architectures.