mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-24 14:17:16 -04:00
Fix Questa flow
This commit is contained in:
parent
bcc5eb0bde
commit
25dae772b3
4 changed files with 54 additions and 23 deletions
12
Makefile
12
Makefile
|
@ -124,27 +124,31 @@ $(library):
|
|||
sim: build $(library)/ariane_dpi.so
|
||||
vsim${questa_version} +permissive -64 -lib ${library} +max-cycles=$(max_cycles) +UVM_TESTNAME=${test_case} \
|
||||
+BASEDIR=$(riscv-test-dir) $(uvm-flags) "+UVM_VERBOSITY=LOW" -coverage -classdebug +jtag_rbb_enable=0 \
|
||||
-gblso tmp/riscv-fesvr/build/libfesvr.so -sv_lib $(library)/ariane_dpi -do " do tb/wave/wave_core.do; run -all; exit" \
|
||||
$(QUESTASIM_FLAGS) \
|
||||
-gblso $(RISCV)/lib/libfesvr.so -sv_lib $(library)/ariane_dpi -do " do tb/wave/wave_core.do; run -all; exit" \
|
||||
${top_level}_optimized +permissive-off ++$(riscv-test-dir)/$(riscv-test) ++$(target-options)
|
||||
|
||||
simc: build $(library)/ariane_dpi.so
|
||||
vsim${questa_version} +permissive -64 -c -lib ${library} +max-cycles=$(max_cycles) +UVM_TESTNAME=${test_case} \
|
||||
+BASEDIR=$(riscv-test-dir) $(uvm-flags) "+UVM_VERBOSITY=LOW" -coverage -classdebug +jtag_rbb_enable=0 \
|
||||
-gblso tmp/riscv-fesvr/build/libfesvr.so -sv_lib $(library)/ariane_dpi -do " run -all; exit" \
|
||||
$(QUESTASIM_FLAGS) \
|
||||
-gblso $(RISCV)/lib/libfesvr.so -sv_lib $(library)/ariane_dpi -do " do tb/wave/wave_core.do; run -all; exit" \
|
||||
${top_level}_optimized +permissive-off ++$(riscv-test-dir)/$(riscv-test) ++$(target-options)
|
||||
|
||||
|
||||
$(riscv-asm-tests): build $(library)/ariane_dpi.so
|
||||
vsim${questa_version} +permissive -64 -c -lib ${library} +max-cycles=$(max_cycles) +UVM_TESTNAME=${test_case} \
|
||||
+BASEDIR=$(riscv-test-dir) $(uvm-flags) "+UVM_VERBOSITY=LOW" -coverage -classdebug +jtag_rbb_enable=0 \
|
||||
-gblso tmp/riscv-fesvr/build/libfesvr.so -sv_lib $(library)/ariane_dpi \
|
||||
$(QUESTASIM_FLAGS) \
|
||||
-gblso $(RISCV)/lib/libfesvr.so -sv_lib $(library)/ariane_dpi \
|
||||
-do "coverage save -onexit tmp/$@.ucdb; run -a; quit -code [coverage attribute -name TESTSTATUS -concise]" \
|
||||
${top_level}_optimized +permissive-off ++$(riscv-test-dir)/$@ ++$(target-options) | tee tmp/riscv-asm-tests-$@.log
|
||||
|
||||
$(riscv-benchmarks): build $(library)/ariane_dpi.so
|
||||
vsim${questa_version} +permissive -64 -c -lib ${library} +max-cycles=$(max_cycles) +UVM_TESTNAME=${test_case} \
|
||||
+BASEDIR=$(riscv-benchmarks-dir) $(uvm-flags) "+UVM_VERBOSITY=LOW" -coverage -classdebug +jtag_rbb_enable=0 \
|
||||
-gblso tmp/riscv-fesvr/build/libfesvr.so -sv_lib $(library)/ariane_dpi \
|
||||
$(QUESTASIM_FLAGS) \
|
||||
-gblso $(RISCV)/lib/libfesvr.so -sv_lib $(library)/ariane_dpi \
|
||||
-do "coverage save -onexit tmp/$@.ucdb; run -a; quit -code [coverage attribute -name TESTSTATUS -concise]" \
|
||||
${top_level}_optimized +permissive-off ++$(riscv-benchmarks-dir)/$@ ++$(target-options) | tee tmp/riscv-benchmarks-$@.log
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ It has configurable size, separate TLBs, a hardware PTW and branch-prediction (b
|
|||
## Getting Started
|
||||
|
||||
|
||||
Go and get the [RISC-V tools](https://github.com/riscv/riscv-tools). Make sure that your `RISCV` environment variable points to your RISC-V installation.
|
||||
Go and get the [RISC-V tools](https://github.com/riscv/riscv-tools). Make sure that your `RISCV` environment variable points to your RISC-V installation (see the RISC-V tools and related projects for futher information).
|
||||
|
||||
Checkout the repository and initialize all submodules
|
||||
```
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <vpi_user.h>
|
||||
#include <svdpi.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
dtm_t* dtm;
|
||||
|
||||
|
@ -20,22 +22,48 @@ extern "C" int debug_tick
|
|||
int debug_resp_bits_data
|
||||
)
|
||||
{
|
||||
bool permissive_on = false;
|
||||
|
||||
if (!dtm) {
|
||||
s_vpi_vlog_info info;
|
||||
if (!vpi_get_vlog_info(&info))
|
||||
abort();
|
||||
|
||||
std::vector<std::string> htif_args;
|
||||
|
||||
// sanitize arguments
|
||||
for (int i = 0; i < info.argc; i++) {
|
||||
for (int i = 1; i < info.argc; i++) {
|
||||
if (strcmp(info.argv[i], "+permissive") == 0) {
|
||||
permissive_on = true;
|
||||
printf("Found permissive %s\n", info.argv[i]);
|
||||
}
|
||||
|
||||
// remove any two double pluses at the beginning (those are target arguments)
|
||||
if (info.argv[i][0] == '+' && info.argv[i][1] == '+' && strlen(info.argv[i]) > 3) {
|
||||
for (int j = 0; j < strlen(info.argv[i]) - 1; j++) {
|
||||
info.argv[i][j] = info.argv[i][j + 2];
|
||||
}
|
||||
}
|
||||
// printf("Argument %d: %s\n", i, info.argv[i]);
|
||||
|
||||
if (!permissive_on) {
|
||||
htif_args.push_back(info.argv[i]);
|
||||
}
|
||||
|
||||
if (strcmp(info.argv[i], "+permissive-off") == 0) {
|
||||
permissive_on = false;
|
||||
printf("Found permissive-off %s\n", info.argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
dtm = new dtm_t(info.argc, info.argv);
|
||||
// convert vector to argc and argv
|
||||
int argc = htif_args.size() + 1;
|
||||
char * argv[argc];
|
||||
argv[0] = (char *) "htif";
|
||||
for (unsigned int i = 0; i < htif_args.size(); i++) {
|
||||
argv[i+1] = (char *) htif_args[i].c_str();
|
||||
}
|
||||
|
||||
dtm = new dtm_t(argc, argv);
|
||||
}
|
||||
|
||||
dtm_t::resp resp_bits;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
add wave -noupdate -group core /ariane_tb/dut/i_ariane/*
|
||||
|
||||
add wave -noupdate -group frontend /ariane_tb/dut/i_ariane/i_frontend/*
|
||||
add wave -noupdate -group frontend -group icache /ariane_tb/dut/i_ariane/i_frontend/i_icache/*
|
||||
add wave -noupdate -group frontend -group icache /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_icache/*
|
||||
add wave -noupdate -group frontend -group ras /ariane_tb/dut/i_ariane/i_frontend/i_ras/*
|
||||
add wave -noupdate -group frontend -group btb /ariane_tb/dut/i_ariane/i_frontend/i_btb/*
|
||||
add wave -noupdate -group frontend -group bht /ariane_tb/dut/i_ariane/i_frontend/i_bht/*
|
||||
# add wave -noupdate -group frontend -group instr_scan /ariane_tb/dut/i_ariane/i_frontend/*i_instr_scan/*
|
||||
add wave -noupdate -group frontend -group instr_scan /ariane_tb/dut/i_ariane/i_frontend/*/i_instr_scan/*
|
||||
add wave -noupdate -group frontend -group fetch_fifo /ariane_tb/dut/i_ariane/i_frontend/i_fetch_fifo/*
|
||||
|
||||
add wave -noupdate -group id_stage -group decoder /ariane_tb/dut/i_ariane/id_stage_i/decoder_i/*
|
||||
|
@ -22,7 +22,6 @@ add wave -noupdate -group ex_stage -group alu /ariane_tb/dut/i_ariane/ex_stage_i
|
|||
add wave -noupdate -group ex_stage -group mult /ariane_tb/dut/i_ariane/ex_stage_i/i_mult/*
|
||||
add wave -noupdate -group ex_stage -group mult -group mul /ariane_tb/dut/i_ariane/ex_stage_i/i_mult/i_mul/*
|
||||
add wave -noupdate -group ex_stage -group mult -group div /ariane_tb/dut/i_ariane/ex_stage_i/i_mult/i_div/*
|
||||
add wave -noupdate -group ex_stage -group mult -group ff1 /ariane_tb/dut/i_ariane/ex_stage_i/i_mult/i_ff1/*
|
||||
|
||||
add wave -noupdate -group ex_stage -group lsu /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/*
|
||||
add wave -noupdate -group ex_stage -group lsu -group lsu_bypass /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/lsu_bypass_i/*
|
||||
|
@ -48,23 +47,23 @@ add wave -noupdate -group csr_file /ariane_tb/dut/i_ariane/csr_regfile_i/*
|
|||
|
||||
add wave -noupdate -group controller /ariane_tb/dut/i_ariane/controller_i/*
|
||||
|
||||
add wave -noupdate -group nbdcache /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/*
|
||||
add wave -noupdate -group nbdcache -group miss_handler /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_miss_handler/*
|
||||
add wave -noupdate -group nbdcache /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/*
|
||||
add wave -noupdate -group nbdcache -group miss_handler /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_miss_handler/*
|
||||
|
||||
add wave -noupdate -group nbdcache -group bypass_arbiter /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_miss_handler/i_bypass_arbiter/*
|
||||
add wave -noupdate -group nbdcache -group bypass_axi /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_miss_handler/i_bypass_axi_adapter/*
|
||||
add wave -noupdate -group nbdcache -group bypass_arbiter /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_miss_handler/i_bypass_arbiter/*
|
||||
add wave -noupdate -group nbdcache -group bypass_axi /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_miss_handler/i_bypass_axi_adapter/*
|
||||
|
||||
add wave -noupdate -group nbdcache -group miss_axi /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_miss_handler/i_miss_axi_adapter/*
|
||||
add wave -noupdate -group nbdcache -group lfsr /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_miss_handler/i_lfsr/*
|
||||
add wave -noupdate -group nbdcache -group miss_axi /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_miss_handler/i_miss_axi_adapter/*
|
||||
add wave -noupdate -group nbdcache -group lfsr /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_miss_handler/i_lfsr/*
|
||||
|
||||
add wave -noupdate -group nbdcache -group dirty_ram /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/dirty_sram/*
|
||||
add wave -noupdate -group nbdcache -group tag_cmp /ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/i_tag_cmp/*
|
||||
add wave -noupdate -group nbdcache -group dirty_ram /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/valid_dirty_sram/*
|
||||
add wave -noupdate -group nbdcache -group tag_cmp /ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/i_tag_cmp/*
|
||||
|
||||
add wave -noupdate -group nbdcache -group ptw {/ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/master_ports[0]/i_cache_ctrl/*}
|
||||
add wave -noupdate -group nbdcache -group load {/ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/master_ports[1]/i_cache_ctrl/*}
|
||||
add wave -noupdate -group nbdcache -group store {/ariane_tb/dut/i_ariane/ex_stage_i/lsu_i/i_nbdcache/master_ports[2]/i_cache_ctrl/*}
|
||||
add wave -noupdate -group nbdcache -group ptw {/ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/master_ports[0]/i_cache_ctrl/*}
|
||||
add wave -noupdate -group nbdcache -group load {/ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/master_ports[1]/i_cache_ctrl/*}
|
||||
add wave -noupdate -group nbdcache -group store {/ariane_tb/dut/i_ariane/i_std_cache_subsystem/i_nbdcache/master_ports[2]/i_cache_ctrl/*}
|
||||
|
||||
add wave -noupdate -group perf_counters {/ariane_tb/dut/i_ariane/i_perf_counters/*}
|
||||
add wave -noupdate -group perf_counters /ariane_tb/dut/i_ariane/i_perf_counters/*
|
||||
|
||||
add wave -noupdate -group dm_top /ariane_tb/dut/i_dm_top/*
|
||||
add wave -noupdate -group dm_top -group dm_csrs /ariane_tb/dut/i_dm_top/i_dm_csrs/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue