Skip to content

Commit

Permalink
synthesis: allow blackboxing macros
Browse files Browse the repository at this point in the history
If a macro is specified in ADDITIONAL_LEFS/LIBS and it is also present
in the Verilog files, use MACROS to list those macros so as to have the
module be marked as blackbox.

A Verilog file can contain more than one module, so it isn't always
convenient to exclude a .v/sv file to have a module marked as
black box.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
  • Loading branch information
oharboe committed Jun 10, 2024
1 parent a078960 commit 095fb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ configuration file.
| `CDL_FILES` | Insert additional Circuit Description Language (`.cdl`) netlist files. |
| `DFF_LIB_FILES` | Technology mapping liberty files for flip-flops. |
| `DONT_USE_LIBS` | Set liberty files as `dont_use`. |
| `MACROS` | Marked as black box during synthesis, defaults to `BLOCKS` |
| `PRESERVE_CELLS` | Mark modules to keep from getting removed in flattening. |
| `SYNTH_ARGS` | Optional synthesis variables for yosys. |
| `VERILOG_TOP_PARAMS` | Apply toplevel params (if exist). |
Expand Down
4 changes: 2 additions & 2 deletions flow/scripts/synth_preamble.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ if {[info exist ::env(PRESERVE_CELLS)]} {



if {[info exist ::env(BLOCKS)]} {
if {[info exist ::env(MACROS)]} {
hierarchy -check -top $::env(DESIGN_NAME)
foreach block $::env(BLOCKS) {
foreach block $::env(MACROS) {
blackbox $block
puts "blackboxing $block"
}
Expand Down

0 comments on commit 095fb12

Please sign in to comment.