/*! \page dtr DTR Format \section dtrPres Presentation The Design Technology Rules (DTR) format was developped as a part of the Chams Project (http://www-soc.lip6.fr/recherche/cian/chams/). It aims at offering a generic description of layout design rules for CMOS technologies.\n \subsection dtrAutrhos Author Damien Dupuis: damien.dupuis(at)lip6(.)fr \subsection dtrLimits Limitations Only simple rules are supported at the moment. For example the minimum width of a metal layer has only one value, although it should depends on the length of the wire drawned. \section dtrDB Stand alone database structure The database contains four object : - DTR::Techno contains generic informations such as the name of the technology and the unit used, and the list of all technologic rules. - DTR::Rule & DTR::ARule respectively describe a symmetrical and an asymmetrical rule. - DTR::Name provides an automatic management of shared name. The library also use the DTR::DTRException class to throw excptions. \subsection dtrParser Using the parser Simply load a technology with static function DTR::Techno::readFromFile() and then get rules (DTR::Techno::getRule()) or directly values (DTR::Techno::getValue()). \subsection dtrDriver Using the driver Using the driver is very simple, user has to create a DTR::Techno object and simply add DTR::Rule or DTR::ARule to it. The adding methods return the newly created Rule so user can set the rule type (DTR::Rule::setType()) if necessary. Finally use the DTR::Techno::writeToFile() method to dump the database to file. \section dtrExamples Examples As said is the global presentation, VLSI SAPD project provides C++ libraries and Python modules for each supported format. In this section we present simple code examples to parse and drive a DTR file using C++ or Python. The DTR file considered is the same for all examples: \c example.dtr.xml \include example.dtr.xml All source codes are available in the \c examples directory. \subsection dtrC C++ \subsubsection dtrParseC Parser The following code (\c parseDtr.cpp) is an example of how to parse a DTR file using C++ library. \include parseDtr.cpp \subsubsection dtrDriveC Driver This C++ code (\c driveDtr.cpp) generates a out.dtr.xml file equivalent to the previous example.dtr.xml. \include driveDtr.cpp \note In order to compile these codes, a CMakeLists.txt file is provided. User must set the $VLSISAPD_TOP variable before running these commands in the directory containing the CMakeLists.txt file: \code %> mkdir build; cd build %> cmake .. %> make \endcode \subsection dtrPython Python \subsubsection dtrParsePython Parser The following python script (\c parseDtr.py) is an example of how to parse a DTR file using python module. \include parseDtr.py \subsubsection dtrDrivePython Driver This python script (\c driveDtr.py) generates a out.dtr.xml file equivalent to the previous example.dtr.xml. \include driveDtr.py \note In order to run these two scripts (\c parseDtr.py & driveDtr.py), user must ensure that $PYTHONPATH variable points to the directory containing DTR.so module. */