396 lines
17 KiB
HTML
396 lines
17 KiB
HTML
<!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. Contents Description Syntax Methods Example Description The patterns module of Stratus is a set of Python classes and methods that allows a procedural ...">
|
||
<meta name="keywords" content="">
|
||
<link rel="icon" href="../favicon.ico">
|
||
|
||
<title>Stratus : Simulation Patterns - 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/install-cases.html">Install Cases</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/install-cases.html">Install Cases</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 : Simulation Patterns</h1>
|
||
<div class="header-underline"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- /Header -->
|
||
|
||
</div>
|
||
<!-- /Header -->
|
||
|
||
|
||
<!-- Content -->
|
||
<div class="container content">
|
||
<!-- -*- mode: rst; explicit-buffer-name: "Patterns_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="../../../pdf/main/Stratus.pdf">Stratus.pdf</a>.</p>
|
||
<div class="contents topic" id="contents">
|
||
<p class="topic-title first">Contents</p>
|
||
<ul class="simple">
|
||
<li><a class="reference internal" href="#description" id="id8">Description</a></li>
|
||
<li><a class="reference internal" href="#syntax" id="id9">Syntax</a></li>
|
||
<li><a class="reference internal" href="#methods" id="id10">Methods</a></li>
|
||
<li><a class="reference internal" href="#example" id="id11">Example</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="section" id="description">
|
||
<h2><a class="toc-backref" href="#id8">Description</a></h2>
|
||
<p>The patterns module of <em>Stratus</em> is a set of <em>Python</em> classes and
|
||
methods that allows a procedural description of input pattern file for
|
||
the logic simulator. The <em>Stratus</em> <tt class="docutils literal">Pattern</tt> method produces a pattern
|
||
description file as output. The file generated by <tt class="docutils literal">Pattern</tt> method is
|
||
in pat format, so IT IS STRONGLY RECOMMENDED TO SEE pat(5) manual BEFORE
|
||
TO USE IT.</p>
|
||
</div>
|
||
<div class="section" id="syntax">
|
||
<h2><a class="toc-backref" href="#id9">Syntax</a></h2>
|
||
<p>From a user point of view, <tt class="docutils literal">Pattern</tt> method is a pattern description
|
||
language using all standard <em>Python</em> facilities. Here follows the
|
||
description of the <tt class="docutils literal">Pattern</tt> method.
|
||
A pat format file can be divided in two parts : declaration and
|
||
description part.
|
||
The declaration part is the list of inputs, outputs, internal signals
|
||
and registers. Inputs are to be forced to a certain value and all the
|
||
others are to be observed during simulation.
|
||
The description part is a set of patterns, where each pattern defines
|
||
the value of inputs and outputs. The pattern number represents actually
|
||
the absolute time for the simulator.
|
||
Similarly, a <tt class="docutils literal">Pattern</tt> method can be divided in two parts :
|
||
declaration and description part. Methods related to the declaration
|
||
must be called before any function related to the description part.</p>
|
||
<div class="section" id="declaration-part">
|
||
<h3>Declaration part</h3>
|
||
<p>The first thing you should do in this part is to instantiate the class
|
||
<tt class="docutils literal">Patwrite</tt> to have access to all patterns declaration and description
|
||
methods. The constructor of this class take as parameters the name of
|
||
pattern output file and the <em>Stratus</em> cell that is described (see
|
||
<tt class="docutils literal">PatWrite</tt> [patwrite]).
|
||
Then, this part allows you to declare the inputs, the outputs, and
|
||
internal observing points (see <tt class="docutils literal">declar</tt>[declar] and
|
||
<tt class="docutils literal">declar_interface</tt> [declar:sub:<cite>i</cite>nterface]).</p>
|
||
</div>
|
||
<div class="section" id="description-part">
|
||
<h3>Description part</h3>
|
||
<p>After all signals are declared, you can begin the description part (see
|
||
<tt class="docutils literal">pattern_begin</tt> [pattern:sub:<cite>b</cite>egin]). In this part you have to
|
||
define input values which are to be applied to the inputs of the circuit
|
||
or output values which are to be compare with the values produced during
|
||
the simulation. (see <tt class="docutils literal">affect</tt> [affect], <tt class="docutils literal">affect_any</tt>
|
||
[affect:sub:<cite>a</cite>ny], <tt class="docutils literal">affect_int</tt> [affect:sub:<cite>i</cite>nt] and
|
||
<tt class="docutils literal">affect_fix</tt> [affect:sub:<cite>f</cite>ix]). <tt class="docutils literal">Pattern</tt> method describes the
|
||
stimulus by event : only signal transitions are described. After each
|
||
event there is a new input in the pattern file (see <tt class="docutils literal">addpat</tt>
|
||
[addpat]). Last thing you should do in this part is to generate the
|
||
output file (see <tt class="docutils literal">pattern_end</tt> [pattern:sub:<cite>e</cite>nd]).</p>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="methods">
|
||
<h2><a class="toc-backref" href="#id10">Methods</a></h2>
|
||
<div class="section" id="patwrite">
|
||
<h3>PatWrite</h3>
|
||
<p>This class is used to create patterns for <em>Stratus</em> models. Currently it
|
||
only supports Alliance “.pat” pattern format. Patterns time stamps are
|
||
in the “absolute date” format, “relative date” isn’t allowed. Legal time
|
||
unit are ps (default), ns, us and ms. The constructor takes as
|
||
parameters the pattern output filename and an optional reference to
|
||
Stratus cell.</p>
|
||
</div>
|
||
<div class="section" id="declar">
|
||
<h3>declar</h3>
|
||
<p>Adds a connector from a Stratus model to the pattern interface. Writes
|
||
the corresponding connector declaration in the pattern file with name,
|
||
arity and direction automatically extracted from the connector
|
||
properties.
|
||
Supported Stratus connectors are:</p>
|
||
<ul class="simple">
|
||
<li>SignalIn,</li>
|
||
<li>SignalOut (only supported if used as an output),</li>
|
||
<li>VddIn,</li>
|
||
<li>VssIn,</li>
|
||
<li>CkIn,</li>
|
||
<li>SignalInOut,</li>
|
||
<li>TriState (always an output),</li>
|
||
<li>Signals.</li>
|
||
</ul>
|
||
<div class="section" id="parameters">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>connector : can either be a reference to a stratus net or a string
|
||
containing the name of the stratus net.</li>
|
||
<li>format : optional format for the connectors values into the pattern
|
||
file, accepted values are :<ul>
|
||
<li>’B’: binary (default),</li>
|
||
<li>’X’: hexadecimal,</li>
|
||
<li>’O’: octal.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="declar-interface">
|
||
<h3>declar_interface</h3>
|
||
<p>Adds all the connectors from a Stratus model to the pattern interface.
|
||
Write the corresponding connector declaration in the pattern file with
|
||
name, arity and direction directly taken from the connector proprieties.</p>
|
||
<div class="section" id="id2">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>cell : the tested Stratus model reference. Optional if a reference to
|
||
the tested Stratus model was given during instanciation[patwrite].</li>
|
||
<li>format : optional format for the connectors values into the pattern
|
||
file, accepted values are :<ul>
|
||
<li>’B’: binary (default),</li>
|
||
<li>’X’: hexadecimal,</li>
|
||
<li>’O’: octal.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id3">
|
||
<h3>declar</h3>
|
||
<p>Affect a string value to a connector.</p>
|
||
<div class="section" id="id4">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>connector : <em>Stratus</em> connector</li>
|
||
<li>value : string to affect to connector</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="affect-int">
|
||
<h3>affect_int</h3>
|
||
<p>Affect an integer (CA2) value to a connector. Convert the 2’s complement
|
||
value to the corresponding binary value. The binary size is taken from
|
||
the connector arity. If the connector is an output, the binary value is
|
||
preceded by “?”.</p>
|
||
<div class="section" id="id5">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>connector : <em>Stratus</em> connector.</li>
|
||
<li>value : 2’s complement value to affect to the connector.</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="affect-fix">
|
||
<h3>affect_fix</h3>
|
||
<p>Affect a fixed point value to a connector. Convert the floating point
|
||
input value to the corresponding fixed point value with
|
||
word_length=connector.arity() and integer_word_length=iwl. If the
|
||
connector is an output, the binary value is preceded by “?”.</p>
|
||
<div class="section" id="id6">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>connector : <em>Stratus</em> connector.</li>
|
||
<li>value : floating point value to convert and asign to connector.</li>
|
||
<li>iwl : integer word length</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="affect-any">
|
||
<h3>affect_any</h3>
|
||
<p>Disable comparison between this connector value and the one calculated
|
||
during simulation.</p>
|
||
<div class="section" id="id7">
|
||
<h4>Parameters</h4>
|
||
<ul class="simple">
|
||
<li>connector : <em>Stratus</em> connector.</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="addpat">
|
||
<h3>addpat</h3>
|
||
<p>Adds a pattern in the pattern file.</p>
|
||
</div>
|
||
<div class="section" id="pattern-begin">
|
||
<h3>pattern_begin</h3>
|
||
<p>Mark the end of the interface declaration and the beginning of the test
|
||
vectors.</p>
|
||
</div>
|
||
<div class="section" id="pattern-end">
|
||
<h3>pattern_end</h3>
|
||
<p>Mark the end of the test vectors and of the patterns file.</p>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="example">
|
||
<h2><a class="toc-backref" href="#id11">Example</a></h2>
|
||
<p><tt class="docutils literal">Pattern</tt> method for an addaccu</p>
|
||
<pre class="literal-block">
|
||
def Pattern(self):
|
||
# initialisation
|
||
pat = PatWrite(self._name+'.pat',self)
|
||
|
||
# declaration of ports
|
||
pat.declar(self.ck, 'B')
|
||
pat.declar(self.load, 'B')
|
||
pat.declar(self.input, 'X')
|
||
pat.declar(self.output, 'X')
|
||
pat.declar(self.vdd, 'B')
|
||
pat.declar(self.vss, 'B')
|
||
|
||
# use of pat.declar_interface(self) has the same effect
|
||
|
||
# description beginning
|
||
pat.pattern_begin()
|
||
|
||
# affect vdd and vss values
|
||
pat.affect_int(self.vdd,1)
|
||
pat.affect_int(self.vss,0)
|
||
|
||
# first pattern : load an initial value
|
||
pat.affect_int(self.input,5)
|
||
pat.affect_int(self.load,1)
|
||
pat.affect_int(self.ck,0)
|
||
# add the pattern in the pattern file
|
||
pat.addpat()
|
||
# compute next event
|
||
pat.affect_int(self.ck,1)
|
||
pat.addpat()
|
||
|
||
# compute 22 cycle of accumulation
|
||
pat.affect_int(self.load,0)
|
||
for i in range(1,22):
|
||
pat.affect_int(self.ck,0)
|
||
pat.addpat()
|
||
pat.affect_int(self.ck,1)
|
||
pat.affect_int(self.output,i+5)
|
||
pat.addpat()
|
||
|
||
# end of the description
|
||
pat.pattern_end()
|
||
</pre>
|
||
</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> |