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

NAME

6       DPGEN_ADSB2F - Adder/Substractor Macro-Generator
7

SYNOPSIS

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

DESCRIPTION

14       Generate a N bits adder/substractor named modelname.
15
16       How it works :
17
18       · if  the add_sub signal is set to '0' an addition is performed, other‐
19         wise it's a substraction.
20
21       · Operation can be either signed or unsigned. In unsigned mode  c31  is
22         the overflow, in unsigned mode you have to compute overflow by XORing
23         c31 and c30.
24
25   TERMINAL NAMES
26       1. add_sub : select addition or substraction (input, 1 bit).
27
28       2. c31 : carry out. In unsigned mode, this is the overflow  (output,  1
29          bits).
30
31       3. c30  : used to compute overflow in signed mode : overflow := c31 xor
32          c30 (output, 1 bits).
33
34       4. i1 : first operand (input, N bits).
35
36       5. i0 : second operand (input, N bits).
37
38       6. q : output (N bits).
39
40       7. vdd : power.
41
42       8. vss : ground.
43

EXAMPLE

45       GENLIB_MACRO(DPGEN_ADSB2F, "model_adsb2f_32"
46                                   , F_BEHAV|F_PLACE
47                                   , 32
48                                   );
49
50       GENLIB_LOINS( "model_adsb2f_32"
51                   , "instance1_adsb2f_32"
52                   , "add_sub"
53                   , "c32"
54                   , "c31"
55                   , "i1[31:0]"
56                   , "i0[31:0]"
57                   ,  "q[31:0]"
58                   , "vdd", "vss", NULL
59                   );
60
61

SEE ALSO

63       GENLIB_MACRO(3), genlib(1)
64
65
66
67ASIM/LIP6                        30 July 2004                  DPGEN_ADSB2F(3)
Impressum