Stratus - Procedural design language based upon Python
Stratus is a set of Python methods/functions dedicated to procedural generation purposes. From a user point of view, Stratus is a circuit's description language that allows Python programming flow control, variable use, and specialized functions in order to handle vlsi objects.
Based upon the Hurricane data structures, the Stratus language gives the user the ability to describe netlist and layout views.
.st_config.py
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 :
format = 'vhdl' simulator = 'ghdl'The default configuration of Stratus uses the Alliance CAD system, ie
'vst'
as format
and 'asimut'
as simulator
.
A cell is a hierachical structural description of a circuit in terms of ports (I/Os), signals (nets) and instances.
The description of a cell is done by creating a new class, derivating for class Model
, with different methods :
Interface
: Description of the external ports of the cell :
Netlist
: Description of the netlist of the cell :
Layout
: Description of the layout of the cell :
Stimuli
: Description of the simulation stimuli of the cell :
After the description of a cell as a sub-class of Model
, the cell has to be instantiated. The different methods described before have to be called.
Then different methods are provided :
View
: Opens/Refreshes the editor in order to see the created layout
Save
: Saves the created cell in the desired format thanks to the configuration file
Testbench
: Creates the testbench of the cell using the Stimuli
method to compute the stimuli. The output format depends of the format
variable given in the configuration file
Simul
: Runs the simulation using the simulator named in the configuration file
A Stratus file must have a .py extension and must begin as follow :
#!/usr/bin/env python from stratus import *
The description of a cell as a sub-class of Model
is done as follow :
class myClass ( Model ) : ...
The creation of the cell is done by instantiating the previous class as follow :
exemple = myClass ( name, param )
After the different methods can be called as follow :
exemple.Interface() exemple.Netlist() exemple.Save() ...
In order to execute a Stratus file (named file
for example), one has two choices :
python file.pyOr :
chmod u+x file.py ./file.py
The names used in Stratus, as arguments to Stratus functions, should be alphanumerical, including the underscore. The arguments of Stratus are case sensitive, so VDD is not equivalent to VDD.
Vectorized connectors or signal can be used using the [N:M] construct.
When using vi, it's possible to have the right syntax highlighting :
:syntax off :source /asim/coriolis/share/etc/stratus.vim
syntax off autocmd BufRead,BufNewfile *.py so /asim/coriolis/share/etc/stratus.vim syntax on
You can see a concrete example at : Example
Netlist Layout Stimuli Place and Route Virtual librayy Instanciation facilities
Sophie BELLOEIL