2023-10-21 13:57:58 +00:00
|
|
|
`timescale 1ns / 1ps
|
2023-10-23 08:34:37 +00:00
|
|
|
`include "tb_tools.vh"
|
2023-10-21 13:57:58 +00:00
|
|
|
|
|
|
|
module tb_risc_v_cpu ();
|
2023-10-23 05:15:21 +00:00
|
|
|
reg clk;
|
|
|
|
reg reset;
|
|
|
|
integer i;
|
|
|
|
wire [31:0] out;
|
|
|
|
|
|
|
|
risc_v_cpu risc_v_cpu (
|
|
|
|
.clock(clk),
|
|
|
|
.reset(reset),
|
|
|
|
.out(out)
|
|
|
|
);
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
reset = 1'b1;
|
|
|
|
#10
|
|
|
|
reset = 1'b0;
|
|
|
|
end
|
2023-10-22 13:41:39 +00:00
|
|
|
|
2023-10-23 05:15:21 +00:00
|
|
|
initial begin
|
|
|
|
clk = 1'b0;
|
|
|
|
for (i = 0; i < 100; i = i + 1) begin
|
|
|
|
#1 clk = ~clk;
|
|
|
|
end
|
2023-10-22 13:41:39 +00:00
|
|
|
end
|
|
|
|
|
2023-10-21 13:57:58 +00:00
|
|
|
endmodule : tb_risc_v_cpu
|