add parameter verilog case
This commit is contained in:
parent
624f80ad72
commit
473e7e49eb
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,19 @@
|
|||
module addition
|
||||
#(
|
||||
parameter DSIZE = 8
|
||||
)
|
||||
(
|
||||
input [DSIZE-1:0] a,
|
||||
input [DSIZE-1:0] b,
|
||||
output [DSIZE-1:0] c
|
||||
);
|
||||
assign c = a + b;
|
||||
endmodule
|
||||
|
||||
module top(
|
||||
input [3:0] a,
|
||||
input [3:0] b,
|
||||
output [3:0] c
|
||||
);
|
||||
addition#(.DSIZE(4)) i(a, b, c);
|
||||
endmodule
|
Loading…
Reference in New Issue