diff --git a/hw/cdc/tools/dvsim/meridiancdc.hjson b/hw/cdc/tools/dvsim/meridiancdc.hjson index 3504516091cfb..015669731fa7a 100644 --- a/hw/cdc/tools/dvsim/meridiancdc.hjson +++ b/hw/cdc/tools/dvsim/meridiancdc.hjson @@ -8,6 +8,7 @@ { FOUNDRY_CONSTRAINT: "{foundry_sdc_file}" } { CDC_WAIVER_FILE: "{cdc_waiver_file}" } { ENV_FILE: "{cdc_env_file}" } + { USER_CONFIG_FILE: "{cdc_config_file}" } ] // Tool invocation diff --git a/hw/cdc/tools/meridiancdc/run-cdc.tcl b/hw/cdc/tools/meridiancdc/run-cdc.tcl index c0832c1638053..d1daf96895ba9 100644 --- a/hw/cdc/tools/meridiancdc/run-cdc.tcl +++ b/hw/cdc/tools/meridiancdc/run-cdc.tcl @@ -24,6 +24,7 @@ set PARAMS [get_env_var "PARAMS"] set CDC_WAIVER_FILE [get_env_var "CDC_WAIVER_FILE"] set CDC_WAIVER_DIR [file dirname $CDC_WAIVER_FILE] set ENV_FILE [get_env_var "ENV_FILE"] +set USER_CONFIG_FILE [get_env_var "USER_CONFIG_FILE"] # Used to disable some SDC constructs that are not needed by CDC. set IS_CDC_RUN 1 @@ -87,6 +88,9 @@ read_env $ENV_FILE # Analyze the intents of the design. analyze_intent +# Run design-specific configuration commands. +source $USER_CONFIG_FILE + # Create directory for reports (if it doesn't exist already). set REPORT_DIR reports file mkdir $REPORT_DIR diff --git a/hw/top_earlgrey/cdc/chip_earlgrey_asic_cdc_cfg.hjson b/hw/top_earlgrey/cdc/chip_earlgrey_asic_cdc_cfg.hjson index 4c994c4e0441b..4ee03d1f6683a 100644 --- a/hw/top_earlgrey/cdc/chip_earlgrey_asic_cdc_cfg.hjson +++ b/hw/top_earlgrey/cdc/chip_earlgrey_asic_cdc_cfg.hjson @@ -33,6 +33,9 @@ // CDC customized env file cdc_env_file: "{proj_root}/hw/top_earlgrey/cdc/user_intent.env" + // CDC customized configuration file (to be sourced after customized env) + cdc_config_file: "{proj_root}/hw/top_earlgrey/cdc/user_configuration.tcl" + // Technology path for this module (empty for open-source runs) foundry_root: "" diff --git a/hw/top_earlgrey/cdc/user_configuration.tcl b/hw/top_earlgrey/cdc/user_configuration.tcl new file mode 100644 index 0000000000000..2b8c8c788ba24 --- /dev/null +++ b/hw/top_earlgrey/cdc/user_configuration.tcl @@ -0,0 +1,5 @@ +# Copyright lowRISC contributors (OpenTitan project). +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# MeridianCDC user configuration file for Earlgrey