torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::architecture::Segments Class Reference

Segment and irregular arc data for the device. More...

#include <Segments.hpp>

+ Inheritance diagram for torc::architecture::Segments:
+ Collaboration diagram for torc::architecture::Segments:

Data Structures

class  CompactSegmentTilewire
 Encapsulation of a wire belonging to a compact segment. More...
 
class  IrregularArc
 Encapsulation of an irregular arc. More...
 
class  SegmentReference
 Encapsulation of compact segment index and an anchoring tile index. More...
 

Public Member Functions

uint32_t getTotalWireCount (void) const
 Return the total number of wires in the device (pruned and actual). More...
 
uint32_t getActualWireCount (void) const
 Return the number of actual wires in the device (unpruned and non-trivial). More...
 
uint32_t getPrunedWireCount (void) const
 Return the number of pruned wires in the device. More...
 
uint32_t getTrivialSegmentCount (void) const
 Return the total number of trivial segments in the device. More...
 
uint32_t getNonTrivialSegmentCount (void) const
 Return the total number of non-trivial segments in the device. More...
 
uint32_t getTotalSegmentCount (void) const
 Return the total number of full segments in the device. More...
 
uint32_t getCompactSegmentCount (void) const
 Return the number of compact segments in the device. More...
 
uint32_t getIrregularArcCount (void) const
 Return the total number of irregular args in the device. More...
 
const Segments::SegmentReferencegetTilewireSegment (const Tilewire &inTilewire) const
 Return the segment reference for the given tile and wire index. More...
 

Protected Types

enum  { eSegmentUndefined = 0xffffffff, eSegmentTrivial = 0 }
 
typedef std::string string
 Imported type name. More...
 
typedef xilinx::TileCount TileCount
 Imported type name. More...
 
typedef xilinx::TileIndex TileIndex
 Imported type name. More...
 
typedef xilinx::WireIndex WireIndex
 Imported type name. More...
 
typedef xilinx::TileOffset TileOffset
 Imported type name. More...
 
typedef xilinx::CompactSegmentCount CompactSegmentCount
 Imported type name. More...
 
typedef xilinx::CompactSegmentIndex CompactSegmentIndex
 Imported type name. More...
 

Protected Member Functions

 Segments (void)
 Protected constructor. More...
 
size_t readTilewireSegments (DigestStream &inStream)
 Read the segment entries for every tile. More...
 
size_t readSegments (DigestStream &inStream, bool inExtendedAnchorTileCount)
 Read the compact segments for the device. More...
 
size_t readIrregularArcs (DigestStream &inStream)
 Read the irregular arcs for the device. More...
 
const Segments::IrregularArcgetIrregularArc (TileIndex inTileIndex, WireIndex inSourceWireIndex, WireIndex inSinkWireIndex)
 Return a pointer to the requested IrregularArc, or 0 if the arc does not exist. More...
 

Protected Attributes

Array2D< CompactSegmentTilewiremCompactSegments
 The compact segments in the device. More...
 
Array2D< SegmentReferencemTilewireSegments
 The segment references for every wire in every tile. More...
 
Array2D< IrregularArcmIrregularArcs
 The irregular arcs for in the device. More...
 
CompactSegmentCount mCompactSegmentCount
 The number of compact segments in the device. More...
 
uint32_t mIrregularArcCount
 The number of irregular arcs in the device. More...
 
uint32_t mTotalWireCount
 The total number of wires in the device (pruned and actual). More...
 
uint32_t mPrunedWireCount
 The number of pruned wires in the device. More...
 
uint32_t mActualWireCount
 The number of actual wires on non-trivial segments in the device. More...
 
uint32_t mTrivialSegmentCount
 The number of defined trivial segments. More...
 
uint32_t mNonTrivialSegmentCount
 The number of defined non-trivial segments. More...
 
uint32_t mTotalSegmentCount
 The total number of defined segments. More...
 

Private Types

typedef std::basic_istream< char > istream
 Internal typedef of istream;. More...
 
typedef std::basic_ostream< char > ostream
 Internal typedef of ostream;. More...
 

Private Member Functions

istreammIn (void)
 Returns the database console input stream. More...
 
ostreammOut (void)
 Returns the database console output stream. More...
 
ostreammErr (void)
 Returns the database console error stream. More...
 
ostreammLog (void)
 Returns the database console log stream. More...
 
istreamgetConsoleIn (void)
 Returns the database console input stream. More...
 
ostreamgetConsoleOut (void)
 Returns the database console output stream. More...
 
ostreamgetConsoleErr (void)
 Returns the database console error stream. More...
 
ostreamgetConsoleLog (void)
 Returns the database console log stream. More...
 
void setConsoleIn (istream &inStream)
 Sets the database console input stream. More...
 
void setConsoleOut (ostream &inStream)
 Sets the database console output stream. More...
 
void setConsoleErr (ostream &inStream)
 Sets the database console error stream. More...
 
void setConsoleLog (ostream &inStream)
 Sets the database console log stream. More...
 
virtual void setConsoleStreams (istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
 Sets all of the database console streams. More...
 

Private Attributes

istreammInPtr
 Pointer to the database console input stream. More...
 
ostreammOutPtr
 
ostreammErrPtr
 
ostreammLogPtr
 

Static Private Attributes

static DDBConsoleStreams sDefaultConsoleStreams
 
static DDBConsoleStreams sNullConsoleStreams
 

Friends

class DDB
 The database has access to our protected functions. More...
 
class torc::architecture::architecture::architecture_segments
 Our unit test has access to our protected functions. More...
 
class torc::architecture::architecture::segments_regression_test_helper
 
class torc::architecture::architecture::segments_unit_test_helper
 

Detailed Description

Segment and irregular arc data for the device.

Segment data is encoded in a collection of compact segments (segment shapes normalized to tile index 0) and a mapping from tilewires to segment references and anchor tile indexes.

Definition at line 40 of file Segments.hpp.

Member Typedef Documentation

Imported type name.

Definition at line 55 of file Segments.hpp.

Imported type name.

Definition at line 56 of file Segments.hpp.

Internal typedef of istream;.

Definition at line 41 of file DDBConsoleStreams.hpp.

Internal typedef of ostream;.

Definition at line 43 of file DDBConsoleStreams.hpp.

typedef std::string torc::architecture::Segments::string
protected

Imported type name.

Definition at line 50 of file Segments.hpp.

Imported type name.

Definition at line 51 of file Segments.hpp.

Imported type name.

Definition at line 52 of file Segments.hpp.

Imported type name.

Definition at line 54 of file Segments.hpp.

Imported type name.

Definition at line 53 of file Segments.hpp.

Member Enumeration Documentation

anonymous enum
protected
Enumerator
eSegmentUndefined 
eSegmentTrivial 

Definition at line 58 of file Segments.hpp.

Constructor & Destructor Documentation

torc::architecture::Segments::Segments ( void  )
protected

Protected constructor.

Definition at line 27 of file Segments.cpp.

30  {}
uint32_t mTrivialSegmentCount
The number of defined trivial segments.
Definition: Segments.hpp:141
CompactSegmentCount mCompactSegmentCount
The number of compact segments in the device.
Definition: Segments.hpp:123
uint32_t mNonTrivialSegmentCount
The number of defined non-trivial segments.
Definition: Segments.hpp:145
Array2D< SegmentReference > mTilewireSegments
The segment references for every wire in every tile.
Definition: Segments.hpp:119
Array2D< CompactSegmentTilewire > mCompactSegments
The compact segments in the device.
Definition: Segments.hpp:117
uint32_t mIrregularArcCount
The number of irregular arcs in the device.
Definition: Segments.hpp:125
uint32_t mActualWireCount
The number of actual wires on non-trivial segments in the device.
Definition: Segments.hpp:137
uint32_t mTotalWireCount
The total number of wires in the device (pruned and actual).
Definition: Segments.hpp:129
uint32_t mTotalSegmentCount
The total number of defined segments.
Definition: Segments.hpp:149
Array2D< IrregularArc > mIrregularArcs
The irregular arcs for in the device.
Definition: Segments.hpp:121
uint32_t mPrunedWireCount
The number of pruned wires in the device.
Definition: Segments.hpp:133

Member Function Documentation

uint32_t torc::architecture::Segments::getActualWireCount ( void  ) const
inline

Return the number of actual wires in the device (unpruned and non-trivial).

Definition at line 168 of file Segments.hpp.

168 { return mActualWireCount; }
uint32_t mActualWireCount
The number of actual wires on non-trivial segments in the device.
Definition: Segments.hpp:137

+ Here is the caller graph for this function:

uint32_t torc::architecture::Segments::getCompactSegmentCount ( void  ) const
inline

Return the number of compact segments in the device.

Definition at line 178 of file Segments.hpp.

178 { return mCompactSegmentCount; }
CompactSegmentCount mCompactSegmentCount
The number of compact segments in the device.
Definition: Segments.hpp:123
ostream& torc::architecture::DDBConsoleStreams::getConsoleErr ( void  )
inlineinherited

Returns the database console error stream.

Definition at line 69 of file DDBConsoleStreams.hpp.

69 { return mErr(); }
ostream & mErr(void)
Returns the database console error stream.

+ Here is the call graph for this function:

istream& torc::architecture::DDBConsoleStreams::getConsoleIn ( void  )
inlineinherited

Returns the database console input stream.

Definition at line 65 of file DDBConsoleStreams.hpp.

65 { return mIn(); }
istream & mIn(void)
Returns the database console input stream.

+ Here is the call graph for this function:

ostream& torc::architecture::DDBConsoleStreams::getConsoleLog ( void  )
inlineinherited

Returns the database console log stream.

Definition at line 71 of file DDBConsoleStreams.hpp.

71 { return mLog(); }
ostream & mLog(void)
Returns the database console log stream.

+ Here is the call graph for this function:

ostream& torc::architecture::DDBConsoleStreams::getConsoleOut ( void  )
inlineinherited

Returns the database console output stream.

Definition at line 67 of file DDBConsoleStreams.hpp.

67 { return mOut(); }
ostream & mOut(void)
Returns the database console output stream.

+ Here is the call graph for this function:

const Segments::IrregularArc * torc::architecture::Segments::getIrregularArc ( TileIndex  inTileIndex,
WireIndex  inSourceWireIndex,
WireIndex  inSinkWireIndex 
)
protected

Return a pointer to the requested IrregularArc, or 0 if the arc does not exist.

Definition at line 213 of file Segments.cpp.

214  {
215  // look up the tile's irregular arcs
216  const Array<IrregularArc>& irregularArcs = mIrregularArcs[inTileIndex];
217  // iterate through the arcs and look for a match
218  Array<IrregularArc>::const_iterator p = irregularArcs.begin();
219  Array<IrregularArc>::const_iterator e = irregularArcs.end();
220  while(p < e) {
221  // look for a matching source wire index
222  WireIndex sourceWireIndex = p->getSourceWireIndex();
223  if(sourceWireIndex < inSourceWireIndex) { p++; continue; }
224  if(sourceWireIndex > inSourceWireIndex) return NULL;
225  // look for a matching sink wire index
226  WireIndex sinkWireIndex = p->getSinkWireIndex();
227  if(sinkWireIndex < inSinkWireIndex) { p++; continue; }
228  if(sinkWireIndex > inSinkWireIndex) return NULL;
229  // if we got here, we found the requested arc
230  return p;
231  }
232  // we didn't find the arc
233  return 0;
234  }
xilinx::WireIndex WireIndex
Imported type name.
Definition: Segments.hpp:53
Array2D< IrregularArc > mIrregularArcs
The irregular arcs for in the device.
Definition: Segments.hpp:121

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t torc::architecture::Segments::getIrregularArcCount ( void  ) const
inline

Return the total number of irregular args in the device.

Definition at line 180 of file Segments.hpp.

180 { return mIrregularArcCount; }
uint32_t mIrregularArcCount
The number of irregular arcs in the device.
Definition: Segments.hpp:125
uint32_t torc::architecture::Segments::getNonTrivialSegmentCount ( void  ) const
inline

Return the total number of non-trivial segments in the device.

Definition at line 174 of file Segments.hpp.

174 { return mNonTrivialSegmentCount; }
uint32_t mNonTrivialSegmentCount
The number of defined non-trivial segments.
Definition: Segments.hpp:145
uint32_t torc::architecture::Segments::getPrunedWireCount ( void  ) const
inline

Return the number of pruned wires in the device.

Definition at line 170 of file Segments.hpp.

170 { return mPrunedWireCount; }
uint32_t mPrunedWireCount
The number of pruned wires in the device.
Definition: Segments.hpp:133
const Segments::SegmentReference& torc::architecture::Segments::getTilewireSegment ( const Tilewire inTilewire) const
inline

Return the segment reference for the given tile and wire index.

Definition at line 182 of file Segments.hpp.

182  {
183  return mTilewireSegments[inTilewire.getTileIndex()][inTilewire.getWireIndex()];
184  }
Array2D< SegmentReference > mTilewireSegments
The segment references for every wire in every tile.
Definition: Segments.hpp:119

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t torc::architecture::Segments::getTotalSegmentCount ( void  ) const
inline

Return the total number of full segments in the device.

Definition at line 176 of file Segments.hpp.

176 { return mTotalSegmentCount; }
uint32_t mTotalSegmentCount
The total number of defined segments.
Definition: Segments.hpp:149
uint32_t torc::architecture::Segments::getTotalWireCount ( void  ) const
inline

Return the total number of wires in the device (pruned and actual).

Definition at line 166 of file Segments.hpp.

166 { return mTotalWireCount; }
uint32_t mTotalWireCount
The total number of wires in the device (pruned and actual).
Definition: Segments.hpp:129
uint32_t torc::architecture::Segments::getTrivialSegmentCount ( void  ) const
inline

Return the total number of trivial segments in the device.

Definition at line 172 of file Segments.hpp.

172 { return mNonTrivialSegmentCount; }
uint32_t mNonTrivialSegmentCount
The number of defined non-trivial segments.
Definition: Segments.hpp:145
ostream& torc::architecture::DDBConsoleStreams::mErr ( void  )
inlineinherited

Returns the database console error stream.

Definition at line 61 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

istream& torc::architecture::DDBConsoleStreams::mIn ( void  )
inlineinherited

Returns the database console input stream.

Definition at line 57 of file DDBConsoleStreams.hpp.

57 { return *mInPtr; }
istream * mInPtr
Pointer to the database console input stream.

+ Here is the caller graph for this function:

ostream& torc::architecture::DDBConsoleStreams::mLog ( void  )
inlineinherited

Returns the database console log stream.

Definition at line 63 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

ostream& torc::architecture::DDBConsoleStreams::mOut ( void  )
inlineinherited

Returns the database console output stream.

Definition at line 59 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

size_t torc::architecture::Segments::readIrregularArcs ( DigestStream inStream)
protected

Read the irregular arcs for the device.

Todo:
Throw a proper exception.

Definition at line 173 of file Segments.cpp.

173  {
174  // prepare to read from the stream
175  size_t bytesReadOffset = inStream.getBytesRead();
176  TileCount tileCount; // number of tiles
177  uint16_t arcCount = 0; // number of irregular arcs in the tile
178  WireIndex sourceWireIndex; // arc source wire index
179  WireIndex sinkWireIndex; // arc sink wire index
180 
181  // read the section header
182  string sectionName;
183  inStream.readSectionHeader(sectionName);
184  /// \todo Throw a proper exception.
185  if(sectionName != ">>>>IrrgArcs>>>>") throw -1;
186 
187  // initialize the irregular arc array
188  inStream.read(tileCount);
189  mIrregularArcs.setSize(tileCount);
190  mOut() << "\tReading irregular arcs for " << tileCount << " tiles..." << std::endl;
191  // loop through each tile
192  for(TileIndex i; i < tileCount; i++) {
193  Array<IrregularArc>& irregularArcs = mIrregularArcs[i];
194  // read the number of irregular arcs
195  inStream.read(arcCount);
196  irregularArcs.setSize(arcCount);
197  // read the irregular arcs
198  for(uint16_t j = 0; j < arcCount; j++) {
199  // read the arc wire indexes
200  inStream.read(sourceWireIndex);
201  inStream.read(sinkWireIndex);
202  // store the irregular arc
203  irregularArcs[j] = IrregularArc(sourceWireIndex, sinkWireIndex);
204  }
205  }
206 
207  // return the number of bytes read
208  return inStream.getBytesRead() - bytesReadOffset;
209  }
xilinx::WireIndex WireIndex
Imported type name.
Definition: Segments.hpp:53
xilinx::TileCount TileCount
Imported type name.
Definition: Segments.hpp:51
xilinx::TileIndex TileIndex
Imported type name.
Definition: Segments.hpp:52
ostream & mOut(void)
Returns the database console output stream.
Array2D< IrregularArc > mIrregularArcs
The irregular arcs for in the device.
Definition: Segments.hpp:121

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t torc::architecture::Segments::readSegments ( DigestStream inStream,
bool  inExtendedAnchorTileCount 
)
protected

Read the compact segments for the device.

Todo:
Throw a proper exception.

Definition at line 89 of file Segments.cpp.

89  {
90  // prepare to read from the stream
91  size_t bytesReadOffset = inStream.getBytesRead();
92  uint16_t wireCount = 0; // number of wires in the segment
93  uint32_t offsetCount = 0; // number of offset tiles which use the segment
94  WireIndex wireIndex; // current wire index
95  TileOffset tileOffset; // current tile offset
96  TileIndex rootTileIndex; // compact segment root tile index
97 
98  // read the section header
99  string sectionName;
100  inStream.readSectionHeader(sectionName);
101  /// \todo Throw a proper exception.
102  if(sectionName != ">>>>Segments>>>>") throw -1;
103 
104  // initialize the tile segment array
105  inStream.read(mCompactSegmentCount);
107  mOut() << "\tReading " << mCompactSegmentCount << " segments..." << std::endl;
108  // loop through each segment (except segment zero)
109  for(CompactSegmentIndex i; i < mCompactSegmentCount; i++) {
110  // initialize each segment sub-array
111  inStream.read(wireCount);
112  mCompactSegments[i].setSize(wireCount);
113  // loop through each wire in the segment
114  for(WireIndex j; j < wireCount; j++) {
115  // read the wire and tile indexes
116  inStream.read(wireIndex);
117  inStream.read(tileOffset);
118  // store the data
119  mCompactSegments[i][j] = CompactSegmentTilewire(wireIndex, tileOffset);
120  }
121  // initialize each offset location
122  if(inExtendedAnchorTileCount) {
123  // read a 32-bit anchor tile count
124  inStream.read(offsetCount);
125  } else {
126  // read the standard 16-bit anchor tile count
127  uint16_t shortOffsetCount;
128  inStream.read(shortOffsetCount);
129  offsetCount = shortOffsetCount;
130  }
131  // loop through each offset for this segment
132  for(uint32_t j = 0; j < offsetCount; j++) {
134  // read the root tile
135  inStream.read(rootTileIndex);
136  // expand the data into each applicable tile
137  for(WireIndex k; k < wireCount; k++) {
138  const CompactSegmentTilewire compactSegmentTilewire = mCompactSegments[i][k];
139  TileIndex tileIndex = TileIndex(rootTileIndex + compactSegmentTilewire.getTileOffset());
140  WireIndex wireIndex = compactSegmentTilewire.getWireIndex();
141 const SegmentReference& existing = mTilewireSegments[tileIndex][wireIndex];
142 if(existing.getCompactSegmentIndex() != 0 || existing.getAnchorTileIndex() != 0) {
143  mErr() << "WARNING: Overwriting mTilewireSegments[" << tileIndex << "][" << wireIndex << "]: "
144  << "conflict is " << i << "@" << rootTileIndex << " versus " << existing.getCompactSegmentIndex()
145  << "@" << existing.getAnchorTileIndex() << std::endl;
146 }
147  mTilewireSegments[tileIndex][wireIndex] = SegmentReference(i, rootTileIndex);
148  }
149  }
150  }
151 
152  // clear the usage information for all tilewires
153  TileCount tileCount(mTilewireSegments.getSize());
154  for(TileIndex tileIndex; tileIndex < tileCount; tileIndex++) {
155  const Array<SegmentReference>& tilewireSegments = mTilewireSegments[tileIndex];
156  Array<SegmentReference>::const_iterator p = tilewireSegments.begin();
157  Array<SegmentReference>::const_iterator e = tilewireSegments.end();
158  while(p < e) {
159  const SegmentReference& segmentReference = *p++;
160  if(segmentReference.isTrivial()) mTrivialSegmentCount++;
161  }
162  }
163 
164  // be sure to add up the total segment count
166  mOut() << "\t" << mTotalSegmentCount << " total segments" << " (" << (mTrivialSegmentCount)
167  << " trivial + " << mNonTrivialSegmentCount << " non-trivial)" << std::endl;
168 
169  // return the number of bytes read
170  return inStream.getBytesRead() - bytesReadOffset;
171  }
xilinx::WireIndex WireIndex
Imported type name.
Definition: Segments.hpp:53
xilinx::TileCount TileCount
Imported type name.
Definition: Segments.hpp:51
uint32_t mTrivialSegmentCount
The number of defined trivial segments.
Definition: Segments.hpp:141
CompactSegmentCount mCompactSegmentCount
The number of compact segments in the device.
Definition: Segments.hpp:123
uint32_t mNonTrivialSegmentCount
The number of defined non-trivial segments.
Definition: Segments.hpp:145
ostream & mErr(void)
Returns the database console error stream.
Array2D< SegmentReference > mTilewireSegments
The segment references for every wire in every tile.
Definition: Segments.hpp:119
xilinx::TileIndex TileIndex
Imported type name.
Definition: Segments.hpp:52
xilinx::CompactSegmentIndex CompactSegmentIndex
Imported type name.
Definition: Segments.hpp:56
Array2D< CompactSegmentTilewire > mCompactSegments
The compact segments in the device.
Definition: Segments.hpp:117
uint32_t mTotalSegmentCount
The total number of defined segments.
Definition: Segments.hpp:149
ostream & mOut(void)
Returns the database console output stream.
xilinx::TileOffset TileOffset
Imported type name.
Definition: Segments.hpp:54

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t torc::architecture::Segments::readTilewireSegments ( DigestStream inStream)
protected

Read the segment entries for every tile.

Todo:
Throw a proper exception.

Definition at line 32 of file Segments.cpp.

32  {
33  // prepare to read from the stream
34  size_t bytesReadOffset = inStream.getBytesRead();
35  TileCount tileCount; // number of tiles
36  uint16_t tileWireCount = 0; // number of wires in the current tile
37  uint16_t extraWireCount = 0; // number of extra wires in the current tile
38  WireIndex wireIndex; // index of extra wire
39 
40  //mErr() << "NOTICE: Remove unnecessary clearing of mTilewireSegment wires."
41  // << std::endl;
42  // read the section header
43  string sectionName;
44  inStream.readSectionHeader(sectionName);
45  /// \todo Throw a proper exception.
46  if(sectionName != ">>>>TileSegs>>>>") throw -1;
47 
48  // initialize the tile segment array
49  inStream.read(tileCount);
50  mTilewireSegments.setSize(tileCount);
51  mOut() << "\tReading " << tileCount << " tiles..." << std::endl;
52  // loop through each tile
53  for(TileIndex i; i < tileCount; i++) {
54  // initialize each tile sub-array
55  inStream.read(tileWireCount);
56  mTilewireSegments[i].setSize(tileWireCount);
57  // the following clearing of SegementReference entris should no longer be necessary
58  // for(WireIndex j; j < tileWireCount; j++)
59  // mTilewireSegments[i][j] = SegmentReference();
60  // read the extra wires that we can't infer from the segments
61  inStream.read(extraWireCount);
62  // mErr() << i << "#" << tileWireCount << ":" << extraWireCount << "="
63  // << mActualWireCount << " ";
64  mTotalWireCount += tileWireCount;
65  mActualWireCount += tileWireCount - extraWireCount;
66  mPrunedWireCount += extraWireCount;
67  // mErr() << "\t" << i << ": ";
68  for(WireIndex j; j < extraWireCount; j++) {
69  // read the wire index
70  inStream.read(wireIndex);
71  // the current database implicitly assumes that only -1 (non-existent) wires are
72  // encoded, so we don't need to read the segment index; that assumption would not
73  // hold if we had to handle removed wires.
74  //// read the segment value
75  //inStream.read(segmentIndex);
76  // store the data
77  mTilewireSegments[i][wireIndex].undefine();
78  // mErr() << wireIndex << " ";
79  }
80  // mErr() << std::endl;
81  mTotalSegmentCount += tileWireCount - extraWireCount;
82  }
83  //mOut() << "\t" << mActualWireCount << " total wires" << std::endl;
84 
85  // return the number of bytes read
86  return inStream.getBytesRead() - bytesReadOffset;
87  }
xilinx::WireIndex WireIndex
Imported type name.
Definition: Segments.hpp:53
xilinx::TileCount TileCount
Imported type name.
Definition: Segments.hpp:51
Array2D< SegmentReference > mTilewireSegments
The segment references for every wire in every tile.
Definition: Segments.hpp:119
xilinx::TileIndex TileIndex
Imported type name.
Definition: Segments.hpp:52
uint32_t mActualWireCount
The number of actual wires on non-trivial segments in the device.
Definition: Segments.hpp:137
uint32_t mTotalWireCount
The total number of wires in the device (pruned and actual).
Definition: Segments.hpp:129
uint32_t mTotalSegmentCount
The total number of defined segments.
Definition: Segments.hpp:149
ostream & mOut(void)
Returns the database console output stream.
uint32_t mPrunedWireCount
The number of pruned wires in the device.
Definition: Segments.hpp:133

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleErr ( ostream inStream)
inlineinherited

Sets the database console error stream.

Definition at line 77 of file DDBConsoleStreams.hpp.

77 { mErrPtr = &inStream; }

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleIn ( istream inStream)
inlineinherited

Sets the database console input stream.

Definition at line 73 of file DDBConsoleStreams.hpp.

73 { mInPtr = &inStream; }
istream * mInPtr
Pointer to the database console input stream.

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleLog ( ostream inStream)
inlineinherited

Sets the database console log stream.

Definition at line 79 of file DDBConsoleStreams.hpp.

79 { mLogPtr = &inStream; }

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleOut ( ostream inStream)
inlineinherited

Sets the database console output stream.

Definition at line 75 of file DDBConsoleStreams.hpp.

75 { mOutPtr = &inStream; }

+ Here is the caller graph for this function:

virtual void torc::architecture::DDBConsoleStreams::setConsoleStreams ( istream inIn,
ostream inOut,
ostream inErr,
ostream inLog 
)
inlinevirtualinherited

Sets all of the database console streams.

Parameters
inInThe console input stream.
inOutThe console output stream.
inErrThe console error stream.
inLogThe console log stream.

Reimplemented in torc::architecture::DDB.

Definition at line 85 of file DDBConsoleStreams.hpp.

86  {
87  setConsoleIn(inIn);
88  setConsoleOut(inOut);
89  setConsoleErr(inErr);
90  setConsoleLog(inLog);
91  }
void setConsoleOut(ostream &inStream)
Sets the database console output stream.
void setConsoleIn(istream &inStream)
Sets the database console input stream.
void setConsoleLog(ostream &inStream)
Sets the database console log stream.
void setConsoleErr(ostream &inStream)
Sets the database console error stream.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DDB
friend

The database has access to our protected functions.

Definition at line 43 of file Segments.hpp.

friend class torc::architecture::architecture::architecture_segments
friend

Our unit test has access to our protected functions.

Definition at line 45 of file Segments.hpp.

friend class torc::architecture::architecture::segments_regression_test_helper
friend

Definition at line 46 of file Segments.hpp.

friend class torc::architecture::architecture::segments_unit_test_helper
friend

Definition at line 47 of file Segments.hpp.

Field Documentation

uint32_t torc::architecture::Segments::mActualWireCount
protected

The number of actual wires on non-trivial segments in the device.

Note
We cannot use a WireCount for this, because it is only intended for use in a single tile, and is consequently only 16 bits wide.

Definition at line 137 of file Segments.hpp.

CompactSegmentCount torc::architecture::Segments::mCompactSegmentCount
protected

The number of compact segments in the device.

Definition at line 123 of file Segments.hpp.

Array2D<CompactSegmentTilewire> torc::architecture::Segments::mCompactSegments
protected

The compact segments in the device.

Definition at line 117 of file Segments.hpp.

ostream* torc::architecture::DDBConsoleStreams::mErrPtr
protectedinherited

Definition at line 96 of file DDBConsoleStreams.hpp.

istream* torc::architecture::DDBConsoleStreams::mInPtr
protectedinherited

Pointer to the database console input stream.

Definition at line 94 of file DDBConsoleStreams.hpp.

uint32_t torc::architecture::Segments::mIrregularArcCount
protected

The number of irregular arcs in the device.

Definition at line 125 of file Segments.hpp.

Array2D<IrregularArc> torc::architecture::Segments::mIrregularArcs
protected

The irregular arcs for in the device.

Definition at line 121 of file Segments.hpp.

ostream* torc::architecture::DDBConsoleStreams::mLogPtr
protectedinherited

Definition at line 97 of file DDBConsoleStreams.hpp.

uint32_t torc::architecture::Segments::mNonTrivialSegmentCount
protected

The number of defined non-trivial segments.

Note
We could use a CompactSegmentCount for this, but that would be semantically incorrect because we are really counting full segments, not compact segments.

Definition at line 145 of file Segments.hpp.

ostream* torc::architecture::DDBConsoleStreams::mOutPtr
protectedinherited

Definition at line 95 of file DDBConsoleStreams.hpp.

uint32_t torc::architecture::Segments::mPrunedWireCount
protected

The number of pruned wires in the device.

Note
We cannot use a WireCount for this, because it is only intended for use in a single tile, and is consequently only 16 bits wide.

Definition at line 133 of file Segments.hpp.

Array2D<SegmentReference> torc::architecture::Segments::mTilewireSegments
protected

The segment references for every wire in every tile.

Definition at line 119 of file Segments.hpp.

uint32_t torc::architecture::Segments::mTotalSegmentCount
protected

The total number of defined segments.

Note
We could use a CompactSegmentCount for this, but that would be semantically incorrect because we are really counting full segments, not compact segments.

Definition at line 149 of file Segments.hpp.

uint32_t torc::architecture::Segments::mTotalWireCount
protected

The total number of wires in the device (pruned and actual).

Note
We cannot use a WireCount for this, because it is only intended for use in a single tile, and is consequently only 16 bits wide.

Definition at line 129 of file Segments.hpp.

uint32_t torc::architecture::Segments::mTrivialSegmentCount
protected

The number of defined trivial segments.

Note
We could use a CompactSegmentCount for this, but that would be semantically incorrect because we are really counting full segments, not compact segments.

Definition at line 141 of file Segments.hpp.

DDBConsoleStreams torc::architecture::DDBConsoleStreams::sDefaultConsoleStreams
staticinherited

Definition at line 45 of file DDBConsoleStreams.hpp.

DDBConsoleStreams torc::architecture::DDBConsoleStreams::sNullConsoleStreams
staticinherited

Definition at line 46 of file DDBConsoleStreams.hpp.


The documentation for this class was generated from the following files: