Updated examples

This commit is contained in:
Damien Dupuis 2010-11-17 15:39:03 +00:00
parent 48407432c9
commit 928b3a0a2a
5 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,7 @@ using namespace std;
#include "vlsisapd/dtr/Name.h" #include "vlsisapd/dtr/Name.h"
int main(int argc, char * argv[]) { int main(int argc, char * argv[]) {
DTR::Techno* techno = new DTR::Techno(DTR::Name("MyTech"), DTR::Name("micro")); DTR::Techno* techno = new DTR::Techno(DTR::Name("MyTech"), DTR::Name("micro"), DTR::Name("rev.A"));
techno->addRule (DTR::Name("transistorMinL"), 0.1 , DTR::Name("ref1")); techno->addRule (DTR::Name("transistorMinL"), 0.1 , DTR::Name("ref1"));
techno->addRule (DTR::Name("transistorMinW"), 0.2 , DTR::Name("ref2")); techno->addRule (DTR::Name("transistorMinW"), 0.2 , DTR::Name("ref2"));

View File

@ -11,6 +11,7 @@ int main(int argc, char * argv[]) {
cerr << "+-----------------------------+" << endl cerr << "+-----------------------------+" << endl
<< "| technology: " << techno->getName().getString() << " |" << endl << "| technology: " << techno->getName().getString() << " |" << endl
<< "| units: " << techno->getUnit().getString() << " |" << endl << "| units: " << techno->getUnit().getString() << " |" << endl
<< "| version: " << techno->getVersion().getString() << " |" << endl
<< "+-----------------------------+" << endl << endl; << "+-----------------------------+" << endl << endl;
cerr << "transistorMinL = " << techno->getValue(DTR::Name("transistorMinL")) << endl cerr << "transistorMinL = " << techno->getValue(DTR::Name("transistorMinL")) << endl

View File

@ -1,4 +1,4 @@
<technology name="example" unit="micro"> <technology name="example" unit="micro" version="rev.A">
<physical_rules> <physical_rules>
<!-- transistor --> <!-- transistor -->
<rule name="transistorMinL" value="0.10" ref="ref1"/> <rule name="transistorMinL" value="0.10" ref="ref1"/>

View File

@ -1,6 +1,6 @@
from DTR import * from DTR import *
techno = Techno(Name("myTech"), Name("micro")) techno = Techno(Name("myTech"), Name("micro"), Name("rev.A"))
techno.addRule (Name("transistorMinL"), 0.1 , Name("ref1")) techno.addRule (Name("transistorMinL"), 0.1 , Name("ref1"))
techno.addRule (Name("transistorMinW"), 0.2 , Name("ref2")) techno.addRule (Name("transistorMinW"), 0.2 , Name("ref2"))

View File

@ -6,6 +6,7 @@ techno = Techno.readFromFile("./example.dtr.xml")
print "+-----------------------------+" print "+-----------------------------+"
print "| technology: "+techno.getName().getString()+" |" print "| technology: "+techno.getName().getString()+" |"
print "| units: "+techno.getUnit().getString()+" |" print "| units: "+techno.getUnit().getString()+" |"
print "| version: "+techno.getVersion().getString()+" |"
print "+-----------------------------+\n\n" print "+-----------------------------+\n\n"
print "transistorMinL = %s"%techno.getValue(Name("transistorMinL")) print "transistorMinL = %s"%techno.getValue(Name("transistorMinL"))