OSVVM / OSVVM-Scripts

OSVVM project simulation scripts. Scripts are tedious. These scripts simplify the steps to compile your project for simulation
Other
10 stars 14 forks source link

Add option to create waveform files for GHDL (GUI mode) #11

Closed Paebbels closed 2 years ago

Paebbels commented 2 years ago

Please add an option to GHDL, so waveform files in GHW format can be created. These can then be viewed and analyzed with GTKwave.

The needed option is --wave=${LibraryUnit}.ghw after the LibraryUnit.

Here a diff from my workaround:

- exec echo "$ghdl --elab-run --std=${VhdlShortVersion} --syn-binding --work=${LibraryName} --workdir=${GHDL_WORKING_LIBRARY_PATH} ${VHDL_RESOURCE_LIBRARY_PATHS} ${LibraryUnit}" | {*}[get_tee]
+ exec echo "$ghdl --elab-run --std=${VhdlShortVersion} --syn-binding --work=${LibraryName} --workdir=${GHDL_WORKING_LIBRARY_PATH} ${VHDL_RESOURCE_LIBRARY_PATHS} ${LibraryUnit}" --wave=${LibraryUnit}.ghw | {*}[get_tee]

Ideally, OSVVM scripting could offer a GUI mode / switch / variable.

JimLewis commented 2 years ago

With the Dev release, you can do this with SetExtendedSimulateOptions "--wave=\${LibraryUnit}.ghw"

I think it should get evaluated as a variable. We will have to test it. @Paebbels Please test the above.

Paebbels commented 2 years ago

Please note, --wave is a runtime option, so it must be specified after the ${LibraryUnit}.

image
See https://ghdl.github.io/ghdl/using/InvokingGHDL.html#elaborate-and-run-elab-run

Paebbels commented 2 years ago

I think this is now covered by SetExtendedSimulateOptions.

How to set a single and how to set multiple options? The documentation mentions only a single value.

Examples:

JimLewis commented 2 years ago

SetExtendedElaborateOptions, SetExtendedRunOptions, and SetSaveWaves were on main branch. Still have to add documentation for them.

Paebbels commented 2 years ago

It doesn't appear in the documentation at https://github.com/PLC2/OSVVM-Scripts/blob/main/README.rst, right?