coriolis/stratus1/doc/dpgen/man_dpgenrom2.tex

67 lines
2.2 KiB
TeX
Raw Normal View History

2010-07-12 10:33:22 -05:00
\begin{itemize}
\item \textbf{Name} : DpgenRom2 -- 2 words ROM Macro-Generator
\item \textbf{Synopsys} :
\begin{verbatim}
Generate ( 'DpgenRom2', modelname
, param = { 'nbit' : n
, 'val0' : constVal0
, 'val1' : constVal1
, 'physical' : True
}
)
\end{verbatim}
\item \textbf{Description} : Generates a \verb-n- bits 2 words optimized ROM named \verb-modelname-.
\item \textbf{Terminal Names} :
\begin{itemize}
\item \textbf{sel0} : address of the value (input, 1 bit)
\item \textbf{q} : the selected word (output, \verb-n- bits)
\item \textbf{vdd} : power
\item \textbf{vss} : ground
\end{itemize}
\item \textbf{Parameters} : Parameters are given in the map \verb-param-.
\begin{itemize}
\item \textbf{nbit} (mandatory) : Defines the size of the generator
\item \textbf{val0} (mandatory) : Defines the first word
\item \textbf{val1} (mandatory) : Defines the second word
\item \textbf{physical} (optional, default value : False) : In order to generate a layout
\end{itemize}
\item \textbf{Behavior} :
\begin{verbatim}
q <= WITH sel0 SELECT
constVal0 WHEN B"0",
constVal1 WHEN B"1";
\end{verbatim}
\item \textbf{Example} :
\begin{verbatim}
from stratus import *
class inst_rom2 ( Model ) :
def Interface ( self ) :
self.sel0 = SignalIn ( "sel0", 1 )
self.q = SignalOut ( "dataout", 4 )
self.vdd = VddIn ( "vdd" )
self.vss = VssIn ( "vss" )
def Netlist ( self ) :
Generate ( 'DpgenRom2', 'rom2_0b1010_0b1100'
, param = { 'nbit' : 4
, 'val0' : "0b1010"
, 'val1' : "0b1100"
, 'physical' : True
}
)
self.I = Inst ( 'rom2_0b1010_0b1100', 'inst'
, map = { 'sel0' : self.sel0
, 'q' : self.q
, 'vdd' : self.vdd
, 'vss' : self.vss
}
)
def Layout ( self ) :
Place ( self.I, NOSYM, Ref(0, 0) )
\end{verbatim}
\end{itemize}