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

NAME

6       DPGEN_SHIFT - Shifter Macro-Generator
7

SYNOPSIS

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

DESCRIPTION

14       Generate a N bits shifter with name modelname.
15
16       How it works :
17
18       · if  the op[0] signal is set to '1' performs a right shift, performs a
19         left shift otherwise.
20
21       · if the op[1] signal is set to '1' performs an arithmetic shift  (only
22         meaningful in case of a right shift).
23
24       · shamt  :  specifies the shift amount. The width of this signal (Y) is
25         computed from the operator's width : Y = ceil(log2(N)) - 1.
26
27   TERMINAL NAMES
28       1. op : select the kind of shift (input, 2 bit).
29
30       2. shamt : the shift amount (input, Y bits).
31
32       3. i : value to shift (input, N bits).
33
34       4. o : output (N bits).
35
36       5. vdd : power.
37
38       6. vss : ground.
39

EXAMPLE

41       GENLIB_MACRO(DPGEN_SHIFT, "model_shift_32",
42                                 F_BEHAV|F_PLACE,
43                                 32);
44
45       GENLIB_LOINS("model_shift_32",
46                    "instance1_shift_32",
47                    "op[1:0]",
48                    "shamt[4:0]",
49                    "x[31:0]",
50                    "y[31:0]",
51                    "vdd", "vss", NULL);
52
53

SEE ALSO

55       GENLIB_MACRO(3), genlib(1)
56
57
58
59ASIM/LIP6                        30 July 2004                   DPGEN_SHIFT(3)
Impressum