

  <refentry id="GENLIB-MACRO">
  <?dbhtml filename="man_genlib_macro.html">

  <refmeta>
    <refentrytitle>GENLIB_MACRO</refentrytitle>
    <manvolnum>3</manvolnum>
    <refmiscinfo>ASIM/LIP6</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname> GENLIB_MACRO </refname>
    <refpurpose> Interface with all MACRO generators. </refpurpose>
  </refnamediv>


  <refsynopsisdiv>
    <funcsynopsis>
      <funcsynopsisinfo>#include  &lt;genlib.h&gt;</funcsynopsisinfo>
      <funcprototype>
        <funcdef>void <function>GENLIB_MACRO</function></funcdef>
          <paramdef>long <parameter>function</parameter></paramdef>
          <paramdef>char *<parameter>modelname</parameter></paramdef>
          <paramdef>long <parameter>flags</parameter></paramdef>
          <paramdef>long <parameter>N</parameter></paramdef>
          <paramdef>long <parameter>drive</parameter></paramdef>
          <paramdef>long <parameter>regNumber</parameter></paramdef>
          <paramdef>char *<parameter>constVal</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title> Description </title>

    <para> The &GENLIB-MACRO; fonction call is the generic interface to
    all &genlib; macro generators. As all generators do not have the
    sames arguments it takes a variable number of arguments.
    </para>
    <para> Arguments are of two kinds :
    <itemizedlist>
      <listitem>
        <para> Mandatory arguments : those arguments must always be
        supplied. They represents the minimal set of common arguments for
        all macro-generators. Mandatory arguments comme firts in the
        arguments list.
        </para>
      </listitem>
      <listitem>
        <para> Optional arguments : arguments specifics to a
        macro-generator or a class of macro-generators.
        </para>
      </listitem>
    </itemizedlist>
    </para>

    <refsect2>
      <title> Arguments </title>

      <orderedlist>
        <listitem>
          <para>&arg-function; : (mandatory) specify which macro-generator
          is to be invoked. For example, to create a two entry multiplexer
          gives &CONST-GENLIB-MUX2;.
          </para>
        </listitem>
        <listitem>
          <para>&arg-modelname; : (mandatory) specify the name of the model
          to be generated. For example :
          <literal>"model_mux2_32bits"</literal>.
          </para>
        </listitem>
        <listitem>
          <para>&arg-flags; : (mandatory) tells which views are to be
          generated. It is a logical combination of the following values :
          (<emphasis>ORed</emphasis>)
          <orderedlist>
            <listitem>
              <para>&F-PLACE; : generate physical view (placement only).
              </para>
            </listitem>
            <listitem>
              <para>&F-BEHAV; : generate behavioral view (&VHDL; view).
              </para>
            </listitem>
            <listitem>
              <para>&F-LSB-FIRST; : the terminal of index zero is matched
              to the &LSB;, thus a 32 bits vector will be written :
              <literal>"signal[31:0]"</literal>.
              </para>
            </listitem>
            <listitem>
              <para>&F-MSB-FIRST; : the terminal of index zero is matched
              to the &MSB;, thus a 32 bits vector will be written :
              <literal>"signal[0:31]"</literal> (aka. &IBM; notation).
              </para>
            </listitem>
          </orderedlist>
          </para>
        </listitem>
        <listitem>
          <para>&arg-N; : (mandatory) width of the model's bus to be
          generated.
          </para>
        </listitem>
        <listitem>
          <para>&arg-drive; : (optional) output power drive.
          </para>
        </listitem>
        <listitem>
          <para>&arg-regNumber; : (optional) number of registers or depth
          of for a &FIFO; macro-generator.
          </para>
        </listitem>
        <listitem>
          <para>&arg-constVal; : (optional) a character string holding a
          constant. For example : <literal>"0xFFFF0000"</literal>.
          </para>
        </listitem>
      </orderedlist>

    </refsect2>

    <refsect2>
      <title> Available Macro-Generators </title>

      <para>
      <itemizedlist>
        <listitem>
          <para> Inverters and Buffers :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-INV"><citerefentry>
              <refentrytitle>DPGEN_INV</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-BUFF"><citerefentry>
              <refentrytitle>DPGEN_BUFF</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Boolean Operators :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-NAND2"><citerefentry>
              <refentrytitle>DPGEN_NAND2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NAND3"><citerefentry>
              <refentrytitle>DPGEN_NAND3</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NAND4"><citerefentry>
              <refentrytitle>DPGEN_NAND4</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-AND2"><citerefentry>
              <refentrytitle>DPGEN_AND2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-AND3"><citerefentry>
              <refentrytitle>DPGEN_AND3</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-AND4"><citerefentry>
              <refentrytitle>DPGEN_AND4</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NOR2"><citerefentry>
              <refentrytitle>DPGEN_NOR2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NOR3"><citerefentry>
              <refentrytitle>DPGEN_NOR3</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NOR4"><citerefentry>
              <refentrytitle>DPGEN_NOR4</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-OR2"><citerefentry>
              <refentrytitle>DPGEN_OR2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-OR3"><citerefentry>
              <refentrytitle>DPGEN_OR3</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-OR4"><citerefentry>
              <refentrytitle>DPGEN_OR4</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-XOR2"><citerefentry>
              <refentrytitle>DPGEN_XOR2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-XNOR2"><citerefentry>
              <refentrytitle>DPGEN_XNOR2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Multiplexers and Tristates :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-NMUX2"><citerefentry>
              <refentrytitle>DPGEN_NMUX2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-MUX2"><citerefentry>
              <refentrytitle>DPGEN_MUX2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NBUSE"><citerefentry>
              <refentrytitle>DPGEN_NBUSE</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-BUSE"><citerefentry>
              <refentrytitle>DPGEN_BUSE</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Programmable Masks :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-NAND2MASK"><citerefentry>
              <refentrytitle>DPGEN_NAND2MASK</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NOR2MASK"><citerefentry>
              <refentrytitle>DPGEN_NOR2MASK</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-XNOR2MASK"><citerefentry>
              <refentrytitle>DPGEN_XNOR2MASK</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Arithmetics Operators :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-ADSB2F"><citerefentry>
              <refentrytitle>DPGEN_ADSB2F</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-SHIFT"><citerefentry>
              <refentrytitle>DPGEN_SHIFT</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <!--
            <listitem><para><link linkend="DPGEN-SHROT"><citerefentry>
              <refentrytitle>DPGEN_SHROT</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            -->
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Miscellaneous :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-NUL"><citerefentry>
              <refentrytitle>DPGEN_NUL</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NUL"><citerefentry>
              <refentrytitle>DPGEN_CONST</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NUL"><citerefentry>
              <refentrytitle>DPGEN_ROM2</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-NUL"><citerefentry>
              <refentrytitle>DPGEN_ROM4</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

        <listitem>
          <para> Registers :
          <itemizedlist>
            <listitem><para><link linkend="DPGEN-RF1"><citerefentry>
              <refentrytitle>DPGEN_RF1</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-RF1"><citerefentry>
              <refentrytitle>DPGEN_RF1R0</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-FIFO"><citerefentry>
              <refentrytitle>DPGEN_FIFO</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-RF1D"><citerefentry>
              <refentrytitle>DPGEN_RF1D</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-RF1D"><citerefentry>
              <refentrytitle>DPGEN_RF1DR0</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-DFF"><citerefentry>
              <refentrytitle>DPGEN_DFF</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-DFFT"><citerefentry>
              <refentrytitle>DPGEN_DFFT</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-SFF"><citerefentry>
              <refentrytitle>DPGEN_SFF</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
            <listitem><para><link linkend="DPGEN-SFFT"><citerefentry>
              <refentrytitle>DPGEN_SFFT</refentrytitle>
              <manvolnum>3</manvolnum>
            </citerefentry></link></para></listitem>
          </itemizedlist>
          </para>
        </listitem>

      </itemizedlist>
      </para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>See Also</title>

    <para>
      <citerefentry>
        <refentrytitle>mbk</refentrytitle>
        <manvolnum>1</manvolnum>
      </citerefentry>,
    </para>
  </refsect1>

  </refentry>
