[dv, cip] Compiler error due to mem_model
@sriyerg @cindy @rasmus-madsen @senelson7
I have the following compiling error which might involve mem_model used in cip_base_scoreboard. I run dv in the upstream repo with various IPs (i.e. i2c, uart etc.). All runs are facing the same error (there is also a warning in cip_base_scoreboard)
xmvlog: *E,TOOMAC (../src/lowrisc_dv_cip_lib_0/cip_base_scoreboard.sv,74|70): too many actual arguments [10.2.2][10.3(IEEE)].
exp_mem.compare(addr, item.d_data, item.a_mask);
|
xmvlog: *W,FUNTSK (../src/lowrisc_dv_cip_lib_0/cip_base_scoreboard.sv,80|20): function called as a task without void'().
exp_mem.compare(addr, item.d_data, item.a_mask);
I think that the problem is that we now have two classes called mem_model (one is vendored in from Ibex). It seems that your simulation is picking up the wrong one.
@imphil: I guess this isn't supposed to happen. Is there a way that we can poke fusesoc in a way that makes sure we get the right file?
What command do you run to get this error message? Yes, there's a second mem_model in hw/vendor/lowrisc_ibex/dv/uvm/icache, but this shouldn't be picked up.
Can we prevent vendoring in common verification components that already exist in OT when vendoring in Ibex?
We sort of do that already. The problem here is that we manually copied (I assume?) the mem_model.sv code from OT, rather than vendoring it properly.
@imphil
My running command
/wdc/proj/cto/top/work/hoang.tung/upstream_ot/util/dvsim/dvsim.py /wdc/proj/cto/top/work/hoang.tung/upstream_ot/hw/ip/uart/dv/uart_sim_cfg.hjson -i uart_sanity --reseed 1 --dump vpd --waves --verbosity l --verbose -t vcs --xprop-off --job-prefix "nc run -C ncsim_interactive -Il" -mp 1
@tunghoang290780 thanks, I can reproduce the problem and will have a look now.
https://github.com/lowRISC/opentitan/pull/2590 proposes one possible solution to this which buys us some time to find a more fine-grained approach, without playing whack-a-mole on every Ibex update.