Skip to content

Conversation

MikeOpenHWGroup
Copy link
Member

DSim was not used for CV32E40P v2 and so there was some bit-rot within both the scriptware and testbench. Also, there is a known bug with DSim which means it cannot handle macros with concatenated parameters. This PR include a kludge to comment-out the offending code.

@MikeOpenHWGroup MikeOpenHWGroup added DO NOT MERGE Common Infrastructure Library components or scriptware common to all environments in CORE-V-VERIF labels Mar 31, 2025
Copy link
Contributor

@cairo-caplan cairo-caplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see many references to cv32e40p_tb_wrapper that probably need to be changed to cv32e40p_core_tb_wrapper. I listed them below:

cv32e40p/sim/tools/dsim/ccov_scopes.txt
cv32e40p/sim/tools/vcs/vcs.tcl
cv32e40p/tb/core/cv32e40p_core_tb_wrapper.sv
cv32e40p/tb/uvmt/uvmt_cv32e40p_dut_wrap.sv
cv32e40p/tb/uvmt/uvmt_cv32e40p_imperas_dv_wrap.sv
cv32e40p/tb/uvmt/uvmt_cv32e40p_macros.sv
cv32e40p/tb/uvmt/uvmt_cv32e40p_step_compare.sv
cv32e40p/tb/uvmt/uvmt_cv32e40p_tb.sv

In any case, I can confirm that the basic hello world core and UVM tests can run on DSIM locally for me.

bit select_fp_instr, include_fpc, rand_status;

rand_status = std::randomize(select_fp_instr) with {select_fp_instr dist {0:=1, 1:=1};};
assert(rand_status) else begin `uvm_error(_header, $sformatf("assertion error")); end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if the removal of the else ... assertion error is just because they are not informative, or they actually had a purpose before? :)

// SPDX-License-Identifier: Apache-2.0 WITH SHL-0.51

module cv32e40p_tb_wrapper
module cv32e40p_core_tb_wrapper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 13 also needs to be changed from cv32e40p_tb_wrapper to cv32e40p_core_tb_wrapper, and cv32e40p_wrapper module to cv32e40p_core module

task uvme_cv32e40p_reduced_rand_debug_req_c::rand_delay();
if (!std::randomize(dly) with {dly inside {[2500:10000]};}) begin
`uvm_fatal("RAND_DEBUG_RAND_DELAY", "Randomization dly Failed")
if (! std::randomize(dly) with { dly inside {[1:10000]}; } ) begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this delay was not randomized from 1 since before? I don't think it is relevant to the PR, I am just curious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Common Infrastructure Library components or scriptware common to all environments in CORE-V-VERIF DO NOT MERGE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants