DPGEN_XNOR2MASK.3alc man page

DPGEN_XNOR2MASK — Programmable Mask Macro-Generator

Synopsis

#include  <genlib.h>

void GENLIB_MACRO (DPGEN_XNOR2MASK, char *modelname, long flags, long N, char *constVal);

Description

Generate a N bits conditionnal XNOR mask named modelname.

How it works :

The constant constVal is given to the macro-generator call, therefore the value cannot be changed afterward : it's hard wired in the operator.

A common error is to give a real C constant for the constVal argument. Be aware that it is a character string.

Terminal Names

1.

cmd : mask control (1 bit).

2.

i0 : input (N bits).

3.

q : output (N bits).

4.

vdd : power.

5.

vss : ground.

Behavior

nq <= WITH cmd SELECT not(i0)                 WHEN '0',
                      not(i0 xor X"0000FFFF") WHEN '1';
   

Example

GENLIB_MACRO(DPGEN_XNOR2MASK, "model_xnor2mask_0000FFFF_32"
                            , F_BEHAV|F_PLACE
                            , 32
                            , "0x0000FFFF" /* A string! */
                            );

GENLIB_LOINS( "model_xnor2mask_0000FFFF_32"
            , "instance1_xnor2mask_32"
            , "cmd"
            , "i0[31:0]"
            ,  "q[31:0]"
            , "vdd", "vss", NULL
            );
    

See Also

GENLIB_MACRO(3), genlib(1)

Info

30 July 2004 ASIM/LIP6 Alliance - genlib User's Manual