coriolis/stratus1/doc/dpgen/man_dpgenbuff.tex

67 lines
2.2 KiB
TeX
Raw Normal View History

2010-07-12 10:33:22 -05:00
\begin{itemize}
\item \textbf{Name} : DpgenBuff -- Buffer Macro-Generator
\item \textbf{Synopsys} :
\begin{verbatim}
Generate ( 'DpgenBuff', modelname
, param = { 'nbit' : n
, 'drive' : d
, 'physical' : True
, 'behavioral' : True
}
)
\end{verbatim}
\item \textbf{Description} : Generates a \verb-n- bits inverter with an output power of \verb-d- named \verb-modelname-.
\item \textbf{Terminal Names} :
\begin{itemize}
\item \textbf{i0} : input (\verb-n- bits)
\item \textbf{q} : 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{drive} (optional) : Defines the output power of the gates
\begin{itemize}
\item Valid drive are : 2, 4 or 8
\item If this parameter is not defined, it's value is the smallest one permitted
\end{itemize}
\item \textbf{physical} (optional, default value : False) : In order to generate a layout
\item \textbf{behavioral} (optional, default value : False) : In order to generate a behavior
\end{itemize}
\item \textbf{Behavior} :
\begin{verbatim}
nq <= i0
\end{verbatim}
\item \textbf{Example} :
\begin{verbatim}
from stratus import *
class inst_buff ( Model ) :
def Interface ( self ) :
self.i = SignalIn ( "i", 32 )
self.o = SignalOut ( "o", 32 )
self.vdd = VddIn ( "vdd" )
self.vss = VssIn ( "vss" )
def Netlist ( self ) :
Generate ( 'DpgenBuff', 'buff_32'
, param = { 'nbit' : 32
, 'physical' : True
}
)
self.I = Inst ( 'buff_32', 'inst'
, map = { 'i0' : self.i
, 'q' : self.o
, 'vdd' : self.vdd
, 'vss' : self.vss
}
)
def Layout ( self ) :
Place ( self.I, NOSYM, Ref(0, 0) )
\end{verbatim}
\end{itemize}