Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- `bender clone`: primary flag for the checkout directory is now `--working-dir`, matching `bender snapshot`'s flag for the same concept; `-p`/`--path` are kept as hidden aliases for backwards compatibility.

### Fixed
- script: stop emitting `-define` flags on VHDL compile commands in the `synopsys`, `formality` and `genus` templates (`--compilation-mode separate` only). VHDL has no preprocessor, and some tools error out on the extra option (https://github.com/pulp-platform/bender/issues/350).
- script: apply `override_files` before validation and the slang pass, so overriding files replace their targets in file-existence checks and in `--top`/`--trim-incdirs` reduction (previously slang saw both the original and the override as duplicate modules); the overridden-file annotation is preserved.

## 0.32.1 - 2026-07-07
Expand Down
4 changes: 2 additions & 2 deletions src/script_fmt/formality_tcl.tera
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ set search_path $search_path_initial
{% for incdir in group.incdirs %}lappend search_path "$ROOT{{ incdir | replace(from=root, to='') }}"
{% endfor %}
{% if abort_on_error %}if {[catch { {% endif %}{% if group.file_type == 'verilog' %}read_sverilog{% elif group.file_type == 'vhdl' %}read_vhdl{% endif %} -r \
{% for define in group.defines %}{% if loop.first %}-define { \
{# VHDL has no preprocessor: never pass defines to read_vhdl #}{% if group.file_type == 'verilog' %}{% for define in group.defines %}{% if loop.first %}-define { \
{% endif %}{{ define.0 }}{% if define.1 %}={{ define.1 }}{% endif %}{% if loop.last %} \
} \
{% else %} \
{% endif %}{% endfor %}[list \
{% endif %}{% endfor %}{% endif %}[list \
{% for file in group.files %}{% if source_annotations %}{% if file.comment %}{{ ' ' }}# {{ file.comment }}
{% endif %}{% endif %}{{ ' ' }}"{{ file.file | replace(from=root, to='$ROOT') }}" \
{% endfor %}]
Expand Down
4 changes: 2 additions & 2 deletions src/script_fmt/genus_tcl.tera
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ set search_path $search_path_initial

{% if group.file_type == 'verilog' %}read_hdl -language sv \
{% elif group.file_type == 'vhdl' %}read_hdl -language vhdl \
{% endif %}{% for define in group.defines %}{% if loop.first %}-define { \
{% endif %}{# VHDL has no preprocessor: never pass defines to a VHDL read_hdl #}{% if group.file_type == 'verilog' %}{% for define in group.defines %}{% if loop.first %}-define { \
{% endif %}{{ define.0 }}{% if define.1 %}={{ define.1 }}{% endif %}{% if loop.last %} \
} \
{% else %} \
{% endif %}{% endfor %}[list \
{% endif %}{% endfor %}{% endif %}[list \
{% for file in group.files %}{% if source_annotations %}{% if file.comment %}{{ ' ' }}# {{ file.comment }}
{% endif %}{% endif %}{{ ' ' }}"{{ file.file | replace(from=root, to='$ROOT') }}" \
{% endfor %}]
Expand Down
4 changes: 3 additions & 1 deletion src/script_fmt/synopsys_tcl.tera
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ analyze -format {% if group.file_type == 'verilog' %}sv{% elif group.file_type =
{%- for tmp_arg in vhdl_args %}{{ tmp_arg }} \
{% endfor -%}
{%- endif -%}
{# VHDL has no preprocessor: never pass defines to a VHDL analyze -#}
{%- if group.file_type == 'verilog' -%}
{%- for define in group.defines -%}
{%- if loop.first %}-define { \
{% endif %}{{ define.0 }}{% if define.1 %}={{ define.1 }}{% endif %}{% if loop.last %} \
} \
{% else %} \
{% endif %}{% endfor %}[list \
{% endif %}{% endfor %}{% else %} {% endif %}[list \
{% for file in group.files -%}
{%- if source_annotations %}{% if file.comment %}{{ ' ' }}# {{ file.comment }}
{% endif %}{% endif %}{{ ' ' }}"{{ file.file | replace(from=root, to='$ROOT') }}" \
Expand Down
Loading