GenLib User's Manual | ||
---|---|---|
<<< Previous | Next >>> |
Generate a N bits adder/substractor named modelname.
How it works :
if the add_sub signal is set to '0' an addition is performed, otherwise it's a substraction.
Operation can be either signed or unsigned. In unsigned mode c31 is the overflow, in unsigned mode you have to compute overflow by XORing c31 and c30.
add_sub : select addition or substraction (input, 1 bit).
c31 : carry out. In unsigned mode, this is the overflow (output, 1 bits).
c30 : used to compute overflow in signed mode : overflow := c31 xor c30 (output, 1 bits).
i1 : first operand (input, N bits).
i0 : second operand (input, N bits).
q : output (N bits).
vdd : power.
vss : ground.
GENLIB_MACRO(DPGEN_ADSB2F, "model_adsb2f_32" , F_BEHAV|F_PLACE , 32 ); GENLIB_LOINS( "model_adsb2f_32" , "instance1_adsb2f_32" , "add_sub" , "c32" , "c31" , "i1[31:0]" , "i0[31:0]" , "q[31:0]" , "vdd", "vss", NULL ); |
<<< Previous | Home | Next >>> |
DPGEN_XNOR2MASK | Up | DPGEN_SHIFT |