Skip to content

Commit 42e82d1

Browse files
committed
Fix Verilator simulations
This fixes compilation issues with the Verilator simulations.
1 parent 971e00e commit 42e82d1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tb/core/tb_top_verilator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void dump_memory()
6969
{
7070
errno = 0;
7171
std::ofstream mem_file;
72-
svLogicVecVal addr = {0};
72+
svLogicVecVal addr = {0, 0};
7373

7474
mem_file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
7575
try {
@@ -84,7 +84,7 @@ void dump_memory()
8484

8585
std::cout << "finished dumping memory" << std::endl;
8686

87-
} catch (std::ofstream::failure e) {
87+
} catch (std::ofstream::failure &e) {
8888
std::cerr << "exception opening/reading/closing file memory_dump.bin\n";
8989
}
9090
}

tb/verilator-model/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ VSRC = dp_ram.sv \
5555
../../rtl/riscv_decoder.sv \
5656
../../rtl/riscv_int_controller.sv \
5757
../../rtl/riscv_ex_stage.sv \
58+
../../rtl/riscv_ff_one.sv \
59+
../../rtl/riscv_fetch_fifo.sv \
5860
../../rtl/riscv_hwloop_controller.sv \
5961
../../rtl/riscv_hwloop_regs.sv \
6062
../../rtl/riscv_id_stage.sv \
6163
../../rtl/riscv_if_stage.sv \
6264
../../rtl/riscv_load_store_unit.sv \
6365
../../rtl/riscv_mult.sv \
66+
../../rtl/riscv_popcnt.sv \
6467
../../rtl/riscv_prefetch_buffer.sv \
6568
../../rtl/riscv_prefetch_L0_buffer.sv \
6669
../../rtl/riscv_register_file.sv \

tb/verilator-model/top.sv

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,19 @@ module top
6565
#(
6666
.PULP_CLUSTER(PULP_CLUSTER),
6767
.FPU(FPU),
68-
.PULP_ZFINX(PULP_ZFINX),
69-
.DM_HALTADDRESS(DM_HALTADDRESS)
68+
.PULP_ZFINX(PULP_ZFINX)
7069
)
7170
riscv_core_i
7271
(
7372
.clk_i ( clk_i ),
7473
.rst_ni ( rstn_i ),
7574

7675
.clock_en_i ( 1'b1 ),
77-
.test_en_i ( 1'b0 ),
76+
.scan_cg_en_i ( 1'b0 ),
7877

7978
.boot_addr_i ( BOOT_ADDR ),
80-
.core_id_i ( 4'h0 ),
81-
.cluster_id_i ( 6'h0 ),
79+
.dm_halt_addr_i ( DM_HALTADDRESS ),
80+
.hart_id_i ( 32'h0 ),
8281

8382
.instr_addr_o ( instr_addr ),
8483
.instr_req_o ( instr_req ),
@@ -118,9 +117,7 @@ module top
118117
.debug_req_i ( debug_req_i ),
119118

120119
.fetch_enable_i ( fetch_enable_i ),
121-
.core_busy_o ( core_busy_o ),
122-
123-
.fregfile_disable_i ( 1'b0 ));
120+
.core_busy_o ( core_busy_o ));
124121

125122
// Instantiate the memory
126123

0 commit comments

Comments
 (0)