vunit icon indicating copy to clipboard operation
vunit copied to clipboard

--export-json without preprocessed path

Open timrid opened this issue 5 years ago • 7 comments

I noticed a problem with the tool vunit-test-explorer (https://github.com/Bochlin/vunit-test-explorer/issues/17). Here you can jump from the GUI to the source code of the test case with one click, which is very comfortable.

But I use the option vu.enable_location_preprocessing() in my run.py which runs a preprocessor over the VHDL code and copys the files to vunit_out/preprocessed/.... When I now click on the "Show source" icon, the program always jumps to the preprocessed files in the folder vunit_out/preprocessed/.... If you make changes to these files, they will be overwritten on the next test execution...

The tool vunit-test-explorer internally uses the --export-json option of vunit, to collect all test cases and the files. And the --export-json option always prints the path to the preprocessed files.

So is it possible that the --export-json option additionally prints the path to the original files?

timrid avatar Sep 14 '20 13:09 timrid

IIRC, the --export-json was added mainly for Sigasi (#347). I assume it is used in that context for running simulation/synthesis tools, rather than providing access to the sources. Otherwise, some other user might have noticed the same issue with enable_location_preprocessing.

As seen in https://github.com/VUnit/vunit/blob/8bd4064e757926b77c91de2aea68d9e26f9918ee/vunit/ui/init.py#L839-L894, get_compile_order is used for retrieving the sources.

I agree that it would be useful to provide both (the "real" sources and the processed sources), either together or as mutually exclusive lists.

/cc @davidmedinasigasi @lievenlemiengre

eine avatar Sep 14 '20 17:09 eine

@timrid Preprocessing is a bit of a pain, it often backfires. With VHDL-2019 it will be possible to get the location without preprocessing. I did some successful tests with the latest Riviera-PRO the other week and plan to integrate that into VUnit shortly. What simulator are you using?

LarsAsplund avatar Sep 15 '20 17:09 LarsAsplund

I work with "Active-HDL Lattice Edition 10.5.216.6767" and "vunit-hdl 4.4.0".

timrid avatar Sep 15 '20 18:09 timrid

Ok. Unfortunately I dont think VHDL-2019 is supported in that simulator. Can you confirm?

LarsAsplund avatar Sep 24 '20 05:09 LarsAsplund

That is correct. Active-HDL Lattice Edition supports only:

  • VHDL 1076-1993
  • VHDL 1076-2002
  • VHDL 1076-2008

timrid avatar Sep 24 '20 05:09 timrid

Hello, I am hoping this can be revived two years later since we are having the same issue at Sigasi. The JSON file contains the URIs of the preprocessed files when we want the URIs of the source files. Basically the use of enable_location_preprocessing breaks some stuff that depend on the source URI.

EhabY avatar Jun 16 '22 14:06 EhabY