diff --git a/vlsisapd/examples/liberty/cplusplus/driveLiberty.cpp b/vlsisapd/examples/liberty/cplusplus/driveLiberty.cpp index 7edc84b5..90c7a115 100644 --- a/vlsisapd/examples/liberty/cplusplus/driveLiberty.cpp +++ b/vlsisapd/examples/liberty/cplusplus/driveLiberty.cpp @@ -54,7 +54,7 @@ int main ( int argc, char * argv[] ) { // Timing LIB::Timing * timing; pin->addTiming(); - timing = pin->getTiming().back(); + timing = pin->getTimings().back(); valeur="negative_unate"; timing->addAttribute(LIB::Name("timing_sense"), LIB::Attribute::String, valeur); valeur="e"; timing->addAttribute(LIB::Name("related_pin"), LIB::Attribute::String, valeur); valeur="0.101"; timing->addAttribute(LIB::Name("intrinsic_rise"), LIB::Attribute::Double, valeur); diff --git a/vlsisapd/examples/liberty/cplusplus/parseLiberty.cpp b/vlsisapd/examples/liberty/cplusplus/parseLiberty.cpp index 6634bf9a..d14499f6 100644 --- a/vlsisapd/examples/liberty/cplusplus/parseLiberty.cpp +++ b/vlsisapd/examples/liberty/cplusplus/parseLiberty.cpp @@ -9,7 +9,11 @@ int main ( int argc, char * argv[] ) { LIB::Library* library = LIB::Library::readFromFile("./testParse.lib"); if ( library ) { + // print of the library library->print(); + // print of one attribute in particular + cout << "| area of inv_x1= " << library->getCell(LIB::Name("inv_x1"))->getAttribute(LIB::Name("area"))->valueAsString() << endl; + cout << "| timing intrinsic_rise of nq of inv_x1= " << library->getCell(LIB::Name("inv_x1"))->getPin(LIB::Name("nq"))->getTiming(LIB::Name("i"))->getAttribute(LIB::Name("intrinsic_rise"))->valueAsString() << endl; } else { cerr << "library is NULL" << endl; } diff --git a/vlsisapd/src/liberty/src/Attribute.cpp b/vlsisapd/src/liberty/src/Attribute.cpp index 318170a3..ac45017f 100644 --- a/vlsisapd/src/liberty/src/Attribute.cpp +++ b/vlsisapd/src/liberty/src/Attribute.cpp @@ -53,8 +53,8 @@ double Attribute::secondValueAsDouble() const { return d; } -string Attribute::typeToString(Attribute::Type type) { - switch(type) { +string Attribute::typeToString() { + switch(_type) { case Unknown: return "unknown"; case String: return "string"; case Bool: return "bool"; diff --git a/vlsisapd/src/liberty/src/Cell.cpp b/vlsisapd/src/liberty/src/Cell.cpp index d2ab5068..9fa88c5c 100644 --- a/vlsisapd/src/liberty/src/Cell.cpp +++ b/vlsisapd/src/liberty/src/Cell.cpp @@ -9,7 +9,18 @@ using namespace std; #include "vlsisapd/liberty/FlipFlop.h" namespace LIB { -Cell::Cell(Name name): _name(name), _attributes(), _pins(), _ff(NULL), _test_cell(NULL) {}; +Cell::Cell(Name name): _name(name), _attributes(), _pins(), _ff(NULL), _testCell(NULL) {}; + +Attribute* Cell::getAttribute(Name attrName) { + Attribute* attr = NULL; + map::iterator it = _attributes.find(attrName); + if (it == _attributes.end()) { + cerr << "[ERROR] Cell " << _name.getString() << " has no attribute named " << attrName.getString() << endl; + exit(1); + } + attr= (*it).second; + return attr; +} Pin* Cell::getPin(Name pinName) { Pin* pin = NULL; @@ -48,7 +59,7 @@ void Cell::addFF(Name noninverting, Name inverting) { } void Cell::setTestCell(Cell *cell) { - _test_cell = cell; + _testCell = cell; } void Cell::print() { @@ -58,7 +69,7 @@ void Cell::print() { cout << "| Attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) + << ", type= " << (*it).second->typeToString() << ", value= " << (*it).second->valueAsString() << endl; } // Cell's pins @@ -69,8 +80,8 @@ void Cell::print() { if(_ff) _ff->print(); // test_cell - if(_test_cell) - _test_cell->print(); + if(_testCell) + _testCell->print(); } bool Cell::write(ofstream &file, bool test) { @@ -95,8 +106,8 @@ bool Cell::write(ofstream &file, bool test) { if(_ff) _ff->write(file); // test_cell - if(_test_cell) - _test_cell->write(file, true); + if(_testCell) + _testCell->write(file, true); file << " }" << endl; return true; } diff --git a/vlsisapd/src/liberty/src/FlipFlop.cpp b/vlsisapd/src/liberty/src/FlipFlop.cpp index 4e6b9dad..60b98086 100644 --- a/vlsisapd/src/liberty/src/FlipFlop.cpp +++ b/vlsisapd/src/liberty/src/FlipFlop.cpp @@ -9,6 +9,17 @@ using namespace std; namespace LIB { FlipFlop::FlipFlop(Name noninverting, Name inverting): _noninverting(noninverting), _inverting(inverting), _attributes() {}; +Attribute* FlipFlop::getAttribute(Name attrName) { + Attribute* attr = NULL; + map::iterator it = _attributes.find(attrName); + if (it == _attributes.end()) { + cerr << "[ERROR] FlipFLop has no attribute named " << attrName.getString() << endl; + exit(1); + } + attr= (*it).second; + return attr; +} + void FlipFlop::addAttribute(Name attrName, Attribute::Type attrType, string& attrValue) { Attribute* attr = new Attribute(attrName, attrType, attrValue); map::iterator it = _attributes.find(attrName); @@ -26,7 +37,7 @@ void FlipFlop::print() { cout << "| Attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) + << ", type= " << (*it).second->typeToString() << ", value= " << (*it).second->valueAsString() << endl; } } diff --git a/vlsisapd/src/liberty/src/LibertyParserGrammar.yy b/vlsisapd/src/liberty/src/LibertyParserGrammar.yy index 27f55e20..f4c252fa 100644 --- a/vlsisapd/src/liberty/src/LibertyParserGrammar.yy +++ b/vlsisapd/src/liberty/src/LibertyParserGrammar.yy @@ -408,7 +408,7 @@ timing_header : TIMING '(' ')' { library->getCell(currentCell)->getPin(listPins.back())->addTiming(); - currentTiming=library->getCell(currentCell)->getPin(listPins.back())->getTiming().back(); + currentTiming=library->getCell(currentCell)->getPin(listPins.back())->getTimings().back(); // only for 1 pin, not available for pins' list if(listPins.size()>1) cerr << "[Warning] timing information for a list of pins, not available." << endl; diff --git a/vlsisapd/src/liberty/src/Library.cpp b/vlsisapd/src/liberty/src/Library.cpp index 5527adc3..1c2330f5 100644 --- a/vlsisapd/src/liberty/src/Library.cpp +++ b/vlsisapd/src/liberty/src/Library.cpp @@ -72,28 +72,167 @@ void Library::addCell(Name cellName) { void Library::print() { cout << "+-----------------------------+" << endl - << "| Library name= " << _name.getString() << endl; + << "| Library : " << _name.getString() << endl; // Library's attributes cout << "| Attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { - cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) - << ", value= " << (*it).second->valueAsString(); + cout << "| name=" << (*it).first.getString() + << ", type=" << (*it).second->typeToString() + << ", value=" << (*it).second->valueAsString(); string unit = (*it).second->getUnit(); if(!unit.empty()) - cout << ", unit= " << unit; + cout << ", unit=" << unit; cout << endl; } + + map attributes; + map pins; + vector timings; + FlipFlop* ff; + // WireLoad for(map::const_iterator it=_wires_load.begin() ; it!=_wires_load.end() ; ++it) { - (*it).second->print(); +// (*it).second->print(); + cout << "| Wireload : " << (*it).first.getString() << endl; + // Wireload's attributes + cout << "| Attributes :" << endl; + attributes = (*it).second->getAttributes(); + for(map::const_iterator it2=attributes.begin() ; it2 != attributes.end() ; ++it2) { + if ((*it2).second == NULL) { + cerr << "NULL attribute !" << endl; + exit(12); + } + cout << "| name=" << (*it2).first.getString() + << ", type=" << (*it2).second->typeToString() + << ", value=" << (*it2).second->valueAsString(); + string value2=(*it2).second->secondValueAsString(); + if(!value2.empty()) + cout << ", value2=" << value2; + cout << endl; + } } + // WireLoadSelection - _wire_load_selection->print(); +// _wire_load_selection->print(); + cout << "| WireLoadSection name= " << _wire_load_selection->getName().getString() << endl; + vector wires_load_area = _wire_load_selection->getWiresLoadArea(); + for(size_t i = 0 ; i < wires_load_area.size() ; i++) { + cout << "| wire_load_from_area name= " << wires_load_area[i]->getName().getString() + << ", min= " << wires_load_area[i]->getMin() + << ", max= " << wires_load_area[i]->getMax() + << endl; + } + // Cell for(map::const_iterator it=_cells.begin() ; it!=_cells.end() ; ++it) { - (*it).second->print(); +// (*it).second->print(); + cout << "| Cell name= " << (*it).first.getString() << endl; + + // Cell's attributes + cout << "| Attributes :" << endl; + attributes=(*it).second->getAttributes(); + for(map::const_iterator it2=attributes.begin() ; it2!=attributes.end() ; ++it2) { + cout << "| name= " << (*it2).first.getString() + << ", type= " << (*it2).second->typeToString() + << ", value= " << (*it2).second->valueAsString() << endl; + } + // Cell's pins + pins=(*it).second->getPins(); + for(map::const_iterator it2=pins.begin() ; it2!=pins.end() ; ++it2) { +// (*it2).second->print(); + cout << "| Pin name= " << (*it2).first.getString() << endl; + // Pin's attributes + cout << "| Attributes :" << endl; + attributes=(*it2).second->getAttributes(); + for(map::const_iterator it3=attributes.begin() ; it3!=attributes.end() ; ++it3) { + cout << "| name= " << (*it3).first.getString() + << ", type= " << (*it3).second->typeToString() + << ", value= " << (*it3).second->valueAsString() << endl; + } + // Timing + timings=(*it2).second->getTimings(); + for (size_t i = 0 ; i < timings.size() ; i++) { + attributes=timings[i]->getAttributes(); + // Timing's attributes + cout << "| Timing's attributes :" << endl; + for(map::const_iterator it3=attributes.begin() ; it3!=attributes.end() ; ++it3) { + cout << "| name= " << (*it3).first.getString() + << ", type= " << (*it3).second->typeToString() + << ", value= " << (*it3).second->valueAsString() << endl; + } + } + } + // FF +// if(_ff) +// _ff->print(); + ff = (*it).second->getFF(); + if(ff) { + cout << "| FF noninverting= " << ff->getNonInverting().getString() << ", inverting= " << ff->getInverting().getString() << endl; + cout << "| Attributes :" << endl; + attributes=ff->getAttributes(); + for(map::const_iterator it=attributes.begin() ; it!=attributes.end() ; ++it) { + cout << "| name= " << (*it).first.getString() + << ", type= " << (*it).second->typeToString() + << ", value= " << (*it).second->valueAsString() << endl; + } + } + // test_cell +// if(_testCell) +// _testCell->print(); + Cell* testCell = (*it).second->getTestCell(); + if(testCell) { + cout << "| Test Cell" << endl; + + // Cell's attributes + cout << "| Attributes :" << endl; + attributes=testCell->getAttributes(); + for(map::const_iterator it2=attributes.begin() ; it2!=attributes.end() ; ++it2) { + cout << "| name= " << (*it2).first.getString() + << ", type= " << (*it2).second->typeToString() + << ", value= " << (*it2).second->valueAsString() << endl; + } + // Cell's pins + pins=(*it).second->getPins(); + for(map::const_iterator it2=pins.begin() ; it2!=pins.end() ; ++it2) { +// (*it2).second->print(); + cout << "| Pin name= " << (*it2).first.getString() << endl; + // Pin's attributes + cout << "| Attributes :" << endl; + attributes=(*it2).second->getAttributes(); + for(map::const_iterator it3=attributes.begin() ; it3!=attributes.end() ; ++it3) { + cout << "| name= " << (*it3).first.getString() + << ", type= " << (*it3).second->typeToString() + << ", value= " << (*it3).second->valueAsString() << endl; + } + // Timing + timings=(*it2).second->getTimings(); + for (size_t i = 0 ; i < timings.size() ; i++) { + attributes=timings[i]->getAttributes(); + // Timing's attributes + cout << "| Timing's attributes :" << endl; + for(map::const_iterator it3=attributes.begin() ; it3!=attributes.end() ; ++it3) { + cout << "| name= " << (*it3).first.getString() + << ", type= " << (*it3).second->typeToString() + << ", value= " << (*it3).second->valueAsString() << endl; + } + } + } + // FF +// if(_ff) +// _ff->print(); + ff = (*it).second->getFF(); + if(ff) { + cout << "| FF noninverting= " << ff->getNonInverting().getString() << ", inverting= " << ff->getInverting().getString() << endl; + cout << "| Attributes :" << endl; + attributes=ff->getAttributes(); + for(map::const_iterator it2=attributes.begin() ; it2!=attributes.end() ; ++it2) { + cout << "| name= " << (*it2).first.getString() + << ", type= " << (*it2).second->typeToString() + << ", value= " << (*it2).second->valueAsString() << endl; + } + } + } } cout << "+-----------------------------+" << endl; }; diff --git a/vlsisapd/src/liberty/src/Pin.cpp b/vlsisapd/src/liberty/src/Pin.cpp index 53df4f59..37a737c3 100644 --- a/vlsisapd/src/liberty/src/Pin.cpp +++ b/vlsisapd/src/liberty/src/Pin.cpp @@ -9,6 +9,27 @@ using namespace std; namespace LIB { Pin::Pin(Name name): _name(name), _attributes(), _timings() {}; +Attribute* Pin::getAttribute(Name attrName) { + Attribute* attr = NULL; + map::iterator it = _attributes.find(attrName); + if (it == _attributes.end()) { + cerr << "[ERROR] Pin " << _name.getString() << " has no attribute named " << attrName.getString() << endl; + exit(1); + } + attr= (*it).second; + return attr; +} + +Timing* Pin::getTiming(Name pinName) { + for (size_t i = 0 ; i < _timings.size() ; i++) { + if (pinName.getString() == _timings[i]->getAttribute(Name("related_pin"))->valueAsString()) { + return _timings[i]; + } + } + cerr << "[ERROR] Pin " << _name.getString() << " has no timing related to pin named " << pinName.getString() << endl; + exit(1); +} + void Pin::addAttribute(Name attrName, Attribute::Type attrType, string& attrValue) { Attribute* attr = new Attribute(attrName, attrType, attrValue); map::iterator it = _attributes.find(attrName); @@ -31,7 +52,7 @@ void Pin::print() { cout << "| Attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) + << ", type= " << (*it).second->typeToString() << ", value= " << (*it).second->valueAsString() << endl; } // Timing diff --git a/vlsisapd/src/liberty/src/Timing.cpp b/vlsisapd/src/liberty/src/Timing.cpp index 0d73fae3..15c1ef0f 100644 --- a/vlsisapd/src/liberty/src/Timing.cpp +++ b/vlsisapd/src/liberty/src/Timing.cpp @@ -9,6 +9,17 @@ using namespace std; namespace LIB { Timing::Timing(): _attributes() {}; +Attribute* Timing::getAttribute(Name attrName) { + Attribute* attr = NULL; + map::iterator it = _attributes.find(attrName); + if (it == _attributes.end()) { + cerr << "[ERROR] Timing has no attribute named " << attrName.getString() << endl; + exit(1); + } + attr= (*it).second; + return attr; +} + void Timing::addAttribute(Name attrName, Attribute::Type attrType, string& attrValue) { Attribute* attr = new Attribute(attrName, attrType, attrValue); map::iterator it = _attributes.find(attrName); @@ -24,7 +35,7 @@ void Timing::print() { cout << "| Timing's attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) + << ", type= " << (*it).second->typeToString() << ", value= " << (*it).second->valueAsString() << endl; } } diff --git a/vlsisapd/src/liberty/src/WireLoad.cpp b/vlsisapd/src/liberty/src/WireLoad.cpp index 780d7394..47c5d6cc 100644 --- a/vlsisapd/src/liberty/src/WireLoad.cpp +++ b/vlsisapd/src/liberty/src/WireLoad.cpp @@ -9,6 +9,17 @@ using namespace std; namespace LIB { WireLoad::WireLoad(Name name): _name(name), _attributes() {}; +Attribute* WireLoad::getAttribute(Name attrName) { + Attribute* attr = NULL; + map::iterator it = _attributes.find(attrName); + if (it == _attributes.end()) { + cerr << "[ERROR] WireLoad " << _name.getString() << " has no attribute named " << attrName.getString() << endl; + exit(1); + } + attr= (*it).second; + return attr; +} + void WireLoad::addAttribute(Name attrName, Attribute::Type attrType, string& attrValue, const string& attrValue2) { Attribute* attr = new Attribute(attrName, attrType, attrValue, "", attrValue2); map::iterator it = _attributes.find(attrName); @@ -25,7 +36,7 @@ void WireLoad::print() { cout << "| Attributes :" << endl; for(map::const_iterator it=_attributes.begin() ; it!=_attributes.end() ; ++it) { cout << "| name= " << (*it).first.getString() - << ", type= " << (*it).second->typeToString((*it).second->getType()) + << ", type= " << (*it).second->typeToString() << ", value= " << (*it).second->valueAsString(); string value2=(*it).second->secondValueAsString(); if(!value2.empty()) diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/Attribute.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/Attribute.h index a38f9524..b4310838 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/Attribute.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/Attribute.h @@ -26,12 +26,12 @@ class Attribute { inline const std::string& valueAsString() const; inline const std::string& secondValueAsString() const; - bool valueAsBool() const; - int valueAsInt() const; + bool valueAsBool() const; + int valueAsInt() const; double valueAsDouble() const; double secondValueAsDouble() const; - std::string typeToString(Type type); - bool write(std::ofstream &file); + std::string typeToString(); + bool write(std::ofstream &file); private: Name _name; diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/Cell.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/Cell.h index af6f676d..e33d961c 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/Cell.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/Cell.h @@ -15,8 +15,12 @@ class Cell { Cell(Name name); inline Name getName(); - Pin* getPin(Name pinName); + inline std::map getAttributes(); + inline std::map getPins(); inline FlipFlop* getFF(); + inline Cell* getTestCell(); + Attribute* getAttribute(Name attrName); + Pin* getPin(Name pinName); void addAttribute(Name attrName, Attribute::Type attrType, std::string& attrValue); void addPin(Name pinName); @@ -31,11 +35,14 @@ class Cell { std::map _attributes; std::map _pins; FlipFlop* _ff; - Cell* _test_cell; + Cell* _testCell; }; inline Name Cell::getName() { return _name; }; +inline std::map Cell::getPins() { return _pins; }; +inline std::map Cell::getAttributes() { return _attributes; }; inline FlipFlop* Cell::getFF() { return _ff; }; +inline Cell* Cell::getTestCell() { return _testCell; }; } // namespace LIB #endif diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/FlipFlop.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/FlipFlop.h index a93e7320..17cc9566 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/FlipFlop.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/FlipFlop.h @@ -11,6 +11,11 @@ namespace LIB { class FlipFlop { public: FlipFlop(Name noninverting, Name inverting); + + inline Name getNonInverting(); + inline Name getInverting(); + inline std::map getAttributes(); + Attribute* getAttribute(Name attrName); void addAttribute(Name attrName, Attribute::Type attrType, std::string& attrValue); @@ -23,5 +28,9 @@ class FlipFlop { std::map _attributes; }; +inline Name FlipFlop::getNonInverting() { return _noninverting; }; +inline Name FlipFlop::getInverting() { return _inverting; }; +inline std::map FlipFlop::getAttributes() { return _attributes; }; + } // namespace LIB #endif diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/Name.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/Name.h index b36238a6..39f6fbc2 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/Name.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/Name.h @@ -1,12 +1,3 @@ -/* - * Name.h - * openChams - * - * Created by damien dupuis on 18/12/09. - * Copyright 2009 UPMC / LIP6. All rights reserved. - * - */ - #ifndef __LIB_NAME_H__ #define __LIB_NAME_H__ diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/Pin.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/Pin.h index 1dc4c008..1368eedf 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/Pin.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/Pin.h @@ -15,7 +15,10 @@ class Pin { Pin(Name name); inline Name getName(); - inline std::vector getTiming(); + inline std::map getAttributes(); + inline std::vector getTimings(); + Attribute* getAttribute(Name attrName); + Timing* getTiming(Name pinName); void addAttribute(Name attrName, Attribute::Type attrType, std::string& attrValue); void addTiming(); @@ -30,7 +33,8 @@ class Pin { }; inline Name Pin::getName() { return _name; }; -inline std::vector Pin::getTiming() { return _timings; }; +inline std::map Pin::getAttributes() { return _attributes; }; +inline std::vector Pin::getTimings() { return _timings; }; } // namespace LIB #endif diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/Timing.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/Timing.h index 64a88a46..071796b7 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/Timing.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/Timing.h @@ -11,6 +11,9 @@ namespace LIB { class Timing { public: Timing(); + + inline std::map getAttributes(); + Attribute* getAttribute(Name attrName); void addAttribute(Name attrName, Attribute::Type attrType, std::string& attrValue); @@ -21,5 +24,7 @@ class Timing { std::map _attributes; }; +inline std::map Timing::getAttributes() { return _attributes; }; + } // namespace LIB #endif diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoad.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoad.h index b69ad8cd..e1f0aaff 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoad.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoad.h @@ -11,6 +11,8 @@ class WireLoad { WireLoad(Name name); inline Name getName(); + inline std::map getAttributes(); + Attribute* getAttribute(Name attrName); void addAttribute(Name attrName, Attribute::Type attrType, std::string& attrValue, const std::string& attrValue2 = ""); @@ -23,6 +25,7 @@ class WireLoad { }; inline Name WireLoad::getName() { return _name; }; +inline std::map WireLoad::getAttributes() { return _attributes; }; } // namespace LIB #endif diff --git a/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoadSelection.h b/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoadSelection.h index 622a3236..3fa2c789 100644 --- a/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoadSelection.h +++ b/vlsisapd/src/liberty/src/vlsisapd/liberty/WireLoadSelection.h @@ -13,6 +13,9 @@ class WireLoadSelection { public: WireLoadSelection(Name name); + inline Name getName(); + inline std::vector getWiresLoadArea(); + void addWireLoadArea(double min, double max, Name name); void print(); bool write(std::ofstream& file); @@ -21,6 +24,9 @@ class WireLoadSelection { Name _name; std::vector _wires_load_area; }; + +inline Name WireLoadSelection::getName() { return _name; }; +inline std::vector WireLoadSelection::getWiresLoadArea() { return _wires_load_area; }; } // namespace #endif