DPGEN_SHROT(3)

NAME
DPGEN_SHROT - Shift/Rotation Macro-Generator

SYNOPSIS
#include <genlib.h>

void GENLIB_MACRO(
	DPGEN_SHROT,
	char *modelname,
	long flags,
	long N
);
.SH "DESCRIPTION"

Generate a N bits shift/rotation operator with name modelname.

How it works :

•   if the op[0] signal is set to '1' right shift/rotation occurs, otherwise left shift/rotation occurs.

•   if the op[1] signal is set to '1' performs an arithmetic shift (only meaningful in case of a right shift).

•   if the op[2] signal is set to '1' 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

1.  op : select the kind of shift/rotation (input, 3 bit).

2.  shamt : the shift amount (input, Y bits).

3.  : value to shift (input, N bits).

4.  : output (N bits).

5.  vdd : power.

6.  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);

SEE ALSO

GENLIB_MACRO(3), genlib(1)