opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[dv, cip] Compiler error due to mem_model

Open tunghoang290780 opened this issue 6 years ago • 7 comments

@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);

tunghoang290780 avatar Jun 23 '20 07:06 tunghoang290780

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?

rswarbrick avatar Jun 23 '20 10:06 rswarbrick

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.

imphil avatar Jun 23 '20 15:06 imphil

Can we prevent vendoring in common verification components that already exist in OT when vendoring in Ibex?

sriyerg avatar Jun 23 '20 15:06 sriyerg

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.

rswarbrick avatar Jun 23 '20 15:06 rswarbrick

@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 avatar Jun 23 '20 15:06 tunghoang290780

@tunghoang290780 thanks, I can reproduce the problem and will have a look now.

imphil avatar Jun 23 '20 16:06 imphil

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.

imphil avatar Jun 23 '20 16:06 imphil