<p>The <b>OpenCHAMS</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 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>Simply load an OPENCHAMS file using the static function OpenChams::Circuit::readFromFile() and then get the netlist object (OpenChams::Circuit::getNetlist()) or the sizing procedure (OpenChams::Circuit::getSizing(), might be NULL) or any other useful information (see OpenChams::Circuit).</p>
<p>Using the driver is very simple, user has to create an OpenChams::Circuit object and simply add OpenChams::Netlist (mandatory) and OpenChams::Sizing (optionnal) or OpenChams::Schematic (optionnal) or OpenChams::Layout (optinnal) to it. Finally use the OpenChams::Circuit::writeToFile() 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 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><divclass="fragment"></div><!-- fragment --><divclass="fragment"></div><!-- fragment --><p>All source codes are available in the <code>examples</code> directory.</p>
<p>The following code (<code>parseOpenChams.cpp</code>) is an example of how to parse a OPENCHAMS file using C++ library. </p><divclass="fragment"></div><!-- fragment --><h3><aclass="anchor"id="openChamsDriveC"></a>
<p>This C++ code (<code>driveOpenChams.cpp</code>) generates an inverter.xml file equivalent to the included one. </p><divclass="fragment"></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">%> cmake ..</div><divclass="line">%> make</div></div><!-- fragment --></dd></dl>
<p>The following python script (<code>parseOpenChams.py</code>) is an example of how to parse a OPENCHAMS file using python module. </p><divclass="fragment"></div><!-- fragment --><h3><aclass="anchor"id="openChamsDrivePython"></a>
<p>This python script (<code>driveOpenChams.py</code>) generates an inverter.xml file equivalent to the included one. </p><divclass="fragment"></div><!-- fragment --><dlclass="section note"><dt>Note</dt><dd>In order to run these two scripts (<code>parseOpenChams.py</code>& driveOpenChams.py), user must ensure that $PYTHONPATH variable points to the directory containing OPENCHAMS.so module. </dd></dl>