2018-06-06 11:42:26 -05:00
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=utf-8" >
< title > VLSI SAPD Documentation< / title >
< link href = "stylesheet.css" rel = "stylesheet" type = "text/css" >
< / head >
< h1 id = "pagetop" class = "header" > VLSI SAPD Documentation< / h1 >
< center class = "header" >
< table class = "header" >
< tr >
< td > < a href = "index.html" > Presentation< / a > < / td >
< td > < a href = "agds.html" > AGDS< / a > < / td >
< td > < a href = "cif.html" > CIF< / a > < / td >
< td > < a href = "dtr.html" > DTR< / a > < / td >
< td > < a href = "openchams.html" > OPENCHAMS< / a > < / td >
< td > < a href = "spice.html" > SPICE< / a > < / td >
< td > < a href = "contact.html" > Links & Contact< / a > < / td >
< / tr >
< / table >
< / center >
< br >
< hr >
< body >
2018-08-19 06:27:09 -05:00
<!-- Generated by Doxygen 1.8.5 -->
2018-06-06 11:42:26 -05:00
< / div > <!-- top -->
< div class = "header" >
< div class = "headertitle" >
< div class = "title" > CIF Format < / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < h1 > < a class = "anchor" id = "cifPres" > < / a >
Presentation< / h1 >
2018-08-19 06:27:09 -05:00
< p > 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 < a href = "http://en.wikipedia.org/wiki/Caltech_Intermediate_Form" > http://en.wikipedia.org/wiki/Caltech_Intermediate_Form< / a > for more informations). < br / >
2018-06-06 11:42:26 -05:00
< / p >
< h2 > < a class = "anchor" id = "cifAutrhos" > < / a >
Author< / h2 >
< p > Damien Dupuis: damien.dupuis(at)lip6(.)fr< / p >
< h2 > < a class = "anchor" id = "cifLimits" > < / a >
Limitations< / h2 >
< p > Although the CIF format allows hierarchical description and supports several shapes, in this driver, we do not use hierarchy and only use Polygons.< / p >
< h1 > < a class = "anchor" id = "cifDB" > < / a >
Stand alone database structure< / h1 >
2018-08-19 06:27:09 -05:00
< p > The database consists in two simple objects :< / p >
< ul >
2018-06-06 11:42:26 -05:00
< li > < a class = "el" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > contains all CIF circuit informations such as the name, the unit used, the scale and the list of all Polygons.< / li >
< li > < a class = "el" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > describes a Polygon (a set of points).< / li >
< / ul >
< h2 > < a class = "anchor" id = "cifDriver" > < / a >
Using the driver< / h2 >
2018-08-19 06:27:09 -05:00
< p > To drive a CIF file, user has to create one < a class = "el" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > and as many < a class = "el" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > as the number of shapes of the layout. The < a class = "el" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > objects can be created independently from for the < a class = "el" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > but must be finally added to the < a class = "el" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > using < a class = "el" href = "class_c_i_f_1_1_circuit.html#a5b37e86206e2a128ba6db4987dc09a39" title = "adds a Polygon to the Circuit. " > CIF::Circuit::addPolygon()< / a > .< br / >
2018-06-06 11:42:26 -05:00
Once the < a class = "el" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > is complete, simply call the < a class = "el" href = "class_c_i_f_1_1_circuit.html#a90c823b70c4984f302c19ceca604d101" title = "writes the database to file. " > CIF::Circuit::writeToFile()< / a > method to drive the database to file.< / p >
< h1 > < a class = "anchor" id = "cifExamples" > < / a >
Examples< / h1 >
2018-08-19 06:27:09 -05:00
< p > 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 < code > transistor.cif:< / code > < / p >
< div class = "fragment" > < div class = "line" > (CIF file written on 11-Jun-2010 13:49:44 by VLSISAPD_CIF_DRIVER);< / div >
< div class = "line" > (Units: micro - UU/DB Scale: 0.001);< / div >
< div class = "line" > DS 1 1 1;< / div >
< div class = "line" > 9 Transistor;< / div >
< div class = "line" > L 6; P 130,290 540,290 540,690 130,690;< / div >
< div class = "line" > L 17; P 305,150 365,150 365,830 305,830;< / div >
< div class = "line" > DF;< / div >
< div class = "line" > C 1;< / div >
< div class = "line" > E< / div >
< / div > <!-- fragment --> < div class = "image" >
2018-06-06 11:42:26 -05:00
< img src = "transistorCif.png" alt = "transistorCif.png" / >
< div class = "caption" >
CIF example layout< / div > < / div >
< h2 > < a class = "anchor" id = "cifC" > < / a >
C++< / h2 >
2018-08-19 06:27:09 -05:00
< p > Here is the C++ code (< code > driveCif.cpp< / code > ) used to generate the transistor.cif file. (Source is available in examples directory). < / p >
< div class = "fragment" > < div class = "line" > < span class = "preprocessor" > #include < string> < / span > < / div >
< div class = "line" > < span class = "keyword" > using namespace < / span > std;< / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "preprocessor" > #include " vlsisapd/cif/Circuit.h" < / span > < / div >
< div class = "line" > < span class = "preprocessor" > #include " vlsisapd/cif/Polygon.h" < / span > < / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "keywordtype" > int< / span > main(< span class = "keywordtype" > int< / span > argc, < span class = "keywordtype" > char< / span > * argv[]) {< / div >
< div class = "line" > < a class = "code" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > * circuit = < span class = "keyword" > new< / span > < a class = "code" href = "class_c_i_f_1_1_circuit.html" > CIF::Circuit< / a > (< span class = "keywordtype" > string< / span > (< span class = "stringliteral" > " Transistor" < / span > ), < span class = "keywordtype" > string< / span > (< span class = "stringliteral" > " micro" < / span > ), 0.001);< / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "comment" > // Layer #6 corresponds to active< / span > < / div >
< div class = "line" > < a class = "code" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > * poly = < span class = "keyword" > new< / span > < a class = "code" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > (6);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (130, 290);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (540, 290);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (540, 690);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (130, 690);< / div >
< div class = "line" > circuit-> < a class = "code" href = "class_c_i_f_1_1_circuit.html#a5b37e86206e2a128ba6db4987dc09a39" > addPolygon< / a > (poly);< / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "comment" > // Layer #17 corresponds to polysilicium< / span > < / div >
< div class = "line" > poly = < span class = "keyword" > new< / span > < a class = "code" href = "class_c_i_f_1_1_polygon.html" > CIF::Polygon< / a > (17);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (305, 150);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (365, 150);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (365, 830);< / div >
< div class = "line" > poly-> < a class = "code" href = "class_c_i_f_1_1_polygon.html#ab3047469780327f18539907e1303ea15" > addPoint< / a > (305, 830);< / div >
< div class = "line" > circuit-> < a class = "code" href = "class_c_i_f_1_1_circuit.html#a5b37e86206e2a128ba6db4987dc09a39" > addPolygon< / a > (poly);< / div >
< div class = "line" > < / div >
< div class = "line" > circuit-> < a class = "code" href = "class_c_i_f_1_1_circuit.html#a90c823b70c4984f302c19ceca604d101" > writeToFile< / a > (< span class = "stringliteral" > " ./transistor.cif" < / span > );< / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "keywordflow" > return< / span > 0;< / div >
< div class = "line" > }< / div >
< div class = "line" > < / div >
< / div > <!-- fragment --> < dl class = "section note" > < dt > Note< / dt > < dd > 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: < div class = "fragment" > < div class = "line" > %> mkdir build; cd build< / div >
< div class = "line" > %> cmake ..< / div >
< div class = "line" > %> make< / div >
< / div > <!-- fragment --> < / dd > < / dl >
2018-06-06 11:42:26 -05:00
< h2 > < a class = "anchor" id = "cifPython" > < / a >
Python< / h2 >
2018-08-19 06:27:09 -05:00
< p > Here is the Python code (< code > driveCif.py< / code > ) used to generate the transistor.cif file. (Source is available in examples directory). < / p >
< div class = "fragment" > < div class = "line" > < a name = "l00001" > < / a > < span class = "lineno" > 1< / span >   < span class = "keyword" > import< / span > CIF< / div >
< div class = "line" > < a name = "l00002" > < / a > < span class = "lineno" > 2< / span >   circuit = < a class = "code" href = "class_c_i_f_1_1_circuit.html" > CIF.Circuit< / a > (< span class = "stringliteral" > " Transistor" < / span > , < span class = "stringliteral" > " micro" < / span > , 0.001)< / div >
< div class = "line" > < a name = "l00003" > < / a > < span class = "lineno" > 3< / span >   poly1 = < a class = "code" href = "class_c_i_f_1_1_polygon.html" > CIF.Polygon< / a > (6)< / div >
< div class = "line" > < a name = "l00004" > < / a > < span class = "lineno" > 4< / span >   poly1.addPoint(130, 290)< / div >
< div class = "line" > < a name = "l00005" > < / a > < span class = "lineno" > 5< / span >   poly1.addPoint(540, 290)< / div >
< div class = "line" > < a name = "l00006" > < / a > < span class = "lineno" > 6< / span >   poly1.addPoint(540, 690)< / div >
< div class = "line" > < a name = "l00007" > < / a > < span class = "lineno" > 7< / span >   poly1.addPoint(130, 690)< / div >
< div class = "line" > < a name = "l00008" > < / a > < span class = "lineno" > 8< / span >   circuit.addPolygon(poly1)< / div >
< div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / span >   < / div >
< div class = "line" > < a name = "l00010" > < / a > < span class = "lineno" > 10< / span >   poly2 = < a class = "code" href = "class_c_i_f_1_1_polygon.html" > CIF.Polygon< / a > (17)< / div >
< div class = "line" > < a name = "l00011" > < / a > < span class = "lineno" > 11< / span >   poly2.addPoint(305, 150);< / div >
< div class = "line" > < a name = "l00012" > < / a > < span class = "lineno" > 12< / span >   poly2.addPoint(365, 150);< / div >
< div class = "line" > < a name = "l00013" > < / a > < span class = "lineno" > 13< / span >   poly2.addPoint(365, 830);< / div >
< div class = "line" > < a name = "l00014" > < / a > < span class = "lineno" > 14< / span >   poly2.addPoint(305, 830);< / div >
< div class = "line" > < a name = "l00015" > < / a > < span class = "lineno" > 15< / span >   circuit.addPolygon(poly2)< / div >
< div class = "line" > < a name = "l00016" > < / a > < span class = "lineno" > 16< / span >   < / div >
< div class = "line" > < a name = "l00017" > < / a > < span class = "lineno" > 17< / span >   circuit.writeToFile(< span class = "stringliteral" > " ./transistor.cif" < / span > )< / div >
< / div > <!-- fragment --> < dl class = "section note" > < dt > Note< / dt > < dd > In order to run the < code > driveCif.py< / code > script, user must ensure that $PYTHONPATH variable points to the directory containing CIF.so module. < / dd > < / dl >
2018-06-06 11:42:26 -05:00
< / div > < / div > <!-- contents -->
< br >
< hr >
< table class = "footer1" >
< tr >
2018-10-01 09:52:17 -05:00
< td class = "LFooter" > < small > Generated by doxygen 1.8.5 on Mon Oct 1 2018< / small > < / td >
2018-06-06 11:42:26 -05:00
< td class = "RFooter" > < a href = '#pagetop' > < small > Return to top of page< / small > < / a > < / td >
< / tr >
< / table >
< table class = "footer2" >
< tr >
< td class = "LFooter" > VLSI SAPD Documentation< / td >
< td class = "RFooter" > < small > Copyright © 2010 - 2011 < a href = "http://www.upmc.fr" > UPMC< / a > All rights reserved< / small > < / td >
< / tr >
< / table >
< / body >
< / html >