diff --git a/alliance/src/genlib/doc/man_dpgen_shift.sgm b/alliance/src/genlib/doc/man_dpgen_shift.sgm index 48549c1e..963bcaa9 100644 --- a/alliance/src/genlib/doc/man_dpgen_shift.sgm +++ b/alliance/src/genlib/doc/man_dpgen_shift.sgm @@ -31,25 +31,24 @@ Description - Generate a &N; bits shifter named &modelname;. + Generate a &N; bits shifter with name &modelname;. How it works : - if op[0] signal is set to &one; perform - a right shift, left shift otherwise. + if the op[0] signal is set to &one; performs + a right shift, performs a left shift otherwise. - if op[1] signal is set to &one; perform - a sign extention, i.e. an arithmetic shift (only meaningful in case - of a right shift). + if the op[1] signal is set to &one; performs + an arithmetic shift (only meaningful in case of a right shift). - &shamt; : specify the shift amount. The wide of this signal - (&Y;) is computed from the operator's wide : - Y = log2(N) - 1. + &shamt; : specifies the shift amount. The width of this signal + (&Y;) is computed from the operator's width : + Y = ceil(log2(N)) - 1. @@ -67,10 +66,10 @@ &shamt; : the shift amount (input, &Y; bits). - &i0; : value to shift (input, &N; bits). + &i; : value to shift (input, &N; bits). - &q; : output (&N; bits). + &o; : output (&N; bits). vdd : power. @@ -89,20 +88,17 @@ -GENLIB_MACRO(DPGEN_SHIFT, "model_shift_32" - , F_BEHAV|F_PLACE - , 32 - ); +GENLIB_MACRO(DPGEN_SHIFT, "model_shift_32", + F_BEHAV|F_PLACE, + 32); -GENLIB_LOINS( "model_shift_32" - , "instance1_shift_32" - , "add_sub" - , "op[1:0]" - , "shamt[4:0]" - , "i0[31:0]" - , "q[31:0]" - , "vdd", "vss", NULL - ); +GENLIB_LOINS("model_shift_32", + "instance1_shift_32", + "op[1:0]", + "shamt[4:0]", + "x[31:0]", + "y[31:0]", + "vdd", "vss", NULL); diff --git a/alliance/src/genlib/doc/man_dpgen_shrot.sgm b/alliance/src/genlib/doc/man_dpgen_shrot.sgm new file mode 100644 index 00000000..578e116a --- /dev/null +++ b/alliance/src/genlib/doc/man_dpgen_shrot.sgm @@ -0,0 +1,115 @@ + + + + + + + DPGEN_SHROT + 3 + ASIM/LIP6 + + + + DPGEN_SHROT + Shift/Rotation Macro-Generator + + + + + + #include <genlib.h> + + void GENLIB_MACRO + DPGEN_SHROT + char *modelname + long flags + long N + + + + + + Description + + Generate a &N; bits shift/rotation operator with name &modelname;. + + How it works : + + + if the op[0] signal is set to &one; + right shift/rotation occurs, otherwise left shift/rotation + occurs. + + + + if the op[1] signal is set to &one; performs + an arithmetic shift (only meaningful in case of a right shift). + + + + if the op[2] signal is set to &one; performs + a rotation, otherwise performs a shift. + + + + &shamt; : specifies the shift amount. The width of this signal + (&Y;) is computed from the operator's width : + Y = ceil(log2(N)) - 1. + + + + + + + Terminal Names + + + + &op; : select the kind of shift/rotation (input, 3 bit). + + + + &shamt; : the shift amount (input, &Y; bits). + + + &i; : value to shift (input, &N; bits). + + + &o; : output (&N; bits). + + + vdd : power. + + + vss : ground. + + + + + + + + + Example + + + +GENLIB_MACRO(DPGEN_SHROT, "rot25", + F_BEHAV|F_PLACE, + 25); + +GENLIB_LOINS("rot25", + "instance1_rot25", + "op[2:0]", + "shamt[4:0]", + "x[31:0]", + "y[31:0]", + "vdd", "vss", NULL); + + + + + + &man-dpgen-see-also; + + diff --git a/alliance/src/genlib/doc/man_genlib_macro.sgm b/alliance/src/genlib/doc/man_genlib_macro.sgm index 51f0d0ba..ea3a7e99 100644 --- a/alliance/src/genlib/doc/man_genlib_macro.sgm +++ b/alliance/src/genlib/doc/man_genlib_macro.sgm @@ -258,6 +258,10 @@ DPGEN_SHIFT 3 + + DPGEN_SHROT + 3 +