coriolis/documentation/output/pages/stratus-language.html

2582 lines
100 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Printable version of this document Stratus.pdf. Stratus Procedural design language based upon Python Contents Introduction Description of a netlist Description of a layout Patterns generation ...">
<meta name="keywords" content="">
<link rel="icon" href="../favicon.ico">
<title>Stratus : Netlist Capture Language - Coriolis VLSI CAD Tools [offline]</title>
<!-- Stylesheets -->
<link href="../theme/css/bootstrap.css" rel="stylesheet">
<link href="../theme/css/fonts.css" rel="stylesheet">
<link href="../theme/css/nest.css" rel="stylesheet">
<link href="../theme/css/pygment.css" rel="stylesheet">
<link href="../theme/css/coriolis.css" rel="stylesheet">
<!-- /Stylesheets -->
<script src="../theme/js/jquery.min.js"></script>
<script src="../theme/js/bootstrap.min.js"></script>
<!-- RSS Feeds -->
<!-- /RSS Feeds -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Header -->
<div class="header-container" style="background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../images/common/layout-motif-faded-4.png'); background-position: center; ">
<!--
<div class="container">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../"><img class="mr20" src="../images/common/Coriolis-logo-white-4-small.png" alt="logo">Coriolis VLSI CAD Tools [offline]</a>
</div>
<ul class="nav navbar-nav">
<li><a href="../pages/gitlab.html">Git</a></li>
<li><a href="../pages/documentation.html">Documentation</a></li>
<li class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="caret"></span>Topics
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item " href="../pages/homepage.html">Coriolis <span class="sc">vlsi</span> Backend Tools</a></li>
<li><a class="dropdown-item " href="../pages/symbolic-layout.html">Symbolic Layout</a></li>
</ul>
</li>
</ul>
</div>
</nav>
</div> <!-- navbar container -->
-->
<!-- Static navbar -->
<div class="container">
<div class="header-nav">
<div class="header-logo">
<a class="pull-left" href="../"><img class="mr20" src="../images/common/Coriolis-logo-white-4-small.png" alt="logo">Coriolis VLSI CAD Tools [offline]</a>
</div>
<div class="nav pull-right">
<a href="../pages/gitlab.html">Git</a>
<a href="../pages/documentation.html">Documentation</a>
</div>
<div class="nav pull-right">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="caret"></span>Topics
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item " href="../pages/homepage.html">Coriolis <span class="sc">vlsi</span> Backend Tools</a></li>
<li><a class="dropdown-item " href="../pages/symbolic-layout.html">Symbolic Layout</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- /Static navbar -->
<!-- Header -->
<div class="container header-wrapper">
<div class="row">
<div class="col-lg-12">
<div class="header-content">
<a href="https://www.lip6.fr/"><img class="mr20" height="60px" src="../images/common/LogoLIP6Blanc.png" alt="LIP6"></a>
<a href="https://www.sorbonne-universite.fr/"><img class="mr20" height="60px" src="../images/common/logo-SU-blanc-700px.png" alt="Sorbonne Universite"></a>
<a href="https://www.cnrs.fr/"><img class="mr20" height="60px" src="../images/common/LOGO-cnrs-white-large.png" alt="CNRS"></a>
<h1 class="header-title text-uppercase">Stratus : Netlist Capture Language</h1>
<div class="header-underline"></div>
</div>
</div>
</div>
</div>
<!-- /Header -->
</div>
<!-- /Header -->
<!-- Content -->
<div class="container content">
<!-- -*- mode: rst; explicit-buffer-name: "Stratus_HTML.rst<pelican>" -*- -->
<!-- -*- Mode: rst; explicit-buffer-name: "definition.rst<documentation/etc>" -*- -->
<!-- HTML/LaTeX backends mixed macros. -->
<!-- Acronyms & names. -->
<!-- URLs -->
<!-- Standard CAO/VLSI Concepts. -->
<!-- Alliance & MBK Concepts -->
<!-- Hurricane Concepts. -->
<p>Printable version of this document <a class="reference external" href="../pdfs/Stratus.pdf">Stratus.pdf</a>.</p>
<p>Stratus Procedural design language based upon <em>Python</em></p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id185">Introduction</a></li>
<li><a class="reference internal" href="#description-of-a-netlist" id="id186">Description of a netlist</a></li>
<li><a class="reference internal" href="#description-of-a-layout" id="id187">Description of a layout</a></li>
<li><a class="reference internal" href="#patterns-generation-extension" id="id188">Patterns generation extension</a></li>
<li><a class="reference internal" href="#place-and-route" id="id189">Place and Route</a></li>
<li><a class="reference internal" href="#instanciation-facilities" id="id190">Instanciation facilities</a></li>
<li><a class="reference internal" href="#useful-links" id="id191">Useful links</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id185">Introduction</a></h2>
<div class="section" id="stratus">
<h3>Stratus</h3>
<div class="section" id="name">
<h4>Name</h4>
<p>Stratus Procedural design language based upon <em>Python</em></p>
</div>
<div class="section" id="description">
<h4>Description</h4>
<p><em>Stratus</em> is a set of <em>Python</em> methods/functions dedicated to
procedural generation purposes. From a user point of view, <em>Stratus</em> is
a circuits description language that allows <em>Python</em> programming flow
control, variable use, and specialized functions in order to handle vlsi
objects.</p>
<p>Based upon the <em>Hurricane</em> data structures, the <em>Stratus</em> language gives
the user the ability to describe netlist and layout views.</p>
</div>
<div class="section" id="configuration">
<h4>Configuration</h4>
<p>A configuration file can be used to direct the generation process of
Stratus. With this file, the user can choose the output format (vst,
vhdl...), the simulator (asimut, ghdl...), the standard cell library...
This configuration file named <tt class="docutils literal">.st_config.py</tt> must be placed either in
the HOME directory or in the current directory. This file contains a set
of variables used in the process generation of Stratus, as for example :</p>
<pre class="literal-block">
format = 'vhdl'
simulator = 'ghdl'
</pre>
<p>The default configuration of Stratus uses the Alliance CAD system, ie
<tt class="docutils literal">'vst'</tt> as <tt class="docutils literal">format</tt> and <tt class="docutils literal">'asimut'</tt> as <tt class="docutils literal">simulator</tt>.</p>
</div>
<div class="section" id="description-of-a-cell">
<h4>Description of a cell</h4>
<p>A cell is a hierachical structural description of a circuit in terms
of ports (I/Os), signals (nets) and instances.</p>
<p>The description of a cell is done by creating a new class, derivating
for class <tt class="docutils literal">Model</tt>, with different methods :</p>
<ul class="simple">
<li>Method <tt class="docutils literal">Interface</tt> : Description of the external ports of the cell
:<ul>
<li>SignalIn, SignalOut, ...</li>
</ul>
</li>
<li>Method <tt class="docutils literal">Netlist</tt> : Description of the netlist of the cell :<ul>
<li>Inst, Signal</li>
</ul>
</li>
<li>Method <tt class="docutils literal">Layout</tt> : Description of the layout of the cell :<ul>
<li>Place, PlaceTop, PlaceBottom, PlaceRight, PlaceLeft ...</li>
</ul>
</li>
<li>Method <tt class="docutils literal">Stimuli</tt> : Description of the simulation stimuli of the
cell :<ul>
<li>affect, addd ...</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="creation-of-the-cell">
<h4>Creation of the cell</h4>
<p>After the description of a cell as a sub-class of <tt class="docutils literal">Model</tt>, the cell
has to be instantiated. The different methods described before have to
be called.</p>
<p>Then different methods are provided :</p>
<ul class="simple">
<li>Method <tt class="docutils literal">View</tt> : Opens/Refreshes the editor in order to see the
created layout</li>
<li>Method <tt class="docutils literal">Save</tt> : Saves the created cell in the desired format thanks
to the configuration file<ul>
<li>no argument : creation of a netlist file</li>
<li>PHYSICAL : creation of a netlist file AND a layout file</li>
<li>STRATUS : creation of a python/stratus file<ul>
<li>FileName : optionnal argument when using Save(STRATUS) in order
to choose the name of the file to be generated</li>
<li>Be careful : if one wants to create a stratus file AND a
netlist, always use Save(STRATUS) before Save() !</li>
</ul>
</li>
</ul>
</li>
<li>Method <tt class="docutils literal">Testbench</tt> : Creates the testbench of the cell using the
<tt class="docutils literal">Stimuli</tt> method to compute the stimuli. The output format depends
of the <tt class="docutils literal">format</tt> variable given in the configuration file</li>
<li>Method <tt class="docutils literal">Simul</tt> : Runs the simulation using the simulator named in
the configuration file</li>
</ul>
</div>
<div class="section" id="syntax">
<h4>Syntax</h4>
<p>A <em>Stratus</em> file must have a .py extension and must begin as follow :</p>
<pre class="literal-block">
#!/usr/bin/env python
from stratus import *
</pre>
<p>The description of a cell as a sub-class of <tt class="docutils literal">Model</tt> is done as follow
:</p>
<pre class="literal-block">
class myClass ( Model ) :
...
</pre>
<p>The creation of the cell is done by instantiating the previous class as
follow :</p>
<pre class="literal-block">
exemple = myClass ( name, param )
</pre>
<p>After the different methods can be called as follow :</p>
<pre class="literal-block">
exemple.Interface()
exemple.Netlist()
exemple.Save()
...
</pre>
<p>In order to execute a <em>Stratus</em> file (named <tt class="docutils literal">file</tt> for example), one
has two choices :</p>
<pre class="literal-block">
python file.py
</pre>
<p>Or :</p>
<pre class="literal-block">
chmod u+x file.py
./file.py
</pre>
<p>The names used in <em>Stratus</em>, as arguments to <em>Stratus</em> functions,
should be alphanumerical, including the underscore. The arguments of
<em>Stratus</em> are case sensitive, so VDD is not equivalent to vdd.</p>
<div class="line-block">
<div class="line">Vectorized connectors or signal can be used using the [n:m] construct.</div>
</div>
</div>
<div class="section" id="syntax-highlighting">
<h4>Syntax highlighting</h4>
<p>When using vi, its possible to have the right syntax highlighting :</p>
<ul class="simple">
<li>Commands to do when you want to change once the coloration of your
file :</li>
</ul>
<pre class="literal-block">
:syntax off
:source /asim/coriolis/share/etc/stratus.vim
</pre>
<ul class="simple">
<li>Modification of your .vimrc in order to have the syntax highlighting
each time you open a file :</li>
</ul>
<pre class="literal-block">
syntax off
autocmd BufRead,BufNewfile *.py so /asim/coriolis/share/etc/stratus.vim
syntax on
</pre>
</div>
</div>
<div class="section" id="example">
<h3>Example</h3>
<div class="section" id="the-addaccu-circuit">
<h4>The addaccu circuit</h4>
<p><img alt="add1" src="../pages/images/add1.png" /></p>
</div>
<div class="section" id="the-data-path">
<h4>The data-path</h4>
<p><img alt="add2" src="../pages/images/add2.png" /></p>
</div>
<div class="section" id="description-of-the-circuit-with-stratus-file-addaccu-py">
<h4>Description of the circuit with <em>Stratus</em> : file addaccu.py</h4>
<p><img alt="addaccu" src="../pages/images/addaccu.png" /></p>
</div>
<div class="section" id="creation-of-the-circuit-file-test-py">
<h4>Creation of the circuit : file test.py</h4>
<p><img alt="test" src="../pages/images/test.png" /></p>
</div>
<div class="section" id="how-to-execute-the-file">
<h4>How to execute the file</h4>
<pre class="literal-block">
python test.py -n 4
</pre>
<p>or :</p>
<pre class="literal-block">
chmod u+x test.py
./test -n 4
</pre>
</div>
<div class="section" id="the-editor">
<h4>The editor</h4>
<p>The method <tt class="docutils literal">View</tt> permits to open an editor in which one can see the
cell being created as shown in the picture below.</p>
<p><img alt="editor" src="../pages/images/editor.png" /></p>
</div>
<div class="section" id="function-param">
<h4>Function Param</h4>
<p>This function allows the user to give parameters when creating a cell.
When one wants to give values to two parameters, one can type on the
shell :</p>
<pre class="literal-block">
python test.py -n 4 -w 8
</pre>
<p>The file <tt class="docutils literal">test.py</tt> has then to contain :</p>
<pre class="literal-block">
nbit, nword = Param ( &quot;n&quot;, &quot;w&quot; )
</pre>
<p>The letters typed on the shell must be the ones given as parameters of
function <tt class="docutils literal">Param</tt>.</p>
</div>
<div class="section" id="how-to-instanciate-your-generator-in-another-generator">
<h4>How to instanciate your generator in another generator</h4>
<p>One can create a generator and instantiate it in another generator.
To do that, the model name of the generator must have the form :
“file_name.class_name”.
Note that if the two generators are not in the same directory, the
directory of the generator to be instantiated has to be added in the
CRL_CATA_LIB environment variable.</p>
<p>For example, in order to instanciate the addaccu created above in a cell
:</p>
<pre class="literal-block">
n = 4
Generate ( &quot;addaccu.addaccu&quot;, &quot;my_addaccu_%dbits&quot; % n
, param = { 'nbit' : n } )
Inst ( &quot;my_addaccu_%dbits&quot; % n
, map = { 'a' : self.netA
, 'b' : self.netB
, 'c' : self.netC
, 'v' : self.netV
, 'cmd' : self.netCmd
, 'cout' : self.netCout
, 's' : self.netS
, 'vdd' : self.vdd
, 'vss' : self.vss
}
)
</pre>
</div>
</div>
</div>
<div class="section" id="description-of-a-netlist">
<h2><a class="toc-backref" href="#id186">Description of a netlist</a></h2>
<div class="section" id="nets">
<h3>Nets</h3>
<div class="section" id="id2">
<h4>Name</h4>
<p>SignalIn, SignalOut ... Creation of nets</p>
</div>
<div class="section" id="synopsys">
<h4>Synopsys</h4>
<pre class="literal-block">
netA = SignalIn ( &quot;a&quot;, 4 )
</pre>
</div>
<div class="section" id="id3">
<h4>Description</h4>
<p>How to create and use nets.</p>
</div>
<div class="section" id="id4">
<h4>Nets</h4>
<p>Differents kind of nets are listed below :</p>
<ul class="simple">
<li><tt class="docutils literal">SignalIn</tt> : Creation of an input port</li>
<li><tt class="docutils literal">SignalOut</tt> : Creation of an output port</li>
<li><tt class="docutils literal">SignalInOut</tt> : Creation of an inout port</li>
<li><tt class="docutils literal">SignalUnknown</tt> : Creation of an input/output port which direction
is not defined</li>
<li><tt class="docutils literal">TriState</tt> : Creation of a tristate port</li>
<li><tt class="docutils literal">CkIn</tt> : Creation of a clock port</li>
<li><tt class="docutils literal">VddIn</tt> : Creation of the vdd alimentation</li>
<li><tt class="docutils literal">VssIn</tt> : Creation of the vss alimentation</li>
<li><tt class="docutils literal">Signal</tt> : Creation of an internal net</li>
</ul>
</div>
<div class="section" id="parameters">
<h4>Parameters</h4>
<p>All kind of constructors have the same parameters :</p>
<ul class="simple">
<li><tt class="docutils literal">name</tt> : the name of the net (mandatory argument)</li>
<li><tt class="docutils literal">arity</tt> : the arity of the net (mandatory argument)</li>
<li><tt class="docutils literal">indice</tt> : for bit vectors only : the LSB bit (optional argument :
set to 0 by default)</li>
</ul>
<p>Only <tt class="docutils literal">CkIn</tt>, <tt class="docutils literal">VddIn</tt> and <tt class="docutils literal">VssIn</tt> do not have the same parameters :
there is only the <tt class="docutils literal">name</tt> parameter (they are 1 bit nets).</p>
</div>
<div class="section" id="functions-and-methods">
<h4>Functions and methods</h4>
<p>Some functions/methods are provided in order to handle nets :</p>
<ul>
<li><p class="first">function <tt class="docutils literal">Cat</tt> : Concatenation of nets, beginning with the MSB</p>
<pre class="literal-block">
Inst ( 'DpgenInv'
, map = { 'i0' : Cat ( A, B )
, 'nq' : S
, 'vdd' : vdd
, 'vss' : vss
}
)
</pre>
<p>Or :</p>
<pre class="literal-block">
tab = []
tab.append ( A )
tab.append ( B )
Inst ( 'DpgenInv'
, map = { 'i0' : Cat ( tab )
, 'nq' : S
, 'vdd' : vdd
, 'vss' : vss
}
)
</pre>
<p>If A and B are 2 bits nets, the net <tt class="docutils literal">myNet</tt> will be such as :</p>
<pre class="literal-block">
myNet[3] = A[1]
myNet[2] = A[0]
myNet[1] = B[1]
myNet[0] = B[0]
</pre>
</li>
<li><p class="first">function <tt class="docutils literal">Extend</tt> : Creation of a net which is an extension of the
net which it is applied to</p>
<pre class="literal-block">
temp = Signal ( &quot;temp&quot;, 5 )
tempExt = Signal ( &quot;temp_ext&quot;, 8 )
tempExt &lt;= temp.Extand ( 8, 'one' )
</pre>
</li>
<li><p class="first">method <tt class="docutils literal">Alias</tt> : Creation of an alias name for a net</p>
<pre class="literal-block">
cin.Alias ( c_temp[0] )
cout.Alias ( c_temp[4] )
for i in range ( 4 ) :
Inst ( &quot;Fulladder&quot;
, map = { 'a' : a[i]
, 'b' : b[i]
, 'cin' : c_temp[i]
, 'sout' : sout[i]
, 'cout' : c_temp[i+1]
, 'vdd' : vdd
, 'vss' : vss
}
)
</pre>
</li>
</ul>
</div>
<div class="section" id="errors">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul>
<li><div class="first line-block">
<div class="line"><tt class="docutils literal">Error in SignalIn :</tt></div>
<div class="line"><tt class="docutils literal">the lenght of the net must be a positive value.</tt></div>
<div class="line">One can not create a net with a negative lenght.</div>
</div>
</li>
</ul>
</div>
</div>
<div class="section" id="instances">
<h3>Instances</h3>
<div class="section" id="id5">
<h4>Name</h4>
<p>Inst Creation of instances</p>
</div>
<div class="section" id="id6">
<h4>Synopsys</h4>
<pre class="literal-block">
Inst ( model
, name
, map = connectmap
)
</pre>
</div>
<div class="section" id="id7">
<h4>Description</h4>
<p>Instantiation of an instance. The type of the instance is given by the
<tt class="docutils literal">model</tt> parameter. The connexions are made thanks to the
<tt class="docutils literal">connectmap</tt> parameters.</p>
</div>
<div class="section" id="id8">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">Model</tt> : Name of the mastercell of the instance to create
(mandatory argument)</li>
<li><tt class="docutils literal">name</tt> : Name of the instance (optional)
When this argument is not defined, the instance has a name created
by default. This argument is usefull when one wants to create a
layout as well. Indeed, the placement of the instances is much easier
when the conceptor has chosen himself the name f the
instances.&lt;/para&gt;</li>
<li><tt class="docutils literal">connectmap</tt> : Connexions in order to make the netlist</li>
</ul>
<p><tt class="docutils literal">param</tt> and <tt class="docutils literal">map</tt> are dictionnaries as shown in the example below.</p>
</div>
<div class="section" id="id9">
<h4>Example</h4>
<pre class="literal-block">
Inst ( 'a2_x2'
, map = { 'i0' : in0
, 'i1' : in1
, 'q' : out
, 'vdd' : vdd
, 'vss' : vss
}
)
</pre>
<p>You can see a concrete example at :</p>
</div>
<div class="section" id="id10">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">Error in Inst : the model Model does not exist.</tt>
<tt class="docutils literal">Check CRL_CATA_LIB.</tt>
Either one has made a mistake in the name of the model, either the
environment variable is not correct.</li>
<li><tt class="docutils literal">Error in Inst : port does not exist in model Model.</tt>
One port in map is not correct.</li>
<li><tt class="docutils literal">Error in Inst : one input net is not dimensionned.</tt>
The size of the output nets is automatically calculated bus the
input nets must be dimensionned before being connected.</li>
</ul>
</div>
</div>
<div class="section" id="generators">
<h3>Generators</h3>
<div class="section" id="id11">
<h4>Name</h4>
<p>Generate Interface with the generators</p>
</div>
<div class="section" id="id12">
<h4>Synopsys</h4>
<pre class="literal-block">
Generate ( model, modelname, param = dict )
</pre>
</div>
<div class="section" id="id13">
<h4>Description</h4>
<p>The <tt class="docutils literal">Generate</tt> function call is the generic interface to all
generators.</p>
</div>
<div class="section" id="arguments">
<h4>Arguments</h4>
<ul class="simple">
<li><tt class="docutils literal">model</tt> : Specifies which generator is to be invoked<ul>
<li>If the generator belongs to the Dpgen library provided by Stratus,
the model name of the generator is simply the name of the class of
the generator.</li>
<li>If the generator is created by the user, the model name of the
generator must have the form : “file_name.class_name”. (Note
that if the the generator is not in the working directory, the
directory of the generator to be instantiated has to be added in
the CRL_CATA_LIB environment variable)</li>
</ul>
</li>
<li><tt class="docutils literal">modelname</tt> : Specifies the name of the model to be generated</li>
<li><tt class="docutils literal">dict</tt> : Specifies the parameters of the generator</li>
</ul>
</div>
<div class="section" id="id14">
<h4>Parameters</h4>
<p>Every generator has its own parameters. They must be described in the
map <tt class="docutils literal">dict</tt>.
Every generator provides a netlist view. Two other views can be
generated, if they are provided by the generator. Two parameters have to
be given, in order to choose those views :</p>
<ul class="simple">
<li>physical : True/False, generation of the physical view (optionnal,
False by default)</li>
<li>behavioral : True/False, generation of the behavioral view
(optionnal, False by default)</li>
</ul>
</div>
<div class="section" id="id15">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Generate : the model must be described in a string.</tt></li>
</ul>
</div>
</div>
</div>
<div class="section" id="description-of-a-layout">
<h2><a class="toc-backref" href="#id187">Description of a layout</a></h2>
<div class="section" id="place">
<h3>Place</h3>
<div class="section" id="id16">
<h4>Name</h4>
<p>Place Places an instance</p>
</div>
<div class="section" id="id17">
<h4>Synopsys</h4>
<pre class="literal-block">
Place ( ins, sym, point )
</pre>
</div>
<div class="section" id="id18">
<h4>Description</h4>
<p>Placement of an instance.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt>, in
order to use the <tt class="docutils literal">Place</tt> function.</p>
</div>
<div class="section" id="id19">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place.</li>
<li><tt class="docutils literal">sym</tt> : Geometrical operation to be performed on the instance
before beeing placed.
The <tt class="docutils literal">sym</tt> argument can take eight legal values :<ul>
<li><tt class="docutils literal">NOSYM</tt> : no geometrical operation is performed</li>
<li><tt class="docutils literal">SYM_Y</tt> : Y becomes -Y, that means toward X axe symetry</li>
<li><tt class="docutils literal">SYM_X</tt> : X becomes -X, that means toward Y axe symetry</li>
<li><tt class="docutils literal">SYMXY</tt> : X becomes -X, Y becomes -Y</li>
<li><tt class="docutils literal">ROT_P</tt> : a positive 90 degrees rotation takes place</li>
<li><tt class="docutils literal">ROT_M</tt> : a negative 90 degrees rotation takes place</li>
<li><tt class="docutils literal">SY_RP</tt> : Y becomes -Y, and then a positive 90 degrees rotation
takes place</li>
<li><tt class="docutils literal">SY_RM</tt> : Y becomes -Y, and then a negative 90 degrees rotation
takes place</li>
</ul>
</li>
<li><tt class="docutils literal">point</tt> : coordinates of the lower left corner of the abutment box
of the instance in the current figure.</li>
</ul>
</div>
<div class="section" id="id20">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst, NOSYM, XY ( 0, 0 ) )
</pre>
</div>
<div class="section" id="id21">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul>
<li><div class="first line-block">
<div class="line"><tt class="docutils literal">[Stratus ERROR] Placement : the instance doesn't exist.</tt></div>
<div class="line">The instance must be instanciated in order to be placed.</div>
</div>
</li>
<li><p class="first"><tt class="docutils literal">[Stratus ERROR] Placement : the first argument is not an instance.</tt></p>
</li>
<li><div class="first line-block">
<div class="line"><tt class="docutils literal">[Stratus ERROR] Placement : the instance is already placed.</tt></div>
<div class="line">One can not place an instance twice</div>
</div>
</li>
<li><div class="first line-block">
<div class="line"><tt class="docutils literal">[Stratus ERROR] Place : wrong argument for placement type.</tt></div>
<div class="line">The symetry given as argument is not correct.</div>
</div>
</li>
<li><div class="first line-block">
<div class="line"><tt class="docutils literal">[Stratus ERROR] Place : wrong argument for placement,</tt></div>
<div class="line">`` the coordinates must be put in a XY object.``</div>
<div class="line">The coordinates are not descrobed the bood way.</div>
</div>
</li>
</ul>
</div>
</div>
<div class="section" id="placetop">
<h3>PlaceTop</h3>
<div class="section" id="id22">
<h4>Name</h4>
<p>PlaceTop Places an instance at the top of the “reference instance”</p>
</div>
<div class="section" id="id23">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceTop ( ins, sym, offsetX, offsetY )
</pre>
</div>
<div class="section" id="id24">
<h4>Description</h4>
<p>Placement of an instance.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt> in order
to use the <tt class="docutils literal">PlaceTop</tt> function.</p>
<p>The bottom left corner of the abutment box of the instance is placed,
after beeing symetrized and/or rotated, toward the top left corner of
the abutment box of the “reference instance”. The newly placed instance
becomes the “reference instance”.</p>
</div>
<div class="section" id="id25">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place.</li>
<li><tt class="docutils literal">sym</tt> : Geometrical operation to be performed on the instance
before beeing placed.
The <tt class="docutils literal">sym</tt> argument can take eight legal values :<ul>
<li><tt class="docutils literal">NOSYM</tt> : no geometrical operation is performed</li>
<li><tt class="docutils literal">SYM_Y</tt> : Y becomes -Y, that means toward X axe symetry</li>
<li><tt class="docutils literal">SYM_X</tt> : X becomes -X, that means toward Y axe symetry</li>
<li><tt class="docutils literal">SYMXY</tt> : X becomes -X, Y becomes -Y</li>
<li><tt class="docutils literal">ROT_P</tt> : a positive 90 degrees rotation takes place</li>
<li><tt class="docutils literal">ROT_M</tt> : a negative 90 degrees rotation takes place</li>
<li><tt class="docutils literal">SY_RP</tt> : Y becomes -Y, and then a positive 90 degrees rotation
takes place</li>
<li><tt class="docutils literal">SY_RM</tt> : Y becomes -Y, and then a negative 90 degrees rotation
takes place</li>
</ul>
</li>
<li><tt class="docutils literal">offsetX</tt> (optionnal) : An offset is put horizontally. The value
given as argument must be a multiple of PITCH</li>
<li><tt class="docutils literal">offsetY</tt> (optionnal) : An offset is put vertically. The value
given as argument must be a multiple of SLICE</li>
</ul>
</div>
<div class="section" id="id26">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst1, NOSYM, 0, 0 )
PlaceTop ( myInst2, SYM_Y )
</pre>
</div>
<div class="section" id="id27">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance doesn't exist.</tt>
The instance must be instanciated in order to be placed.</li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the first argument is not an instance.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance is already placed.</tt>
One can not place an instance twice</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceTop : no previous instance.</tt>
One can use <tt class="docutils literal">PlaceTop</tt> only if a reference instance exist. Use a
<tt class="docutils literal">Place</tt> call before.</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceTop : wrong argument for placement type.</tt>
The symetry given as argument is not correct.</li>
</ul>
</div>
</div>
<div class="section" id="placebottom">
<h3>PlaceBottom</h3>
<div class="section" id="id28">
<h4>Name</h4>
<p>PlaceBottom Places an instance below the “reference instance”</p>
</div>
<div class="section" id="id29">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceBottom ( ins, sym, offsetX, offsetY )
</pre>
</div>
<div class="section" id="id30">
<h4>Description</h4>
<p>Placement of an instance.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt> in order
to use the <tt class="docutils literal">PlaceTop</tt> function.</p>
<p>The top left corner of the abutment box of the instance is placed, after
beeing symetrized and/or rotated, toward the bottom left corner of the
abutment box of the “reference instance”. The newly placed instance
becomes the “reference instance”.</p>
</div>
<div class="section" id="id31">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place.</li>
<li><tt class="docutils literal">sym</tt> : Geometrical operation to be performed on the instance
before beeing placed.
The <tt class="docutils literal">sym</tt> argument can take eight legal values :<ul>
<li><tt class="docutils literal">NOSYM</tt> : no geometrical operation is performed</li>
<li><tt class="docutils literal">SYM_Y</tt> : Y becomes -Y, that means toward X axe symetry</li>
<li><tt class="docutils literal">SYM_X</tt> : X becomes -X, that means toward Y axe symetry</li>
<li><tt class="docutils literal">SYMXY</tt> : X becomes -X, Y becomes -Y</li>
<li><tt class="docutils literal">ROT_P</tt> : a positive 90 degrees rotation takes place</li>
<li><tt class="docutils literal">ROT_M</tt> : a negative 90 degrees rotation takes place</li>
<li><tt class="docutils literal">SY_RP</tt> : Y becomes -Y, and then a positive 90 degrees rotation
takes place</li>
<li><tt class="docutils literal">SY_RM</tt> : Y becomes -Y, and then a negative 90 degrees rotation
takes place</li>
</ul>
</li>
<li><tt class="docutils literal">offsetX</tt> (optionnal) : An offset is put horizontally. The value
given as argument must be a multiple of PITCH</li>
<li><tt class="docutils literal">offsetY</tt> (optionnal) : An offset is put vertically. The value
given as argument must be a multiple of SLICE</li>
</ul>
</div>
<div class="section" id="id32">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst1, NOSYM, 0, 0 )
PlaceBottom ( myInst2, SYM_Y )
</pre>
</div>
<div class="section" id="id33">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance doesn't exist.</tt>
The instance must be instanciated in order to be placed.</li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the first argument is not an instance.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance is already placed.</tt>
One can not place an instance twice</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceBottom : no previous instance.</tt>
One can use <tt class="docutils literal">PlaceBottom</tt> only if a reference instance exist. Use
a <tt class="docutils literal">Place</tt> call before.</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceBottom : wrong argument for placement type.</tt>
The symetry given as argument is not correct.</li>
</ul>
</div>
</div>
<div class="section" id="placeright">
<h3>PlaceRight</h3>
<div class="section" id="id34">
<h4>Name</h4>
<p>PlaceRight Places an instance at the right of the “reference instance”</p>
</div>
<div class="section" id="id35">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceRight ( ins, sym, offsetX, offsetY )
</pre>
</div>
<div class="section" id="id36">
<h4>Description</h4>
<p>Placement of an instance.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt> in order
to use the <tt class="docutils literal">PlaceTop</tt> function.</p>
<p>The bottom left corner of the abutment box of the instance is placed,
after beeing symetrized and/or rotated, toward the bottom right corner
of the abutment box of the “reference instance”. The newly placed
instance becomes the “reference instance”.</p>
</div>
<div class="section" id="id37">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place.</li>
<li><tt class="docutils literal">sym</tt> : Geometrical operation to be performed on the instance
before beeing placed.
The <tt class="docutils literal">sym</tt> argument can take eight legal values :<ul>
<li><tt class="docutils literal">NOSYM</tt> : no geometrical operation is performed</li>
<li><tt class="docutils literal">SYM_Y</tt> : Y becomes -Y, that means toward X axe symetry</li>
<li><tt class="docutils literal">SYM_X</tt> : X becomes -X, that means toward Y axe symetry</li>
<li><tt class="docutils literal">SYMXY</tt> : X becomes -X, Y becomes -Y</li>
<li><tt class="docutils literal">ROT_P</tt> : a positive 90 degrees rotation takes place</li>
<li><tt class="docutils literal">ROT_M</tt> : a negative 90 degrees rotation takes place</li>
<li><tt class="docutils literal">SY_RP</tt> : Y becomes -Y, and then a positive 90 degrees rotation
takes place</li>
<li><tt class="docutils literal">SY_RM</tt> : Y becomes -Y, and then a negative 90 degrees rotation
takes place</li>
</ul>
</li>
<li><tt class="docutils literal">offsetX</tt> (optionnal) : An offset is put horizontally. The value
given as argument must be a multiple of PITCH</li>
<li><tt class="docutils literal">offsetY</tt> (optionnal) : An offset is put vertically. The value
given as argument must be a multiple of SLICE</li>
</ul>
</div>
<div class="section" id="id38">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst1, NOSYM, 0, 0 )
PlaceRight ( myInst2, NOSYM )
</pre>
</div>
<div class="section" id="id39">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance doesn't exist.</tt>
The instance must be instanciated in order to be placed.</li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the first argument is not an instance.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance is already placed.</tt>
One can not place an instance twice</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceRight : no previous instance.</tt>
One can use <tt class="docutils literal">PlaceRight</tt> only if a reference instance exist. Use
a <tt class="docutils literal">Place</tt> call before.</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceRight : wrong argument for placement type.</tt>
The symetry given as argument is not correct.</li>
</ul>
</div>
</div>
<div class="section" id="placeleft">
<h3>PlaceLeft</h3>
<div class="section" id="id40">
<h4>Name</h4>
<p>PlaceLeft Places an instance at the left of the “reference instance”</p>
</div>
<div class="section" id="id41">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceLeft ( ins, sym, offsetX, offsetY )
</pre>
</div>
<div class="section" id="id42">
<h4>Description</h4>
<p>Placement of an instance.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt> in order
to use the <tt class="docutils literal">PlaceTop</tt> function.</p>
<p>The bottom right corner of the abutment box of the instance is placed,
after beeing symetrized and/or rotated, toward the bottom left corner of
the abutment box of the “reference instance”. The newly placed instance
becomes the “reference instance”.</p>
</div>
<div class="section" id="id43">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place.</li>
<li><tt class="docutils literal">sym</tt> : Geometrical operation to be performed on the instance
before beeing placed.
The <tt class="docutils literal">sym</tt> argument can take eight legal values :<ul>
<li><tt class="docutils literal">NOSYM</tt> : no geometrical operation is performed</li>
<li><tt class="docutils literal">SYM_Y</tt> : Y becomes -Y, that means toward X axe symetry</li>
<li><tt class="docutils literal">SYM_X</tt> : X becomes -X, that means toward Y axe symetry</li>
<li><tt class="docutils literal">SYMXY</tt> : X becomes -X, Y becomes -Y</li>
<li><tt class="docutils literal">ROT_P</tt> : a positive 90 degrees rotation takes place</li>
<li><tt class="docutils literal">ROT_M</tt> : a negative 90 degrees rotation takes place</li>
<li><tt class="docutils literal">SY_RP</tt> : Y becomes -Y, and then a positive 90 degrees rotation
takes place</li>
<li><tt class="docutils literal">SY_RM</tt> : Y becomes -Y, and then a negative 90 degrees rotation
takes place</li>
</ul>
</li>
<li><tt class="docutils literal">offsetX</tt> (optionnal) : An offset is put horizontally. The value
given as argument must be a multiple of PITCH</li>
<li><tt class="docutils literal">offsetY</tt> (optionnal) : An offset is put vertically. The value
given as argument must be a multiple of SLICE</li>
</ul>
</div>
<div class="section" id="id44">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst1, NOSYM, 0, 0 )
PlaceLeft ( myInst2, NOSYM )
</pre>
</div>
<div class="section" id="id45">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance doesn't exist.</tt>
The instance must be instanciated in order to be placed.</li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the first argument is not an instance.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] Placement : the instance is already placed.</tt>
One can not place an instance twice</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceLeft : no previous instance.</tt>
One can use <tt class="docutils literal">PlaceLeft</tt> only if a reference instance exist. Use a
<tt class="docutils literal">Place</tt> call before.</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceLeft : wrong argument for placement type.</tt>
The symetry given as argument is not correct.</li>
</ul>
</div>
</div>
<div class="section" id="setrefins">
<h3>SetRefIns</h3>
<div class="section" id="id46">
<h4>Name</h4>
<p>SetRefIns Defines the new “reference instance” for placement</p>
</div>
<div class="section" id="id47">
<h4>Synopsys</h4>
<pre class="literal-block">
SetRefIns ( ins )
</pre>
</div>
<div class="section" id="id48">
<h4>Description</h4>
<p>This function defines the new “reference instance”, used as starting
point in the relative placement functions.
Its regarding the abutmentbox of the instance <tt class="docutils literal">ins</tt> that the next
instance is going to be placed, if using the appropriate functions.</p>
<p>Note that the more recently placed instance becomes automaticaly the
“reference instance”, if SetRefIns isnt called.</p>
</div>
<div class="section" id="id49">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : defines the new “reference instance”</li>
</ul>
</div>
<div class="section" id="id50">
<h4>Example</h4>
<pre class="literal-block">
Place ( myInst1, NOSYM, 0, 0 )
PlaceRight ( myInst2, NOSYM )
SetRefIns ( myInst1 )
PlaceTop ( myInst3, SYM_Y )
</pre>
<p><tt class="docutils literal">myInst3</tt> is on top of <tt class="docutils literal">myInst1</tt> instead of <tt class="docutils literal">myInst2</tt>.</p>
</div>
<div class="section" id="id51">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] SetRefIns : the instance doesn't exist.</tt>
If the instance has not been instanciated, it is impossible do to
any placement from it.</li>
<li><tt class="docutils literal">[Stratus ERROR] SetRefIns : the instance <span class="pre">...is</span> not placed.</tt>
If the instance has not been placed, it is impossible do to any
placement from it.</li>
</ul>
</div>
</div>
<div class="section" id="defab">
<h3>DefAb</h3>
<div class="section" id="id52">
<h4>Name</h4>
<p>DefAb Creates the abutment box of the current cell</p>
</div>
<div class="section" id="id53">
<h4>Synopsys</h4>
<pre class="literal-block">
DefAb ( point1, point2 )
</pre>
</div>
<div class="section" id="id54">
<h4>Description</h4>
<p>This function creates the abutment box of the current cell.</p>
<p>Note that one does not have to call this function before saving in order
to create the abutment box. The abutment box is created nevertheless
(given to placed instances). This function is usefull if one wants to
create an abutment before placing the instances.</p>
</div>
<div class="section" id="id55">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">point1</tt> : coordinates of the bottom left corner of the created
abutment box.</li>
<li><tt class="docutils literal">point2</tt> : coordinates of the top right corner of the created
abutment box.</li>
</ul>
</div>
<div class="section" id="id56">
<h4>Example</h4>
<pre class="literal-block">
DefAb ( XY(0, 0), XY(500, 100) )
Place ( self.inst, NOSYM, XY(0, 0) )
</pre>
</div>
<div class="section" id="id57">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] DefAb : an abutment box already exists.</tt>
`` Maybe you should use ResizeAb function.``
One has called DefAb but the current cell already has an abutment
box.
In order to modify the current abutment box, the function to call
is ResizeAb.</li>
<li><tt class="docutils literal">[Stratus ERROR] DefAb : wrong argument,</tt>
`` the coordinates must be put in a XY object.``
The type of one of the arguments is not correct. Coordinates must
be put in a <tt class="docutils literal">XY</tt> object.</li>
<li><tt class="docutils literal">[Stratus ERROR] DefAb :</tt>
<tt class="docutils literal">Coordinates of an abutment Box in y must be multiple of the slice.</tt>
<tt class="docutils literal">Coordinates of an abutment Box in x must be multiple of the pitch.</tt>
One has called DefAb with non authorized values.</li>
</ul>
</div>
</div>
<div class="section" id="resizeab">
<h3>ResizeAb</h3>
<div class="section" id="id58">
<h4>Name</h4>
<p>ResizeAb Modifies the abutment box of the current cell</p>
</div>
<div class="section" id="id59">
<h4>Synopsys</h4>
<pre class="literal-block">
ResizeAb ( dx1, dy1, dx2, dy2 )
</pre>
</div>
<div class="section" id="id60">
<h4>Description</h4>
<p>This function modifies the abutment box of the current cell.
The coordinates of the abutment box are the coordinates of the envelop
of the abutment boxes of each instance plus the delta values given as
argument.</p>
<p>Note that one can not call this function in order to create the abutment
box. This fonction only modifies the already created abutment box.</p>
</div>
<div class="section" id="id61">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">(dx1, dy1)</tt> : Values to be substracted to the lower left corner of
the previous abutment box.</li>
<li><tt class="docutils literal">(dx2, dy2)</tt> : Values to be added to the upper right corner of the
previous abutment box.</li>
</ul>
<p>The Values are used as follow :</p>
<p><img alt="resize" src="../pages/images/resizeAb.png" /></p>
</div>
<div class="section" id="id62">
<h4>Example</h4>
<pre class="literal-block">
% Expansion of the abutment box at the top and the bottom
ResizeAb ( 0, 100, 0, 100 )
</pre>
</div>
<div class="section" id="id63">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li>`` [Stratus ERROR] ResizeAb :``
<tt class="docutils literal">Coordinates of an abutment Box in y must be multiple of the slice.</tt>
<tt class="docutils literal">Coordinates of an abutment Box in x must be multiple of the pitch.</tt>
One has called ResizeAb with non authorized values</li>
<li>`` [Stratus ERROR] ResizeAb :``
<tt class="docutils literal">one of the values of dx1 or dx2 (dy1 or dy2)&nbsp; is incompatible with</tt>
<tt class="docutils literal">the size of the abutment box.</tt>
<tt class="docutils literal">Coordinates of an abutment Box in x must be multiple of the pitch.</tt>
One has called ResizeAb with a value which deteriorates the
abtument box</li>
</ul>
</div>
</div>
</div>
<div class="section" id="patterns-generation-extension">
<h2><a class="toc-backref" href="#id188">Patterns generation extension</a></h2>
<div class="section" id="description-of-the-stimuli">
<h3>Description of the stimuli</h3>
<p>The stimuli used for the simulation are described in a <tt class="docutils literal">Stimuli</tt>
method. This method is a Python function generator that is automatically
called by the <tt class="docutils literal">Testbench</tt> method to generate all the stimuli. As a
Python function generator, the <tt class="docutils literal">yield</tt> instruction have to be used at
the end of each stimuli computation.</p>
<div class="section" id="affect-value-to-signals">
<h4>Affect value to signals</h4>
<p>The method <tt class="docutils literal">affect</tt> permits to affect a value to a given signal as
follow</p>
<pre class="literal-block">
self._stim.affect(self.Ck,0)
</pre>
</div>
<div class="section" id="add-stimuli">
<h4>Add stimuli</h4>
<p>The method <tt class="docutils literal">add</tt> permits to finish a step of simulation by add all the
values to the current stimuli</p>
<pre class="literal-block">
self._stim.add()
</pre>
</div>
</div>
</div>
<div class="section" id="place-and-route">
<h2><a class="toc-backref" href="#id189">Place and Route</a></h2>
<div class="section" id="placesegment">
<h3>PlaceSegment</h3>
<div class="section" id="id64">
<h4>Name</h4>
<p>PlaceSegment Places a segment</p>
</div>
<div class="section" id="id65">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceSegment ( net, layer, point1, point2, width )
</pre>
</div>
<div class="section" id="id66">
<h4>Description</h4>
<p>Placement of a segment.
The segment is created between <tt class="docutils literal">point1</tt> and <tt class="docutils literal">point2</tt> on the layer
<tt class="docutils literal">layer</tt> and with width <tt class="docutils literal">width</tt>. It belongs to the net <tt class="docutils literal">net</tt>.
Note that the segment must be horizontal or vertival.</p>
</div>
<div class="section" id="id67">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">net</tt> : Net which the segment belongs to</li>
<li><tt class="docutils literal">layer</tt> : Layer of the segment.
The <tt class="docutils literal">layer</tt> argument is a string wich can take different values,
thanks to the technology (file described in HUR_TECHNO_NAME)<ul>
<li>NWELL, PWELL, ptie, ntie, pdif, ndif, ntrans, ptrans, poly, ALU1,
ALU2, ALU3, ALU4, ALU5, ALU6, VIA1, VIA2, VIA3, VIA4, VIA5, TEXT,
UNDEF, SPL1, TALU1, TALU2, TALU3, TALU4, TALU5, TALU6, POLY, NTIE,
PTIE, NDIF, PDIF, PTRANS, NTRANS, CALU1, CALU2, CALU3, CALU4,
CALU5, CALU6, CONT_POLY, CONT_DIF_N, CONT_DIF_P,
CONT_BODY_N, CONT_BODY_P, via12, via23, via34, via45, via56,
via24, via25, via26, via35, via36, via46, CONT_TURN1,
CONT_TURN2, CONT_TURN3, CONT_TURN4, CONT_TURN5, CONT_TURN6</li>
</ul>
</li>
<li><tt class="docutils literal">point1</tt>, <tt class="docutils literal">point2</tt> : The segment is created between those two
points</li>
</ul>
</div>
<div class="section" id="id68">
<h4>Example</h4>
<pre class="literal-block">
PlaceSegment ( myNet, &quot;ALU3&quot;, XY (10, 0), XY (10, 100), 2 )
</pre>
</div>
<div class="section" id="id69">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PlaceSegment : Argument layer must be a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceSegment : Wrong argument,</tt>
<tt class="docutils literal">the coordinates of the segment must be put in XY objects.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceSegment : Segments are vertical or horizontal.</tt>
The two references given as argument do not describe a vertical or
horizontal segment. Wether coordinate x or y of the references must
be identical.</li>
</ul>
<p>]*CopyUpSegment*CopyUpSegmentseccopy</p>
</div>
</div>
<div class="section" id="placecontact">
<h3>PlaceContact</h3>
<div class="section" id="id70">
<h4>Name</h4>
<p>PlaceContact Places a contact</p>
</div>
<div class="section" id="id71">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceContact ( net, layer, point, width, height )
</pre>
</div>
<div class="section" id="id72">
<h4>Description</h4>
<p>Placement of a contact.
The contact is located at the coodinates of <tt class="docutils literal">point</tt>, on the layer
<tt class="docutils literal">layer</tt> and has a size of 1 per 1. It belongs to the net <tt class="docutils literal">net</tt>.
Note that the segment must be horizontal or vertival.</p>
</div>
<div class="section" id="id73">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">net</tt> : Net which the contact belongs to</li>
<li><tt class="docutils literal">layer</tt> : Layer of the segment.
The <tt class="docutils literal">layer</tt> argument is a string wich can take different values,
thanks to the technology (file described in HUR_TECHNO_NAME)<ul>
<li>NWELL, PWELL, ptie, ntie, pdif, ndif, ntrans, ptrans, poly, ALU1,
ALU2, ALU3, ALU4, ALU5, ALU6, VIA1, VIA2, VIA3, VIA4, VIA5, TEXT,
UNDEF, SPL1, TALU1, TALU2, TALU3, TALU4, TALU5, TALU6, POLY, NTIE,
PTIE, NDIF, PDIF, PTRANS, NTRANS, CALU1, CALU2, CALU3, CALU4,
CALU5, CALU6, CONT_POLY, CONT_DIF_N, CONT_DIF_P,
CONT_BODY_N, CONT_BODY_P, via12, via23, via34, via45, via56,
via24, via25, via26, via35, via36, via46, CONT_TURN1,
CONT_TURN2, CONT_TURN3, CONT_TURN4, CONT_TURN5, CONT_TURN6</li>
</ul>
</li>
<li><tt class="docutils literal">point</tt> : Coodinates of the contact</li>
<li><tt class="docutils literal">width</tt> : Width of the contact</li>
<li><tt class="docutils literal">height</tt> : Height of the contact</li>
</ul>
</div>
<div class="section" id="id74">
<h4>Example</h4>
<pre class="literal-block">
PlaceContact ( myNet, &quot;ALU2&quot;, XY (10, 0), 2, 2 )
</pre>
</div>
<div class="section" id="id75">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PlaceContact : Argument layer must be a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceContact : Wrong argument,</tt>
<tt class="docutils literal">the coordinates of the contact must be put in a XY object.</tt></li>
</ul>
</div>
</div>
<div class="section" id="placepin">
<h3>PlacePin</h3>
<div class="section" id="id76">
<h4>Name</h4>
<p>PlacePin Places a pin</p>
</div>
<div class="section" id="id77">
<h4>Synopsys</h4>
<pre class="literal-block">
PlacePin ( net, layer, direction, point, width, height )
</pre>
</div>
<div class="section" id="id78">
<h4>Description</h4>
<p>Placement of a pin.
The pin is located at the coodinates of <tt class="docutils literal">point</tt>, on the layer
<tt class="docutils literal">layer</tt>, has a a direction of <tt class="docutils literal">direction</tt> and size of 1 per 1. It
belongs to the net <tt class="docutils literal">net</tt>.</p>
</div>
<div class="section" id="id79">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">net</tt> : Net which the pin belongs to</li>
<li><tt class="docutils literal">layer</tt> : Layer of the segment.
The <tt class="docutils literal">layer</tt> argument is a string wich can take different values,
thanks to the technology (file described in HUR_TECHNO_NAME)<ul>
<li>NWELL, PWELL, ptie, ntie, pdif, ndif, ntrans, ptrans, poly, ALU1,
ALU2, ALU3, ALU4, ALU5, ALU6, VIA1, VIA2, VIA3, VIA4, VIA5, TEXT,
UNDEF, SPL1, TALU1, TALU2, TALU3, TALU4, TALU5, TALU6, POLY, NTIE,
PTIE, NDIF, PDIF, PTRANS, NTRANS, CALU1, CALU2, CALU3, CALU4,
CALU5, CALU6, CONT_POLY, CONT_DIF_N, CONT_DIF_P,
CONT_BODY_N, CONT_BODY_P, via12, via23, via34, via45, via56,
via24, via25, via26, via35, via36, via46, CONT_TURN1,
CONT_TURN2, CONT_TURN3, CONT_TURN4, CONT_TURN5, CONT_TURN6</li>
</ul>
</li>
<li><tt class="docutils literal">direction</tt> : Direction of the pin<ul>
<li>UNDEFINED, NORTH, SOUTH, EAST, WEST</li>
</ul>
</li>
<li><tt class="docutils literal">point</tt> : Coodinates of the pin</li>
<li><tt class="docutils literal">width</tt> : Width of the pin</li>
<li><tt class="docutils literal">height</tt> : Height of the pin</li>
</ul>
</div>
<div class="section" id="id80">
<h4>Example</h4>
<pre class="literal-block">
PlacePin ( myNet, &quot;ALU2&quot;, NORTH, XY (10, 0), 2, 2 )
</pre>
</div>
<div class="section" id="id81">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PlacePin : Argument layer must be a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlacePin : Illegal pin access direction.</tt>
<tt class="docutils literal">The values are : UNDEFINED, NORTH, SOUTH, EAST, WEST.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlacePin : Wrong argument,</tt>
<tt class="docutils literal">the coordinates of the pin must be put in a XY object.</tt></li>
</ul>
</div>
</div>
<div class="section" id="placeref">
<h3>PlaceRef</h3>
<div class="section" id="id82">
<h4>Name</h4>
<p>PlaceRef Places a reference</p>
</div>
<div class="section" id="id83">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceRef ( point, name )
</pre>
</div>
<div class="section" id="id84">
<h4>Description</h4>
<p>Placement of a reference.
The reference is located at the coordinates of <tt class="docutils literal">point</tt>, with name
<tt class="docutils literal">name</tt>.</p>
</div>
<div class="section" id="id85">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">point</tt> : Coodinates of the reference</li>
<li><tt class="docutils literal">name</tt> : Name of the reference</li>
</ul>
</div>
<div class="section" id="id86">
<h4>Example</h4>
<pre class="literal-block">
PlaceRef ( XY (10, 0), &quot;myref&quot; )
</pre>
</div>
<div class="section" id="id87">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PlaceRef : Wrong argument,</tt>
<tt class="docutils literal">the coordinates of the reference must be put in a XY object.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceRef : Argument layer must be a string.</tt></li>
</ul>
</div>
</div>
<div class="section" id="getrefxy">
<h3>GetRefXY</h3>
<div class="section" id="id88">
<h4>Name</h4>
<p>GetRefXY Returns the coordinates of a reference</p>
</div>
<div class="section" id="id89">
<h4>Synopsys</h4>
<pre class="literal-block">
GetRefXY ( pathname, refname )
</pre>
</div>
<div class="section" id="id90">
<h4>Description</h4>
<p>Computation of coordinates.
The point returned (object XY) represents the location of the
reference of name <tt class="docutils literal">refname</tt> within the coodinates system of the top
cell. The reference <tt class="docutils literal">refname</tt> is instanciated in an instance found
thanks to <tt class="docutils literal">pathname</tt> which represents an ordered sequence of instances
through the hierarchy.</p>
</div>
<div class="section" id="id91">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">pathname</tt> : The path in order to obtain, from the top cell, the
instance the reference <tt class="docutils literal">refname</tt> belongs to</li>
<li><tt class="docutils literal">refname</tt> : The name of the reference</li>
</ul>
</div>
<div class="section" id="id92">
<h4>Example</h4>
<p>The cell which is being created (the top cell), instanciates a generator
with instance name “my_dpgen_and2”. This generator instanciates an
instance called “cell_1” which the reference “i0_20” belongs to.</p>
<pre class="literal-block">
GetRefXY ( &quot;my_dpgen_and2.cell_1&quot;, &quot;i0_20&quot; )
</pre>
</div>
<div class="section" id="id93">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] GetRefXY :</tt>
<tt class="docutils literal">The instance's path must be put with a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] GetRefXY :</tt>
<tt class="docutils literal">The reference must be done with it's name : a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] GetRefXY :</tt>
<tt class="docutils literal">No reference found with name ... in masterCell ...</tt></li>
</ul>
</div>
</div>
<div class="section" id="copyupsegment">
<h3>CopyUpSegment</h3>
<div class="section" id="id94">
<h4>Name</h4>
<p>CopyUpSegment Copies the segment of an instance in the current cell</p>
</div>
<div class="section" id="id95">
<h4>Synopsys</h4>
<pre class="literal-block">
CopyUpSegment ( pathname, netname, newnet )
</pre>
</div>
<div class="section" id="id96">
<h4>Description</h4>
<p>Duplication of a segment.
The segment is created with the same cordinates and layer as the
segment corresponding to the net <tt class="docutils literal">netname</tt> in the instance found
thanks to <tt class="docutils literal">pathname</tt>. It belongs to the net <tt class="docutils literal">newnet</tt>.
Note that if several segments correspond to the net, they are all
going to be copied.</p>
</div>
<div class="section" id="id97">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">pathname</tt> : The path in order to obtain, from the top cell, the
instance the net <tt class="docutils literal">netname</tt> belongs to</li>
<li><tt class="docutils literal">netname</tt> : The name of the net which the segment belongs to</li>
<li><tt class="docutils literal">net</tt> : The net which the top cell segment os going to belong to</li>
</ul>
</div>
<div class="section" id="id98">
<h4>Example</h4>
<pre class="literal-block">
CopuUpSegment ( &quot;my_dpgen_and2.cell_1&quot;, &quot;i0&quot;, myNet )
</pre>
</div>
<div class="section" id="id99">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] CopyUpSegment :</tt>
<tt class="docutils literal">The instance's path must be put with a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] CopyUpSegment :</tt>
<tt class="docutils literal">The segment must be done with it's name : a string.</tt></li>
<li><tt class="docutils literal">[Stratus ERROR] CopyUpSegment :</tt>
<tt class="docutils literal">No net found with name ... in masterCell ...</tt>
There is no net with name <tt class="docutils literal">netname</tt> in the instance found thanks
to the path <tt class="docutils literal">pathname</tt>.</li>
<li><tt class="docutils literal">[Stratus ERROR] CopyUpSegment :</tt>
<tt class="docutils literal">No segment found with net ... in masterCell ...</tt>
The net with name <tt class="docutils literal">netname</tt> has no segment. So the copy of
segment can not be done.</li>
<li><tt class="docutils literal">[Stratus ERROR] CopyUpSegment :</tt>
<tt class="docutils literal">the segment of net ... are not of type CALU.</tt>
In other words, the net is not an external net. The copy can be
done only with external nets.</li>
</ul>
</div>
</div>
<div class="section" id="placecentric">
<h3>PlaceCentric</h3>
<div class="section" id="id100">
<h4>Name</h4>
<p>PlaceCentric Placement of an instance in the middle of an abutment box</p>
</div>
<div class="section" id="id101">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceCentric ( ins )
</pre>
</div>
<div class="section" id="id102">
<h4>Description</h4>
<p>This function places an instance in the middle of and abutment box.
The instance has to be instantiated in the method <tt class="docutils literal">Netlist</tt> in order
to use this function.</p>
</div>
<div class="section" id="id103">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">ins</tt> : Instance to place</li>
</ul>
</div>
<div class="section" id="id104">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PlaceCentric: the instance does not exist.</tt>
The instance must be instanciated in order to be placed.</li>
<li><tt class="docutils literal">[Stratus ERROR] PlaceCentric :</tt>
<tt class="docutils literal">the instance's size is greater than this model.</tt>
The instance must fit in the abutment box. The abutment box may not
be big enough.</li>
</ul>
</div>
</div>
<div class="section" id="placeglu">
<h3>PlaceGlu</h3>
<div class="section" id="id105">
<h4>Name</h4>
<p>PlaceGlue Automatic placement of non placed instances</p>
</div>
<div class="section" id="id106">
<h4>Synopsys</h4>
<pre class="literal-block">
PlaceGlue ( cell )
</pre>
</div>
<div class="section" id="id107">
<h4>Description</h4>
<p>This function places, thanks to the automatic placer Mistral of
Coriolis, all the non placed instances of the cell.</p>
</div>
<div class="section" id="id108">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">cell</tt> : the cell which the fonction is applied to</li>
</ul>
</div>
</div>
<div class="section" id="fillcell">
<h3>FillCell</h3>
<div class="section" id="id109">
<h4>Name</h4>
<p>FillCell Automatic placement of ties.</p>
</div>
<div class="section" id="id110">
<h4>Synopsys</h4>
<pre class="literal-block">
FillCell ( cell )
</pre>
</div>
<div class="section" id="id111">
<h4>Description</h4>
<p>This function places automatically ties.</p>
</div>
<div class="section" id="id112">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">cell</tt> : the cell which the fonction is applied to</li>
</ul>
</div>
<div class="section" id="id113">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] FillCell : Given cell doesn't exist.</tt>
The argument is wrong. Check if one has created the cell correctly.</li>
</ul>
</div>
</div>
<div class="section" id="pads">
<h3>Pads</h3>
<div class="section" id="id114">
<h4>Name</h4>
<p>PadNorth, PadSouth, PadEast, PasWest Placement of pads at the
periphery of the cell</p>
</div>
<div class="section" id="id115">
<h4>Synopsys</h4>
<pre class="literal-block">
PadNorth ( args )
</pre>
</div>
<div class="section" id="id116">
<h4>Description</h4>
<p>These functions place the pads given as arguments at the given side of
the cell (PadNorth : up north, PadSouth : down south ...). Pads are
placed from bottom to top for PadNorth and PadSouth and from left to
right for PadWest and PasEast.</p>
</div>
<div class="section" id="id117">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">args</tt> : List of pads to be placed</li>
</ul>
</div>
<div class="section" id="id118">
<h4>Example</h4>
<pre class="literal-block">
PadSouth ( self.p_cin, self.p_np, self.p_ng, self.p_vssick0
, self.p_vddeck0, self.p_vsseck1, self.p_vddeck1, self.p_cout
, self.p_y[0], self.p_y[1], self.p_y[2]
)
</pre>
</div>
<div class="section" id="id119">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PadNorth : not enough space for all pads.</tt>
The abutment box is not big enough in order to place all the pads.
Maybe one could put pads on other faces of the cell.</li>
<li><tt class="docutils literal">[Stratus ERROR] PadNorth : one instance doesn't exist.</tt>
One of the pads given as arguments does not exist</li>
<li><tt class="docutils literal">[Stratus ERROR] PadNorth : one argument is not an instance.</tt>
One of the pads is not one of the pads of the cell.</li>
<li><tt class="docutils literal">[Stratus ERROR] PadNorth : the instance ins is already placed.</tt>
One is trying to place a pad twice.</li>
<li><tt class="docutils literal">[Stratus ERROR] PadNorth : pad ins must be closer to the center.</tt>
The pad name ins must be put closer to the center in order to route
the cell</li>
</ul>
</div>
</div>
<div class="section" id="alimentation-rails">
<h3>Alimentation rails</h3>
<div class="section" id="id120">
<h4>Name</h4>
<p>AlimVerticalRail, AlimHorizontalRail Placement of a
vertical/horizontal alimentation call back</p>
</div>
<div class="section" id="id121">
<h4>Synopsys</h4>
<pre class="literal-block">
AlimVerticalRail ( nb )
</pre>
</div>
<div class="section" id="id122">
<h4>Description</h4>
<p>These functions place a vertical/horizontal alimentation call back. Its
position is given by the parameter given.</p>
</div>
<div class="section" id="id123">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">nb</tt> : coordinate of the rail<ul>
<li>For AlimVerticalRail, <tt class="docutils literal">nb</tt> is in pitches i.e. 5 lambdas</li>
<li>For AlimHorizontalRail, <tt class="docutils literal">nb</tt> is in slices i.e. 50 lambdas</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="id124">
<h4>Example</h4>
<pre class="literal-block">
AlimVerticalRail ( 50 )
AlimVerticalRail ( 150 )
AlimHorizontalRail ( 10 )
</pre>
</div>
<div class="section" id="id125">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] AlimHorizontalRail :</tt>
<tt class="docutils literal">Illegal argument y, y must be between ... and ...</tt>
The argument given is wrong : the call back would not be in the
abutment box.</li>
<li><tt class="docutils literal">[Stratus ERROR] Placement of cells :</tt>
<tt class="docutils literal">please check your file of layout with DRUC.</tt>
The placement of the cell needs to be correct in order to place a
call back. Check the errors of placement.</li>
</ul>
</div>
</div>
<div class="section" id="alimentation-connectors">
<h3>Alimentation connectors</h3>
<div class="section" id="id126">
<h4>Name</h4>
<p>AlimConnectors Creation of connectors at the periphery of the core of
a circuit</p>
</div>
<div class="section" id="id127">
<h4>Synopsys</h4>
<pre class="literal-block">
AlimConnectors()
</pre>
</div>
<div class="section" id="id128">
<h4>Description</h4>
<p>This function creates the connectors in Alu 1 at the periphery of the
core.</p>
</div>
</div>
<div class="section" id="powerring">
<h3>PowerRing</h3>
<div class="section" id="id129">
<h4>Name</h4>
<p>PowerRing Placement of power rings.</p>
</div>
<div class="section" id="id130">
<h4>Synopsys</h4>
<pre class="literal-block">
PowerRing ( nb )
</pre>
</div>
<div class="section" id="id131">
<h4>Description</h4>
<p>This function places power rings around the core and around the plots.</p>
</div>
<div class="section" id="id132">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">nb</tt> : Number of pair of rings vdd/vss</li>
</ul>
</div>
<div class="section" id="id133">
<h4>Example</h4>
<pre class="literal-block">
PowerRing ( 3 )
</pre>
</div>
<div class="section" id="id134">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] PowerRing : Pads in the north haven't been placed.</tt>
The pads of the 4 sides of the chip must be placed before calling
function PowerRing.</li>
<li><tt class="docutils literal">[Stratus ERROR] PowerRing : too many rings, not enough space.</tt>
Wether The argument of PowerRing is to big, or the abutment box of
the chip is to small. Theres no space to put the rings.</li>
</ul>
</div>
</div>
<div class="section" id="routeck">
<h3>RouteCk</h3>
<div class="section" id="id135">
<h4>Name</h4>
<p>RouteCk Routing of signal Ck to standard cells</p>
</div>
<div class="section" id="id136">
<h4>Synopsys</h4>
<pre class="literal-block">
RouteCk ( net )
</pre>
</div>
<div class="section" id="id137">
<h4>Description</h4>
<p>This function routes signal Ck to standard cells.</p>
</div>
<div class="section" id="id138">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">net</tt> : the net which the fonction is applied to</li>
</ul>
</div>
<div class="section" id="id139">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] RouteCk : Pads in the north haven't been placed</tt>
The pads must be placed before calling RoutageCk.</li>
</ul>
</div>
</div>
</div>
<div class="section" id="instanciation-facilities">
<h2><a class="toc-backref" href="#id190">Instanciation facilities</a></h2>
<div class="section" id="buffer">
<h3>Buffer</h3>
<div class="section" id="id140">
<h4>Name</h4>
<p>Buffer Easy way to instantiate a buffer</p>
</div>
<div class="section" id="id141">
<h4>Synopsys</h4>
<pre class="literal-block">
netOut &lt;= netIn.Buffer()
</pre>
</div>
<div class="section" id="id142">
<h4>Description</h4>
<p>This method is a method of net. The net which this method is applied
to is the input net of the buffer. The method returns a net : the output
net.
Note that it is possible to change the generator instanciated with the
<tt class="docutils literal">SetBuff</tt> method.</p>
</div>
<div class="section" id="id143">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.S = SignalOut ( &quot;s&quot;, 4 )
self.Vdd = VddIn ( &quot;vdd&quot; )
self.Vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S &lt;= self.A.Buffer()
</pre>
</div>
</div>
<div class="section" id="multiplexor">
<h3>Multiplexor</h3>
<div class="section" id="id144">
<h4>Name</h4>
<p>Mux Easy way to instantiate a multiplexor</p>
</div>
<div class="section" id="id145">
<h4>Synopsys</h4>
<pre class="literal-block">
netOut &lt;= netCmd.Mux ( arg )
</pre>
</div>
<div class="section" id="id146">
<h4>Description</h4>
<p>This method is a method of net. The net which this method is applied
to is the command of the multiplexor. The nets given as parameters are
all the input nets. This method returns a net : the output net.
There are two ways to describe the multiplexor : the argument <tt class="docutils literal">arg</tt>
can be a list or a dictionnary.
Note that it is possible to change the generator instanciated with the
<tt class="docutils literal">SetMux</tt> method.</p>
</div>
<div class="section" id="id147">
<h4>Parameters</h4>
<ul>
<li><p class="first">List :
For each value of the command, the corresponding net is specified.
All values must be specified.
For example :</p>
<pre class="literal-block">
out &lt;= cmd.Mux ( [in0, in1, in2, in3] )
</pre>
<p>The net out is then initialised like this :</p>
<pre class="literal-block">
if cmd == 0 : out &lt;= in0
if cmd == 1 : out &lt;= in1
if cmd == 2 : out &lt;= in2
if cmd == 3 : out &lt;= in3
</pre>
</li>
<li><p class="first">Dictionnary :
A dictionnary makes the correspondance between a value of the
command and the corresponding net.
For example :</p>
<pre class="literal-block">
out &lt;= cmd.Mux ( {&quot;0&quot; : in0, &quot;1&quot; : in1, &quot;2&quot; : in2, &quot;3&quot; : in3} )
</pre>
<p>This initialisation corresponds to the one before. Thanks to the use
of a dictionnary, the connections can be clearer :</p>
<ul>
<li><p class="first"><tt class="docutils literal">'default'</tt>: This key of the dictionnary corresponds to all
the nets that are not specified
For example :</p>
<pre class="literal-block">
out &lt;= cmd.Mux ( {&quot;0&quot; : in0, &quot;default&quot; : in1} )
</pre>
<p>This notation corresponds to :</p>
<pre class="literal-block">
if cmd == 0 : out &lt;= in0
else : out &lt;= in1
</pre>
<p>Note that if there is no <tt class="docutils literal">'default'</tt> key specified and that not
all the nets are specified, the non specified nets are set to 0.</p>
</li>
<li><p class="first"><tt class="docutils literal">#</tt> and <tt class="docutils literal">?</tt> : When a key of the dictionnary begins with
<tt class="docutils literal">#</tt>, the number after the <tt class="docutils literal">#</tt> has to be binary and each ? in
the number means that this bit is not precised
For example :</p>
<pre class="literal-block">
out &lt;= cmd.Mux ( {&quot;#01?&quot; : in0, &quot;default&quot; : in1} )
</pre>
<p>This notation corresponds to :</p>
<pre class="literal-block">
if cmd in ( 2, 3 ) : out &lt;= in0
else : out &lt;= in1
</pre>
</li>
<li><p class="first"><tt class="docutils literal">,</tt> and <tt class="docutils literal">-</tt> : When keys contains thoses symbols, it permits
to enumerate intervals
For example :</p>
<pre class="literal-block">
out &lt;= cmd.Mux ( {&quot;0,4&quot; : in0, &quot;1-3,5&quot; : in1} )
</pre>
<p>This notation corresponds to :</p>
<pre class="literal-block">
if cmd in ( 0, 4 ) : out &lt;= in0
elif cmd in ( 1, 2, 3, 5) : out &lt;= in1
else : out &lt;= 0
</pre>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="id148">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.B = SignalIn ( &quot;b&quot;, 4 )
self.C = SignalIn ( &quot;c&quot;, 4 )
self.D = SignalIn ( &quot;d&quot;, 4 )
self.Cmd1 = SignalIn ( &quot;cmd1&quot;, 2 )
self.Cmd2 = SignalIn ( &quot;cmd2&quot;, 4 )
self.S1 = SignalOut ( &quot;s1&quot;, 4 )
self.S2 = SignalOut ( &quot;s2&quot;, 4 )
self.Vdd = VddIn ( &quot;vdd&quot; )
self.Vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S1 &lt;= self.Cmd1.Mux ( [sefl.A, self.B, self.C, self.D] )
self.S2 &lt;= self.Cmd2.Mux ( { &quot;0&quot; : self.A
, &quot;1,5-7&quot; : self.B
, &quot;#1?1?&quot; : self.C
, &quot;default&quot; : self.D
} )
</pre>
</div>
<div class="section" id="id149">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Mux : all the nets must have the same lenght.</tt>
All the input nets pust have the same lenght.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux : there are no input nets.</tt>
The input nets seem to have been forgotten.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux : wrong argument type.</tt>
The connections of the buses are not described by a list nor a
dictionnary.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux :</tt>
<tt class="docutils literal">the number of nets does not match with the lenght of the command.</tt>
When using a list, the number of nets has to correspond to the
number of possible values of the command.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux : wrong key.</tt>
One of the key of the dictionnary is not un number, neither a list
or an interval.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux :</tt>
<tt class="docutils literal">when an interval is specified, the second number of the interval</tt>
<tt class="docutils literal">must be greater than the first one.</tt>
When creating an interval with “-”, the second number has to be
greater than the first one.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux :</tt>
<tt class="docutils literal">the binary number does not match with the lenght of the command.</tt>
When using the <tt class="docutils literal">#</tt> notation, each digit of the binary number
corresponds to a wire of the cmd. The leghts have to correspond.</li>
<li><tt class="docutils literal">[Stratus ERROR] Mux : after #, the number has to be binary.</tt>
When using the <tt class="docutils literal">#</tt> notation, the number has to be binary : one
can use 0, 1 or ?.</li>
</ul>
</div>
</div>
<div class="section" id="shifter">
<h3>Shifter</h3>
<div class="section" id="id150">
<h4>Name</h4>
<p>Shift Easy way to instantiate a shifter</p>
</div>
<div class="section" id="id151">
<h4>Synopsys</h4>
<pre class="literal-block">
netOut &lt;= netCmd.Shift ( netIn, direction, type )
</pre>
</div>
<div class="section" id="id152">
<h4>Description</h4>
<p>This method is a method of net. The net which this method is applied
to is the command of the shifter, its the one which defines the number
of bits to shift. The net given as parameter is the input net. The other
arguments set the different patameters. The method returns a net : the
output net.
Note that it is possible to change the generator instanciated with the
<tt class="docutils literal">SetShift</tt> method.</p>
</div>
<div class="section" id="id153">
<h4>Parameters</h4>
<ul class="simple">
<li><tt class="docutils literal">netIn</tt> : the net which is going to be shifted</li>
<li><tt class="docutils literal">direction</tt> : this string represents the direction of the shift :<ul>
<li>“left”</li>
<li>“right”</li>
</ul>
</li>
<li><tt class="docutils literal">type</tt> : this string represents the type of the shift :<ul>
<li>“logical” : only “zeros” are put in the net</li>
<li>“arith” : meaningful for “right” shift, the values put in the nets
are an extension of the MSB</li>
<li>“circular” : the values put in the nets are the ones which have
just been taken off</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="id154">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.Cmd = SignalIn ( &quot;cmd&quot;, 2 )
self.S1 = SignalOut ( &quot;s1&quot;, 4 )
self.S2 = SignalOut ( &quot;s2&quot;, 4 )
self.S3 = SignalOut ( &quot;s3&quot;, 4 )
self.Vdd = VddIn ( &quot;vdd&quot; )
self.Vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S1 &lt;= self.Cmd.Shift ( self.A, &quot;right&quot;, &quot;logical&quot; )
self.S2 &lt;= self.Cmd.Shift ( self.A, &quot;right&quot;, &quot;arith&quot; )
self.S3 &lt;= self.Cmd.Shift ( self.A, &quot;left&quot;, &quot;circular&quot; )
</pre>
<p>If the value of “a” is “0b1001” and the value of “cmd” is “0b10”, we
will have :</p>
<ul class="simple">
<li>“s1” : “0b0010”</li>
<li>“s2” : “0b1110”</li>
<li>“s3” : “0b0110”</li>
</ul>
</div>
<div class="section" id="id155">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Shift :</tt>
<tt class="docutils literal">The input net does not have a positive arity.</tt>
The net which is going to be shifted must have a positive arity.</li>
<li><tt class="docutils literal">[Stratus ERROR] Shift :</tt>
<tt class="docutils literal">The direction parameter must be &quot;left&quot; or &quot;right&quot;.</tt>
The “direction” argument is not correct.</li>
<li><tt class="docutils literal">[Stratus ERROR] Shift :</tt>
<tt class="docutils literal">The type parameter must be &quot;logical&quot; or &quot;arith&quot; or &quot;circular&quot;.</tt>
The “type” argument is not correct.</li>
</ul>
</div>
</div>
<div class="section" id="register">
<h3>Register</h3>
<div class="section" id="id156">
<h4>Name</h4>
<p>Reg Easy way to instantiate a register</p>
</div>
<div class="section" id="id157">
<h4>Synopsys</h4>
<pre class="literal-block">
netOut &lt;= netCk.Reg ( netIn )
</pre>
</div>
<div class="section" id="id158">
<h4>Description</h4>
<p>This method is a method of net. The net which this method is applied
to is the clock of the register. The net given as parameter is the input
net. The method returns a net : the output net.
Note that it is possible to change the generator instanciated with the
<tt class="docutils literal">SetReg</tt> method.</p>
</div>
<div class="section" id="id159">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.S = SignalOut ( &quot;s&quot;, 4 )
self.Ck = CkIn ( &quot;ck&quot; )
self.Vdd = VddIn ( &quot;vdd&quot; )
self.Vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S &lt;= self.Ck.Reg ( self.A )
</pre>
</div>
<div class="section" id="id160">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Reg : The input net does not have a positive arity.</tt>
The input net must have a positive arity.</li>
<li><tt class="docutils literal">[Stratus ERROR] Reg : The clock does not have a positive arity.</tt>
The clock must have a positive arity.</li>
</ul>
</div>
</div>
<div class="section" id="constants">
<h3>Constants</h3>
<div class="section" id="id161">
<h4>Name</h4>
<p>Constant Easy way to instantiate constants</p>
</div>
<div class="section" id="id162">
<h4>Synopsys</h4>
<pre class="literal-block">
netOne &lt;= One ( 2 )
net8 &lt;= &quot;8&quot;
</pre>
</div>
<div class="section" id="id163">
<h4>Description</h4>
<p>These functions simplify the way to instanciate constants.</p>
<ul class="simple">
<li>The functions <tt class="docutils literal">One</tt> and<tt class="docutils literal">Zero</tt> permits to initialise all the
bits of a net to one or zero.</li>
<li>The instanciation of a constant thanks to a string can be done in
decimal, hecadecimal or binary.</li>
</ul>
</div>
<div class="section" id="id164">
<h4>Parameters</h4>
<ul class="simple">
<li>For <tt class="docutils literal">One</tt> and <tt class="docutils literal">Zero</tt> :<ul>
<li><tt class="docutils literal">n</tt> : the arity of the net</li>
</ul>
</li>
<li>For the instanciation of a constant :<ul>
<li>the constant given must be a string representing :<ul>
<li>A decimal number</li>
<li>A binary number : the string must begin with “0b”</li>
<li>An hexadecimal number : the string must begin with “0x”</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="id165">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.Ones = SignalOut ( &quot;ones&quot;, 2 )
self.Zeros = SignalOut ( &quot;zeros&quot;, 4 )
self.Eight = SignalOut ( &quot;eight&quot;, 4 )
self.Twentu = SignalOut ( &quot;twenty&quot;, 5 )
self.Two = SignalOut ( &quot;two&quot;, 5 )
self.Vdd = VddIn ( &quot;vdd&quot; )
self.Vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.Ones &lt;= One ( 2 )
self.Zero &lt;= Zero ( 4 )
self.Eight &lt;= &quot;8&quot;
self.Twenty &lt;= &quot;0x14&quot;
self.Two &lt;= &quot;0b10&quot;
</pre>
</div>
<div class="section" id="id166">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Const :</tt>
<tt class="docutils literal">the argument must be a string representing a number in decimal,</tt>
<tt class="docutils literal">binary (0b) or hexa (0x).</tt>
The string given as argument does not have the right form.</li>
</ul>
</div>
</div>
<div class="section" id="boolean-operations">
<h3>Boolean operations</h3>
<div class="section" id="id167">
<h4>Description</h4>
<p>Most common boolean operators can be instantiated without the <tt class="docutils literal">Inst</tt>
constructor.</p>
</div>
<div class="section" id="list">
<h4>List</h4>
<p>Boolean operators are listed below :</p>
<ul class="simple">
<li><tt class="docutils literal">And2</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1</tt></li>
<li><tt class="docutils literal">Or2</tt> : <tt class="docutils literal">q &lt;= i0 | i1</tt></li>
<li><tt class="docutils literal">Xor2</tt> : <tt class="docutils literal">q &lt;= i0 ^ i1</tt></li>
<li><tt class="docutils literal">Inv</tt> : <tt class="docutils literal">q &lt;= ~i0</tt></li>
</ul>
</div>
<div class="section" id="generators-to-instantiate">
<h4>Generators to instantiate</h4>
<p>One can choose the generator to be used. Some methods are applied to
the cell and set the generator used when using <tt class="docutils literal">&amp;</tt>, <tt class="docutils literal">|</tt>, <tt class="docutils literal">^</tt> and
<tt class="docutils literal">~</tt>. The generators used by default are the ones from the virtual
library.</p>
<p>Methods are :</p>
<ul class="simple">
<li><tt class="docutils literal">SetAnd</tt></li>
<li><tt class="docutils literal">SetOr</tt></li>
<li><tt class="docutils literal">SetXor</tt></li>
<li><tt class="docutils literal">SetNot</tt></li>
</ul>
</div>
<div class="section" id="id168">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.B = SignalIn ( &quot;b&quot;, 4 )
self.B = SignalIn ( &quot;c&quot;, 4 )
self.S = SignalOut ( &quot;s&quot;, 4 )
self.vdd = VddIn ( &quot;vdd&quot; )
self.vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S &lt;= ( ~self.A &amp; self.B ) | self.C
</pre>
</div>
<div class="section" id="id169">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] &amp; : the nets must have the same lenght.</tt>
When one uses boolean expressions, one has to check that the sizes
of both nets are equivalent.</li>
<li><tt class="docutils literal">[Stratus ERROR] : there is no alim.</tt>
The cell being created does not have the alimentation nets. The
instanciation is impossible.</li>
</ul>
</div>
</div>
<div class="section" id="arithmetical-operations">
<h3>Arithmetical operations</h3>
<div class="section" id="id170">
<h4>Description</h4>
<p>Most common arithmetic operators can be instantiated without the
<tt class="docutils literal">Inst</tt> constructor.</p>
</div>
<div class="section" id="id171">
<h4>List</h4>
<p>Arithmetical operators are listed below :</p>
<ul class="simple">
<li><tt class="docutils literal">Addition</tt> : <tt class="docutils literal">q &lt;= i0 + i1</tt></li>
<li><tt class="docutils literal">Substraction</tt> : <tt class="docutils literal">q &lt;= i0</tt> - <tt class="docutils literal">i1</tt></li>
<li><tt class="docutils literal">Multiplication</tt> : <tt class="docutils literal">q &lt;= i0 * i1</tt></li>
<li><tt class="docutils literal">Division</tt> : <tt class="docutils literal">q &lt;= i0 / i1</tt></li>
</ul>
</div>
<div class="section" id="id172">
<h4>Generators to instantiate</h4>
<p>One can choose the generator to be used. Some methods are applied to the
cell and set the generator used when using overloard. Methods are :</p>
<ul class="simple">
<li><tt class="docutils literal">SetAdd</tt> (for addition and substraction)</li>
<li><tt class="docutils literal">SetMult</tt></li>
<li><tt class="docutils literal">SetDiv</tt></li>
</ul>
<p>The generators used by default are :</p>
<ul class="simple">
<li><tt class="docutils literal">Addition</tt> : Slansky adder</li>
<li><tt class="docutils literal">Substraction</tt> : Slansky adder + inversor + cin = 1</li>
<li><tt class="docutils literal">Multiplication</tt> : CA2 multiplier (signed, modified booth/Wallace
tree)</li>
<li><tt class="docutils literal">Division</tt> : not available yet</li>
</ul>
</div>
<div class="section" id="id173">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.B = SignalIn ( &quot;b&quot;, 4 )
self.S = SignalOut ( &quot;s&quot;, 4 )
self.T = SignalOut ( &quot;t&quot;, 8 )
self.vdd = VddIn ( &quot;vdd&quot; )
self.vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S &lt;= self.A + self.B
self.T &lt;= self.A * self.B
</pre>
</div>
<div class="section" id="id174">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] + : the nets must have the same lenght.</tt>
When one uses arithmetic expressions, one has to check that the
sizes of both nets are equivalent.</li>
<li><tt class="docutils literal">[Stratus ERROR] : there is no alim.</tt>
The cell being created does not have the alimentation nets. The
instanciation is impossible.</li>
</ul>
</div>
</div>
<div class="section" id="comparison-operations">
<h3>Comparison operations</h3>
<div class="section" id="id175">
<h4>Name</h4>
<p>Eq/Ne : Easy way to test the value of the nets</p>
</div>
<div class="section" id="id176">
<h4>Synopsys</h4>
<pre class="literal-block">
netOut &lt;= net.Eq ( &quot;n&quot; )
</pre>
</div>
<div class="section" id="id177">
<h4>Description</h4>
<p>Comparaison functions are listed below :</p>
<ul class="simple">
<li><tt class="docutils literal">Eq</tt> : returns <tt class="docutils literal">true</tt> if the value of the net is equal to <tt class="docutils literal">n</tt>.</li>
<li><tt class="docutils literal">Ne</tt> : returns <tt class="docutils literal">true</tt> if the value of the net is different from
<tt class="docutils literal">n</tt>.</li>
</ul>
<p>Note that it is possible to change the generator instanciated with the
<tt class="docutils literal">SetComp</tt> method.</p>
</div>
<div class="section" id="id178">
<h4>Parameters</h4>
<p>The constant given as argument must be a string representing :</p>
<ul class="simple">
<li>A decimal number</li>
<li>A binary number : the string must begin with “0b”</li>
<li>An hexadecimal number : the string must begin with “0x”</li>
</ul>
</div>
<div class="section" id="id179">
<h4>Example</h4>
<pre class="literal-block">
class essai ( Model ) :
def Interface ( self ) :
self.A = SignalIn ( &quot;a&quot;, 4 )
self.S = SignalOut ( &quot;s&quot;, 1 )
self.T = SignalOut ( &quot;t&quot;, 1 )
self.vdd = VddIn ( &quot;vdd&quot; )
self.vss = VssIn ( &quot;vss&quot; )
def Netlist ( self ) :
self.S &lt;= self.A.Eq ( &quot;4&quot; )
self.T &lt;= self.A.Ne ( &quot;1&quot; )
</pre>
</div>
<div class="section" id="id180">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Eq :</tt>
<tt class="docutils literal">the number does not match with the net's lenght.</tt>
When one uses comparaison functions on one net, one has to check
that the number corresponds to the size of the net.</li>
<li><tt class="docutils literal">[Stratus ERROR] Eq :</tt>
<tt class="docutils literal">the argument must be a string representing a number in decimal,</tt>
<tt class="docutils literal">binary (0b) or hexa (0x).</tt>
The string given as argument does not have the right form.</li>
</ul>
</div>
</div>
<div class="section" id="virtual-library">
<h3>Virtual library</h3>
<div class="section" id="id181">
<h4>Description</h4>
<p>The virtual library permits to create a cell and map it to different
libraries without having to change it.</p>
</div>
<div class="section" id="list-of-the-generators-provided">
<h4>List of the generators provided</h4>
<ul class="simple">
<li><tt class="docutils literal">a2</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1</tt></li>
<li><tt class="docutils literal">a3</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1 &amp; i2</tt></li>
<li><tt class="docutils literal">a4</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1 &amp; i2 &amp; i3</tt></li>
<li><tt class="docutils literal">na2</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 )</tt></li>
<li><tt class="docutils literal">na3</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 &amp; i2 )</tt></li>
<li><tt class="docutils literal">na4</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 &amp; i2 &amp; i3 )</tt></li>
<li><tt class="docutils literal">o2</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1</tt></li>
<li><tt class="docutils literal">o3</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1 &amp; i2</tt></li>
<li><tt class="docutils literal">o4</tt> : <tt class="docutils literal">q &lt;= i0 &amp; i1 &amp; i2 &amp; i3</tt></li>
<li><tt class="docutils literal">no2</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 )</tt></li>
<li><tt class="docutils literal">no3</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 &amp; i2 )</tt></li>
<li><tt class="docutils literal">no4</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 &amp; i1 &amp; i2 &amp; i3 )</tt></li>
<li><tt class="docutils literal">inv</tt> : <tt class="docutils literal">nq &lt;= ~ i</tt></li>
<li><tt class="docutils literal">buf</tt> : <tt class="docutils literal">q &lt;= i</tt></li>
<li><tt class="docutils literal">xr2</tt> : <tt class="docutils literal">q &lt;= i0 ^ i1</tt></li>
<li><tt class="docutils literal">nxr2</tt> : <tt class="docutils literal">nq &lt;= ~ ( i0 ^ i1 )</tt></li>
<li><tt class="docutils literal">zero</tt> : <tt class="docutils literal">nq &lt;= '0'</tt></li>
<li><tt class="docutils literal">one</tt> : <tt class="docutils literal">q &lt;= '1'</tt></li>
<li><tt class="docutils literal">halfadder</tt> : <tt class="docutils literal">sout &lt;= a ^ b</tt> and <tt class="docutils literal">cout &lt;= a &amp; b</tt></li>
<li><tt class="docutils literal">fulladder</tt> : <tt class="docutils literal">sout &lt;= a ^ b ^ cin</tt>
and <tt class="docutils literal">cout &lt;= ( a &amp; b ) | ( a &amp; cin ) | ( b &amp; cin )</tt></li>
<li><tt class="docutils literal">mx2</tt> : <tt class="docutils literal">q &lt;= (i0 &amp; ~cmd) | (i1 &amp; cmd)</tt></li>
<li><tt class="docutils literal">nmx2</tt> : <tt class="docutils literal">nq &lt;= ~( (i0 &amp; ~cmd) | (i1 &amp; cmd) )</tt></li>
<li><tt class="docutils literal">sff</tt> : <tt class="docutils literal">if RISE ( ck ) : q &lt;= i</tt></li>
<li><tt class="docutils literal">sff2</tt> : <tt class="docutils literal">if RISE ( ck ) : q &lt;= (i0 &amp; ~cmd) | (i1 &amp; cmd)</tt></li>
<li><tt class="docutils literal">sff3</tt> : <tt class="docutils literal">if RISE ( ck ) :</tt>
`` q &lt;= (i0 &amp; ~cmd0) | (((i1 &amp; cmd1)|(i2&amp;~cmd1)) &amp; cmd0)``</li>
<li><tt class="docutils literal">ts</tt> : <tt class="docutils literal">if cmd : q &lt;= i</tt></li>
<li><tt class="docutils literal">nts</tt> : <tt class="docutils literal">if cmd : nq &lt;= ~i</tt></li>
</ul>
</div>
<div class="section" id="mapping-file">
<h4>Mapping file</h4>
<p>The virtual library is mapped to the sxlib library. A piece of the
corresponding mapping file is shown below.
In order to map the virtual library to another library, on has to
write a .xml file which makes correspond models and interfaces.
Note that the interfaces of the cells must be the same (except for the
names of the ports). Otherwise, one has to create .vst file in order to
make the interfaces match.</p>
<p>The environment variable used to point the right file is
<tt class="docutils literal">STRATUS_MAPPING_NAME</tt>.</p>
<p><img alt="xml" src="../pages/images/xml.png" /></p>
</div>
<div class="section" id="id182">
<h4>Generators</h4>
<p>Some generators are also provided in order to use the cells of the
library with nets of more than 1 bit. One has to upper the first letter
of the model name in order to user those generators. What is simply done
is a for loop with the bits of the nets. The parameter <tt class="docutils literal">'nbit'</tt> gives
the size of the generator.</p>
</div>
<div class="section" id="id183">
<h4>Example</h4>
<ul class="simple">
<li>Direct instanciation of a cell</li>
</ul>
<pre class="literal-block">
for i in range ( 4 ) :
Inst ( 'a2'
, map = { 'i0' : neti0[i]
, 'i1' : neti1[i]
, 'q' : netq[i]
, 'vdd' : netvdd
, 'vss' : netvss
}
)
</pre>
<ul class="simple">
<li>Instanciation of a generator</li>
</ul>
<pre class="literal-block">
Generate ( 'A2', &quot;my_and2_4bits&quot;, param = { 'nbit' : 4 } )
Inst ( 'my_and2_4bits'
, map = { 'i0' : neti0
, 'i1' : neti1
, 'q' : netq
, 'vdd' : vdd
, 'vss' : vss
}
)
</pre>
</div>
<div class="section" id="id184">
<h4>Errors</h4>
<p>Some errors may occur :</p>
<ul class="simple">
<li><tt class="docutils literal">[Stratus ERROR] Inst : the model ... does not exist.</tt>
<tt class="docutils literal">Check CRL_CATA_LIB.</tt>
The model of the cell has not been found. One has to check the
environment variable.</li>
<li><tt class="docutils literal">[Stratus ERROR] Virtual library : No file found in order to parse.</tt>
<tt class="docutils literal">Check STRATUS_MAPPING_NAME.</tt>
The mapping file is not given in the environment variable.</li>
</ul>
</div>
</div>
</div>
<div class="section" id="useful-links">
<h2><a class="toc-backref" href="#id191">Useful links</a></h2>
<div class="section" id="dpgen-generators">
<h3>DpGen generators</h3>
<p>You can find the documentation of the DPGEN library at : ./DpGen.html</p>
</div>
<div class="section" id="arithmetic-package-of-stratus">
<h3>Arithmetic package of stratus</h3>
<p>You can find the documentation of the arithmetic stratuss package at:
<a class="reference external" href="file:////users/outil/arith/latest/modules_stratus/arithmetic/doc/arith/index.html">file:////users/outil/arith/latest/modules_stratus/arithmetic/doc/arith/index.html</a></p>
</div>
<div class="section" id="arithmetic-generators-and-some-stratus-packages">
<h3>Arithmetic generators and some stratus packages</h3>
<p>You can find the documentation of the arithmetic library at :
<a class="reference external" href="file:////users/outil/arith/latest/doc/index.html">file:////users/outil/arith/latest/doc/index.html</a></p>
</div>
<div class="section" id="patterns-module">
<h3>Patterns module</h3>
<p>You can find the documentation of the patterns module : {filename}Patterns_HTML.rst</p>
</div>
</div>
</div>
<!-- /Content -->
<!-- Footer -->
<div class="footer gradient-2">
<div class="container footer-container ">
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-3 col-lg-3">
<div class="footer-title">Social</div>
<ul class="list-unstyled">
</ul>
</div>
<div class="col-xs-4 col-sm-3 col-md-3 col-lg-2">
</div>
<div class="col-xs-4 col-sm-3 col-md-3 col-lg-3">
<div class="footer-title">Links</div>
<ul class="list-unstyled">
<li><a href="https://coriolis.lip6.fr/" target="_blank">Alliance/Coriolis</a></li>
<li><a href="https://www-soc.lip6.fr/" target="_blank">CIAN Team Website</a></li>
<li><a href="https://f-si.org" target="_blank">Free Silicon Foundation</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-4">
<p class="pull-right text-right">
<small><em>Proudly powered by <a href="http://docs.getpelican.com/" target="_blank">pelican</a></em></small><br/>
<small><em><span class="sc">NEST</span> theme by <a href="https://github.com/molivier" target="_blank">molivier</a></em></small><br/>
<small>Copyright © 2020-2020 Sorbonne Universite</small>
</p>
</div>
</div>
</div>
</div>
<!-- /Footer -->
</body>
</html>