Skip to content

Commit f9d414a

Browse files
committed
synth: Pipe VERILOG_DEFINES
Signed-off-by: Martin Povišer <[email protected]>
1 parent b95d6c7 commit f9d414a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

flow/designs/asap7/cva6/config.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#
2-
# TODO before enablement: pipe VERILOG_DEFINES through to yosys
3-
#
4-
51
export PLATFORM = asap7
62

73
export DESIGN_NAME = cva6

flow/scripts/synth_preamble.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ if {[env_var_exists_and_non_empty RTLIL_FILE]} {
5252
# Workaround for yosys-slang#119
5353
setattr -unset init
5454
} else {
55+
verilog_defaults -push
56+
verilog_defaults -add {*}$::env(VERILOG_DEFINES)
5557
foreach file $::env(VERILOG_FILES) {
5658
read_verilog -defer -sv {*}$vIdirsArgs $file
5759
}
60+
verilog_defaults -pop
5861
}
5962

6063
# Read platform specific mapfile for OPENROAD_CLKGATE cells

flow/scripts/variables.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,13 @@ VERILOG_FILES:
575575
The path to the design Verilog files providing a description of modules.
576576
stages:
577577
- synth
578+
VERILOG_DEFINES:
579+
description: >
580+
Preprocessor defines passed to the language frontend.
581+
Example: `-D HPDCACHE_ASSERT_OFF`
582+
default: ""
583+
stages:
584+
- synth
578585
SDC_FILE:
579586
required: true
580587
description: |

0 commit comments

Comments
 (0)