Skip to content

Support LLVM JIT.#1164

Open
LarsAsplund wants to merge 1 commit intomasterfrom
fix-1105
Open

Support LLVM JIT.#1164
LarsAsplund wants to merge 1 commit intomasterfrom
fix-1105

Conversation

@LarsAsplund
Copy link
Collaborator

No description provided.

@creiter64
Copy link

The original error is gone, but now I get the following lines:

C:\msys64\ucrt64\bin\ghdl.exe:error: unknown command option '-o'
C:\msys64\ucrt64\bin\ghdl.exe:error: if the option is a simulation option, place it after toplevel unit

I'm testing with ghdl/ghdl@bababe6 installed via GHDL - v6.0.0-dev - MSYS2/UCRT64 - LLVM-JIT backend

@LarsAsplund
Copy link
Collaborator Author

LarsAsplund commented Feb 17, 2026

@creiter64 Have another try! Are you using the coverage feature?

@creiter64
Copy link

I tried again, from the debug output I got the following (redacted):

C:\msys64\ucrt64\bin\ghdl --elab-run --std=08 --work=tb
--workdir=C:\<snip>\sim-vunit\vunit_out\ghdl\libraries\tb
-PC:\<snip>\sim-vunit\vunit_out\ghdl\libraries\vunit_lib
-PC:\<snip>\sim-vunit\vunit_out\ghdl\libraries\evk
-PC:\<snip>\sim-vunit\vunit_out\ghdl\libraries\vunit_test_runner_lib
-PC:\<snip>\sim-vunit\vunit_out\ghdl\libraries\tb
-o C:\<snip>\sim-vunit\vunit_out\test_output\cb4bd712ab6af2784bff0830ba5bca8a6adfc752\ghdl\ebv_frame_dropper_tb-sim ebv_frame_dropper_tb
sim
--max-stack-alloc=512
--ieee-asserts=disable
-gdrop_pattern=drop_all
-ginput_file=C:/<snip>/testbench/test_data/frame_at_once_in.ebv
-greference_file=C:/<snip>/testbench/test_data/frame_at_once_drop_all_ref.ebv
-grunner_cfg=active python runner : true,
             enabled_test_cases : drop_test,
			 output path : C::/<snip>/build/evk__ebv-frame-dropper_0.0.1/sim-vunit/vunit_out/test_output/71d1d62c082b797a97e253099bdeea9bfcdb85aa/,
			 seed : 0d9a2cd9fe313761,
			 tb path : C::/<snip>/build/evk__ebv-frame-dropper_0.0.1/sim-vunit/src/evk__ebv-frame-dropper_0.0.1/testbench/,
			 use_color : true --assert-level=error -gdrop_pattern=drop_first

So the -o option is used, but it seems GHDL LLVM-JIT doesn't like it.

I guess it comes from this this line

I think the LLVM-JIT backend simply doesn't have that option, since it doesn't link anything. See:

$ ghdl help elab-run
elab-run [OPTS] UNIT [ARCH] [RUNOPTS]
  Elaborate and run design UNIT
  aliases: --elab-run, -r, run
Main options (try --options-help for details):
 --std=XX
   Use XX as VHDL standard (87,93c,93,00,02 or 08)
 --work=NAME
   Set the name of the WORK library
 -PDIR
   Add DIR in the library search path
 --workdir=DIR
   Specify the directory of the WORK library
 -fsynopsys
   Allow to use synopsys packages in ieee library
 -frelaxed
   Relax semantic rules
 -fexplicit
   Gives priority to explicit operator redefinitions
 --debug        Run with debugger
 --expect-failure  Expect analysis/elaboration failure
 --time-resolution=UNIT   Set the resolution of type time
            UNIT can be fs, ps, ns, us, ms, sec or auto

$ ghdl help-options
Main options:
  --work=LIB         use LIB as work library
  --workdir=DIR      use DIR for the file library
  -PPATH             add PATH in the library path list
  --std=87/93/00/02/08  select vhdl 87/93/00/02/08 standard
  --std=93c          select vhdl 93 standard and allow 87 syntax
  --[no-]vital-checks  do [not] check VITAL restrictions
  -Wx or --warn-x    enable a warning (see help-warnings
  -Wall              enables all warnings.
  -Werror            turns warnings into errors
Extensions:
  -fexplicit         give priority to explicitly declared operator
  -frelaxed-rules    relax some LRM rules
  -C  --mb-comments  allow multi-bytes chars in a comment
  --bootstrap        allow --work=std
  --syn-binding      use synthesis default binding rule
  -fpsl              parse psl in comments
Compilation list:
  -l[sca]            after semantics, canon or annotation
  --lall             -lX options apply to all files
  -lv                verbose list
  -v                 disp compilation stages
Compilation dump:
  -d[psa]            dump tree after parse, semantics or annotate
  --dall             -dX options apply to all files
  --dump-drivers     dump processes drivers

@creiter64
Copy link

return self._backend in ("llvm", "gcc")
this might be the culprit.

@LarsAsplund
Copy link
Collaborator Author

Did you try my latest update?

@LarsAsplund
Copy link
Collaborator Author

Sorry, never pushed it... Now it should be fixed

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.

2 participants