coriolis/deprecated/vlsisapd/doc/cif/cif.dox

45 lines
2.5 KiB
Plaintext
Raw Normal View History

/*! \page cif CIF Format
\section cifPres Presentation
The <b>Caltech Intermediate Format (CIF)</b> consists in a limited set of graphic primitives used to describe the shapes on each layer of an integrated circuit (see http://en.wikipedia.org/wiki/Caltech_Intermediate_Form for more informations). \n
\subsection cifAutrhos Author
Damien Dupuis: damien.dupuis(at)lip6(.)fr
\subsection cifLimits Limitations
Although the CIF format allows hierarchical description and supports several shapes, in this driver, we do not use hierarchy and only use Polygons.
\section cifDB Stand alone database structure
The database consists in two simple objects :
- CIF::Circuit contains all CIF circuit informations such as the name, the unit used, the scale and the list of all Polygons.
- CIF::Polygon describes a Polygon (a set of points).
\subsection cifDriver Using the driver
To drive a CIF file, user has to create one CIF::Circuit and as many CIF::Polygon as the number of shapes of the layout. The CIF::Polygon objects can be created independently from for the CIF::Circuit but must be finally added to the CIF::Circuit using CIF::Circuit::addPolygon().\n
Once the CIF::Circuit is complete, simply call the CIF::Circuit::writeToFile() method to drive the database to file.
\section cifExamples 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 two simple code examples to drive a CIF file using C++ or Python. These two examples drive the same file \c transistor.cif:
\include transistor.cif
\image html transistorCif.png CIF example layout
\image latex transistorCif.pdf CIF example layout width=.25\linewidth
\subsection cifC C++
Here is the C++ code (\c driveCif.cpp) used to generate the transistor.cif file. (Source is available in examples directory).
\include driveCif.cpp
2010-06-15 08:12:13 -05:00
\note In order to compile this code, 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 cifPython Python
Here is the Python code (\c driveCif.py) used to generate the transistor.cif file. (Source is available in examples directory).
\include driveCif.py
\note In order to run the \c driveCif.py script, user must ensure that $PYTHONPATH variable points to the directory containing CIF.so module.
*/