coriolis/vlsisapd/doc/html/openchams.html

121 lines
138 KiB
HTML
Raw Normal View History

<!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>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<!-- Generated by Doxygen 1.8.14 -->
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">OPENCHAMS Format </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="openChamsPres"></a>
Presentation</h1>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>The <b>OpenCHAMS</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 convenient way to describe analogic circuits' netlists and is based on XML. Some CHAMS specific informations, such as schematic properties, layout properties or sizing procedure, can be described in this format.<br />
</p>
<h2><a class="anchor" id="openChamsAutrhos"></a>
Author</h2>
<p>Damien Dupuis: damien.dupuis(at)lip6(.)fr</p>
<h1><a class="anchor" id="openChamsDB"></a>
Stand alone database structure</h1>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>The database has many objects that can be arranged in five categories:</p><ul>
<li>General<ul>
<li><a class="el" href="class_open_chams_1_1_circuit.html">OpenChams::Circuit</a></li>
<li>OpenChams::Name</li>
<li><a class="el" href="class_open_chams_1_1_open_chams_exception.html">OpenChams::OpenChamsException</a></li>
</ul>
</li>
<li>Netlist<ul>
<li><a class="el" href="class_open_chams_1_1_netlist.html">OpenChams::Netlist</a></li>
<li><a class="el" href="class_open_chams_1_1_instance.html">OpenChams::Instance</a></li>
<li><a class="el" href="class_open_chams_1_1_device.html">OpenChams::Device</a></li>
<li><a class="el" href="class_open_chams_1_1_transistor.html">OpenChams::Transistor</a></li>
<li><a class="el" href="class_open_chams_1_1_parameters.html">OpenChams::Parameters</a></li>
<li><a class="el" href="class_open_chams_1_1_net.html">OpenChams::Net</a></li>
</ul>
</li>
<li>Sizing<ul>
<li><a class="el" href="class_open_chams_1_1_sizing.html">OpenChams::Sizing</a></li>
<li><a class="el" href="class_open_chams_1_1_operator.html">OpenChams::Operator</a></li>
<li><a class="el" href="class_open_chams_1_1_simul_model.html">OpenChams::SimulModel</a></li>
</ul>
</li>
<li>Schematic<ul>
<li><a class="el" href="class_open_chams_1_1_schematic.html">OpenChams::Schematic</a></li>
<li><a class="el" href="class_open_chams_1_1_port.html">OpenChams::Port</a></li>
<li><a class="el" href="class_open_chams_1_1_wire.html">OpenChams::Wire</a></li>
<li><a class="el" href="class_open_chams_1_1_wire_point.html">OpenChams::WirePoint</a></li>
<li><a class="el" href="class_open_chams_1_1_instance_point.html">OpenChams::InstancePoint</a></li>
<li><a class="el" href="class_open_chams_1_1_port_point.html">OpenChams::PortPoint</a></li>
<li><a class="el" href="class_open_chams_1_1_intermediate_point.html">OpenChams::IntermediatePoint</a></li>
</ul>
</li>
<li>Layout<ul>
<li><a class="el" href="class_open_chams_1_1_layout.html">OpenChams::Layout</a></li>
<li><a class="el" href="class_open_chams_1_1_node.html">OpenChams::Node</a></li>
<li><a class="el" href="class_open_chams_1_1_bloc.html">OpenChams::Bloc</a></li>
<li><a class="el" href="class_open_chams_1_1_group.html">OpenChams::Group</a></li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="openChamsParser"></a>
Using the parser</h2>
<p>Simply load an OPENCHAMS file using the static function <a class="el" href="class_open_chams_1_1_circuit.html#ad0aa3183bdea59e62f69c295026b7fe7" title="creates and returns a Circuit object based on a database source file. ">OpenChams::Circuit::readFromFile()</a> and then get the netlist object (<a class="el" href="class_open_chams_1_1_circuit.html#a4085d6a7b6958ffdd7ab5df7e6d6e53f" title="returns the Netlist object associated to the circuit or NULL if it does not exist. ">OpenChams::Circuit::getNetlist()</a>) or the sizing procedure (<a class="el" href="class_open_chams_1_1_circuit.html#a0ce52bc8747f684ec0123faa8ff97b6d" title="returns the Sizing object associated to the circuit or NULL if it does not exist. ...">OpenChams::Circuit::getSizing()</a>, might be NULL) or any other useful information (see <a class="el" href="class_open_chams_1_1_circuit.html">OpenChams::Circuit</a>).</p>
<h2><a class="anchor" id="openChamsDriver"></a>
Using the driver</h2>
<p>Using the driver is very simple, user has to create an <a class="el" href="class_open_chams_1_1_circuit.html">OpenChams::Circuit</a> object and simply add <a class="el" href="class_open_chams_1_1_netlist.html">OpenChams::Netlist</a> (mandatory) and <a class="el" href="class_open_chams_1_1_sizing.html">OpenChams::Sizing</a> (optionnal) or <a class="el" href="class_open_chams_1_1_schematic.html">OpenChams::Schematic</a> (optionnal) or <a class="el" href="class_open_chams_1_1_layout.html">OpenChams::Layout</a> (optinnal) to it. Finally use the <a class="el" href="class_open_chams_1_1_circuit.html#a2eb07935ec946a07edcee2255b781193" title="writes the database to file. ">OpenChams::Circuit::writeToFile()</a> method to dump the database to file.</p>
<h1><a class="anchor" id="openChamsExamples"></a>
Examples</h1>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -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 simple code examples to parse and drive a OPENCHAMS file using C++ or Python. The OPENCHAMS files considered are the same for all examples: <code>inverter.xml</code> and <code>buffer.xml</code> </p><div class="fragment"><div class="line">&lt;?<span class="keyword">xml</span> <span class="keyword">version</span>=<span class="stringliteral">&quot;1.0&quot;</span> <span class="keyword">encoding</span>=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;</div><div class="line">&lt;<span class="keywordtype">circuit</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;inverter&quot;</span> <span class="keyword">techno</span>=<span class="stringliteral">&quot;myTech&quot;</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">parameters</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;temp&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;27.0&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;Vdd&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;1.2&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;Vss&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0.0&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;L&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0.10e-6&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;Ids&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;30e-6&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameter</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;Veg&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0.12&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">parameterEq</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;complex&quot;</span> <span class="keyword">equation</span>=<span class="stringliteral">&quot;myEq&quot;</span>/&gt;</div><div class="line"> &lt;/<span class="keywordtype">parameters</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">netlist</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">instances</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">instance</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;nmos1&quot;</span> <span class="keyword">model</span>=<span class="stringliteral">&quot;Transistor&quot;</span> <span class="keyword">order</span>=<span class="stringliteral">&quot;1&quot;</span> <span class="keyword">mostype</span>=<span class="stringliteral">&quot;NMOS&quot;</span> <span class="keyword">sourceBulkConnected</span>=<span class="stringliteral">&quot;True&quot;</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">connectors</span>&gt;</div><div class="line"> &lt;<span class="keywordtype">connector</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;G&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">connector</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;D&quot;</span>/&gt;</div><div class="line"> &lt;<span class="keywordtype">connector</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;S&quot;</span>/&gt;
<h2><a class="anchor" id="openChamsC"></a>
C++</h2>
<h3><a class="anchor" id="openChamsParseC"></a>
Parser</h3>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>The following code (<code>parseOpenChams.cpp</code>) is an example of how to parse a OPENCHAMS file using C++ library. </p><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;vector&gt;</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 &quot;vlsisapd/openChams/Circuit.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Name.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Parameters.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Netlist.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Instance.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Device.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Net.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Transistor.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Schematic.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Sizing.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Operator.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Layout.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Node.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Port.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Wire.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/OpenChamsException.h&quot;</span></div><div class="line"></div><div class="line"><span class="keywordtype">void</span> printHBTree(<a class="code" href="class_open_chams_1_1_node.html">OpenChams::Node</a>* node, <span class="keywordtype">unsigned</span> indent) {</div><div class="line"> <span class="keywordflow">if</span> (!node) <span class="keywordflow">return</span>; <span class="comment">// since we pass nnode-&gt;getRight and node-getTop without checking for NULL</span></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0 ; i &lt; indent ; i++) {</div><div class="line"> cerr &lt;&lt; <span class="stringliteral">&quot; |&quot;</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordtype">string</span> pos = <span class="stringliteral">&quot;&quot;</span>;</div><div class="line"> <span class="keywordflow">switch</span>(node-&gt;<a class="code" href="class_open_chams_1_1_node.html#a566f4d0bebb46cfd31384a8394a7dbb9">getPosition</a>()) {</div><div class="line"> <span class="keywordflow">case</span> OpenChams::Node::TOP:</div><div class="line"> pos = <span class="stringliteral">&quot;top&quot;</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> OpenChams::Node::RIGHT:</div><div class="line"> pos = <span class="stringliteral">&quot;right&quot;</span>;</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">default</span>:</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> <a class="code" href="class_
Driver</h3>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>This C++ code (<code>driveOpenChams.cpp</code>) generates an inverter.xml file equivalent to the included one. </p><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;string&gt;</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 &quot;vlsisapd/openChams/Circuit.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Netlist.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Instance.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Device.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Transistor.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Net.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Schematic.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Sizing.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Operator.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Layout.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Node.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Port.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;vlsisapd/openChams/Wire.h&quot;</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_open_chams_1_1_circuit.html">OpenChams::Circuit</a>* circuit = <span class="keyword">new</span> <a class="code" href="class_open_chams_1_1_circuit.html">OpenChams::Circuit</a>(OpenChams::Name(<span class="stringliteral">&quot;design&quot;</span>), OpenChams::Name(<span class="stringliteral">&quot;myTech&quot;</span>));</div><div class="line"> <span class="comment">// value parameters</span></div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;temp&quot;</span>), <span class="stringliteral">&quot;27.0&quot;</span> );</div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;Vdd&quot;</span>) , <span class="stringliteral">&quot;1.2&quot;</span> );</div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;Vss&quot;</span>) , <span class="stringliteral">&quot;0.0&quot;</span> );</div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;L&quot;</span>) , <span class="stringliteral">&quot;0.1e-6&quot;</span>);</div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;Ids&quot;</span>) , <span class="stringliteral">&quot;30e-6&quot;</span> );</div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;Veg&quot;</span>) , <span class="stringliteral">&quot;0.12&quot;</span> );</div><div class="line"> <span class="comment">// equation parameters</span></div><div class="line"> circuit-&gt;addParameter(OpenChams::Name(<span class="stringliteral">&quot;complex&quot;</span>), <span class="stringliteral">&quot;myEq&quot;</span>);</div><div class="line"></div><div class="line"> <span class="comment">// netlist</span></div><div class="line"> <a class="code" href="class_open_chams_1_1_netlist.html">OpenChams::Netlist</a>* netlist = circuit-&gt;<a class="code" href="class_open_chams_1_1_circuit.html#a3f11671c7ea7b4e2cc3487bd7954b667">createNetlist</a>();</div><div class="line"> <span class="comment">// instances
<h2><a class="anchor" id="openChamsPython"></a>
Python</h2>
<h3><a class="anchor" id="openChamsParsePython"></a>
Parser</h3>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>The following python script (<code>parseOpenChams.py</code>) is an example of how to parse a OPENCHAMS file using python module. </p><div class="fragment"><div class="line"><span class="keyword">import</span> sys</div><div class="line"></div><div class="line"><span class="keyword">from</span> OPENCHAMS <span class="keyword">import</span> *</div><div class="line"></div><div class="line"><span class="keyword">def </span>printHBTree(node, indent):</div><div class="line"> <span class="keywordflow">if</span> node == <span class="keywordtype">None</span>:</div><div class="line"> <span class="keywordflow">return</span></div><div class="line"> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(indent):</div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; |&quot;</span>,</div><div class="line"> <span class="keywordflow">if</span> isinstance(node, Bloc):</div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; bloc:&quot;</span>, node.getName(), <span class="stringliteral">&quot;-&quot;</span>, node.getPosition()</div><div class="line"> printHBTree(node.top , indent+1)</div><div class="line"> printHBTree(node.right, indent+1)</div><div class="line"> <span class="keywordflow">return</span></div><div class="line"> <span class="keywordflow">if</span> isinstance(node, Group):</div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; group:&quot;</span>, node.getName(), <span class="stringliteral">&quot;-&quot;</span>, node.getPosition(), <span class="stringliteral">&quot;-&quot;</span>, node.align, <span class="stringliteral">&quot;-&quot;</span>, node.isolated, <span class="stringliteral">&quot;-&quot;</span>, node.paired</div><div class="line"> printHBTree(node.rootNode, indent+1)</div><div class="line"> printHBTree(node.top , indent+1)</div><div class="line"> printHBTree(node.right , indent+1)</div><div class="line"> <span class="keywordflow">return</span></div><div class="line"></div><div class="line"><span class="keyword">def </span>printContents(circuit):</div><div class="line"> <span class="keywordflow">print</span> circuit.name</div><div class="line"> <span class="comment"># circuit parameters</span></div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; + parameters&quot;</span></div><div class="line"> <span class="keywordflow">for</span> param <span class="keywordflow">in</span> circuit.parameters.getValues():</div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; | |&quot;</span>, param.key, <span class="stringliteral">&quot;:&quot;</span>, param.value</div><div class="line"> <span class="keywordflow">for</span> param <span class="keywordflow">in</span> circuit.parameters.getEqValues():</div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; | |&quot;</span>, param.key, <span class="stringliteral">&quot;:&quot;</span>, param.value</div><div class="line"> <span class="comment"># netlist</span></div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; + netlist&quot;</span></div><div class="line"> <span class="comment"># instances</span></div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; | + instances&quot;</span></div><div class="line"> <span class="keywordflow">for</span> instance <span class="keywordflow">in</span> circuit.netlist.getInstances():</div><div class="line"> <span class="keywordflow">if</span> isinstance(instance, Device): </div><div class="line"> <span class="keywordflow">print</span> <span class="stringliteral">&quot; | | +&quot;</span>, instance.name, <span class="stringliteral">&quot;:&quot;</span>, instance.model, instance.order, instance.mosType, instance.sourceBulkConnected</div><div class="line"> <span class="keyw
Driver</h3>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<p>This python script (<code>driveOpenChams.py</code>) generates an inverter.xml file equivalent to the included one. </p><div class="fragment"><div class="line"><span class="keyword">from</span> OPENCHAMS <span class="keyword">import</span> *</div><div class="line"></div><div class="line">circuit = Circuit(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;design&quot;</span>), <a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;myTech&quot;</span>))</div><div class="line"><span class="comment"># value parameters</span></div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;temp&quot;</span>), 27.0 )</div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;Vdd&quot;</span>) , 1.2 )</div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;Vss&quot;</span>) , 0.0 )</div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;L&quot;</span>) , 0.1e-6)</div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;Ids&quot;</span>) , 30e-6 )</div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;Veg&quot;</span>) , 0.12 )</div><div class="line"><span class="comment"># equation parameters</span></div><div class="line">circuit.addParameter(<a class="code" href="class_name.html">Name</a>(<span class="stringliteral">&quot;complex&quot;</span>), <span class="stringliteral">&quot;myEq&quot;</span>)</div><div class="line"></div><div class="line"><span class="comment"># netlist :</span></div><div class="line">netlist = circuit.createNetlist()</div><div class="line"><span class="comment"># instances</span></div><div class="line"><span class="comment"># nmos1</span></div><div class="line">inst_nmos1 = netlist.addDevice(<span class="stringliteral">&quot;nmos1&quot;</span>, <span class="stringliteral">&quot;Transistor&quot;</span>, 1, <span class="stringliteral">&quot;NMOS&quot;</span>, <span class="keyword">True</span>)</div><div class="line">inst_nmos1.addConnector(<span class="stringliteral">&quot;G&quot;</span>)</div><div class="line">inst_nmos1.addConnector(<span class="stringliteral">&quot;S&quot;</span>)</div><div class="line">inst_nmos1.addConnector(<span class="stringliteral">&quot;D&quot;</span>)</div><div class="line">tr_nmos1 = inst_nmos1.addTransistor(<span class="stringliteral">&quot;m1&quot;</span>)</div><div class="line">tr_nmos1.gate = <span class="stringliteral">&quot;G&quot;</span> <span class="comment"># the name of the connector of inst_nmos1</span></div><div class="line">tr_nmos1.source = <span class="stringliteral">&quot;S&quot;</span></div><div class="line">tr_nmos1.drain = <span class="stringliteral">&quot;D&quot;</span></div><div class="line">tr_nmos1.bulk = <span class="stringliteral">&quot;S&quot;</span></div><div class="line"><span class="comment"># pmos1</span></div><div class="line">inst_pmos1 = netlist.addDevice(<span class="stringliteral">&quot;pmos1&quot;</span>, <span class="stringliteral">&quot;Transistor&quot;</span>, 2, <span class="stringliteral">&quot;PMOS&quot;</span>, <span class="keyword">True</span>)</div><div class="line">inst_pmos1.addConnector(<span class="stringliteral">&quot;G&quot;</span>)</div><div class="line">inst_pmos1.addConnector(<span class="stringliteral">&quot;S&quot;</span>)</div><div class="line">inst_pmos1.addConnector(<span class="stringliteral">&quot;D&quot;</span>)</div><div class="line">tr_pmos1 = inst_pmos1.addTransistor(<span class="stringliteral">&quot;m1&quot;</span>)</div><div class="line">tr_pmos1.gate = <span class="stringliteral">&quot;G&quot;</span> <span class="comment"># the name of the connector of inst_pmos1</span></div><div class="line">tr_pmos1.source = <span class="stringlit
</div></div><!-- contents -->
<br>
<hr>
<table class="footer1">
<tr>
Analog integration part II. Analog place & route (slicing tree). * Change: In Hurricane::CellWidget, set the minimal size to 350 pixels to fit my normal DPI secondary screen... * Change: In Hurricane::Error(), reactivate the backtrace generation by default. Seriously slow down the program each time an Error is to be constructed. * Bug: In Analog::Device::preCreate(), check for NULL Technology before attempting to use it. * Change: In Hurricane/Analog, remove all '*Arguments*' classes and their Python interface. It was an obsoleted way of passing devices parameters to the Python layout generators (located in Oroshi). Now we just get them straight from the Device with the getParamter() method. * Change: In CRL::System CTOR, add Python pathes for Oroshi & Karakaze. * Change: In Oroshi/Python/WIP_*.py layout generator scripts, remove all uses of the "Arguments". Directly access the parameters through the device itself. Make the checkCoherency() with identical arguments as of layout(). * New: Bora tool that performs analog place & route. Based on a slicing tree representation. It is the thesis work of Eric Lao. Code beautyfication and some programming cleanup. * New: Karakaze tool, provide the Python base class AnalogDesign used to build an analog design. Create/configure devices and assemble them in a slicing tree. * Change: In Unicorn/cgt.py, display the stack trace in case of an ImportError exception as well as for other exceptions. Add Bora to the set for included tool engines.
2018-10-18 11:10:01 -05:00
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Oct 18 2018</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 &#169; 2010 - 2011 <a href="http://www.upmc.fr">UPMC</a> All rights reserved</small></td>
</tr>
</table>
</body>
</html>