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

Namespace for Xilinx architecture support. More...

Data Structures

struct  WireCount
 Encapsulation of a wire count in an unsigned 16-bit integer. More...
 
struct  WireIndex
 Encapsulation of a wire index in an unsigned 16-bit integer. More...
 
struct  WireFlags
 Encapsulation of wire attribute flags in an unsigned 16-bit integer. More...
 
struct  TileCount
 Encapsulation of a tile count in an unsigned 32-bit integer. More...
 
struct  TileIndex
 Encapsulation of a tile index in an unsigned 32-bit integer. More...
 
struct  TileOffset
 Encapsulation of a tile offset in an unsigned 32-bit integer. More...
 
struct  TileRow
 Encapsulation of a tile row in an unsigned 16-bit integer. More...
 
struct  TileCol
 Encapsulation of a tile column in an unsigned 16-bit integer. More...
 
struct  TileTypeCount
 Encapsulation of a tile type count in an unsigned 16-bit integer. More...
 
struct  TileTypeIndex
 Encapsulation of a tile type index in an unsigned 16-bit integer. More...
 
struct  CompactSegmentCount
 Encapsulation of a compact segment count in an unsigned 32-bit integer. More...
 
struct  CompactSegmentIndex
 Encapsulation of a compact segment index in an unsigned 32-bit integer. More...
 
struct  SiteCount
 Encapsulation of a site count in an unsigned 32-bit integer. More...
 
struct  SiteIndex
 Encapsulation of a site index in an unsigned 32-bit integer. More...
 
struct  SiteFlags
 Encapsulation of site attribute flags in an unsigned 16-bit integer. More...
 
struct  SiteTypeCount
 Encapsulation of a site type count in an unsigned 16-bit integer. More...
 
struct  SiteTypeIndex
 Encapsulation of a site type index in an unsigned 16-bit integer. More...
 
struct  PinCount
 Encapsulation of a pin count in an unsigned 32-bit integer. More...
 
struct  PinIndex
 Encapsulation of a pin index in an unsigned 32-bit integer. More...
 
struct  PinFlags
 Encapsulation of pin attribute flags in an unsigned 16-bit integer. More...
 
struct  PackageCount
 Encapsulation of a package count in an unsigned 16-bit integer. More...
 
struct  PackageIndex
 Encapsulation of a package index in an unsigned 16-bit integer. More...
 
struct  PadCount
 Encapsulation of a pad count in an unsigned 32-bit integer. More...
 
struct  PadIndex
 Encapsulation of a pad index in an unsigned 32-bit integer. More...
 

Functions

 BOOST_AUTO_TEST_CASE (TilewireUnitTest)
 Unit test for the Tilewire class. More...
 
TileIndex operator+ (const TileOffset &inTileOffset, const TileIndex &inTileIndex)
 Addition operator to add an anchor tile index to a relative tile offset. More...
 

Detailed Description

Namespace for Xilinx architecture support.

This namespace defines types suitable for Xilinx architectures. These types may or may not resemble those for other architectures.

Function Documentation

torc::architecture::xilinx::BOOST_AUTO_TEST_CASE ( TilewireUnitTest  )

Unit test for the Tilewire class.

Definition at line 30 of file TilewireUnitTest.cpp.

30  {
31  // create accessory wires and tiles
32  WireIndex wire1(15);
33  WireIndex wire2(300);
34  TileIndex tile1(1);
35  TileIndex tile2(1);
36 
37  // features tested:
38  // sizeof(Tilewire)
39  BOOST_CHECK_EQUAL(sizeof(Tilewire), (sizeof(TileIndex) + sizeof(WireIndex)));
40  BOOST_CHECK_EQUAL(sizeof(Tilewire), 6u);
41 
42  // functions tested:
43  // Tilewire(void);
44  // Tilewire(const TileIndex& inTileIndex, const WireIndex& inWireIndex);
45  // Tilewire(const Tilewire& inTilewire);
46  // bool operator ==(const Tilewire& rhs) const;
47  Tilewire tilewire1(tile1, wire1);
48  Tilewire tilewire2(tile2, wire2);
49  Tilewire tilewire3(tilewire1);
50  Tilewire tilewire4 = tilewire1;
51  Tilewire tilewire5;
52  BOOST_CHECK_EQUAL(tilewire1 == tilewire2, false);
53  BOOST_CHECK_EQUAL(tilewire1 == tilewire3, true);
54 
55  // functions tested:
56  // const TileIndex& getTileIndex(void) const;
57  // const WireIndex& getWireIndex(void) const;
58  // void setTileIndex(const TileIndex& inTileIndex);
59  // void setWireIndex(const WireIndex& inWireIndex);
60  BOOST_CHECK_EQUAL(tilewire3.getTileIndex(), tile1);
61  BOOST_CHECK_EQUAL(tilewire3.getWireIndex(), wire1);
62  BOOST_CHECK_EQUAL(tilewire5.getTileIndex(), TileIndex::undefined());
63  BOOST_CHECK_EQUAL(tilewire5.getWireIndex(), WireIndex::undefined());
64  tilewire3.setTileIndex(tile2);
65  tilewire3.setWireIndex(wire2);
66  BOOST_CHECK_EQUAL(tilewire3.getTileIndex(), tile2);
67  BOOST_CHECK_EQUAL(tilewire3.getWireIndex(), wire2);
68 
69  // functions tested:
70  // const Tilewire& operator =(const Tilewire& rhs) const;
71  tilewire4 = tilewire2;
72  BOOST_CHECK_EQUAL(tilewire4.getTileIndex(), tile2);
73  BOOST_CHECK_EQUAL(tilewire4.getWireIndex(), wire2);
74 
75  // functions tested:
76  // bool operator <(const Tilewire& rhs) const;
77  BOOST_CHECK_EQUAL(tilewire1 < tilewire2, true);
78  BOOST_CHECK_EQUAL(tilewire2 < tilewire1, false);
79  BOOST_CHECK_EQUAL(tilewire4 < tilewire2, false);
80  BOOST_CHECK_EQUAL(tilewire2 < tilewire4, false);
81 }

+ Here is the call graph for this function:

TileIndex torc::architecture::xilinx::operator+ ( const TileOffset &  inTileOffset,
const TileIndex &  inTileIndex 
)

Addition operator to add an anchor tile index to a relative tile offset.

Definition at line 25 of file XilinxDatabaseTypes.cpp.

25  {
26  return TileIndex(TileIndex::pod(inTileOffset) + TileIndex::pod(inTileIndex));
27  }