torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DDB.cpp
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 Source for the DDB class.
18 
23 #include <boost/filesystem/convenience.hpp>
24 #include <boost/algorithm/string.hpp>
25 #include <iostream>
26 #include <fstream>
27 
28 namespace torc {
29 namespace architecture {
30 
31  void DDB::initialize(const string& inDeviceName, const string& inPackageName) {
32 
33  // pull in symbols from other namespaces
34  using std::string;
35 // using std::cout;
36 // using std::cerr;
37 // using std::clog;
38  using std::endl;
39  using std::fstream;
40  using boost::uint32_t;
41 
42  try {
43 
44  // track statistics
45  uint32_t familyDatabaseBytesRead = 0;
46  uint32_t deviceDatabaseBytesRead = 0;
47 
48  // open the device database
49  mDeviceName = inDeviceName;
50  string deviceFilename = inDeviceName + ".db";
51  boost::to_lower(deviceFilename);
53  mLog() << "Reading device " << inDeviceName << " (" << mDevicePath << ")..." << endl;
54  DigestStream deviceDatabaseStream(mDevicePath);
55  deviceDatabaseStream.exceptions(fstream::eofbit | fstream::failbit | fstream::badbit);
56  deviceDatabaseBytesRead += mDeviceVersion.readVersions(deviceDatabaseStream, true);
57  deviceDatabaseBytesRead += readFamilyName(deviceDatabaseStream);
58 
59  // open the family database
60  mFamilyPath = mDevicePath.parent_path() / (mFamilyName + ".db");
61  mOut() << "\tReading family " << mFamilyName << " (" << mFamilyPath << ")..." << endl;
62  DigestStream familyDatabaseStream(mFamilyPath);
63  familyDatabaseStream.exceptions(fstream::eofbit | fstream::failbit | fstream::badbit);
64 
65  // populate the database from family and device data
66  familyDatabaseBytesRead += mFamilyVersion.readVersions(familyDatabaseStream, false);
67  familyDatabaseBytesRead += mTiles.readTileTypes(familyDatabaseStream);
68  familyDatabaseBytesRead += mTiles.readTileWireInfo(familyDatabaseStream);
69  deviceDatabaseBytesRead += readSpeedGrades(deviceDatabaseStream);
70  deviceDatabaseBytesRead += mSites.readPackages(deviceDatabaseStream);
71  deviceDatabaseBytesRead += mTiles.readTileMap(deviceDatabaseStream);
72  deviceDatabaseBytesRead += mSegments.readTilewireSegments(deviceDatabaseStream);
73  bool extendedAnchorTileCount
75  deviceDatabaseBytesRead
76  += mSegments.readSegments(deviceDatabaseStream, extendedAnchorTileCount);
77  deviceDatabaseBytesRead += mSegments.readIrregularArcs(deviceDatabaseStream);
78  familyDatabaseBytesRead += mSites.readPrimitiveTypes(familyDatabaseStream);
79  familyDatabaseBytesRead += mSites.readPrimitivePinMaps(familyDatabaseStream);
80  deviceDatabaseBytesRead += mSites.readSites(deviceDatabaseStream);
81  mOut() << "Read " << familyDatabaseBytesRead << " bytes from " << mFamilyName << endl;
82  mOut() << "Read " << deviceDatabaseBytesRead << " bytes from " << mDeviceName << endl;
83  // automatically size the wire and arc usage objects
86 
87  // activate the specified package if any
88  if(inPackageName.length()) mSites.activatePackage(inPackageName);
89  }
90 
91  catch(fstream::failure f) {
92  mErr() << "An unprocessed ifstream::failure exception was thrown: " << f.what() << endl;
93  throw;
94  }
95 
96  }
97 
98  size_t DDB::readFamilyName(DigestStream& inStream) {
99  // prepare to read from the stream
100  size_t bytesReadOffset = inStream.getBytesRead();
101  char scratch[1 << 10]; // scratch read buffer
102  boost::uint16_t nameLength = 0; // length of family name
103 
104  // read the section header
105  string sectionName;
106  inStream.readSectionHeader(sectionName);
107  /// \todo Throw a proper exception.
108  if(sectionName != ">>>> Family >>>>") throw -1;
109 
110  // read the family name
111  inStream.read(nameLength);
112  if(nameLength > sizeof(scratch)) throw -1;
113  inStream.read(scratch, nameLength);
114  scratch[nameLength] = 0;
115  mFamilyName = scratch;
116 
117  // return the number of bytes read
118  return inStream.getBytesRead() - bytesReadOffset;
119  }
120 
121  size_t DDB::readSpeedGrades(DigestStream& inStream) {
122  // prepare to read from the stream
123  size_t bytesReadOffset = inStream.getBytesRead();
124  char scratch[1 << 10]; // scratch read buffer
125  uint16_t nameLength = 0; // length of family name
126 
127  // read the section header
128  string sectionName;
129  inStream.readSectionHeader(sectionName);
130  /// \todo Throw a proper exception.
131  if(sectionName != ">>>> Speeds >>>>") throw -1;
132 
133  // read the speed grade count
134  uint16_t speedGradeCount;
135  inStream.read(speedGradeCount);
136  mOut() << "\tReading " << speedGradeCount << " speed grade"
137  << (speedGradeCount != 1 ? "s" : "") << " (";
138  // loop through each speed grade
139  for(uint16_t i = 0; i < speedGradeCount; i++) {
140  // read the speed grade
141  inStream.read(nameLength);
142  if(nameLength > sizeof(scratch)) throw -1;
143  inStream.read(scratch, nameLength);
144  scratch[nameLength] = 0;
145  mSpeedGrades.push_back(scratch);
146  mOut() << scratch << (i + 1 < speedGradeCount ? ", " : "");
147  }
148  mOut() << ") ... " << std::endl;
149 
150  // return the number of bytes read
151  return inStream.getBytesRead() - bytesReadOffset;
152  }
153 
154  void DDB::expandSegment(const Tilewire& inTilewire, TilewireVector& outTilewires,
155  EExpandDirection inExpandDirection) {
156 
157  // look up the segment specified by this tile and wire
158  WireIndex wireIndex = inTilewire.getWireIndex();
159  TileIndex tileIndex = inTilewire.getTileIndex();
160  const Segments::SegmentReference& compactSegmentReference
161  = mSegments.getTilewireSegment(inTilewire);
162  // undefined segments are not real in the current device
163  if(!compactSegmentReference.isDefined()) return;
164 
165  // initialize the wire array with the segment information or the trivial wire
166  Array<Segments::CompactSegmentTilewire> trivialSegmentReference;
167  if(compactSegmentReference.isTrivial()) {
168  trivialSegmentReference.setSize(1);
169  trivialSegmentReference[0] = Segments::CompactSegmentTilewire(wireIndex,
170  TileOffset(tileIndex));
171  }
172  const Array<Segments::CompactSegmentTilewire>& segmentReference
173  = compactSegmentReference.isTrivial() ? trivialSegmentReference
174  : mSegments.mCompactSegments[compactSegmentReference.getCompactSegmentIndex()];
175 
176  // iterate through each wire in the compact segment
177  TileIndex anchorTileIndex = compactSegmentReference.getAnchorTileIndex();
179  = segmentReference.begin();
181  = segmentReference.end();
182  bool sinkward = (inExpandDirection & eExpandDirectionSinkward) != 0;
183  bool sourceward = (inExpandDirection & eExpandDirectionSourceward) != 0;
184  while(csp < cse) {
185  // get information about the current tilewire
186  const Segments::CompactSegmentTilewire& compactSegmentTilewire = *csp++;
187  WireIndex csWireIndex = compactSegmentTilewire.getWireIndex();
188  TileOffset csTileOffset = compactSegmentTilewire.getTileOffset();
189  TileIndex csTileIndex = csTileOffset + anchorTileIndex;
190  // push each wire into the segment
191  outTilewires.push_back(Tilewire(csTileIndex, csWireIndex));
192  // look up tile and wire information
193  const TileInfo& tileInfo = mTiles.getTileInfo(csTileIndex);
194  const WireInfo& wireInfo = mTiles.getWireInfo(tileInfo.getTypeIndex(), csWireIndex);
195  // include tied sinks
196  if(sinkward) {
197  const WireArray& tiedSinks = wireInfo.getTiedSinks();
198  WireArray::const_iterator p = tiedSinks.begin();
199  WireArray::const_iterator e = tiedSinks.end();
200  while(p < e) expandSegment(Tilewire(csTileIndex, *p++), outTilewires,
201  inExpandDirection);
202  }
203  // include tied sources
204  if(sourceward) {
205  const WireArray& tiedSources = wireInfo.getTiedSources();
206  WireArray::const_iterator p = tiedSources.begin();
207  WireArray::const_iterator e = tiedSources.end();
208  while(p < e) expandSegment(Tilewire(csTileIndex, *p++), outTilewires,
209  inExpandDirection);
210  }
211  }
212  }
213 
214  void DDB::expandTilewireSinks(const Tilewire& inTilewire, TilewireVector& outSinks,
215  bool inUseTied, bool inUseRegular, bool inUseIrregular, bool inUseRoutethrough) {
216  // get information about the starting tile and wire
217  WireIndex wireIndex = inTilewire.getWireIndex();
218  TileIndex tileIndex = inTilewire.getTileIndex();
219  const TileInfo& tileInfo = mTiles.getTileInfo(tileIndex);
220  const WireInfo& wireInfo = mTiles.getWireInfo(tileInfo.getTypeIndex(), wireIndex);
221 
222  // add the regular sinks
223  if(inUseRegular) {
224  const WireArray& sinks = wireInfo.getSinks();
225  WireArray::const_iterator sp = sinks.begin();
226  WireArray::const_iterator se = sinks.end();
227  while(sp < se) outSinks.push_back(Tilewire(tileIndex, *sp++));
228  }
229 
230  // add any irregular sinks
231  if(inUseIrregular) {
232  const WireArray& irregularSinks = wireInfo.getIrregularSinks();
233  WireArray::const_iterator isp = irregularSinks.begin();
234  WireArray::const_iterator ise = irregularSinks.end();
235  while(isp < ise) {
236  WireIndex sinkWireIndex = *isp++;
237  // arcs to undefined segments are likewise undefined
238  const Segments::SegmentReference& segment
239  = mSegments.getTilewireSegment(Tilewire(tileIndex, sinkWireIndex));
240  if(!segment.isDefined()) continue;
241  // determine whether this irregular arc exists
242  const Segments::IrregularArc* irregularArc = mSegments.getIrregularArc(tileIndex,
243  wireIndex, sinkWireIndex);
244  if(irregularArc != 0 && !segment.isDefined()) {
245  mErr() << "WARNING: Irregular arc " << inTilewire << " >> "
246  << Tilewire(tileIndex, sinkWireIndex)
247  << " is defined, but the sink segment is undefined." << std::endl;
248  }
249  if(irregularArc == 0) continue;
250  // the arc exists, so add it to the list
251  outSinks.push_back(Tilewire(tileIndex, sinkWireIndex));
252  }
253  }
254 
255  // add the routethrough sinks
256  if(inUseRoutethrough) {
257  const WireArray& routethroughSinks = wireInfo.getRoutethroughSinks();
258  WireArray::const_iterator rsp = routethroughSinks.begin();
259  WireArray::const_iterator rse = routethroughSinks.end();
260  while(rsp < rse) outSinks.push_back(Tilewire(tileIndex, *rsp++));
261  }
262  }
263 
264  void DDB::expandTilewireSources(const Tilewire& inTilewire, TilewireVector& outSources,
265  bool inUseTied, bool inUseRegular, bool inUseIrregular, bool inUseRoutethrough) {
266  // get information about the starting tile and wire
267  WireIndex wireIndex = inTilewire.getWireIndex();
268  TileIndex tileIndex = inTilewire.getTileIndex();
269  const TileInfo& tileInfo = mTiles.getTileInfo(tileIndex);
270  const WireInfo& wireInfo = mTiles.getWireInfo(tileInfo.getTypeIndex(), wireIndex);
271 
272  // add the regular sources
273  if(inUseRegular) {
274  const WireArray& sources = wireInfo.getSources();
275  WireArray::const_iterator sp = sources.begin();
276  WireArray::const_iterator se = sources.end();
277  while(sp < se) outSources.push_back(Tilewire(tileIndex, *sp++));
278  }
279 
280  // add any irregular sources
281  if(inUseIrregular) {
282  const WireArray& irregularSources = wireInfo.getIrregularSources();
283  WireArray::const_iterator isp = irregularSources.begin();
284  WireArray::const_iterator ise = irregularSources.end();
285  while(isp < ise) {
286  WireIndex sourceWireIndex = *isp++;
287  // arcs to undefined segments are likewise undefined
288  const Segments::SegmentReference& segment
289  = mSegments.getTilewireSegment(Tilewire(tileIndex, sourceWireIndex));
290  if(!segment.isDefined()) continue;
291  // determine whether this irregular arc exists
292  const Segments::IrregularArc* irregularArc = mSegments.getIrregularArc(tileIndex,
293  sourceWireIndex, wireIndex);
294  if(irregularArc != 0 && !segment.isDefined()) {
295  mErr() << "WARNING: Irregular arc " << inTilewire << " >> "
296  << Tilewire(tileIndex, sourceWireIndex)
297  << " is defined, but the source segment is undefined." << std::endl;
298  }
299  if(irregularArc == 0) continue;
300  // the arc exists, so add it to the list
301  outSources.push_back(Tilewire(tileIndex, sourceWireIndex));
302  }
303  }
304 
305  // add the routethrough sinks
306  if(inUseRoutethrough) {
307  const WireArray& routethroughSources = wireInfo.getRoutethroughSources();
308  WireArray::const_iterator rsp = routethroughSources.begin();
309  WireArray::const_iterator rse = routethroughSources.end();
310  while(rsp < rse) outSources.push_back(Tilewire(tileIndex, *rsp++));
311  }
312  }
313 
314  void DDB::expandSegmentSinks(const Tilewire& inTilewire, ArcVector& outArcs,
315  EExpandDirection inExpandDirection, bool inUseTied, bool inUseRegular,
316  bool inUseIrregular, bool inUseRoutethrough) {
317  // expand the segment
318  TilewireVector segment;
319  expandSegment(inTilewire, segment, inExpandDirection);
320  // expand all of the arcs
321  TilewireVector::const_iterator sep = segment.begin();
322  TilewireVector::const_iterator see = segment.end();
323  while(sep < see) {
324  // expand the tilewire sinks
325  const Tilewire& tilewire = *sep++;
326  TilewireVector sinks;
327  expandTilewireSinks(tilewire, sinks, inUseTied, inUseRegular, inUseIrregular,
328  inUseRoutethrough);
329  // rewrite the sinks as arcs
330  TilewireVector::const_iterator sip = sinks.begin();
331  TilewireVector::const_iterator sie = sinks.end();
332  while(sip < sie) outArcs.push_back(Arc(tilewire, *sip++));
333  }
334  }
335 
336  void DDB::expandSegmentSources(const Tilewire& inTilewire, ArcVector& outArcs,
337  EExpandDirection inExpandDirection, bool inUseTied, bool inUseRegular,
338  bool inUseIrregular, bool inUseRoutethrough) {
339  // expand the segment
340  TilewireVector segment;
341  expandSegment(inTilewire, segment, inExpandDirection);
342  // expand all of the arcs
343  TilewireVector::const_iterator sep = segment.begin();
344  TilewireVector::const_iterator see = segment.end();
345  while(sep < see) {
346  // expand the tilewire sources
347  const Tilewire& tilewire = *sep++;
348  TilewireVector sources;
349  expandTilewireSources(tilewire, sources, inUseTied, inUseRegular, inUseIrregular,
350  inUseRoutethrough);
351  // rewrite the sources as arcs
352  TilewireVector::const_iterator sop = sources.begin();
353  TilewireVector::const_iterator soe = sources.end();
354  while(sop < soe) outArcs.push_back(Arc(*sop++, tilewire));
355  }
356  }
357 
358 } // namespace architecture
359 } // namespace torc
Encapsulation of a wire belonging to a compact segment.
Definition: Segments.hpp:64
const WireIndex & getWireIndex(void) const
Returns the wire index.
Definition: Tilewire.hpp:66
Encapsulation of a tile index in an unsigned 32-bit integer.
static const boost::filesystem::path & getDevicesPath(void)
Returns the absolute path to the family and device database directory.
string mDeviceName
The name of the device.
Definition: DDB.hpp:54
CompactSegmentIndex getCompactSegmentIndex(void) const
Definition: Segments.hpp:82
EExpandDirection
Enumeration to indicate in which directions segments should be expanded.
Definition: DDB.hpp:92
const const xilinx::WireIndex * const_iterator
Constant T iterator type.
Definition: Array.hpp:83
Encapsulation of an arc between two tilewires.
Definition: Arc.hpp:28
void autosize(void)
Size the wire usage according to the number of device tiles.
Definition: ArcUsage.hpp:120
size_t readVersions(DigestStream &inStream, bool inShowVersion=false)
Read the version information.
Definition: Versions.cpp:25
std::istream & read(uint8_t &outValue)
Read and return a uint8_t.
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
Definition: Tilewire.hpp:101
Tiles mTiles
The family and device tile data.
Definition: DDB.hpp:72
xilinx::TileOffset TileOffset
Imported type name.
Definition: DDB.hpp:50
Array of wire indexes.
Definition: WireInfo.hpp:31
void activatePackage(const string &inName)
Activate the specified device package.
Definition: Sites.hpp:92
Header for the DirectoryTree class.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Definition: Tiles.hpp:137
T * end(void)
Returns the non-constant end iterator.
Definition: Array.hpp:97
boost::filesystem::path mDevicePath
the device database path.
Definition: DDB.hpp:58
const WireArray & getIrregularSinks(void) const
Returns the irregular sink array for this wire.
Definition: WireInfo.hpp:119
size_t readTileWireInfo(DigestStream &inStream)
Read the family wire info.
Definition: Tiles.cpp:58
ostream & mErr(void)
Returns the database console error stream.
const Array< const WireInfo > & getWireInfo(TileTypeIndex inTileTypeIndex) const
Returns the WireInfo array for the specified tile type.
Definition: Tiles.hpp:140
const WireArray & getSources(void) const
Returns the source array for this wire.
Definition: WireInfo.hpp:117
size_t readTileTypes(DigestStream &inStream)
Read the family tile types.
Definition: Tiles.cpp:25
void expandSegmentSinks(const Tilewire &inTilewire, ArcVector &outSinks, EExpandDirection inExpandDirection=eExpandDirectionNone, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands all sink arcs for the given tilewire's segment.
Definition: DDB.cpp:314
size_t readIrregularArcs(DigestStream &inStream)
Read the irregular arcs for the device.
Definition: Segments.cpp:173
Encapsulation of an irregular arc.
Definition: Segments.hpp:105
Encapsulation of a wire index in an unsigned 16-bit integer.
std::vector< Arc > ArcVector
Vector of Arc objects.
Definition: Arc.hpp:78
std::string string
Encapsulation of a tile offset in an unsigned 32-bit integer.
const WireArray & getRoutethroughSources(void) const
Returns the routethrough source array for this wire.
Definition: WireInfo.hpp:125
void expandTilewireSinks(const Tilewire &inTilewire, TilewireVector &outSinks, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sinks.
Definition: DDB.cpp:214
const WireArray & getTiedSources(void) const
Returns the tied source array for this wire.
Definition: WireInfo.hpp:113
Header for torc::physical output stream helpers.
const WireArray & getIrregularSources(void) const
Returns the irregular source array for this wire.
Definition: WireInfo.hpp:121
size_t readFamilyName(class DigestStream &inStream)
Reads the family name from a device DigestStream.
Definition: DDB.cpp:98
string mFamilyName
The name of the family.
Definition: DDB.hpp:56
Encapsulation of a device tile and wire pair.
Definition: Tilewire.hpp:39
size_t readPrimitivePinMaps(DigestStream &inStream)
Read the site pin mappings for the family.
Definition: Sites.cpp:267
Array2D< CompactSegmentTilewire > mCompactSegments
The compact segments in the device.
Definition: Segments.hpp:117
const WireArray & getSinks(void) const
Returns the sink array for this wire.
Definition: WireInfo.hpp:115
void expandTilewireSources(const Tilewire &inTilewire, TilewireVector &outSources, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sources.
Definition: DDB.cpp:264
void expandSegmentSources(const Tilewire &inTilewire, ArcVector &outSources, EExpandDirection inExpandDirection=eExpandDirectionNone, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands all source arcs for the given tilewire's segment.
Definition: DDB.cpp:336
Encapsulation of a tile within a device tile map.
Definition: TileInfo.hpp:33
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
Definition: TileInfo.hpp:92
ArcUsage mArcUsage
The design arc usage.
Definition: DDB.hpp:74
const WireArray & getRoutethroughSinks(void) const
Returns the routethrough sink array for this wire.
Definition: WireInfo.hpp:123
void readSectionHeader(string &outHeader)
Read and return a section header.
ostream & mOut(void)
Returns the database console output stream.
ostream & mLog(void)
Returns the database console log stream.
Encapsulation of dotted decimal DottedVersion numbers.
const Segments::IrregularArc * getIrregularArc(TileIndex inTileIndex, WireIndex inSourceWireIndex, WireIndex inSinkWireIndex)
Return a pointer to the requested IrregularArc, or 0 if the arc does not exist.
Definition: Segments.cpp:213
boost::filesystem::path mFamilyPath
the family database path.
Definition: DDB.hpp:60
Encapsulation of compact segment index and an anchoring tile index.
Definition: Segments.hpp:78
Segments mSegments
The device segment data.
Definition: DDB.hpp:68
Header for the DigestStream class.
const Segments::SegmentReference & getTilewireSegment(const Tilewire &inTilewire) const
Return the segment reference for the given tile and wire index.
Definition: Segments.hpp:182
T * begin(void)
Returns the non-constant begin iterator.
Definition: Array.hpp:95
const WireArray & getTiedSinks(void) const
Returns the tied sink array for this wire.
Definition: WireInfo.hpp:111
Header for the DDB class.
size_t readPackages(DigestStream &inStream)
Read the packages for the device.
Definition: Sites.cpp:25
const TileIndex & getTileIndex(void) const
Returns the tile index.
Definition: Tilewire.hpp:64
void setSize(uint32_t inSize)
Discards all contents and resizes the array.
Definition: Array.hpp:107
StringVector mSpeedGrades
The supported speed grades.
Definition: DDB.hpp:66
Encapsulation of a wire within a tile type.
Definition: WireInfo.hpp:36
Sites mSites
The family and device site data.
Definition: DDB.hpp:70
void initialize(const string &inDeviceName, const string &inPackageName)
Initializes the database.
Definition: DDB.cpp:31
Encapsulation of a device or family digest stream.
size_t readTileMap(DigestStream &inStream)
Read the device tile map.
Definition: Tiles.cpp:226
size_t readTilewireSegments(DigestStream &inStream)
Read the segment entries for every tile.
Definition: Segments.cpp:32
size_t getBytesRead(void) const
Returns the number of bytes read.
size_t readPrimitiveTypes(DigestStream &inStream)
Read the primitive types for the family.
Definition: Sites.cpp:90
WireUsage mWireUsage
The design wire usage.
Definition: DDB.hpp:76
void autosize(void)
Size the wire usage according to the number of device tiles.
Definition: WireUsage.hpp:68
size_t readSpeedGrades(class DigestStream &inStream)
Reads the supported speed grades from a device DigestStream.
Definition: DDB.cpp:121
size_t readSegments(DigestStream &inStream, bool inExtendedAnchorTileCount)
Read the compact segments for the device.
Definition: Segments.cpp:89
Versions mFamilyVersion
The family database version.
Definition: DDB.hpp:64
Encapsulation of a static array.
Definition: Array.hpp:39
void expandSegment(const Tilewire &inTilewire, TilewireVector &outTilewires, EExpandDirection inExpandDirection=eExpandDirectionNone)
Expands the given tilewire's segment.
Definition: DDB.cpp:154
const DottedVersion & getFormat(void) const
Returns the database format version.
Definition: Versions.hpp:70
size_t readSites(DigestStream &inStream)
Read the sites for the device.
Definition: Sites.cpp:305
Versions mDeviceVersion
The device database version.
Definition: DDB.hpp:62