coriolis/stratus1/doc/stratus/latex/stratus/node44.html

284 lines
8.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Virtual library</TITLE>
<META NAME="description" CONTENT="Virtual library">
<META NAME="keywords" CONTENT="stratus">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="LaTeX2HTML v2012">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="SoC.css">
<LINK REL="next" HREF="node45.html">
<LINK REL="previous" HREF="node35.html">
<LINK REL="up" HREF="stratus.html">
<LINK REL="next" HREF="node45.html">
</HEAD>
<BODY >
<DIV CLASS="navigation">
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr><td class="navigation" align="left" width="33%"><B>Previous</B></td>
<td class="navigation" align="center" width="34%"><B>Up</B></td>
<td class="navigation" align="right" width="33%"><B>Next</B></td>
</tr><tr>
<td class="navigation" align="left" width="33%"><A HREF="node43.html">Comparison operations</A></td>
<td class="navigation" align="center" width="34%"><A HREF="stratus.html">Stratus User's Manual</A></td>
<td class="navigation" align="right" width="33%"><A HREF="node45.html">Useful links</A></td>
</tr></table>
<hr>
<br>
</DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00080000000000000000"></A>
<A NAME="seclibrary"></A>
<BR>
Virtual library
</H1>
<H3><A NAME="SECTION00080100000000000000">
Description</A>
</H3>
<P>
The virtual library permits to create a cell and map it to different libraries without having to change it.
<P>
<H3><A NAME="SECTION00080200000000000000">
List of the generators provided</A>
</H3>
<P>
<UL>
<LI><code>a2</code> : <code>q &lt;= i0 &amp; i1</code>
</LI>
<LI><code>a3</code> : <code>q &lt;= i0 &amp; i1 &amp; i2</code>
</LI>
<LI><code>a4</code> : <code>q &lt;= i0 &amp; i1 &amp; i2 &amp; i3</code>
</LI>
<LI><code>na2</code> : <code>nq &lt;= ~ ( i0 &amp; i1 )</code>
</LI>
<LI><code>na3</code> : <code>nq &lt;= ~ ( i0 &amp; i1 &amp; i2 )</code>
</LI>
<LI><code>na4</code> : <code>nq &lt;= ~ ( i0 &amp; i1 &amp; i2 &amp; i3 )</code>
</LI>
<LI><code>o2</code> : <code>q &lt;= i0 &amp; i1</code>
</LI>
<LI><code>o3</code> : <code>q &lt;= i0 &amp; i1 &amp; i2</code>
</LI>
<LI><code>o4</code> : <code>q &lt;= i0 &amp; i1 &amp; i2 &amp; i3</code>
</LI>
<LI><code>no2</code> : <code>nq &lt;= ~ ( i0 &amp; i1 )</code>
</LI>
<LI><code>no3</code> : <code>nq &lt;= ~ ( i0 &amp; i1 &amp; i2 )</code>
</LI>
<LI><code>no4</code> : <code>nq &lt;= ~ ( i0 &amp; i1 &amp; i2 &amp; i3 )</code>
</LI>
<LI><code>inv</code> : <code>nq &lt;= ~ i</code>
</LI>
<LI><code>buf</code> : <code>q &lt;= i</code>
</LI>
<LI><code>xr2</code> : <code>q &lt;= i0 ^ i1</code>
</LI>
<LI><code>nxr2</code> : <code>nq &lt;= ~ ( i0 ^ i1 )</code>
</LI>
<LI><code>zero</code> : <code>nq &lt;= '0'</code>
</LI>
<LI><code>one</code> : <code>q &lt;= '1'</code>
</LI>
<LI><code>halfadder</code> : <code>sout &lt;= a ^ b</code> and <code>cout &lt;= a &amp; b</code>
</LI>
<LI><code>fulladder</code> : <code>sout &lt;= a ^ b ^ cin</code>
<BR>
and <code>cout &lt;= ( a &amp; b ) | ( a &amp; cin ) | ( b &amp; cin )</code>
</LI>
<LI><code>mx2</code> : <code>q &lt;= (i0 &amp; ~cmd) | (i1 &amp; cmd)</code>
</LI>
<LI><code>nmx2</code> : <code>nq &lt;= ~( (i0 &amp; ~cmd) | (i1 &amp; cmd) )</code>
</LI>
<LI><code>sff</code> : <code>if RISE ( ck ) : q &lt;= i</code>
</LI>
<LI><code>sff2</code> : <code>if RISE ( ck ) : q &lt;= (i0 &amp; ~cmd) | (i1 &amp; cmd)</code>
</LI>
<LI><code>sff3</code> : <code>if RISE ( ck ) :</code>
<BR><code> q &lt;= (i0 &amp; ~cmd0) | (((i1 &amp; cmd1)|(i2&amp;~cmd1)) &amp; cmd0)</code>
</LI>
<LI><code>ts</code> : <code>if cmd : q &lt;= i</code>
</LI>
<LI><code>nts</code> : <code>if cmd : nq &lt;= ~i</code>
</LI>
</UL>
<P>
<H3><A NAME="SECTION00080300000000000000">
Mapping file</A>
</H3>
<P>
The virtual library is mapped to the sxlib library. A piece of the corresponding mapping file is shown below.
<BR>
In order to map the virtual library to another library, on has to write a .xml file which makes correspond models and interfaces.
<BR>
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.
<BR>
<P>
The environment variable used to point the right file is <code>STRATUS_MAPPING_NAME</code>.
<P>
<DIV ALIGN="CENTER">
<DIV ALIGN="CENTER">
</DIV><IMG
WIDTH="739" HEIGHT="207" ALIGN="BOTTOM" BORDER="0"
SRC="./xml.png"
ALT="Image xml">
</DIV>
<P>
<H3><A NAME="SECTION00080400000000000000">
Generators</A>
</H3>
<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 <code>'nbit'</code> gives the size of the generator.
<P>
<H3><A NAME="SECTION00080500000000000000">
Example</A>
</H3>
<P>
<UL>
<LI>Direct instanciation of a cell
</LI>
</UL>
<PRE>
for i in range ( 4 ) :
Inst ( 'a2'
, map = { 'i0' : neti0[i]
, 'i1' : neti1[i]
, 'q' : netq[i]
, 'vdd' : netvdd
, 'vss' : netvss
}
)
</PRE>
<P>
<UL>
<LI>Instanciation of a generator
</LI>
</UL>
<PRE>
Generate ( 'A2', "my_and2_4bits", param = { 'nbit' : 4 } )
Inst ( 'my_and2_4bits'
, map = { 'i0' : neti0
, 'i1' : neti1
, 'q' : netq
, 'vdd' : vdd
, 'vss' : vss
}
)
</PRE>
<P>
<H3><A NAME="SECTION00080600000000000000">
Errors</A>
</H3>
<P>
Some errors may occur :
<UL>
<LI><code>[Stratus ERROR] Inst : the model ... does not exist.</code>
<BR><code>Check CRL_CATA_LIB.</code>
<BR>
The model of the cell has not been found. One has to check the environment variable.
</LI>
<LI><code>[Stratus ERROR] Virtual library : No file found in order to parse.</code>
<BR><code>Check STRATUS_MAPPING_NAME.</code>
<BR>
The mapping file is not given in the environment variable.
</LI>
</UL>
<P>
<H3><A NAME="SECTION00080700000000000000">
See Also</A>
</H3>
<P>
<A HREF="node3.html#secintroduction"><SPAN CLASS="textit">Introduction</SPAN></A>
<P>
<BR> <HR>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><UL>
<LI><A NAME="tex2html1001"
HREF="node44.html#SECTION00080100000000000000">Description</A>
<LI><A NAME="tex2html1002"
HREF="node44.html#SECTION00080200000000000000">List of the generators provided</A>
<LI><A NAME="tex2html1003"
HREF="node44.html#SECTION00080300000000000000">Mapping file</A>
<LI><A NAME="tex2html1004"
HREF="node44.html#SECTION00080400000000000000">Generators</A>
<LI><A NAME="tex2html1005"
HREF="node44.html#SECTION00080500000000000000">Example</A>
<LI><A NAME="tex2html1006"
HREF="node44.html#SECTION00080600000000000000">Errors</A>
<LI><A NAME="tex2html1007"
HREF="node44.html#SECTION00080700000000000000">See Also</A>
</UL></UL>
<!--End of Table of Child-Links-->
<DIV CLASS="navigation">
<p>
<hr><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr><td class="navigation" align="left" width="33%"><B>Previous</B></td>
<td class="navigation" align="center" width="34%"><B>Up</B></td>
<td class="navigation" align="right" width="33%"><B>Next</B></td>
</tr><tr>
<td class="navigation" align="left" width="33%"><A HREF="node43.html">Comparison operations</A></td>
<td class="navigation" align="center" width="34%"><A HREF="stratus.html">Stratus User's Manual</A></td>
<td class="navigation" align="right" width="33%"><A HREF="node45.html">Useful links</A></td>
</tr></table>
<hr>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Sophie B<small>ELLOEIL</small><br>20051116.1
</ADDRESS>
</BODY>
</HTML>