89 lines
25 KiB
HTML
89 lines
25 KiB
HTML
<!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>
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">DTR Format </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="dtrPres"></a>
|
|
Presentation</h1>
|
|
<p>The <b>Design Technology Rules (DTR)</b> format was developped as a part of the Chams Project (<a href="http://www-soc.lip6.fr/recherche/cian/chams/">http://www-soc.lip6.fr/recherche/cian/chams/</a>). It aims at offering a generic description of layout design rules for CMOS technologies.<br />
|
|
</p>
|
|
<h2><a class="anchor" id="dtrAutrhos"></a>
|
|
Author</h2>
|
|
<p>Damien Dupuis: damien.dupuis(at)lip6(.)fr</p>
|
|
<h2><a class="anchor" id="dtrLimits"></a>
|
|
Limitations</h2>
|
|
<p>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.</p>
|
|
<h1><a class="anchor" id="dtrDB"></a>
|
|
Stand alone database structure</h1>
|
|
<p>The database contains four object :</p><ul>
|
|
<li><a class="el" href="class_d_t_r_1_1_techno.html">DTR::Techno</a> contains generic informations such as the name of the technology and the unit used, and the list of all technologic rules.</li>
|
|
<li><a class="el" href="class_d_t_r_1_1_rule.html">DTR::Rule</a> & <a class="el" href="class_d_t_r_1_1_a_rule.html">DTR::ARule</a> respectively describe a symmetrical and an asymmetrical rule.</li>
|
|
</ul>
|
|
<p>The library also use the <a class="el" href="class_d_t_r_1_1_d_t_r_exception.html">DTR::DTRException</a> class to throw excptions.</p>
|
|
<h2><a class="anchor" id="dtrParser"></a>
|
|
Using the parser</h2>
|
|
<p>Simply load a technology with static function <a class="el" href="class_d_t_r_1_1_techno.html#acf863c2bdb7f1aacc4422c8155c60d17" title="creates and returns a Techno object based on a database source file. ">DTR::Techno::readFromFile()</a> and then get rules (<a class="el" href="class_d_t_r_1_1_techno.html#a4d56a05b47bd6c51e4e18120f49b584b" title="returns the rule uniquely identified by its name and layers. ">DTR::Techno::getRule()</a>) or directly values (<a class="el" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057" title="returns the value of a rule uniquely identified by its name and layers. ">DTR::Techno::getValue()</a>).</p>
|
|
<h2><a class="anchor" id="dtrDriver"></a>
|
|
Using the driver</h2>
|
|
<p>Using the driver is very simple, user has to create a <a class="el" href="class_d_t_r_1_1_techno.html">DTR::Techno</a> object and simply add <a class="el" href="class_d_t_r_1_1_rule.html">DTR::Rule</a> or <a class="el" href="class_d_t_r_1_1_a_rule.html">DTR::ARule</a> to it. The adding methods return the newly created Rule so user can set the rule type (<a class="el" href="class_d_t_r_1_1_rule.html#a3568407d7a7890c39b8c9acc1e608535" title="sets the type of a rule. ">DTR::Rule::setType()</a>) if necessary. Finally use the <a class="el" href="class_d_t_r_1_1_techno.html#a26b05539dd3345963b8708788b82e2cb" title="writes the database to file. ">DTR::Techno::writeToFile()</a> method to dump the database to file.</p>
|
|
<h1><a class="anchor" id="dtrExamples"></a>
|
|
Examples</h1>
|
|
<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 simple code examples to parse and drive a DTR file using C++ or Python. The DTR file considered is the same for all examples: <code>example.dtr.xml</code> </p><div class="fragment"><div class="line"><<span class="keywordtype">technology</span> <span class="keyword">name</span>=<span class="stringliteral">"example"</span> <span class="keyword">unit</span>=<span class="stringliteral">"micro"</span> <span class="keyword">version</span>=<span class="stringliteral">"rev.A"</span>></div><div class="line"> <<span class="keywordtype">physical_rules</span>></div><div class="line"> <span class="comment"><!-- transistor --></span></div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"transistorMinL"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.10"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref1"</span>/> </div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"transistorMinW"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.20"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref2"</span>/></div><div class="line"></div><div class="line"> <span class="comment"><!-- minWidth --></span></div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"minWidth"</span> <span class="keyword">layer</span>=<span class="stringliteral">"metal1"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.15"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref3"</span>/></div><div class="line"></div><div class="line"> <span class="comment"><!-- minSpacing --></span></div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"minSpacing"</span> <span class="keyword">layer</span>=<span class="stringliteral">"metal1"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.20"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref4"</span>/></div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"minSpacing"</span> <span class="keyword">layer1</span>=<span class="stringliteral">"active"</span> <span class="keyword">layer2</span>=<span class="stringliteral">"poly"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.10"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref5"</span>/></div><div class="line"></div><div class="line"> <span class="comment"><!-- minExtension --></span></div><div class="line"> <<span class="keywordtype">arule</span> <span class="keyword">name</span>=<span class="stringliteral">"minExtension"</span> <span class="keyword">layer1</span>=<span class="stringliteral">"poly"</span> <span class="keyword">layer2</span>=<span class="stringliteral">"active"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.20"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref6"</span>/></div><div class="line"></div><div class="line"> <span class="comment"><!-- minArea --></span></div><div class="line"> <<span class="keywordtype">rule</span> <span class="keyword">name</span>=<span class="stringliteral">"minArea"</span> <span class="keyword">type</span>=<span class="stringliteral">"area"</span> <span class="keyword">layer</span>=<span class="stringliteral">"metal1"</span> <span class="keyword">value</span>=<span class="stringliteral">"0.100"</span> <span class="keyword">ref</span>=<span class="stringliteral">"ref7"</span>/></div><div class="line"> </<span class="keywordtype">physical_rules</span>></div><div class="line"></<span class="keywordtype">technology</span>></div><div class="line"></div></div><!-- fragment --><p>All source codes are available in the <code>examples</code> directory.</p>
|
|
<h2><a class="anchor" id="dtrC"></a>
|
|
C++</h2>
|
|
<h3><a class="anchor" id="dtrParseC"></a>
|
|
Parser</h3>
|
|
<p>The following code (<code>parseDtr.cpp</code>) is an example of how to parse a DTR file using C++ library. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <iostream></span></div><div class="line"><span class="preprocessor">#include <string></span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"></div><div class="line"><span class="preprocessor">#include "vlsisapd/dtr/Techno.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_d_t_r_1_1_techno.html">DTR::Techno</a>* techno = <a class="code" href="class_d_t_r_1_1_techno.html#acf863c2bdb7f1aacc4422c8155c60d17">DTR::Techno::readFromFile</a>(<span class="stringliteral">"./example.dtr.xml"</span>);</div><div class="line"></div><div class="line"> cerr << <span class="stringliteral">"+-----------------------------+"</span> << endl</div><div class="line"> << <span class="stringliteral">"| technology: "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#a3fd7335faa33dce2f87c7e50eef3e294">getName</a>() << <span class="stringliteral">" |"</span> << endl</div><div class="line"> << <span class="stringliteral">"| units: "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#a42e12e8f890c03ebf12e754d7e489dcb">getUnit</a>() << <span class="stringliteral">" |"</span> << endl</div><div class="line"> << <span class="stringliteral">"| version: "</span> << techno->getVersion() << <span class="stringliteral">" |"</span> << endl</div><div class="line"> << <span class="stringliteral">"+-----------------------------+"</span> << endl << endl;</div><div class="line"></div><div class="line"> cerr << <span class="stringliteral">"transistorMinL = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"transistorMinL"</span>) << endl</div><div class="line"> << <span class="stringliteral">"transistorMinW = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ad5ef5b8e444ab7a86a2e3bff7762c956">getValueAsString</a>(<span class="stringliteral">"transistorMinW"</span>) << endl</div><div class="line"> << <span class="stringliteral">"minWidth of metal1 = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"minWidth"</span>, <span class="stringliteral">"metal1"</span>) << endl</div><div class="line"> << <span class="stringliteral">"minSpacing of metal1 = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"minWidth"</span>, <span class="stringliteral">"metal1"</span>) << endl</div><div class="line"> << <span class="stringliteral">"minSpacing of active vs poly = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"minSpacing"</span>, <span class="stringliteral">"active"</span>, <span class="stringliteral">"poly"</span>) << endl</div><div class="line"> << <span class="stringliteral">"minExtension active over poly = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"minExtension"</span>, <span class="stringliteral">"poly"</span>, <span class="stringliteral">"active"</span>) << endl</div><div class="line"> << <span class="stringliteral">"minArea of metal1 = "</span> << techno-><a class="code" href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<span class="stringliteral">"minArea"</span>, <span class="stringliteral">"metal1"</span>) << endl;</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 --><h3><a class="anchor" id="dtrDriveC"></a>
|
|
Driver</h3>
|
|
<p>This C++ code (<code>driveDtr.cpp</code>) generates a out.dtr.xml file equivalent to the previous example.dtr.xml. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <string></span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"></div><div class="line"><span class="preprocessor">#include "vlsisapd/dtr/Techno.h"</span></div><div class="line"><span class="preprocessor">#include "vlsisapd/dtr/Rules.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_d_t_r_1_1_techno.html">DTR::Techno</a>* techno = <span class="keyword">new</span> <a class="code" href="class_d_t_r_1_1_techno.html">DTR::Techno</a>(<span class="stringliteral">"MyTech"</span>, <span class="stringliteral">"micro"</span>, <span class="stringliteral">"rev.A"</span>);</div><div class="line"></div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a> (<span class="stringliteral">"transistorMinL"</span>, 0.1 , <span class="stringliteral">"ref1"</span>);</div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a> (<span class="stringliteral">"transistorMinW"</span>, 0.2 , <span class="stringliteral">"ref2"</span>);</div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a> (<span class="stringliteral">"minWidth"</span> , 0.15, <span class="stringliteral">"ref3"</span>, <span class="stringliteral">"metal1"</span>);</div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a> (<span class="stringliteral">"minSpacing"</span> , 0.2 , <span class="stringliteral">"ref4"</span>, <span class="stringliteral">"metal1"</span>);</div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a> (<span class="stringliteral">"minSpacing"</span> , 0.1 , <span class="stringliteral">"ref5"</span>, <span class="stringliteral">"active"</span>, <span class="stringliteral">"poly"</span>);</div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#a5f5a790974fe7d3b1c6f1b698ef0a818">addARule</a>(<span class="stringliteral">"minExtension"</span> , 0.2 , <span class="stringliteral">"ref6"</span>, <span class="stringliteral">"poly"</span> , <span class="stringliteral">"active"</span>);</div><div class="line"> </div><div class="line"> <a class="code" href="class_d_t_r_1_1_rule.html">DTR::Rule</a>* rule = techno-><a class="code" href="class_d_t_r_1_1_techno.html#afa2c8412c365c950649b9f81661ecafd">addRule</a>(<span class="stringliteral">"minArea"</span>, 0.1, <span class="stringliteral">"ref7"</span>, <span class="stringliteral">"metal1"</span>);</div><div class="line"> rule-><a class="code" href="class_d_t_r_1_1_rule.html#a3568407d7a7890c39b8c9acc1e608535">setType</a>(<span class="stringliteral">"area"</span>);</div><div class="line"></div><div class="line"> techno-><a class="code" href="class_d_t_r_1_1_techno.html#a26b05539dd3345963b8708788b82e2cb">writeToFile</a>(<span class="stringliteral">"./out.dtr.xml"</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 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: <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>
|
|
<h2><a class="anchor" id="dtrPython"></a>
|
|
Python</h2>
|
|
<h3><a class="anchor" id="dtrParsePython"></a>
|
|
Parser</h3>
|
|
<p>The following python script (<code>parseDtr.py</code>) is an example of how to parse a DTR file using python module. </p><div class="fragment"><div class="line"><span class="keyword">from</span> DTR <span class="keyword">import</span> *</div><div class="line"><span class="keyword">from</span> decimal <span class="keyword">import</span> Decimal</div><div class="line"></div><div class="line">techno = Techno.readFromFile(<span class="stringliteral">"./example.dtr.xml"</span>)</div><div class="line"></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"+-----------------------------+"</span></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"| technology: "</span>+techno.get) + <span class="stringliteral">" |"</span></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"| units: "</span>+techno.getUnit() +<span class="stringliteral">" |"</span></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"| version: "</span>+techno.getVersion()+<span class="stringliteral">" |"</span></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"+-----------------------------+\n\n"</span></div><div class="line"></div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"transistorMinL = %s"</span>%techno.getValue(<span class="stringliteral">"transistorMinL"</span>)</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"transistorMinW = %s"</span>%Decimal(techno.getValueAsString(<span class="stringliteral">"transistorMinW"</span>))</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"minWidth of metal1 = %s"</span>%techno.getValue(<span class="stringliteral">"minWidth"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"minSpacing of metal1 = %s"</span>%techno.getValue(<span class="stringliteral">"minWidth"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"minSpacing of active vs poly = %s"</span>%techno.getValue(<span class="stringliteral">"minSpacing"</span>, <span class="stringliteral">"active"</span>, <span class="stringliteral">"poly"</span>)</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"minExtension active over poly = %s"</span>%techno.getValue(<span class="stringliteral">"minExtension"</span>, <span class="stringliteral">"poly"</span>, <span class="stringliteral">"active"</span>)</div><div class="line"><span class="keywordflow">print</span> <span class="stringliteral">"minArea of metal1 = %s"</span>%techno.getValue(<span class="stringliteral">"minArea"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line"></div><div class="line"><span class="comment"># an example of why it is important to use Decimal in python:</span></div><div class="line"><span class="keywordflow">print</span> techno.getValue(<span class="stringliteral">"minArea"</span>, <span class="stringliteral">"metal1"</span>)*3-0.3 <span class="comment"># returns 5.55111512313e-17</span></div><div class="line"><span class="keywordflow">print</span> Decimal(techno.getValueAsString(<span class="stringliteral">"minArea"</span>, <span class="stringliteral">"metal1"</span>))*3-Decimal(<span class="stringliteral">'0.3'</span>) <span class="comment"># returns 0.000</span></div></div><!-- fragment --><h3><a class="anchor" id="dtrDrivePython"></a>
|
|
Driver</h3>
|
|
<p>This python script (<code>driveDtr.py</code>) generates a out.dtr.xml file equivalent to the previous example.dtr.xml. </p><div class="fragment"><div class="line"><span class="keyword">from</span> DTR <span class="keyword">import</span> *</div><div class="line"></div><div class="line">techno = Techno(<span class="stringliteral">"myTech"</span>, <span class="stringliteral">"micro"</span>, <span class="stringliteral">"rev.A"</span>)</div><div class="line"></div><div class="line">techno.addRule (<span class="stringliteral">"transistorMinL"</span>, 0.1 , <span class="stringliteral">"ref1"</span>)</div><div class="line">techno.addRule (<span class="stringliteral">"transistorMinW"</span>, 0.2 , <span class="stringliteral">"ref2"</span>)</div><div class="line">techno.addRule (<span class="stringliteral">"minWidth"</span> , 0.15, <span class="stringliteral">"ref3"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line">techno.addRule (<span class="stringliteral">"minSpacing"</span> , 0.2 , <span class="stringliteral">"ref4"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line">techno.addRule (<span class="stringliteral">"minSpacing"</span> , 0.1 , <span class="stringliteral">"ref5"</span>, <span class="stringliteral">"active"</span>, <span class="stringliteral">"poly"</span>)</div><div class="line">techno.addARule(<span class="stringliteral">"minExtension"</span> , 0.2 , <span class="stringliteral">"ref6"</span>, <span class="stringliteral">"poly"</span>, <span class="stringliteral">"active"</span>)</div><div class="line"></div><div class="line">rule = techno.addRule(<span class="stringliteral">"minArea"</span>, 0.1, <span class="stringliteral">"ref7"</span>, <span class="stringliteral">"metal1"</span>)</div><div class="line">rule.setType(<span class="stringliteral">"area"</span>)</div><div class="line"></div><div class="line">techno.writeToFile(<span class="stringliteral">"./out.dtr.xml"</span>)</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>In order to run these two scripts (<code>parseDtr.py</code> & driveDtr.py), user must ensure that $PYTHONPATH variable points to the directory containing DTR.so module. </dd></dl>
|
|
</div></div><!-- contents -->
|
|
<br>
|
|
<hr>
|
|
<table class="footer1">
|
|
<tr>
|
|
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td>
|
|
<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 - 2020 <a href="http://www.sorbonne-universite.fr">UPMC</a> All rights reserved</small></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|