torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SiteTypesUnitTest.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 Unit test for the SiteTypes class.
18 
19 #include <boost/test/unit_test.hpp>
23 #include "torc/physical/Design.hpp"
28 #include "torc/physical/Named.hpp"
29 #include <boost/regex.hpp>
30 #include <string>
31 #include <map>
32 #include <fstream>
33 #include <iostream>
34 
35 
36 namespace torc {
37 namespace architecture {
38 
39 BOOST_AUTO_TEST_SUITE(architecture)
40 
41 
42 
43 /// \brief Unit test to iterate through the ConfigMaps of a XDL file.
44 BOOST_AUTO_TEST_CASE(iterate_configmaps) {
45 
46  using namespace torc::physical;
47 
48  // create the appropriate file paths
50  / "torc" / "physical" / "DesignUnitTest.reference.xdl";
51 
52  // import the XDL design
53  std::fstream fileStream(referencePath.string().c_str());
54  BOOST_REQUIRE(fileStream.good());
55  XdlImporter importer;
56 
57  importer(fileStream, referencePath.string());
58 
59  // look up the design (and do something with it ...)
60  torc::physical::DesignSharedPtr designPtr = importer.getDesignPtr();
61  BOOST_REQUIRE(designPtr.get() != 0);
62 
63  Circuit::InstanceSharedPtrConstIterator p = designPtr->instancesBegin();
64  Circuit::InstanceSharedPtrConstIterator e = designPtr->instancesEnd();
65 
66  while(p < e) {
67  InstanceSharedPtr instancePtr = *p++;
68  std::cout << "Instance:" << instancePtr->getName() << std::endl;
69  ConfigMap::const_iterator cp = instancePtr->configBegin();
70  ConfigMap::const_iterator ce = instancePtr->configEnd();
71  while(cp != ce) {
72  std::cout << "\tConfig:" << cp->first << "---->" << cp->second.getName() << ":" << cp->second.getValue() << std::endl;
73  cp++;
74  }
75  }
76 }
77 
78 
79 
80 
81 
82 bool findLUTbyCfg(const std::string isit);
83 bool findLUTbyCfg(const std::string isit)
84 {
85  static const boost::regex e("(^(<eqn>)|((#LUT:|#RAM:|#ROM:)<eqn>)$)");
86  return regex_match(isit, e);
87 }
88 bool findFFbyCfg(const std::string isit);
89 bool findFFbyCfg(const std::string isit)
90 {
91  static const boost::regex e("(^#(FF|LATCH)$)");
92  return regex_match(isit, e);
93 }
94 bool findINV(const std::string isit);
95 bool findINV(const std::string isit)
96 {
97  static const boost::regex e("^.*_B$");
98  return regex_match(isit, e);
99 }
100 bool findROUTETHROUGH(const std::string isit);
102 {
103  static const boost::regex e("^_ROUTETHROUGH.*");
104  return regex_match(isit, e);
105 }
106 bool findAND(const std::string isit);
107 bool findAND(const std::string isit)
108 {
109  static const boost::regex e("^.*AND.*");
110  return regex_match(isit, e);
111 }
112 bool findVCC(const std::string isit);
113 bool findVCC(const std::string isit)
114 {
115  static const boost::regex e("^.*VCC$");
116  return regex_match(isit, e);
117 }
118 bool findGND(const std::string isit);
119 bool findGND(const std::string isit)
120 {
121  static const boost::regex e("^.*GND$");
122  return regex_match(isit, e);
123 }
124 
125 
126 
127 ///\brief Unit test to iterate through a database and classify all existing elements into pseudo-types
128 BOOST_AUTO_TEST_CASE(classify_elements){
129 //xc6vhx380t xc5vlx30 xc4vfx60 xc6slx9l xc2vp40 xc2v40 xc3s250e
130 
131  // open and initialize a database
132  DDB ddb("xc5vlx30");
133  // look up the logic sites in the device
134  const Sites& sites = ddb.getSites();
135 
136  // look up the primitive def types
137  typedef const Array<const PrimitiveDef> PrimitiveDefArray;
138  PrimitiveDefArray& primitiveDefs = sites.getSiteTypes();
139  PrimitiveDefArray::const_iterator p = primitiveDefs.begin();
140  PrimitiveDefArray::const_iterator e = primitiveDefs.end();
141 
142  /// \brief Map of all elements.
143  typedef std::map<std::string, PrimitiveElement*> AllElements;
144  AllElements allElements;
145  /// \brief Map of all terminals.
146  typedef std::map<std::string, PrimitiveElement*> AllTerminals;
147  AllTerminals allTerminals;
148  /// \brief Map of all switches.
149  typedef std::map<std::string, PrimitiveElement*> AllSwitches;
150  AllSwitches allSwitches;
151  /// \brief Map of all orphans.
152  typedef std::map<std::string, PrimitiveElement*> AllOrphans;
153  AllOrphans allOrphans;
154  /// \brief Map of all muxes.
155  typedef std::map<std::string, PrimitiveElement*> AllMuxes;
156  AllMuxes allMuxes;
157  /// \brief Map of all inverters.
158  typedef std::map<std::string, PrimitiveElement*> AllInverters;
159  AllInverters allInverters;
160  /// \brief Map of all luts.
161  typedef std::map<std::string, PrimitiveElement*> AllLuts;
162  AllLuts allLuts;
163  /// \brief Map of all flops.
164  typedef std::map<std::string, PrimitiveElement*> AllFlops;
165  AllFlops allFlops;
166  /// \brief Map of all main elements.
167  typedef std::map<std::string, PrimitiveElement*> AllMains;
168  AllMains allMains;
169  /// \brief Map of all main elements.
170  typedef std::map<std::string, PrimitiveElement*> AllAnds;
171  AllAnds allAnds;
172  /// \brief Map of all main elements.
173  typedef std::map<std::string, PrimitiveElement*> AllVccs;
174  AllVccs allVccs;
175  /// \brief Map of all main elements.
176  typedef std::map<std::string, PrimitiveElement*> AllGnds;
177  AllGnds allGnds;
178 
179  //int i = 0;
180  // iterate over the primitive defs
181  while(p < e) {
182  // look up the current primitive def
183  const PrimitiveDef& primitiveDef = *p++;
184  //std::cout << "Inside Primitive Def:" << primitiveDef.getName() << std::endl << std::endl;
186  // look up the primitive def pins
187  const PrimitivePinArray& primitivePins = primitiveDef.getPins();
188  PrimitivePinArray::const_iterator sp = primitivePins.begin();
189  PrimitivePinArray::const_iterator se = primitivePins.end();
190  const PrimitivePin primitivePin;
191  // keep a track of all the primitive pins (to find the main elements, we need to compare elements with site pins)
192  std::vector<std::string> primitivePinNames;
193  std::vector<std::string>::const_iterator spe = unique(primitivePinNames.begin(), primitivePinNames.end());
194  (void) spe;
195 
196  // iterate over the primitive def pins
197  if(primitivePins.getSize() > 0) {
198  //std::cout << " ";
199  while(sp < se) {
200  const PrimitivePin& primitivePin = *sp++;
201  primitivePinNames.push_back(primitivePin.getName());
202  }
203  //std::cout << std::endl;
204  }
205 
206  // look up the primitive def elements
207  const PrimitiveElementArray& elements = primitiveDef.getElements();
210 
211 
212  // iterate over the primitive def elements
213  if(elements.getSize() > 0) {
214  while(ep < ee) {
215  const PrimitiveElement& element = *ep++;
216 
217  //std::cout << "Inside ELEMENT NAME:" << element.getName() << std::endl;
218  /// \brief Map of all elements.
219  allElements[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
220 
221  /// \brief Capture the 'main' elements.
222  if(primitiveDef.getName() == element.getName()){
223  //std::cout << "\tMAIN element:" << element.getName() << std::endl;
224  allMains[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
225  allElements.erase(element.getName());
226  }
227  //typedef const Array<const Sites::ElementPin> ElementPinArray;
228  const PrimitiveElementPinArray& elementPins = element.getPins();
231 
232  //Count input pins of Muxes/Invs
233  int countPins = 0;
234  int isINV = 0;
235  std::string cfgValue;
236  int totalPinCount = 0;
237  int cfgSize = 0;
238  int notEmpty = 0;
239  int isLUT = 0;
240  int isFF = 0;
241  int isVCC = 0;
242  int isGND = 0;
243  int isAND = 0;
244 
245  std::vector<std::string> elementPinNames;
246  std::vector<std::string>::const_iterator ppe = unique(elementPinNames.begin(), elementPinNames.end());
247  (void) ppe;
248 
249  //Iterate through Element PINS
250  while(pp < pe) {
251  const PrimitiveElementPin& elementPin = *pp++;
252  //(void) elementPin;
253 
254  //Check if the pin is an Input pin
255  if(elementPin.isInput() == 1){
256  typedef std::set<std::string> StringSet;
257  const StringSet elementCfgs = element.getCfgs();
258  StringSet::const_iterator cp = elementCfgs.begin();
259  StringSet::const_iterator ce = elementCfgs.end();
260 
261  //Iterate through the Cfgs
262  while(cp != ce){
263 
264  const std::string& isit = *cp++;
265  //Check if the pin names and cfgs match
266  if(elementPin.getName() == isit){
267  if(findINV(isit) == 1){
268  elementPinNames.push_back(elementPin.getName());
269  isINV = 1;
270  countPins++;
271  }else{
272  elementPinNames.push_back(elementPin.getName());
273  countPins++;
274  }
275  break;
276  }
277  cfgValue = isit;
278  //trying to check if the # of cgfs and # of element pins match
279  cfgSize = elementCfgs.size();
280  if(!elementCfgs.empty()) notEmpty = 1;
281  if(findLUTbyCfg(isit) == 1){
282  isLUT = 1;
283  }else if(findFFbyCfg(isit) == 1){
284  isFF = 1;
285  }
286  }
287  }
288  if((findVCC(element.getName()) == 1) && (elementPin.getName() == "1")){
289  isVCC = 1;
290  }else if((findGND(element.getName()) == 1) && (elementPin.getName() == "0")){
291  isGND = 1;
292  }else if((findAND(element.getName()) == 1) && ((elementPin.getName() == "0") || (elementPin.getName() == "1"))){
293  isAND = 1;
294  }
295  totalPinCount++;
296  }
297 
298  if(countPins > 0) {
299  //If the pin names and cfgs match, it is a MUX (or INV)
300  if(countPins == 1){
301  //std::cout << "\tSWITCH: " << element.getName() << " "; //std::endl;
302  allMuxes[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
303  allSwitches[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
304  allElements.erase(element.getName());
305  }else if(isINV == 1){
306  //std::cout << "\tINV: " << element.getName() << " ";
307  allMuxes[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
308  allInverters[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
309  allElements.erase(element.getName());
310  }else if(isINV == 0){
311  //std::cout << "\tMUX: " << element.getName() << " ";
312  allMuxes[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
313  allElements.erase(element.getName());
314  }
315  //std::cout << countPins << " "; // << std::endl;
316  //print the PINs that are matched with cfg within that element
317  for(std::vector<std::string>::const_iterator b = elementPinNames.begin(); b != elementPinNames.end(); b++) {
318  //std::cout << *b << " ";
319  }
320  // check if the number of pins is equal to the number of cfgs
321  if(notEmpty == 1){
322  if(countPins != cfgSize) throw 0;
323  }
324 
325  }else if(isLUT == 1){
326  //std::cout << "\tLUT: " << element.getName() << std::endl;//" ";
327  allLuts[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
328  allElements.erase(element.getName());
329  }else if(isFF == 1){
330  //std::cout << "\tFLOP: " << element.getName() << std::endl;//" ";
331  allFlops[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
332  allElements.erase(element.getName());
333  }
334  if(totalPinCount == 0){
335  //std::cout << "\tORPHAN:" << element.getName() <<std::endl;
336  allOrphans[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
337  allElements.erase(element.getName());
338  }
339  if(findROUTETHROUGH(element.getName()) == 1){
340  //std::cout << "ROUTETHROUGH FOUND! ---- d e l e t i n g !" << std::endl;
341  allElements.erase(element.getName());
342  }
343  if(isAND == 1){//if(findAND(element.getName()) == 1){
344  allAnds[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
345  allElements.erase(element.getName());
346  }
347  if(isVCC == 1){
348  allVccs[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
349  allElements.erase(element.getName());
350  }
351  if(isGND == 1){
352  allGnds[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
353  allElements.erase(element.getName());
354  }
355  for(std::vector<std::string>::const_iterator s = primitivePinNames.begin(); s != primitivePinNames.end(); s++) {
356  if(element.getName() == *s){
357  //std::cout << "\tTERMINAL:" << element.getName() << std::endl;
358  allTerminals[element.getName()] = const_cast <PrimitiveElement*>(&element); //element.getName();
359  allElements.erase(element.getName());
360  break;
361  }
362  }
363  }
364  }
365 
366  //std::cout << "-----------------------------------------------------------" <<std::endl;
367  //std::cout << std::endl;
368  }
369  std::map<std::string, PrimitiveElement*>::const_iterator pos;
370  std::cout << "------ UNCLASSIFIED ELEMENTS -------" <<std::endl;
371  for(pos = allElements.begin(); pos != allElements.end(); ++pos) {
372  std::cout << "Element: " << pos->first << std::endl;// " ";
373  //std::cout << "Value:" << pos->second << std::endl;
374  }
375  std::cout << std::endl;
376  std::cout << "------ MUXES -------" <<std::endl;
377  for(pos = allMuxes.begin(); pos != allMuxes.end(); ++pos) {
378  std::cout << "Element: " << pos->first << std::endl; //<< " ";
379  //std::cout << "Value:" << pos->second << std::endl;
380  }
381  std::cout << std::endl;
382  std::cout << "------ LUTS -------" <<std::endl;
383  for(pos = allLuts.begin(); pos != allLuts.end(); ++pos) {
384  std::cout << "Element: " << pos->first << std::endl; //<< " ";
385  //std::cout << "Value:" << pos->second << std::endl;
386  }
387  std::cout << std::endl;
388  std::cout << "------ FLOPS -------" <<std::endl;
389  for(pos = allFlops.begin(); pos != allFlops.end(); ++pos) {
390  std::cout << "Element: " << pos->first << std::endl; //<< " ";
391  //std::cout << "Value:" << pos->second << std::endl;
392  }
393  std::cout << std::endl;
394  std::cout << "------ TERMINALS -------" <<std::endl;
395  for(pos = allTerminals.begin(); pos != allTerminals.end(); ++pos) {
396  std::cout << "Element: " << pos->first << std::endl; //<< " ";
397  //std::cout << "Value:" << pos->second << std::endl;
398  }
399  std::cout << std::endl;
400  std::cout << "------ SWITCHES -------" <<std::endl;
401  for(pos = allSwitches.begin(); pos != allSwitches.end(); ++pos) {
402  std::cout << "Element: " << pos->first << std::endl; //<< " ";
403  //std::cout << "Value:" << pos->second << std::endl;
404  }
405  std::cout << std::endl;
406  std::cout << "------ ANDS -------" <<std::endl;
407  for(pos = allAnds.begin(); pos != allAnds.end(); ++pos) {
408  std::cout << "Element: " << pos->first << std::endl; //<< " ";
409  //std::cout << "Value:" << pos->second << std::endl;
410  }
411  std::cout << std::endl;
412  std::cout << "------ VCCS -------" <<std::endl;
413  for(pos = allVccs.begin(); pos != allVccs.end(); ++pos) {
414  std::cout << "Element: " << pos->first << std::endl; //<< " ";
415  //std::cout << "Value:" << pos->second << std::endl;
416  }
417  std::cout << std::endl;
418  std::cout << "------ GNDS -------" <<std::endl;
419  for(pos = allGnds.begin(); pos != allGnds.end(); ++pos) {
420  std::cout << "Element: " << pos->first << std::endl; //<< " ";
421  //std::cout << "Value:" << pos->second << std::endl;
422  }
423 
424 
425 }
426 
427 
428 
429 
430 
431 
432 
433 
434 
435 /// \brief Unit test for the SiteTypes class.
436 BOOST_AUTO_TEST_CASE(SiteTypesUnitTest) {
437 
438  // open and initialize a database
439  DDB ddb("xc5vlx30");
440  // look up the logic sites in the device
441  const Sites& sites = ddb.getSites();
442  // look up the primitive def types
443  typedef const Array<const PrimitiveDef> PrimitiveDefArray;
444  PrimitiveDefArray& primitiveDefs = sites.getSiteTypes();
445  PrimitiveDefArray::const_iterator p = primitiveDefs.begin();
446  PrimitiveDefArray::const_iterator e = primitiveDefs.end();
447  int i = 0;
448  // iterate over the primitive defs
449  while(p < e) {
450  // look up the current primitive def
451  const PrimitiveDef& primitiveDef = *p++;
452  std::cout << i << ": " << primitiveDef.getName() << std::endl;
454  // look up the primitive def pins
455  const PrimitivePinArray& primitivePins = primitiveDef.getPins();
456  PrimitivePinArray::const_iterator sp = primitivePins.begin();
457  PrimitivePinArray::const_iterator se = primitivePins.end();
458  // iterate over the primitive def pins
459  if(false && primitivePins.getSize() > 0) {
460  std::cout << " ";
461  // output each of the pin names along with the flags (2-INPUT, 4-OUTPUT)
462  while(sp < se) {
463  const PrimitivePin& primitivePin = *sp++;
464  std::cout << primitivePin.getName() << " ";
465  std::cout << primitivePin.getFlags() << " ";
466  }
467  std::cout << std::endl;
468  }
469  // look up the primitive def elements
470 
471  const PrimitiveElementArray& elements = primitiveDef.getElements();
474  // iterate over the primitive def elements
475  if(true && elements.getSize() > 0) {
476  // output each of the element names and if the pin is a basic element
477  while(ep < ee) {
478  const PrimitiveElement& element = *ep++;
479  std::cout << "ELEMENT NAME:" << element.getName() << " "<< std::endl;
480  //std::cout << " ";
481  //std::cout<< "ELEMENT IS Basic ELement:" << element.isBel() << " " << std::endl;
482 
483  const PrimitiveElementPinArray& elementPins = element.getPins();
486  // iterate over the element pins
487  if(elementPins.getSize()> 0) {
488 
489  // output each of the element pin names along with the element flags (2-Input, 4-Output)
490  while(pp < pe) {
491  // std::cout << " ";
492  const PrimitiveElementPin& elementPin = *pp++;
493  std::cout << elementPin.getElementPtr()->getName() << "." << elementPin.getName() << " ";
494  //std::cout << ((elementPin.getElement()->getName() == element.getName())
495  //? "" : (elementPin.getElement()->getName() + " "));
496  //std::cout<< "ELEMENT PIN NAME:" << elementPin.getName() << " " << std::endl;
497  //std::cout << " ";
498  //std::cout<< "ELEMENT FLAG NAME:" << elementPin.getFlags() << " " << std::endl;
499  // typedef std::set<std::string> StringSet;
500  // const StringSet elementCfgs = element.getCfgs();
501  // StringSet::const_iterator cp = elementCfgs.begin();
502  // StringSet::const_iterator ce = elementCfgs.end();
503  // // iterate over the configs
504  // if(elementCfgs.size() != 0){
505  // // output each of the configs
506  // while(cp != ce){
507  // std::cout << " ";
508  // std::cout << "CONFIG NAME: " << *cp << " " << std::endl;
509  // *cp++;
510  // }
511  // }
512  }
513  std::cout << std::endl;
514  }
515  }
516  std::cout << std::endl;
517  }
518  const PrimitiveConnSharedPtrArray& connections = primitiveDef.getConnections();
521  // iterate over the primitive element connections
522  while(true && ccp < cce) {
523  const PrimitiveConn& connection = *(*ccp++);
524  const PrimitiveElementPin& source = *connection.getSourcePtr();
525  const PrimitiveElementPinPtrVector& sinks = connection.getSinks();
526  std::cout << source.getElementPtr()->getName() << "." << source.getName() << " ==> ";
527  PrimitiveElementPinPtrVector::const_iterator epp = sinks.begin();
528  PrimitiveElementPinPtrVector::const_iterator epe = sinks.end();
529  while(epp < epe) {
530  const PrimitiveElementPin& sink = **epp++;
531  std::cout << sink.getElementPtr()->getName() << "." << sink.getName() << " ";
532  }
533  std::cout << std::endl;
534  }
535  i++;
536  }
537  BOOST_REQUIRE(true);
538 
539 }
540 
541 BOOST_AUTO_TEST_SUITE_END()
542 
543 } // namespace architecture
544 } // namespace torc
545 
const PrimitiveElementPinPtrVector & getSinks(void) const
Returns a vector of pointers to the sink primitive element pins.
bool findROUTETHROUGH(const std::string isit)
PinFlags getFlags(void) const
Returns the pin direction flags.
const const PrimitivePin * const_iterator
Constant T iterator type.
Definition: Array.hpp:83
Header for the ConfigMap class.
Device database, including complete wiring and logic support.
Definition: DDB.hpp:42
BOOST_AUTO_TEST_CASE(ArcUnitTest)
Unit test for the Arc class.
Definition: ArcUnitTest.cpp:29
const PrimitiveElementPin * getSourcePtr(void) const
Returns a pointer to the source primitive element pin.
DesignSharedPtr getDesignPtr(void)
Returns a shared pointer for the design.
Header for the DirectoryTree class.
Header for the Instance class.
Encapsulation of primitive site definition, with associated connections, elements, and pins.
T * end(void)
Returns the non-constant end iterator.
Definition: Array.hpp:97
Header for the Sites class.
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
Definition: Circuit.hpp:72
bool findAND(const std::string isit)
bool findFFbyCfg(const std::string isit)
bool findINV(const std::string isit)
const string & getName(void) const
Returns the pin name.
const Sites & getSites(void) const
Returns a constant reference to the family and device site data.
Definition: DDB.hpp:144
const string & getName(void) const
Returns the pin name.
std::string string
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
Definition: ConfigMap.hpp:52
const string & getName(void) const
Returns the name of the element.
PrimitiveElementPinArray & getPins(void)
Returns a non-constant array of element pins. This function should only be used by the Sites class d...
Architecture aware importer from XDL format into a physical design.
const Array< const PrimitiveDef > & getSiteTypes(void) const
Returns the site types for this family.
Definition: Sites.hpp:125
bool findGND(const std::string isit)
bool isInput(void) const
Returns true if this pin is a primitive input.
const PrimitiveConnSharedPtrArray & getConnections(void) const
Returns a constant array of primitive connection shared pointers.
Site type and population data for the family and the device.
Definition: Sites.hpp:45
Header for the Design class.
Encapsulation of a PrimitiveDef internal connection. This class is analogous to a permanent net with...
Header for the Named class.
Array< const PrimitivePin > PrimitivePinArray
Array of constant PrimitivePin objects.
const PrimitiveElement * getElementPtr(void) const
Returns a pointer to the primitive element that owns this pin.
PrimitivePinArray & getPins(void)
Returns a non-constant array of element pins. This function should only be used by the Sites class d...
boost::filesystem::path path
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
Encapsulation of a primitive pin's name and flags. Primitive pins are logic site inputs or outputs...
const PrimitiveElementArray & getElements(void) const
Returns a constant array of primitive elements.
Encapsulation of a primitive site element. Primitive elements are subcomponents of logic primitive s...
Encapsulation of a primitive element pin's name, flags, and element pointer. Primitive element pins ...
bool findLUTbyCfg(const std::string isit)
T * begin(void)
Returns the non-constant begin iterator.
Definition: Array.hpp:95
Header for the DDB class.
const StringSet & getCfgs(void) const
Returns the set of allowable configuration values.
Header for the Circuit class.
std::vector< const PrimitiveElementPin * > PrimitiveElementPinPtrVector
Vector of constant PrimitiveElementPin pointers.
bool findVCC(const std::string isit)
Header for the XdlImporter class.
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.
Encapsulation of a static array.
Definition: Array.hpp:39
uint32_t getSize(void) const
Returns the array size.
Definition: Array.hpp:104
const string & getName(void) const
Returns the name of the primitive.