diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-21 13:50:28 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-21 13:50:28 +0200 |
commit | cb0be9e2039569ee7d18657e8f675d1f8369b407 (patch) | |
tree | 91fa71b3960d1ad5217759371143efbdd833d475 /sim/testbench_cpu.v | |
parent | 98d0dd96611dc2c0e444eaf9410f8adf2924c6b5 (diff) | |
download | riscv_cpu-cb0be9e2039569ee7d18657e8f675d1f8369b407.tar.gz riscv_cpu-cb0be9e2039569ee7d18657e8f675d1f8369b407.zip |
restructured project
Diffstat (limited to 'sim/testbench_cpu.v')
-rw-r--r-- | sim/testbench_cpu.v | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/sim/testbench_cpu.v b/sim/testbench_cpu.v deleted file mode 100644 index ba40dc2..0000000 --- a/sim/testbench_cpu.v +++ /dev/null @@ -1,68 +0,0 @@ -`timescale 1ns / 1ps - -module testbench_register_file(); - -reg clk; -reg rst; - -reg [31:0] io_in; -wire [31:0] io_out; - -cpu cpu ( - .clk(clk), - .rstn(!rst), - .io_in(io_in), - .io_out(io_out) -); - -integer file, r, eof; -reg [100*8:1] line; -reg [31:0] clk_cycle_count; - - -always #5 clk = ~clk; - -reg [1023:0] testvec_filename; -reg [1023:0] waveform_filename; - -initial begin - if ($value$plusargs("testvec=%s", testvec_filename)) begin - end else begin - $display("ERROR: testvec not specified"); - $finish; - end - - if ($value$plusargs("waveform=%s", waveform_filename)) begin - end else begin - $display("ERROR: waveform not specified"); - $finish; - end -end - -initial begin - $dumpfile(waveform_filename); - $dumpvars(0,testbench_register_file); -end - - -initial begin - clk = 0; - rst = 0; - - clk_cycle_count = 0; - - @(negedge clk); - rst = 1; - @(negedge clk); - rst = 0; - - - while (1) begin - @(posedge clk); - clk_cycle_count = clk_cycle_count + 1; - if (clk_cycle_count == 10000) $finish; - end -end - -endmodule - |