32 "[UNKNOWN TYPE 0]",
"TYPE1",
"TYPE2",
"[UNKNOWN TYPE 3]",
"[UNKNOWN TYPE 4]",
33 "[UNKNOWN TYPE 5]",
"[UNKNOWN TYPE 6]",
"[UNKNOWN TYPE 7]"
37 "NOP",
"READ",
"WRITE",
"RESERVED"
41 "CRC",
"FAR",
"FDRI",
"FDRO",
"CMD",
"CTL",
"MASK",
"STAT",
"LOUT",
"COR",
"MFWR",
"FLR",
42 "[UNKNOWN_REGISTER 12]",
"[UNKNOWN_REGISTER 13]",
"IDCODE"
46 "NULL",
"WCFG",
"MFWR",
"LFRM",
"RCFG",
"START",
"RCAP",
"RCRC",
"AGHIGH",
"SWITCH",
47 "GRESTORE",
"SHUTDOWN",
"GCAPTURE",
"DESYNCH"
50 #define VALUES (const char*[])
54 {0x00000007, 0,
"GWE_cycle",
"GWE_CYCLE", 5,
57 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
58 {0x00000038, 3,
"GTS_cycle",
"GTS_CYCLE", 4,
61 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
62 {0x000001c0, 6,
"LCK_cycle",
"LOCK_CYCLE", 7,
65 VALUES{
"1",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"NoWait", 0}},
66 {0x00000E00, 9,
"Match_cycle",
"MATCH_CYCLE", 7,
69 VALUES{
"1",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"NoWait", 0}},
70 {0x00007000, 12,
"DONE_cycle",
"DONE_CYCLE", 3,
73 VALUES{
"[UNDEFINED 0]",
"2",
"3",
"4",
"5",
"6",
"[UNDEFINED 6]",
"[UNDEFINED 7]", 0}},
74 {0x00018000, 15,
"StartupClk",
"SSCLKSRC", 0,
77 VALUES{
"Cclk",
"UserClk",
"JtagClk",
"JtagClk", 0}},
78 {0x00780000, 19,
"ConfigRate",
"OSCFSEL", 0,
82 "[UNKNOWN 0]",
"[UNKNOWN 1]",
"[UNKNOWN 2]",
"[UNKNOWN 3]",
83 "[UNKNOWN 4]",
"[UNKNOWN 5]",
"[UNKNOWN 6]",
"[UNKNOWN 7]",
84 "[UNKNOWN 8]",
"[UNKNOWN 9]",
"[UNKNOWN 10]",
"[UNKNOWN 11]",
85 "[UNKNOWN 12]",
"[UNKNOWN 13]",
"[UNKNOWN 14]",
"[UNKNOWN 15]",
87 {0x00800000, 23,
"Capture",
"SINGLE", 0,
90 VALUES{
"Continuous",
"OneShot", 0}},
91 {0x01000000, 24,
"DriveDone",
"DRIVE_DONE", 0,
95 {0x02000000, 25,
"DonePipe",
"DONE_PIPE", 0,
99 {0x20000000, 29,
"CRC",
"CRC_BYPASS", 0,
102 VALUES{
"Enable",
"Disable", 0}},
109 {0x00000001, 0,
"CRC_error",
"CRC_ERROR", 0,
113 {0x00000004, 2,
"DCM_locked",
"DCM_LOCK", 0,
117 {0x00000008, 3,
"DCI_matched",
"DCI_MATCH", 0,
121 {0x00000010, 4,
"IN_error",
"IN_ERROR", 0,
125 {0x00000020, 5,
"GTS_CFG",
"GTS_CFG_B", 0,
128 VALUES{
"IoDisabled",
"IoEnabled", 0}},
129 {0x00000040, 6,
"GWE",
"GWE", 0,
133 VALUES{
"WriteDisabled",
"WriteEnabled", 0}},
134 {0x00000080, 7,
"GHIGH_B",
"GHIGH_B", 0,
137 VALUES{
"InterconnectDisabled",
"InterconnectEnabled", 0}},
138 {0x00000700, 8,
"Mode",
"MODE", 0,
141 VALUES{
"MasterSerial",
"SlaveSelectMap32",
"[UNDEFINED 2]",
"MasterSelectMap",
142 "[UNDEFINED 3]",
"JTAG",
"SlaveSelectMap8",
"[UNDEFINED 6]",
"SlaveSerial", 0}},
143 {0x00000800, 11,
"INIT",
"INIT", 0,
146 VALUES{
"Deasserted",
"Asserted", 0}},
147 {0x00001000, 12,
"Done",
"DONE", 0,
150 VALUES{
"Deasserted",
"Asserted", 0}},
151 {0x00002000, 13,
"ID_error",
"ID_ERROR", 0,
160 {0x00000001, 0,
"GTS_USER_B",
"GTS_USER_B", 0,
163 VALUES{
"IoDisabled",
"IoActive", 0}},
164 {0x00000008, 3,
"Persist",
"PERSIST", 0,
168 {0x00000030, 4,
"Security",
"SBITS", 0,
172 VALUES{
"None",
"Level1",
"Level2",
"Level2", 0}},
178 {0x00000001, 0,
"GTS_USER_B",
"GTS_USER_B", 0,
VALUES{
"Protected",
"Writable", 0}},
179 {0x00000008, 3,
"Persist",
"PERSIST", 0,
VALUES{
"Protected",
"Writable", 0}},
180 {0x00000080, 4,
"Security",
"SBITS", 0,
181 VALUES{
"Protected",
"[UNKNOWN 1]",
"[UNKNOWN 2]",
"Writable", 0}},
188 const Subfield* subfields;
196 for(
uint32_t field = 0; subfields[field].mMask != 0; field++) {
197 const Subfield& subfield = subfields[field];
198 if(inSubfield != subfield.mBitgenName && inSubfield != subfield.mConfigGuideName)
200 const char** ptr = subfield.
mValues;
201 for(
uint32_t i = 0; *ptr != 0; i++, ptr++) {
202 if(inSetting == *ptr)
return (i << subfield.mShift) & subfield.mMask;
210 #ifndef GENERATE_STATIC_DEVICE_INFO
219 using namespace torc::common;
249 typedef std::map<TileTypeIndex, std::string> TileTypeIndexToName;
250 typedef std::map<std::string, TileTypeIndex> TileTypeNameToIndex;
251 TileTypeIndexToName tileTypeIndexToName;
252 TileTypeNameToIndex tileTypeNameToIndex;
254 for(TileTypeIndex tileTypeIndex(0); tileTypeIndex < tileTypeCount; tileTypeIndex++) {
256 tileTypeIndexToName[tileTypeIndex] = tileTypeName;
257 tileTypeNameToIndex[tileTypeName] = tileTypeIndex;
264 columnTypes.resize(colCount);
267 for(TileCol col; col < colCount; col++) {
270 TileTypeIndexToColumnType::iterator ttwp = ttwe;
272 for(TileRow row(8); row < rowCount-6; row++) {
284 columnTypes[col] =
static_cast<EColumnType>(ttwp->second);
290 if(blockType == 2)
break;
295 std::fstream tilemapStream(generatedMap.string().c_str(), std::ios::out);
296 for(TileRow row; row < rowCount; row++) {
297 for(TileCol col; col < colCount; col++) {
302 if(col + 1 < colCount) tilemapStream <<
",";
304 tilemapStream << std::endl;
306 tilemapStream.close();
309 setDeviceInfo(DeviceInfo(tileCount, rowCount, colCount, columnTypes));
317 bool clockColumn =
true;
335 for(
uint32_t farMinor = 0; farMinor < width; farMinor++) {
341 if(width > 0) farMajor++;
353 for(
uint32_t farMinor = 0; farMinor < width; farMinor++) {
359 if(width > 0) farMajor++;
379 std::cout <<
"Bit Value at index: (" << i <<
", " << j <<
") : " <<
mBitColumnIndexes[i][j] << std::endl;
381 std::cout <<
"Xdl Value at index: (" << i <<
", " << k <<
") : " <<
mXdlColumnIndexes[i][k] << std::endl;
EColumnType
Major column types.
static const char * sOpcodeName[eOpcodeCount]
Packet opcode names.
ColumnDefVector mColumnDefs
Column type widths.
static const Subfield sMASK[]
Control Mask Register (MASK) subfields.
Encapsulation of a tile row in an unsigned 16-bit integer.
FrameIndexToAddress mFrameIndexToAddress
Map of frame indexes to frame addresses.
FrameAddressToIndex mFrameAddressToIndex
Map of frame addressee to frame indexes.
TileTypeNameToColumnType mTileTypeNameToColumnType
static const char * sRegisterName[eRegisterCount]
Configuration register names.
Encapsulation of a tile column in an unsigned 16-bit integer.
Device database, including complete wiring and logic support.
TileTypeCount getTileTypeCount(void) const
Returns the tile type count for this device.
TileRow getRowCount(void) const
Returns the row count for this device.
static const char * sCommandName[eCommandCount]
Configuration command names.
Header for the DirectoryTree class.
static const Subfield sCTL[]
Control Register (CTL) subfields.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
static const char * sPacketTypeName[ePacketTypeCount]
Packet type names.
TileTypeIndexToColumnType mTileTypeIndexToColumnType
Static device information class for Xilinx bitstreams. This class facilitates the creation of frame ...
uint16_t getColCount(void) const
Returns the column count.
TileCount getTileCount(void) const
Returns the tile count for this device.
EDevice mDevice
Bitstream device enumeration.
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally only useful for int...
boost::uint32_t uint32_t
Imported type name.
static const Subfield sCOR[]
Configuration Options Register (COR) subfields.
DeviceInfo mDeviceInfo
Device information.
Tile map, tile type, and wire information for the family and device.
Encapsulation of a tile count in an unsigned 32-bit integer.
Encapsulation of a tile within a device tile map.
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.
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.
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.
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.
static const Subfield sSTAT[]
Status Register (STAT) subfields.
TileCol getColCount(void) const
Returns the column count for this device.
Encapsulation of a tile type index in an unsigned 16-bit integer.
boost::uint16_t uint16_t
Imported type name.
Header for the DDB class.
EFarBlockType
Frame Address Register block type constants.
Template base for encapsulated integers, to enforce strong typing.
Header for the Spartan3E class.
boost::uint32_t uint32_t
Imported type name.
void setDeviceInfo(const DeviceInfo &rhs)
Assign static device information for the current bitstream.
ColumnIndexVector mBitColumnIndexes[Spartan3E::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
const char ** mValues
The allowable subfield values.
ERegister
Configuration register enumeration.
ColumnIndexVector mXdlColumnIndexes[Spartan3E::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
TileIndex getTileIndex(TileRow inRow, TileCol inCol) const
Returns the tile index for the given [row,column] pair.
Device database types for Xilinx architectures.