fusesoc icon indicating copy to clipboard operation
fusesoc copied to clipboard

Sending an argument value to modelsim backend does not work as expected

Open hackathlete opened this issue 2 years ago • 1 comments

Hello,

There is a generic value in my VHLD design that I want to set by sending an argument value to the backend each time I run the simulation (each time another value).

In the .core file the parameter is defined as follows:

parameters:
  G_SEED:
    datatype    : int
    paramtype   : generic

Then I run fusesoc with the command: fusesoc run --run --target=sim --tool=ghdl fusesoc:argument_test:seed_generic:0.0 --G_SEED=$RANDOM fusesoc run --run --target=sim --tool=modelsim fusesoc:argument_test:seed_generic:0.0 --G_SEED=$RANDOM

The expected behaviour is that each time I simulate the design another random value is passed to the simulator.

With ghdl this works as expected.

However, with modelsim the argument value is not sent to the simulator each time but the first time only. I had a quick look at the makefile for modelsim and it seems, that the argument value from the first invocation is written into the makefile. Instead the argument value from each invocation should be taken.

Attached the files of a short example: seed_generic.zip

hackathlete avatar Apr 01 '22 09:04 hackathlete

Thanks for reporting. I think I fixed it with https://github.com/olofk/edalize/tree/modelsim_runtime_args Would be great if you could give that a try

olofk avatar Apr 01 '22 12:04 olofk

@hackathlete Did you get a chance to test the above fix?

olofk avatar Dec 18 '22 01:12 olofk

Please reopen if the problem remains

olofk avatar Jan 19 '23 20:01 olofk