[Benchmark] Add a micro benchmark: 8-bit multiply and accumulate
This commit is contained in:
parent
8c970a792a
commit
be03eafd66
|
@ -0,0 +1,22 @@
|
||||||
|
//-------------------------------------------------------
|
||||||
|
// Functionality: A 8-bit multiply-acculumate circuit
|
||||||
|
// Author: Xifan Tang
|
||||||
|
//-------------------------------------------------------
|
||||||
|
|
||||||
|
module mac_8(a, b, c, out);
|
||||||
|
parameter DATA_WIDTH = 8; /* declare a parameter. default required */
|
||||||
|
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||||
|
output [DATA_WIDTH - 1 : 0] out;
|
||||||
|
|
||||||
|
assign out = a * b + c;
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue