Skip to content

Commit

Permalink
Merge pull request #2393 from MikeOpenHWGroup/cv32e40p/dev_fixvcs
Browse files Browse the repository at this point in the history
Incorporate UNSUPPORTED_WITH kludge for VCS
  • Loading branch information
MikeOpenHWGroup authored Mar 25, 2024
2 parents cf56f21 + c2901e3 commit cb2cc35
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ VRMDATA
*whetstone*
*.do
*eembc*
*.code-workspace
13 changes: 13 additions & 0 deletions cv32e40p/env/uvme/cov/uvme_cv32e40p_cov_model_macros.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2024 OpenHW Group
// SPDX-License-Identifier: Apache-2.0 WITH SHL-210
`ifndef __UVMA_CV32E40P_COV_MODEL_MACROS_SV__
`define __UVMA_CV32E40P_COV_MODEL_MACROS_SV__

// Macro to remove instrucitons that are not supported based on standard ext_*_supported variable names (from commmon core control cfg class)
`ifdef UNSUPPORTED_WITH
`define WITH iff
`else
`define WITH with
`endif

`endif // __UVMA_CV32E40P_COV_MODEL_MACROS_SV__
6 changes: 5 additions & 1 deletion cv32e40p/env/uvme/cov/uvme_cv32e40p_fp_instr_covg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class uvme_cv32e40p_fp_instr_covg extends uvm_component;
extern task run_phase(uvm_phase phase);
extern task sample_clk_i();

`include "uvme_cv32e40p_cov_model_macros.sv"

`define FPU_MULTICYCLE_WINDOW_ILLEGAL_CASES \
illegal_bins clk_2_19_group_NON_DIVSQRT = ( (!binsof(cp_curr_fpu_apu_op) intersect {APU_OP_FDIV, APU_OP_FSQRT}) && (!binsof(cp_f_multicycle_clk_window) intersect {1}) ) \
with ( (cp_f_multicycle_clk_window != 0) & (fpu_latency == 0) ); \
Expand Down Expand Up @@ -391,7 +393,9 @@ class uvme_cv32e40p_fp_instr_covg extends uvm_component;
(`COVIF_CB.apu_gnt == 1) &&
(`COVIF_CB.apu_rvalid_i == 1) ) {

bins rd[] = {[0:31]} with (fpu_latency == 0);
// FIXME: this is a kludge for a known VCS issue
//bins rd[] = {[0:31]} with (fpu_latency == 0);
bins rd[] = {[0:31]} `WITH (fpu_latency == 0);
}

// from bhv_logic_3
Expand Down
7 changes: 7 additions & 0 deletions lib/uvm_agents/uvma_isacov/uvma_isacov_macros.sv
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
`ifndef __UVMA_ISACOV_MACROS_SV__
`define __UVMA_ISACOV_MACROS_SV__

// Macro to remove instrucitons that are not supported based on standard ext_*_supported variable names (from commmon core control cfg class)
`ifdef UNSUPPORTED_WITH
`define WITH iff
`else
`define WITH with
`endif

// Macro to remove instrucitons that are not supported based on standard ext_*_supported variable names (from commmon core control cfg class)
`define ISACOV_IGN_BINS \
ignore_bins IGN_UNKNOWN = {UNKNOWN}; \
Expand Down
3 changes: 3 additions & 0 deletions mk/uvmt/vcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ endif

VCS_FILE_LIST ?= -f $(DV_UVMT_PATH)/uvmt_$(CV_CORE_LC).flist

# FIXME: this is a kludge to work-around a known VCS bug
VCS_USER_COMPILE_ARGS += +define+UNSUPPORTED_WITH

ifeq ($(call IS_YES,$(ENABLE_TRACE_LOG)),YES)
VCS_USER_COMPILE_ARGS += +define+$(CV_CORE_UC)_TRACE_EXECUTION
VCS_USER_COMPILE_ARGS += +define+$(CV_CORE_UC)_RVFI_TRACE_EXECUTION
Expand Down

0 comments on commit cb2cc35

Please sign in to comment.