Skip to content
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

[dvsim,questa] DRAFT questa fixes #24331

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hcallahan-lowrisc
Copy link
Contributor

@hcallahan-lowrisc hcallahan-lowrisc commented Aug 15, 2024

DO NOT MERGE

TODO: Update author attribution
-> Authored-by: lmg260a <add-email-here>

Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
@hcallahan-lowrisc hcallahan-lowrisc added Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Tool:dvsim Pertains to the dvsim and testplan tools labels Aug 15, 2024
@hcallahan-lowrisc hcallahan-lowrisc self-assigned this Aug 15, 2024
@lmg260a
Copy link

lmg260a commented Aug 21, 2024

New topic: line 213 of hw/ip/entropy_src/rtl/entropy_src.sv has:

stub_hw2reg.debug_status.main_sm_state.d = 8'b01110110;

stub_hw2reg is defined on line 89 of the same file:

entropy_src_hw2reg_t stub_hw2reg;

entropy_src_hw2reg_t is defined in entropy_src_reg_pkg.sv, lines 743-786

  typedef struct packed {
     ....
     entropy_src_hw2reg_debug_status_reg_t debug_status; // [80:70]
    ... } entropy_src_hw2reg_t;

entropy_src_hw2reg_debug_status_reg_t is defined in entropy_src_reg_pkg.sv, lines 555:580

  typedef struct packed {
    ...
      struct packed {
      logic        d;
    } main_sm_idle;
  } entropy_src_hw2reg_debug_status_reg_t;

So in debug_status, I see a "main_sm_idle" but not main_sm_state.
I compared the generated to original and the files are identical.
There's no obvious `defines that would affect this (to me). So I suspect there's some higher-level configuration that I've got wrong. Can you possibly help?

My build command is:
util/dvsim/dvsim.py hw/top_earlgrey/dv/chip_sim_cfg.hjson -i chip_sw_uart_tx_rx
I have to generate VCS, then port to questa, because

util/dvsim/dvsim.py hw/top_earlgrey/dv/chip_sim_cfg.hjson \
		-i chip_sw_uart_tx_rx \
		-n \
		--tool questa 

won't run.

@lmg260a
Copy link

lmg260a commented Aug 22, 2024

For questa simulation, using these defines:
+define+TOP_LEVEL_DV
+define+UVM
+define+UVM_NO_DEPRECATED
+define+UVM_REGEX_NO_DPI
+define+UVM_REG_ADDR_WIDTH=32
+define+UVM_REG_DATA_WIDTH=64
+define+UVM_REG_BYTENABLE_WIDTH=8
+define+SIMULATION
+define+DUT_HIER=tb.dut
Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Tool:dvsim Pertains to the dvsim and testplan tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants