Skip to content

Commit

Permalink
[cdc,top_earlgrey] Add user configuration file
Browse files Browse the repository at this point in the history
This file allows to configure the CDC tool after constraints have been
evaluated and additional user intents specified.  The file is currently
empty; it will be populated in later PRs.

Signed-off-by: Andreas Kurth <[email protected]>
  • Loading branch information
andreaskurth committed Nov 4, 2024
1 parent 10ac910 commit 43f206b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/cdc/tools/dvsim/meridiancdc.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions hw/cdc/tools/meridiancdc/run-cdc.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions hw/top_earlgrey/cdc/chip_earlgrey_asic_cdc_cfg.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

Expand Down
5 changes: 5 additions & 0 deletions hw/top_earlgrey/cdc/user_configuration.tcl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 43f206b

Please sign in to comment.