blob: a8d4cb1b74c7fade7c91e576e212d7afc0b65981 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module mult (input clock, input signed [15:0] x, input signed [15:0] y, output reg signed [30:0] product,
input enable_in, output reg enable_out );
always @(posedge clock)
if(enable_in)
product <= #1 x*y;
else
product <= #1 31'd0;
always @(posedge clock)
enable_out <= #1 enable_in;
endmodule // mult
|