1DPGEN_NOR2MASK(3)       Alliance - genlib User's Manual      DPGEN_NOR2MASK(3)
2
3
4

NAME

6       DPGEN_NOR2MASK - Programmable Mask Macro-Generator
7

SYNOPSIS

9       #include  <genlib.h>
10
11       void GENLIB_MACRO (DPGEN_NOR2MASK, char *modelname, long flags, long N,
12       char *constVal);
13

DESCRIPTION

15       Generate a N bits conditionnal NOR mask named modelname.
16
17       How it works :
18
19       · if the cmd signal is set to '0', the mask  is  NOT  applied,  so  the
20         whole operator behave like an inverter.
21
22       · if  the  cmd signal is set to '1', the mask IS applied, the output is
23         the complemented result of the input value ORed with the  mask  (sup‐
24         plied by constVal).
25
26       The  constant  constVal is given to the macro-generator call, therefore
27       the value cannot be changed afterward : it's hard wired in  the  opera‐
28       tor.
29
30       A  common error is to give a real C constant for the constVal argument.
31       Be aware that it is a character string.
32
33   TERMINAL NAMES
34       1. cmd : mask control (1 bit).
35
36       2. i0 : input (N bits).
37
38       3. q : output (N bits).
39
40       4. vdd : power.
41
42       5. vss : ground.
43
44   BEHAVIOR
45       nq <= WITH cmd SELECT not(i0)                WHEN '0',
46                             not(i0 or X"0000FFFF") WHEN '1';
47
48

EXAMPLE

50       GENLIB_MACRO(DPGEN_NOR2MASK, "model_nor2mask_0000FFFF_32"
51                                  , F_BEHAV|F_PLACE
52                                  , 32
53                                  , "0x0000FFFF" /* A string! */
54                                  );
55
56       GENLIB_LOINS( "model_nor2mask_0000FFFF_32"
57                   , "instance1_nor2mask_32"
58                   , "cmd"
59                   , "i0[31:0]"
60                   ,  "q[31:0]"
61                   , "vdd", "vss", NULL
62                   );
63
64

SEE ALSO

66       GENLIB_MACRO(3), genlib(1)
67
68
69
70ASIM/LIP6                        30 July 2004                DPGEN_NOR2MASK(3)
Impressum