52 lines
1.6 KiB
TeX
52 lines
1.6 KiB
TeX
\subsubsection{Name}
|
|
|
|
Reg -- Easy way to instantiate a register
|
|
|
|
\subsubsection{Synopsys}
|
|
|
|
\begin{verbatim}
|
|
netOut <= netCk.Reg ( netIn )
|
|
\end{verbatim}
|
|
|
|
\subsubsection{Description}
|
|
|
|
This method is a method of net. The net which this method is applied to is the clock of the register. The net given as parameter is the input net. The method returns a net : the output net.\\
|
|
\indent Note that it is possible to change the generator instanciated with the \verb-SetReg- method.
|
|
|
|
\subsubsection{Example}
|
|
|
|
\begin{verbatim}
|
|
class essai ( Model ) :
|
|
|
|
def Interface ( self ) :
|
|
self.A = LogicIn ( "a", 4 )
|
|
self.S = LogicOut ( "s", 4 )
|
|
|
|
self.Ck = CkIn ( "ck" )
|
|
|
|
self.Vdd = VddIn ( "vdd" )
|
|
self.Vss = VssIn ( "vss" )
|
|
|
|
def Netlist ( self ) :
|
|
|
|
self.S <= self.Ck.Reg ( self.A )
|
|
\end{verbatim}
|
|
|
|
\subsubsection{Errors}
|
|
|
|
Some errors may occur :
|
|
\begin{itemize}
|
|
\item \verb-[Stratus ERROR] Reg : The input net does not have a positive arity.-\\The input net must have a positive arity.
|
|
\item \verb-[Stratus ERROR] Reg : The clock does not have a positive arity.-\\The clock must have a positive arity.
|
|
\end{itemize}
|
|
|
|
\subsubsection{See Also}
|
|
|
|
\hyperref[ref]{\emph{Introduction}}{}{Introduction}{secintroduction}
|
|
\hyperref[ref]{\emph{Netlist}}{}{Netlist}{secnetlist}
|
|
\hyperref[ref]{\emph{Instanciation of a multiplexor}}{}{Multiplexor}{secmux}
|
|
\hyperref[ref]{\emph{Instanciation of constants}}{}{Constant}{secconstant}
|
|
\hyperref[ref]{\emph{Boolean operations}}{}{Boolean}{secbool}
|
|
\hyperref[ref]{\emph{Arithmetical operations}}{}{Arithmetic}{secarithmetic}
|
|
\hyperref[ref]{\emph{Comparison operations}}{}{Comparison}{seccomp}
|