-
Notifications
You must be signed in to change notification settings - Fork 632
Fix DSim support #2297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DSim support #2297
Conversation
Update code from upstream repository https://github.com/chipsalliance/riscv-dv to revision 71666ebacd69266b1abb7cdbad5e1897ce5884e6 Signed-off-by: Akash Levy <[email protected]>
Also, I'll share my DSim setup in case you want to try it out. I'm not using DSim Desktop, I'm using the CLI binaries. You need both Here's my DSim base
And here's my ibex
|
Tagging @hcallahan-lowrisc for review |
This is great, thanks! |
ibex_mem_intf_agent_pkg -> ibex_mem_intf_pkg Use ibex enum values instead of integers Add #0 for dsim to start simulation
Done! 0314b58 has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @akashlevy! It's great to see DSim functional again, and very much appreciated.
Woo-hoo! |
Continued from #2286:
This PR fixes up Ibex UVM support for DSim simulator. Several things had to be fixed:
ZERO
enum constant instead of'0
and0
for instr enums: dv/uvm/core_ibex/riscv_dv_extension/ibex_directed_instr_lib.svCPUCTRLSTS
,SECURESEED
) toprivileged_reg_t
and replace enum constants intoimplemented_csr[]
: vendor/google_riscv-dv/src/riscv_instr_pkg.sv, vendor/google_riscv-dv/euvm/riscv/gen/riscv_instr_pkg.d, dv/uvm/core_ibex/riscv_dv_extension/riscv_core_setting.tpl.svibex_mem_intf_agent_pkg::ADDR_WIDTH
andibex_mem_intf_agent_pkg::DATA_WIDTH
withibex_mem_intf_pkg::ADDR_WIDTH
andibex_mem_intf_pkg::DATA_WIDTH
: dv/uvm/core_ibex/tests/core_ibex_base_test.sv, dv/uvm/core_ibex/tests/core_ibex_test_lib.sv, dv/uvm/core_ibex/tests/core_ibex_vseq.sv#0
to allow clock to properly start in dv/uvm/core_ibex/tb/core_ibex_tb_top.svreloc_word
in dv/uvm/core_ibex/scripts/run_instr_gen.pydsim_compile_opts
withdsim_opts
and apply correct defparams and +defines in util/ibex_config.pyWith these fixes, I was able to get most of the UVM tests running with
SIMULATOR=dsim ITERATIONS=1
:Future enhancements:
METADATA-DIR
make variable issue