<p>The <b>Design Technology Rules (DTR)</b> format was developped as a part of the Chams Project (<ahref="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>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>
<li><aclass="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><aclass="el"href="class_d_t_r_1_1_rule.html">DTR::Rule</a>&<aclass="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 <aclass="el"href="class_d_t_r_1_1_d_t_r_exception.html">DTR::DTRException</a> class to throw excptions.</p>
<h2><aclass="anchor"id="dtrParser"></a>
Using the parser</h2>
<p>Simply load a technology with static function <aclass="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 (<aclass="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 (<aclass="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><aclass="anchor"id="dtrDriver"></a>
Using the driver</h2>
<p>Using the driver is very simple, user has to create a <aclass="el"href="class_d_t_r_1_1_techno.html">DTR::Techno</a> object and simply add <aclass="el"href="class_d_t_r_1_1_rule.html">DTR::Rule</a> or <aclass="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 (<aclass="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 <aclass="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>
<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>
<divclass="line"><<<spanclass="stringliteral">"minWidth of metal1 = "</span><< techno-><aclass="code"href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<spanclass="stringliteral">"minWidth"</span>, <spanclass="stringliteral">"metal1"</span>) << endl</div>
<divclass="line"><<<spanclass="stringliteral">"minSpacing of metal1 = "</span><< techno-><aclass="code"href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<spanclass="stringliteral">"minWidth"</span>, <spanclass="stringliteral">"metal1"</span>) << endl</div>
<divclass="line"><<<spanclass="stringliteral">"minSpacing of active vs poly = "</span><< techno-><aclass="code"href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<spanclass="stringliteral">"minSpacing"</span>, <spanclass="stringliteral">"active"</span>, <spanclass="stringliteral">"poly"</span>) << endl</div>
<divclass="line"><<<spanclass="stringliteral">"minExtension active over poly = "</span><< techno-><aclass="code"href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<spanclass="stringliteral">"minExtension"</span>, <spanclass="stringliteral">"poly"</span>, <spanclass="stringliteral">"active"</span>) << endl</div>
<divclass="line"><<<spanclass="stringliteral">"minArea of metal1 = "</span><< techno-><aclass="code"href="class_d_t_r_1_1_techno.html#ac08e2e60dd16750551221ca908001057">getValue</a>(<spanclass="stringliteral">"minArea"</span>, <spanclass="stringliteral">"metal1"</span>) << endl;</div>
</div><!-- fragment --><dlclass="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: <divclass="fragment"><divclass="line">%> mkdir build; cd build</div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="keywordflow">print</span><spanclass="stringliteral">"minWidth of metal1 = %s"</span>%techno.getValue(<spanclass="stringliteral">"minWidth"</span>, <spanclass="stringliteral">"metal1"</span>)</div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="keywordflow">print</span><spanclass="stringliteral">"minSpacing of metal1 = %s"</span>%techno.getValue(<spanclass="stringliteral">"minWidth"</span>, <spanclass="stringliteral">"metal1"</span>)</div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="keywordflow">print</span><spanclass="stringliteral">"minSpacing of active vs poly = %s"</span>%techno.getValue(<spanclass="stringliteral">"minSpacing"</span>, <spanclass="stringliteral">"active"</span>, <spanclass="stringliteral">"poly"</span>)</div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="keywordflow">print</span><spanclass="stringliteral">"minExtension active over poly = %s"</span>%techno.getValue(<spanclass="stringliteral">"minExtension"</span>, <spanclass="stringliteral">"poly"</span>, <spanclass="stringliteral">"active"</span>)</div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="keywordflow">print</span><spanclass="stringliteral">"minArea of metal1 = %s"</span>%techno.getValue(<spanclass="stringliteral">"minArea"</span>, <spanclass="stringliteral">"metal1"</span>)</div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"># an example of why it is important to use Decimal in python:</span></div>
</div><!-- fragment --><dlclass="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>