Issue with GHDL simulation of test counter (Win 10, GHDL, Python 3.7)

Hello,

I tried to simulate the VHDL Test counter under Windows 10, Phython 3.7 and GHDL. When I enter the command hdlmake in the directory …/hdl-make/tests/counter/sim/ghdl/vhdl following traceback is output:

INFO action.py:191: build_file_set() Detected 2 supported files that can be parsed
INFO new_dep_solver.py:109: solve() Dependencies solved, all of the relations were satisfied!
INFO new_dep_solver.py:187: make_dependency_set() Found 2 files as dependancies of counter_tb.
Traceback (most recent call last):
File “C:\Users\Markus\AppData\Local\Programs\Python\Python37-32\Scripts\hdlmake-script.py”, line 11, in
load_entry_point(‘hdlmake==3.2’, ‘console_scripts’, ‘hdlmake’)()
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake_main_.py”, line 57, in main
action_runner(modules_pool)
File "c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake_main
.py", line 67, in _action_runner
modules_pool.makefile()
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\action\core.py”, line 69, in makefile
filename=self.options.filename)
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\tools\make_sim.py”, line 36, in write_makefile
self.makefile_check_tool(‘sim_path’)
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\tools\makefile.py”, line 126, in makefile_check_tool
if self._check_in_system_path():
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\tools\makefile.py”, line 105, in _check_in_system_path
path = self._get_path()
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\tools\makefile.py”, line 86, in _get_path
locations = shell.which(bin_name)
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\site-packages\hdlmake\util\shell.py”, line 111, in which
candidate = os.path.join(location, filename)
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\ntpath.py”, line 115, in join
genericpath._check_arg_types(‘join’, path, *paths)
File “c:\users\markus\appdata\local\programs\python\python37-32\lib\genericpath.py”, line 149, in _check_arg_types
(funcname, s.class.name)) from None
TypeError: join() argument must be str or bytes, not ‘NoneType’

Let me know, if you need further details.

Regards,
Markus

Hello,

can you post your Manifest.py ?

Thanks!

Hi Tristan

sure.
Please see bellow, I need to attach the file bellow because this forum does not allow new users uploading any files.
BTW, it is the manifest file from the git repo of hdl-make: https://www.ohwr.org/project/hdl-make/tree/master/tests/counter/sim/ghdl/vhdl

Regards,
Markus

action = “simulation”
sim_tool = “ghdl”
sim_top = “counter_tb”

sim_post_cmd = “ghdl -r counter_tb --stop-time=6us --vcd=counter_tb.vcd; gtkwave counter_tb.vcd”

modules = {
“local” : [ “…/…/…/testbench/counter_tb/vhdl” ],
}

Nobody has yet tested hdlmake+ghdl on windows. In tools/ghdl.py, replace line 40 with:
'windows_bin': 'ghdl';

Tell me if that works, and I will commit the change.

Thanks,
Tristan.

Hi Tristan

Thanks for the hint!

I had to replace line 40 with:
‘windows_bin’: ‘ghdl.exe’,

After this change, I was able to generate the Makefile:
…\hdl-make\tests\counter\sim\ghdl\vhdl>hdlmake
INFO action.py:191: build_file_set() Detected 2 supported files that can be parsed
INFO new_dep_solver.py:109: solve() Dependencies solved, all of the relations were satisfied!
INFO new_dep_solver.py:187: make_dependency_set() Found 2 files as dependancies of counter_tb.
INFO makefile.py:129: makefile_check_tool() GHDL found in system PATH: …\Documents\PortableApps\GHDL_0.36\bin

But I get an error, when I want to simulate the counter TB:
…\hdl-make\tests\counter\sim\ghdl\vhdl>make
ghdl -a …\modules\counter\vhdl\counter.vhd
/bin/sh: line 0: type: nul: not found
make: *** [Makefile:35: work\counter.counter_vhd] Error 1

I would like sending you the Makefile. Could you please enable the upload function for me?

Regards,
Markus

I don’t have the rights to enable upload. I will ask around.

I have the impression you’re using a pure Windows python but a cygwin make.

Tristan.

Tristan,

yes, I can confirm your impression. I am using Python release for Windows 3.7.4 and make cygwin64.

Markus

Hello Tristan,

I figured out, that the Manifest.py file for GHDL needs a change.

Line 5 has to be changed to:
sim_post_cmd = “ghdl -r counter_tb --stop-time=6us --vcd=counter_tb.vcd && gtkwave counter_tb.vcd”

Regards,
Markus

Yes, that makes sense.

Thanks,
Tristan.