-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReg_Block_1_tb.v
More file actions
46 lines (34 loc) · 812 Bytes
/
Copy pathReg_Block_1_tb.v
File metadata and controls
46 lines (34 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Testbench for msrv32_reg_block_1 21BCE0289
module Testbench_Reg_Block_1;
reg [31:0] pc_mux_in;
reg ms_riscv32_mp_clk_in;
reg ms_riscv32_mp_rst_in;
wire [31:0] pc_out;
msrv32_reg_block_1 Reg_Block_1(
.pc_mux_in(pc_mux_in),
.ms_riscv32_mp_clk_in(ms_riscv32_mp_clk_in),
.ms_riscv32_mp_rst_in(ms_riscv32_mp_rst_in),
.pc_out(pc_out)
);
always begin
#5 ms_riscv32_mp_clk_in = ~ms_riscv32_mp_clk_in;
end
initial begin
ms_riscv32_mp_clk_in = 0;
pc_mux_in = 32'h00000011;
ms_riscv32_mp_rst_in = 0;
#20;
pc_mux_in = 32'h00000022;
#15;
pc_mux_in = 32'h00000033;
ms_riscv32_mp_rst_in = 1;
#10;
ms_riscv32_mp_rst_in = 0;
pc_mux_in = 32'h00000099;
#25;
$stop;
end
always @(posedge ms_riscv32_mp_clk_in) begin
$display("pc_out: %h", pc_out);
end
endmodule