On October 30, 2014, Sanjay Singh wrote:

Here is my attempt to compile and run the
tarball DLX on Windows with GHDL 0.29.1 Sokcho:

I would advise switching to the current ghdl-0.31-mcode-win32 build from SourceForge.

Download Page:
http://sourceforge.net/projects/ghdl-updates/files/Builds/ghdl-0.31/Windows/

Windows Install Wiki Page:
http://sourceforge.net/p/ghdl-updates/wiki/Windows%20ghdl-0.31%20install%20from%20zip/

I can successfully run the DLX example with the following using ghdl-0.31-mcode-win32:

 ghdl -i --workdir=work *.vhdl
 ghdl -m --workdir=work dlx_test_behaviour
 ghdl -e --workdir=work dlx_test_behaviour
 ghdl -r --workdir=work dlx_test_behaviour --assert-level=note

I tend to include the elaborate stage, which although not strictly necessary for the mcode build, more closely resembles GHDL usage for the gcc back end.

============
Using GHDL with obsolete synposys std_logic_arith, std_logic_{un}signed libraries:
 Add the --ieee=synopsys option to the commands lines.

============
Using GHDL with GTKWave

Adding the --wave option to the run command line will generate a .ghw file that can be viewed with GTKWave.
Note that this waveform capture will slow the simulation.

ghdl -r --workdir=work.ghd testbench --stop-time=500ms --wave=ghdl_sim.ghw

If the testbench stops the clock upon completion, there is no need for the --stop-time option.

============
Some other windows GHDL scripting examples in can be found in my perpetually unfinished homebrew processor project:

Switch debouncer stimulus testbench:
https://code.google.com/p/yard-1/source/browse/trunk/hdl/common/debounce/test/

UART test bench:
https://code.google.com/p/yard-1/source/browse/trunk/hdl/cores/m_uart/test/

I typically use batch file(s) that look like this:
ghdl -a -v --workdir=work.ghd ..\m_uart_pkg.vhd ..\simple_baud_gen.vhd ..\m_uart.vhd m_uart_tb.vhd
 ghdl -e    --workdir=work.ghd testbench
 ghdl -r    --workdir=work.ghd testbench --wave=ghdl_sim.ghw

-Brian



_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to