19 #include <boost/test/unit_test.hpp>
25 namespace architecture {
27 BOOST_AUTO_TEST_SUITE(architecture)
37 torc::common::DeviceVector::const_iterator dp = devices.begin();
38 torc::common::DeviceVector::const_iterator de = devices.end();
41 if(device.empty())
break;
63 BOOST_CHECK(tileTypeCount != 0);
71 if(*tileTypeName == 0)
72 BOOST_CHECK(*tileTypeName != 0);
87 BOOST_CHECK(tileCount != 0);
89 BOOST_CHECK(rowCount != 0);
91 BOOST_CHECK(colCount != 0);
92 if(static_cast<int>(tileCount) != rowCount * colCount)
93 BOOST_CHECK_EQUAL(static_cast<int>(tileCount), rowCount * colCount);
111 const char* tileName = tileInfo.
getName();
113 BOOST_CHECK(*tileName != 0);
115 if(tileIndex != rowColTileIndex)
116 BOOST_CHECK_EQUAL(tileIndex, rowColTileIndex);
118 if(tileIndex != findTileIndex)
119 BOOST_CHECK_EQUAL(tileIndex, findTileIndex);
137 if(&wireInfo != &wireInfoArray[wireIndex])
138 BOOST_CHECK(&wireInfo == &wireInfoArray[wireIndex]);
139 const char* wireName = wireInfo.
getName();
141 BOOST_CHECK(*wireName != 0);
143 if(wireIndex != findWireIndex)
144 BOOST_CHECK_EQUAL(wireIndex, findWireIndex);
149 BOOST_AUTO_TEST_SUITE_END()
Encapsulation of a tile index in an unsigned 32-bit integer.
const TileCol & getCol(void) const
Returns the column for this tile.
Encapsulation of a tile row in an unsigned 16-bit integer.
const TileRow & getRow(void) const
Returns the row for this tile.
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.
BOOST_AUTO_TEST_CASE(ArcUnitTest)
Unit test for the Arc class.
TileRow getRowCount(void) const
Returns the row count for this device.
const Tiles & getTiles(void) const
Returns a constant reference to the family and device tile data.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
const Array< const WireInfo > & getWireInfo(TileTypeIndex inTileTypeIndex) const
Returns the WireInfo array for the specified tile type.
Encapsulation of a wire index in an unsigned 16-bit integer.
TileCount getTileCount(void) const
Returns the tile count for this device.
Tile map, tile type, and wire information for the family and device.
Encapsulation of a wire count in an unsigned 16-bit integer.
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.
Header for the Devices class.
TileIndex findTileIndex(const string &inName) const
Returns the tile index for the given tile name.
Encapsulation of a tile type count in an unsigned 16-bit integer.
TileCol getColCount(void) const
Returns the column count for this device.
WireIndex findWireIndex(TileTypeIndex inTileTypeIndex, const string &inName) const
Returns the wire index for the given wire name in the given tile type.
Encapsulation of a tile type index in an unsigned 16-bit integer.
const char * getName(void) const
Returns the name for this tile.
Header for the DDB class.
Encapsulation of a wire within a tile type.
std::vector< std::string > DeviceVector
Vector of device names.
Header for the Tiles class.
const char * getName(void) const
Returns the name for this wire.
static const DeviceVector & getUnitTestDevices(void)
Returns a subset of devices for unit tests.
void testDeviceTiles(DDB &inDDB)
WireCount getWireCount(TileTypeIndex inTileTypeIndex) const
Returns the wire count for the specified tile type.
TileIndex getTileIndex(TileRow inRow, TileCol inCol) const
Returns the tile index for the given [row,column] pair.
Encapsulation of a static array.