torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Virtex7Assembler.cpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL: https://svn.east.isi.edu/torc/trunk/src/torc/bitstream/assembler/lut/parser.yy $
3 // $Id: parser.yy 1303 2013-02-25 23:18:16Z nsteiner $
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 
17 
18 namespace torc {
19 namespace bitstream {
20 
21 /// \details Store frame data and bit offset for given tile index
23  const TileInfo& tileInfo = mTiles.getTileInfo(tileIndex);
24 
25  const TileRow &tileRow = tileInfo.getRow();
26  const TileCol &tileCol = tileInfo.getCol();
27 
28 
29  torc::bitstream::Bitstream * bitstreamPtr = mBitstreamPtr.get();
30  torc::bitstream::Virtex7 *virtex7BitStream =
31  dynamic_cast<torc::bitstream::Virtex7 *> (bitstreamPtr);
32 
33  uint32_t bitIndexBegin = 0, bitIndexEnd = 0;
34 
35  uint32_t primaryXdlCol = virtex7BitStream->getPrimaryXdlColumn(tileRow, tileCol);
36 
37  mCurrFrameBlocks = virtex7BitStream->getXdlFrames(tileRow, primaryXdlCol, bitIndexBegin,
39 
40  // Call getXdlFrames with original column to get bit index offset
41  virtex7BitStream->getXdlFrames(tileRow, tileCol, bitIndexBegin,
43  // Each frame covers the full height of clock region which contains many rows of tiles.
44  // The library contains configuration bits only for the first row. So the word index has to
45  // be offset to reach the correct row. The bit index remains same across rows.
46  /// \todo Check for ordering mismatch between this and the library generation code.
47  mCurrWordOffset = 0;
48  if(bitIndexBegin != bitIndexEnd) {
49  mCurrWordOffset = virtex7BitStream->getFrameLength() - (bitIndexEnd >> 5); // eFrameLength is number of words in a frame
50 // mCurrWordOffset = bitIndexBegin >> 5;
51  }
52 }
53 
54 }
55 }
Encapsulation of a tile index in an unsigned 32-bit integer.
const TileCol & getCol(void) const
Returns the column for this tile.
Definition: TileInfo.hpp:96
Encapsulation of a tile row in an unsigned 16-bit integer.
const TileRow & getRow(void) const
Returns the row for this tile.
Definition: TileInfo.hpp:94
Encapsulation of a tile column in an unsigned 16-bit integer.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Definition: Tiles.hpp:137
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
virtual uint32_t getFrameLength(void) const
Return the frame length for the current device.
Definition: Virtex7.hpp:304
torc::bitstream::BitstreamSharedPtr mBitstreamPtr
Definition: Assembler.hpp:316
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
Xilinx bitstream base class.
Encapsulation of a tile within a device tile map.
Definition: TileInfo.hpp:33
Virtex7 bitstream.
Definition: Virtex7.hpp:40
torc::bitstream::VirtexFrameBlocks mCurrFrameBlocks
Frame blocks for current site/tile.
virtual void initializeFrameDataForTile(TileIndex tileIndex)
Store frame blocks and bit offset for given tile index.
boost::uint32_t mCurrWordOffset
Word offset withing frame for current site/tile.
const torc::architecture::Tiles & mTiles
Tiles from architecture database.
Definition: Assembler.hpp:314