A wrapper for GHDL to make it look like Mentor's ModelSim. Helpful for use with programs like Sigasi.

Markus Koch 55bf73e52d Use append_string for files 1 year ago
arch fad1f6433c Changed versioning to include nth commit instead of only commit hash 3 years ago
.gitignore d65c627efa Rewrite in plain C and gtk 3 years ago
CMakeLists.txt 8c5bdd7c60 Added installation instructions to CMakeLists 3 years ago
LICENSE c228e2d0e1 Init commit 4 years ago
README.md d0c20c6e01 Changed default compilation method to compile-on-vcom. See README.MD on how to revert to syntax-check-only behavior. 3 years ago
gui.c ef6c65d20d Add missing cast to GTK_WINDOW 1 year ago
gui.h 55105018aa Refactor indentation 1 year ago
main.c 55bf73e52d Use append_string for files 1 year ago

README.md

model-ghdl

A wrapper for GHDL to make it look like Mentor's ModelSim. Helpful for use with programs like Sigasi.

Compiling and use

First install ghdl from github and install GtkWave. Model-ghdl expects to find the ghdl and gtkwave executables in the system $PATH.

Then, to compile the wrapper, simply do the following:

git clone https://github.com/cclassic/model-ghdl
cmake .
make

The five modelsim applications should now be present in the current folder as symlinks along with a model-ghdl binary. Either install these into your path or point your IDE to the location of the files.

VCOM

Original commands

  • -work top: Set top level
  • -workdir dir: Set working directory
  • -87, -93, -93c, -2000, -2002, -2008: Set VHDL version

Additional commands

  • -ghdl param: Supply these arguments directly to GHDL (can be used multiple times)
  • -no-precompile: Compile the files not until calling vsim. (Faster syntax check, but longer wait time for the simulation to start.)

Notes

  • cwd is expected to be the compile directory
  • Recommended arguments: -ghdl --ieee=synopsys -ghdl -fexplicit -ghdl -frelaxed-rules -ghdl -P/path/to/lib

VSIM

Original commands

  • -gui work.toplevel(RTL): Set toplevel and work library

Additional commands

  • -ghdl param: Supply these arguments directly to GHDL (can be used multiple times)
  • -gtkwprefix prefix: Prefix for the .gtkw save file. Path will be $cwd/$prefix$toplevel.gtkw
  • -type extension: Set simulation output file type. Can be: ghw (default), vcd or fst

Notes

  • cwd is expected to be the source directory (used for .gtkw save path)
  • Recommended arguments: -gtkwprefix gtkwave/ -ghdl --ieee=synopsys -ghdl -fexplicit -ghdl -frelaxed-rules -ghdl -P/path/to/lib

VMAP

No function.

VLIB

No function.

VDEL

No function.