设计 n 位乘加器(先乘后加)
Design a n-bit multiplier (firstly multiply and then add)`
author : Mr.Mao
e-mail : [email protected]
module MAC_N
#(
parameter N = 16
)
(
input [N - 1: 0 ] A,
input [N - 1: 0 ] B,
input [N - 1: 0 ] C,
output [2*N - 1 : 0] R
);
assign R = A * B + C;
endmodule