torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Virtex7.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the Virtex7 class.
18 
19 #ifndef TORC_BITSTREAM_VIRTEX7_HPP
20 #define TORC_BITSTREAM_VIRTEX7_HPP
21 
22 #include <boost/cstdint.hpp>
23 #include <boost/filesystem.hpp>
25 #include <map>
26 
27 namespace torc { namespace architecture { class DDB; } }
28 
29 namespace torc {
30 namespace bitstream {
31 
32 //// To include once the UnitTest is set up
33 namespace bitstream { class Virtex7UnitTest; }
34 namespace bitstream { class Virtex7FarUnitTest; }
35 namespace bitstream { class Zynq7000DebugUnitTest; }
36 namespace bitstream { void testVirtex7Device(const std::string& inDeviceName,
37  const boost::filesystem::path& inWorkingPath); }
38 
39  /// \brief Virtex7 bitstream.
40  class Virtex7 : public VirtexBitstream {
44  friend void torc::bitstream::bitstream::testVirtex7Device(const std::string& inDeviceName,
45  const boost::filesystem::path& inWorkingPath);
46  protected:
47  // typedefs
48  /// \brief Imported type name
49  typedef boost::uint32_t uint32_t;
50  public:
51  // enumerations
52  //
53  /// \brief Configuration register enumeration.
54  /// \see Type 1 Packet Registers: UG470, v1.1, March 28, 2011, Table 5-19.
60  //
61  /// \brief Configuration register enumeration.
62  /// \see Command Register Codes: UG470, v1.1, March 28, 2011, Table 5-21.
68  //
69  /// \brief Frame Address Register subfields.
70  /// \see Frame Address Register Description: UG470, v1.1, March 28 2011, Table 5-20.
71  enum EFar {
74  eFarMaskRow = 0x003e0000, eFarShiftRow = 17,
75  eFarMaskMajor = 0x0001ff80, eFarShiftMajor = 7,
76  eFarMaskMinor = 0x0000007f, eFarShiftMinor = 0
77  };
78  //
79  /// \brief Frame Address Register top and bottom constants.
80  /// \see Frame Address Register Description: UG470, v1.1, March 28, 2011, Table 5-20.
81  enum EFarTopBottom { eFarTop = 0, eFarBottom = 1 };
82  //
83  /// \brief Frame Address Register block type constants.
86  //
87  /// \brief Assorted Constants.
88  /// \see WBSTAR Register Description: UG470, v1.1, March 28, 2011, Table 5-31.
89  enum {
90  eStartAddr = 0x1fffffff,
91  eTimerValue = 0x3fffffff,
92  };
93  //
94  /// \brief Major Column Types.
95  /// \details These are defined and used for internal purposes only, and are not derived
96  /// from any Xilinx documentation.
100  /// \brief Frame length.
101  /// \details Constant frame length of 101 32-bit words for the entire Virtex7 family.
102  /// \see Frame Address Register (00001): UG470, v1.1, March 28, 2011.
103  enum { eFrameLength = 101 };
104  /// \brief Number of pad frames after each frame row.
105  /// \details The configuration controller expects two frames of NOPs after each frame row.
106  enum { eRowPadFrames = 2 };
107  /// \brief Number of rows in a clock region.
108  enum { eClockRegionRows = 52 };
109  protected:
110  // members
111  /// \brief Configuration controller registers.
112  //uint32_t mRegister[eRegisterCount];
113  /// \brief Packet Type names.
114  static const char* sPacketTypeName[ePacketTypeCount];
115  ///\brief Packet Opcode names.
116  static const char* sOpcodeName[eOpcodeCount];
117  ///\brief Configuration Register names.
118  static const char* sRegisterName[eRegisterCount];
119  ///\brief Configuration Command names.
120  static const char* sCommandName[eCommandCount];
121  ///\brief Configurations Options Register 0 (COR) subfields.
122  static const Subfield sCOR0[];
123  ///\brief Configurations Options Register 1 (COR) subfields.
124  static const Subfield sCOR1[];
125  ///\brief Status Register (STAT) subfields.
126  static const Subfield sSTAT[];
127  ///\brief Control Register 0 (CTL) subfields.
128  static const Subfield sCTL0[];
129  ///\brief Control Register 1 (CTL) subfields.
130  static const Subfield sCTL1[];
131  ///\brief Control Mask Register (MASK) subfields.
132  static const Subfield sMASK0[];
133  ///\brief Warm Boot Start Address Register (WBSTAR) subfields.
134  static const Subfield sWBSTAR[];
135  ///\brief Watchdog Timer Register (TIMER) subfields.
136  static const Subfield sTIMER[];
137  ///\brief Boot History Status Register (BOOTSTS) subfields.
138  static const Subfield sBOOTSTS[];
139  ///\brief The number of top bitstream rows.
141  ///\brief The number of bottom bitstream rows.
143  // functions
144  ///\brief Set the number of top and bottom bitstream rows.
145  void setRowCounts (const string& inDeviceName);
146  //string mPrivateDeviceName;
147  public:
148  // constructors
149  ///\brief Basic Constructor.
151 // for(int i = 0; i < eRegisterCount; i++) mRegister[i] =0;
152  for(int i = 0; i < eFarBlockTypeCount; i++) mBlockFrameIndexBounds[i] = 0;
153  // initialize miscellaneous variables
154  mFrameRowCount = 0;
155  // initialize the column type widths for this family
157  mColumnDefs[eColumnTypeEmpty] = ColumnDef("Empty", 0, 0, 0, 0, 0, 0, 0, 0);
158  mColumnDefs[eColumnTypeInt] = ColumnDef("Int", 0, 0, 0, 0, 0, 0, 0, 0);
159  mColumnDefs[eColumnTypeBram] = ColumnDef("Bram", 28,128, 0, 0, 0, 0, 0, 0);
160  mColumnDefs[eColumnTypeCfg] = ColumnDef("Cfg", 36, 0, 0, 0, 0, 0, 0, 0);
161  mColumnDefs[eColumnTypeClb] = ColumnDef("Clb", 36, 0, 0, 0, 0, 0, 0, 0);
162  mColumnDefs[eColumnTypeClock] = ColumnDef("Clock", 30, 0, 0, 0, 0, 0, 0, 0);
163  mColumnDefs[eColumnTypeCmt] = ColumnDef("Cmt", 30, 0, 0, 0, 0, 0, 0, 0);
164  mColumnDefs[eColumnTypeDsp] = ColumnDef("Dsp", 28, 0, 0, 0, 0, 0, 0, 0);
165  mColumnDefs[eColumnTypeGtx] = ColumnDef("Gtx", 32, 0, 0, 0, 0, 0, 0, 0);
166  mColumnDefs[eColumnTypeIoi] = ColumnDef("Ioi", 42, 0, 0, 0, 0, 0, 0, 0);
167  mColumnDefs[eColumnTypeVframe] = ColumnDef("Vframe", 30, 0, 0, 0, 0, 0, 0, 0);
168  mColumnDefs[eColumnTypePss] = ColumnDef("Pss", 0, 0, 0, 0, 0, 0, 0, 0);
169  // map type type names to column types
174  mTileTypeNameToColumnType["CFG_CENTER_TOP"] = eColumnTypeCfg;
175  mTileTypeNameToColumnType["CFG_CENTER_BOT"] = eColumnTypeCfg;
176  mTileTypeNameToColumnType["MONITOR_TOP_PELE1"] = eColumnTypeCfg;
181  mTileTypeNameToColumnType["INT_FEEDTHRU_1"] = eColumnTypeClb;
188  mTileTypeNameToColumnType["GTP_COMMON_MID_LEFT"] = eColumnTypeGtx;
189  mTileTypeNameToColumnType["GTP_COMMON_MID_RIGHT"] = eColumnTypeGtx;
197  }
198  // functions
199  ///\brief Return the masked value for a subfield of the specified register.
200  static uint32_t makeSubfield(ERegister inRegister, const std::string& inSubfield,
201  const std::string& inSetting);
202  ///\brief Initialize the Device Information.
203  virtual void initializeDeviceInfo(const std::string& inDeviceName);
204  ///\brief Initialize the maps between frame indexes and frame addresses.
205  ///\detail This is generally useful only for internal purposes.
206  virtual void initializeFrameMaps(void);
207  /// \brief Read frame data into the frame blocks structure.
208  virtual void readFramePackets(void) {
209  readFramePackets4567<Virtex7>(mBlockFrameIndexBounds, mFrameAddressToIndex,
211  }
212 /* no longer needed
213  /// \brief Update the bitstream packets to include full frame data.
214  virtual void updateFullBitstreamPackets(void);
215  /// \brief Update the bitstream packets to include partial frame data.
216  /// \param inBitstreamType The type of partial bitstream to generate: active or shutdown.
217  /// \param inFrameInclusion The type of frames to include: only dirty frames or all frames.
218  virtual void updatePartialBitstreamPackets(EBitstreamType inBitstreamType,
219  EFrameInclude inFrameInclusion);
220  /// \brief Discard existing packets and generate bitstream packets for a full bitstream.
221  virtual void generateFullBitstreamPackets(void);
222  /// \brief Discard existing packets and generate bitstream packets for a partial bitstream.
223  /// \param inBitstreamType The type of partial bitstream to generate: active or shutdown.
224  /// \param inFrameInclusion The type of frames to include: only dirty frames or all frames.
225  virtual void generatePartialBitstreamPackets(EBitstreamType inBitstreamType,
226  EFrameInclude inFrameInclusion);
227 */
228  /// \brief Discard the existing frame packets and return an iterator to the start position.
229  virtual VirtexPacketVector::iterator deleteFramePackets(void) {
230  return deleteFramePackets4567<Virtex7>();
231  }
232  /// \brief Return a packet vector with full frame data.
234  return generateFullBitstreamPackets4567<Virtex7>(mBlockFrameIndexBounds);
235  }
236  /// \brief Return a packet vector with the full bitstream prefix.
238  /// \brief Return a packet vector with the full bitstream suffix.
240  /// \brief Return a packet vector with partial frame data.
241  /// \param inFrameInclusion The type of frames to include: only dirty frames or all frames.
243  return generatePartialBitstreamPackets4567<Virtex7>(inFrameInclusion,
245  }
246  /// \brief Return a packet vector with the partial bitstream prefix.
247  /// \param inBitstreamType The type of partial bitstream to generate: active or shutdown.
249  /// \brief Return a packet vector with the partial bitstream suffix.
250  /// \param inBitstreamType The type of partial bitstream to generate: active or shutdown.
252  /// \brief Returns frames for specified bitstream tile column.
253  /// \parameter inTopBottom The top or bottom half of the device: eFarTop or eFarBottom.
254  /// \parameter inFrameRow The frame or clock region row in the area specified by
255  /// inTopBottom.
256  /// \parameter inBitCol The bitstream column coordinate (different than the XDL column
257  /// coordinate).
258  /// \parameter inBlockCount The highest block type requested (8 for Xilinx architectures).
260  uint32_t inBitCol, uint32_t inBlockCount = eBlockTypeCount);
261  /// \brief Returns frames for specified bitstream tile column.
262  /// \parameter inBitRow The bitstream row coordinate (same as the XDL row coordinate).
263  /// \parameter inBitCol The bitstream column coordinate (different than the XDL column
264  /// coordinate).
265  /// \parameter outBeginBit The bit index of the beginning of the requested tile.
266  /// \parameter outEndBit The bit index of the end of the requested tile.
267  /// \parameter inBlockCount The highest block type requested (8 for Xilinx architectures).
269  uint32_t& outBeginBit, uint32_t& outEndBit, uint32_t inBlockCount = eBlockTypeCount);
270  /// \brief Returns frames for specified XDL tile coordinates.
271  /// \parameter inXldRow The XDL row coordinate.
272  /// \parameter inXdlCol The XDL column coordinate.
273  /// \parameter outBeginBit The bit index of the beginning of the requested tile.
274  /// \parameter outEndBit The bit index of the end of the requested tile.
275  /// \parameter inBlockCount The highest block type requested (8 for Xilinx architectures).
276  VirtexFrameBlocks getXdlFrames(uint32_t inXdlRow, uint32_t inXdlCol, uint32_t& outBeginBit,
277  uint32_t& outEndBit, uint32_t inBlockCount = eBlockTypeCount);
278  /// \brief Returns the primary column corresponding to the given tile.
279  /// \detail If the specified tile falls in an INT_L or INT_R tile, this function returns
280  /// the index of the corresponding primary XDL column.
281  /// \parameter inXdlCol The XDL column coordinate.
282  uint32_t getPrimaryXdlColumn(uint32_t inXdlRow, uint32_t inXdlCol);
283  /// \brief Split the given frame index into the base index of the major frame and the index
284  /// of the minor frame.
285  virtual void splitFrameIndex(uint32_t inFrameIndex, uint32_t& outMajorIndex,
286  uint32_t& outMinorIndex) {
287  outMinorIndex = mFrameIndexToAddress[inFrameIndex].mMinor;
288  outMajorIndex = inFrameIndex - outMinorIndex;
289  }
290  // deprecation macro
291  /// \cond OMIT_FROM_DOXYGEN
292  // Doxygen gets confused by the explicit "__attribute__ ((deprecated))" so we used this
293  #define DEPRECATED __attribute__ ((deprecated))
294  /// \endcond
295  // deprecated functions
296  /// \brief Loads full bitstream frames into block data structure.
297  DEPRECATED void initializeFullFrameBlocks(void);
298  /// \brief Transfers frame block data into the full bitstream frame packet
299  DEPRECATED void updateFullFrameBlocks(void);
300  // accessors
301  /// \brief Return the number of frame rows for the current device.
302  virtual uint32_t getFrameRowCount(void) const { return mFrameRowCount; }
303  /// \brief Return the frame length for the current device.
304  virtual uint32_t getFrameLength(void) const { return eFrameLength; }
305  /// \brief Return the number of pad frames after each row.
306  virtual uint32_t getRowPadFrames(void) const { return eRowPadFrames; }
307  // inserters
308  /// \brief Insert the bitstream header into and output stream.
309  friend std::ostream& operator<< (std::ostream& os, const Virtex7& rhs);
310  // inner classes
311  class FrameAddress{
312  protected:
313  void assign(uint32_t inAddress) {
316  mRow = (inAddress & eFarMaskRow) >> eFarShiftRow;
317  mMajor = (inAddress & eFarMaskMajor) >> eFarShiftMajor;
318  mMinor = (inAddress & eFarMaskMinor) >> eFarShiftMinor;
319  }
320  public:
322  mMajor(0), mMinor(0) {}
323  FrameAddress(EFarTopBottom inTopBottom, EFarBlockType inBlockType, uint32_t inRow,
324  uint32_t inMajor, uint32_t inMinor) : mTopBottom(inTopBottom),
325  mBlockType(inBlockType), mRow(inRow), mMajor(inMajor), mMinor(inMinor) {}
326  FrameAddress(uint32_t inAddress) { assign(inAddress); }
332  bool operator == (const FrameAddress& rhs) const {
333  return mTopBottom == rhs.mTopBottom && mBlockType == rhs.mBlockType &&
334  mRow == rhs.mRow &&mMajor == rhs.mMajor && mMinor == rhs.mMinor;
335  }
336  bool operator< (const FrameAddress& rhs) const {
337  int diffBlockType = mBlockType - rhs.mBlockType;
338  if(diffBlockType) return diffBlockType < 0;
339  int diffTopBottom = mTopBottom - rhs.mTopBottom;
340  if(diffTopBottom) return diffTopBottom < 0;
341  int diffRow = mRow - rhs.mRow;
342  if(diffRow) return diffRow < 0;
343  int diffMajor = mMajor - rhs.mMajor;
344  if(diffMajor) return diffMajor < 0;
345  return mMinor < rhs.mMinor;
346  }
347  operator uint32_t (void) const {
348  return
351  ((mRow << eFarShiftRow) & eFarMaskRow) |
354  }
355  friend std::ostream& operator<< (std::ostream& os, const Virtex7::FrameAddress& rhs) {
356  return os << (rhs.mTopBottom == Virtex7::eFarTop ? 'T' : 'B')
357  << "" << rhs.mBlockType << "(" << rhs.mRow << "," << rhs.mMajor << "."
358  << rhs.mMinor << ")";
359  }
360  };
361  protected:
362  // inner classes
363  /// \brief Frame row designator: top/bottom flag and row index.
365  /// \brief Top/bottom flag.
367  /// \brief Frame row.
369  /// \brief Base XDL row.
371  /// \brief Offset for this row into the column type vector.
373  /// \brief Default constructor.
375  mColumnVectorBase(0) {}
376  /// \brief Constructor.
377  FrameRowDesignator(EFarTopBottom inTopBottom, uint32_t inFrameRow,
378  uint32_t inXdlBaseRow, uint32_t inColumnVectorBase) : mTopBottom(inTopBottom),
379  mFrameRow(inFrameRow), mXdlBaseRow(inXdlBaseRow),
380  mColumnVectorBase(inColumnVectorBase) {}
381  /// \brief Comparison operator (for map operations).
382  bool operator< (const FrameRowDesignator& rhs) const {
383  if(mTopBottom < rhs.mTopBottom) return true;
384  return mFrameRow < rhs.mFrameRow;
385  }
386  };
387  // typedefs
388  /// \brief Map from frame index to frame address.
389  typedef std::map<uint32_t, Virtex7::FrameAddress> FrameIndexToAddress;
390  /// \brief Map from frame address to frame index.
391  typedef std::map<Virtex7::FrameAddress, uint32_t> FrameAddressToIndex;
392  /// \brief Vector of frame indexes.
393  typedef std::vector<uint32_t> IndexVector;
394  /// \brief Map from bitstream column index to XDL column index.
395  typedef std::map<uint32_t, uint32_t> BitColumnToXdlColumn;
396  /// \brief Vector of FrameRowDesignator entries.
397  typedef std::vector<FrameRowDesignator> FrameRowDesignatorVector;
398  // functions
399  /// \brief Returns frames for queried bitstream coordinates
400  /// \parameter inSerialFrameRow The frame row as indexed starting from top row zero and
401  /// incrementing toward the top of the device, and then continuing from bottom row zero
402  /// and incrementing toward the bottom of the device.
403  VirtexFrameBlocks getBitstreamFrames(uint32_t inSerialFrameRow, uint32_t inBitCol,
404  uint32_t inBlockCount = eBlockTypeCount);
405  /// \brief Returns frames for queried XDL coordinates
406  /// \parameter inSerialFrameRow The frame row as indexed starting from top row zero and
407  /// incrementing toward the top of the device, and then continuing from bottom row zero
408  /// and incrementing toward the bottom of the device.
409  VirtexFrameBlocks getXdlFrames(uint32_t inSerialFrameRow, uint32_t inColumnVectorBase,
410  uint32_t inXdlCol, uint32_t inBlockCount = eBlockTypeCount);
411  // members
412  /// \brief Map of frame indexes to frame addresses.
414  /// \brief Map of frame addresses to frame indexes.
416  /// \brief Vector to store frame indexes of XDL columns.
418  /// \brief Vector to store frame indexes of Bitstream columns.
420  /// \brief Array to hold frame index boundaries for blocks.
422  /// \brief Map of bitstream column indexes to XDL column indexes.
424  /// \brief Number of frame rows.
426  /// \brief Vector of FrameRowDesignator entries for each XDL row.
428  };
429 
430 } // namespace bitstream
431 } // namespace torc
432 
433 
434 #endif // TORC_BITSTREAM_VIRTEX7_HPP
ColumnDefVector mColumnDefs
Column type widths.
Virtex-class bitstream.
TileTypeNameToColumnType mTileTypeNameToColumnType
virtual VirtexPacketVector generatePartialBitstreamSuffix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream suffix.
Definition: Virtex7.cpp:1141
virtual VirtexPacketVector generateFullBitstreamSuffix(void)
Return a packet vector with the full bitstream suffix.
Definition: Virtex7.cpp:980
Header for the VirtexBitstream class.
BitColumnToXdlColumn mBitColumnToXdlColumn
Map of bitstream column indexes to XDL column indexes.
Definition: Virtex7.hpp:423
FrameRowDesignator(EFarTopBottom inTopBottom, uint32_t inFrameRow, uint32_t inXdlBaseRow, uint32_t inColumnVectorBase)
Constructor.
Definition: Virtex7.hpp:377
FrameRowDesignatorVector mXdlRowToFrameRowDesignator
Vector of FrameRowDesignator entries for each XDL row.
Definition: Virtex7.hpp:427
EFarTopBottom mTopBottom
Top/bottom flag.
Definition: Virtex7.hpp:366
Frame row designator: top/bottom flag and row index.
Definition: Virtex7.hpp:364
virtual void readFramePackets(void)
Read frame data into the frame blocks structure.
Definition: Virtex7.hpp:208
friend std::ostream & operator<<(std::ostream &os, const Virtex7::FrameAddress &rhs)
Definition: Virtex7.hpp:355
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally useful only for int...
Definition: Virtex7.cpp:710
virtual VirtexPacketVector generateFullBitstreamPrefix(void)
Return a packet vector with the full bitstream prefix.
Definition: Virtex7.cpp:847
FrameRowDesignator(void)
Default constructor.
Definition: Virtex7.hpp:374
friend class torc::bitstream::bitstream::Zynq7000DebugUnitTest
Definition: Virtex7.hpp:43
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.
Definition: Virtex7.hpp:391
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 ...
Definition: Virtex7.cpp:1349
boost::uint32_t uint32_t
Imported type name.
Definition: Virtex7.hpp:49
friend class torc::bitstream::bitstream::Virtex7FarUnitTest
Definition: Virtex7.hpp:42
ECommand
Configuration register enumeration.
Definition: Virtex7.hpp:63
virtual VirtexPacketVector::iterator deleteFramePackets(void)
Discard the existing frame packets and return an iterator to the start position.
Definition: Virtex7.hpp:229
virtual uint32_t getFrameLength(void) const
Return the frame length for the current device.
Definition: Virtex7.hpp:304
Bitstream column definition for Xilinx bitstreams. For every block type 0 through 8...
Definition: DeviceInfo.hpp:35
virtual VirtexPacketVector generatePartialBitstreamPackets(EFrameInclude inFrameInclusion)
Return a packet vector with partial frame data.
Definition: Virtex7.hpp:242
static const Subfield sMASK0[]
Control Mask Register (MASK) subfields.
Definition: Virtex7.hpp:132
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.
Definition: Virtex7.hpp:126
static const Subfield sBOOTSTS[]
Boot History Status Register (BOOTSTS) subfields.
Definition: Virtex7.hpp:138
EFarBlockType
Frame Address Register block type constants.
Definition: Virtex7.hpp:84
std::string string
ERegister
Configuration register enumeration.
Definition: Virtex7.hpp:55
static const Subfield sTIMER[]
Watchdog Timer Register (TIMER) subfields.
Definition: Virtex7.hpp:136
bool operator<(const FrameAddress &rhs) const
Definition: Virtex7.hpp:336
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).
Definition: Virtex7.cpp:1252
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.
Definition: Virtex7.cpp:361
DEPRECATED void updateFullFrameBlocks(void)
Transfers frame block data into the full bitstream frame packet.
Definition: Virtex7.cpp:1211
DEPRECATED void initializeFullFrameBlocks(void)
Loads full bitstream frames into block data structure.
Definition: Virtex7.cpp:1190
static const Subfield sWBSTAR[]
Warm Boot Start Address Register (WBSTAR) subfields.
Definition: Virtex7.hpp:134
uint32_t mTopRowCount
The number of top bitstream rows.
Definition: Virtex7.hpp:140
FrameAddress(EFarTopBottom inTopBottom, EFarBlockType inBlockType, uint32_t inRow, uint32_t inMajor, uint32_t inMinor)
Definition: Virtex7.hpp:323
FrameIndexToAddress mFrameIndexToAddress
Map of frame indexes to frame addresses.
Definition: Virtex7.hpp:413
static const Subfield sCOR1[]
Configurations Options Register 1 (COR) subfields.
Definition: Virtex7.hpp:124
uint32_t mColumnVectorBase
Offset for this row into the column type vector.
Definition: Virtex7.hpp:372
std::vector< uint32_t > IndexVector
Vector of frame indexes.
Definition: Virtex7.hpp:393
std::map< uint32_t, Virtex7::FrameAddress > FrameIndexToAddress
Map from frame index to frame address.
Definition: Virtex7.hpp:389
EFarTopBottom
Frame Address Register top and bottom constants.
Definition: Virtex7.hpp:81
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.
Definition: Virtex7.hpp:114
static const char * sCommandName[eCommandCount]
Configuration Command names.
Definition: Virtex7.hpp:120
bool operator<(const FrameRowDesignator &rhs) const
Comparison operator (for map operations).
Definition: Virtex7.hpp:382
IndexVector mXdlColumnIndexes[Virtex7::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
Definition: Virtex7.hpp:419
boost::filesystem::path path
uint32_t mFrameRowCount
Number of frame rows.
Definition: Virtex7.hpp:425
void setRowCounts(const string &inDeviceName)
Set the number of top and bottom bitstream rows.
Definition: Virtex7.cpp:670
std::vector< VirtexPacket > VirtexPacketVector
Vector of Virtex packets.
std::map< uint32_t, uint32_t > BitColumnToXdlColumn
Map from bitstream column index to XDL column index.
Definition: Virtex7.hpp:395
static const Subfield sCTL1[]
Control Register 1 (CTL) subfields.
Definition: Virtex7.hpp:130
virtual uint32_t getFrameRowCount(void) const
Return the number of frame rows for the current device.
Definition: Virtex7.hpp:302
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...
Definition: Virtex7.hpp:285
Virtex7 bitstream.
Definition: Virtex7.hpp:40
virtual uint32_t getRowPadFrames(void) const
Return the number of pad frames after each row.
Definition: Virtex7.hpp:306
uint32_t mBottomRowCount
The number of bottom bitstream rows.
Definition: Virtex7.hpp:142
friend class torc::bitstream::bitstream::Virtex7UnitTest
Definition: Virtex7.hpp:41
static const char * sRegisterName[eRegisterCount]
Configuration Register names.
Definition: Virtex7.hpp:118
virtual VirtexPacketVector generatePartialBitstreamPrefix(EBitstreamType inBitstreamType)
Return a packet vector with the partial bitstream prefix.
Definition: Virtex7.cpp:1057
uint32_t mBlockFrameIndexBounds[Virtex7::eFarBlockTypeCount]
Array to hold frame index boundaries for blocks.
Definition: Virtex7.hpp:421
static const Subfield sCTL0[]
Control Register 0 (CTL) subfields.
Definition: Virtex7.hpp:128
EColumnType
Major Column Types.
Definition: Virtex7.hpp:97
EFar
Frame Address Register subfields.
Definition: Virtex7.hpp:71
static const char * sOpcodeName[eOpcodeCount]
Packet Opcode names.
Definition: Virtex7.hpp:116
Virtex7(void)
Basic Constructor.
Definition: Virtex7.hpp:150
std::vector< FrameRowDesignator > FrameRowDesignatorVector
Vector of FrameRowDesignator entries.
Definition: Virtex7.hpp:397
bool operator==(const FrameAddress &rhs) const
Definition: Virtex7.hpp:332
void assign(uint32_t inAddress)
Definition: Virtex7.hpp:313
IndexVector mBitColumnIndexes[Virtex7::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
Definition: Virtex7.hpp:417
static const Subfield sCOR0[]
Configurations Options Register 0 (COR) subfields.
Definition: Virtex7.hpp:122
FrameAddressToIndex mFrameAddressToIndex
Map of frame addresses to frame indexes.
Definition: Virtex7.hpp:415
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...
Definition: Virtex7.cpp:1235
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the Device Information.
Definition: Virtex7.cpp:416
virtual VirtexPacketVector generateFullBitstreamPackets(void)
Return a packet vector with full frame data.
Definition: Virtex7.hpp:233