Download SMASH - Reference manual

Transcript
Chapter 14 - Digital behavioral modeling
___________________________________________________________________________________
An 8x8 multiplier
module ZD_MUL( XB, YB, W, P );
parameter TPROP;
input [7:0] XB, YB;
input [15:0] W;
output [16:0] P;
BEHAVIOR:
{
/* 8*8 multiplier : */
LOCAL_SIGNAL VX,VY,VW;
VX = XB_signed(7,0);
VY = YB_signed(7,0);
VW = W_signed(15,0);
BUSEVENT(P_bus(16,0),VX*VY+VW,TPROP);
}
endmodule
451