Skip to content

ghdl: pass EXTRA_OPTIONS to ghdl -r and fix verilog mode dependency - #587

Open
anirudh12032008 wants to merge 1 commit into
olofk:mainfrom
anirudh12032008:flow-ghdl-generics
Open

anirudh12032008 wants to merge 1 commit into
olofk:mainfrom
anirudh12032008:flow-ghdl-generics

Conversation

@anirudh12032008

Copy link
Copy Markdown

Fixes #586.

Two small fixes in the flow API Ghdl tool.

  • Ghdl.run() passes generics (and the deprecated vlogparams) as make run EXTRA_OPTIONS=-gNAME=value, but the run recipe never expanded $(EXTRA_OPTIONS), so they never reached ghdl -r. The recipe now ends with $(EXTRA_OPTIONS), same as the icarus and vcs tools and the legacy ghdl Makefile.
  • With mode: verilog the run target depended on work-obj<std>.cf, which no rule creates, so make run failed. It now depends on <lib>/<lib>-obj<std>.cf, the same file the sim branch uses.

Tests: the existing tests/test_tool_ghdl.py cases compare the generated Makefile against tests/tools/ghdl/*/Makefile; the four reference files are updated (one line each). No new test files.

Checked:

  • Full suite (excluding test_reporting.py, which needs pandas): 205 passed; the 3 failures (test_ghdl_04, two test_icarus) also fail on current main.
  • I did not have ghdl installed, so nothing was run against a real ghdl. Instead I ran the generated Makefiles with a stub ghdl script on PATH: make run EXTRA_OPTIONS=" -gWIDTH=8" now invokes ghdl -r ... top -gWIDTH=8 (before: no -g argument), and the verilog-mode Makefile runs ghdl --synth --out=verilog ... (before: "No rule to make target work-obj08.cf").

The flow API Ghdl tool passes generics to make as EXTRA_OPTIONS, but the run recipe never expanded it, so generics were silently dropped. Also, in verilog mode the run target depended on work-obj<std>.cf, which nothing creates; depend on the library .cf as the sim branch does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flow API ghdl: generics are dropped, and mode=verilog make run fails

1 participant