reorganize and add support for multiple testbenches

This commit is contained in:
2022-08-21 11:40:12 -06:00
parent e370d6835a
commit b2b17840a1
9 changed files with 71 additions and 23 deletions

17
rtl/counter.v Normal file
View File

@@ -0,0 +1,17 @@
module counter #(
parameter BITS = 8
)(
input clk,
input reset,
output reg [BITS-1:0] y
);
always @(posedge clk or posedge reset) begin
if (reset) begin
y <= 0;
end else begin
y <= y + 1;
end
end
endmodule

18
rtl/top.v Normal file
View File

@@ -0,0 +1,18 @@
// Author: Brendan Haines
// Date: 2020-05-04
module top(
input clk,
input n_reset,
output [7:0] led
);
counter #(
.BITS(8)
) count(
.clk(clk),
.reset(~n_reset),
.y(led)
);
endmodule