\begin{itemize} \item Name : DpgenRom2 -- 2 words ROM Macro-Generator \item Description : Generates a \verb-n- bits 2 words optimized ROM named \verb-modelname-. \item Terminal Names : \begin{itemize} \item sel0 : address of the value (input, 1 bit) \item q : the selected word (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 \item val0 : Defines the first word \item val1 : Defines the second word \end{itemize} \item Behavior : \begin{verbatim} q <= WITH sel0 SELECT contsVal0 WHEN B"0", constVal1 WHEN B"1"; \end{verbatim} \item Example : \begin{verbatim} class myClass ( Model ) : def Interface ( self ) : self._sel0 = LogicIn ( "sel0", 1 ) self._q = LogicOut ( "dataout", 4 ) self._vdd = VddIn ( "vdd" ) self._vss = VssIn ( "vss" ) def Netlist ( self ) : Inst ( 'DpgenRom2' , param = { 'val0' : "0b1010" , 'val1' : "0b1100" , 'nbit' : 4 } , map = { 'sel0' : self._sel0 , 'q' : self._q , 'vdd' : self._vdd , 'vss' : self._vss } ) \end{verbatim} \end{itemize}