47 lines
1.3 KiB
TeX
47 lines
1.3 KiB
TeX
|
\begin{itemize}
|
||
|
\item Name : DpgenNbuse -- Tristate Macro-Generator
|
||
|
\item Description : Generates a \verb-n- bits tristate with an complemented output named \verb-modelname-.
|
||
|
\item Terminal Names :
|
||
|
\begin{itemize}
|
||
|
\item cmd : select ( 1 bit )
|
||
|
\item i0 : input ( \verb-n- bits )
|
||
|
\item nq : output ( \verb-n- bits )
|
||
|
\item vdd : power
|
||
|
\item vss : ground
|
||
|
\end{itemize}
|
||
|
\item Parameters : Parameters are given with a map called \verb-param-.
|
||
|
\begin{itemize}
|
||
|
\item nbit : Defines the size of the generator
|
||
|
\end{itemize}
|
||
|
\item Behavior :
|
||
|
\begin{verbatim}
|
||
|
nts:BLOCK(cmd = '1') BEGIN
|
||
|
nq <= GUARDED not(i0);
|
||
|
END
|
||
|
\end{verbatim}
|
||
|
\item Example :
|
||
|
\begin{verbatim}
|
||
|
class myClass ( Model ) :
|
||
|
def Interface ( self ) :
|
||
|
self._in = LogicIn ( "in", 32 )
|
||
|
self._cmd = LogicIn ( "cmd", 1 )
|
||
|
|
||
|
self._out = TriState ( "out", 32 )
|
||
|
|
||
|
self._vdd = VddIn ( "vdd" )
|
||
|
self._vss = VssIn ( "vss" )
|
||
|
|
||
|
def Netlist ( self ) :
|
||
|
|
||
|
Inst ( 'DpgenNbuse'
|
||
|
, param = { 'nbit' : 32 }
|
||
|
, map = { 'i0' : self._in
|
||
|
, 'cmd' : self._cmd
|
||
|
, 'nq' : self._out
|
||
|
, 'vdd' : self._vdd
|
||
|
, 'vss' : self._vss
|
||
|
}
|
||
|
)
|
||
|
\end{verbatim}
|
||
|
\end{itemize}
|