cocotb / cocotb

cocotb, a coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python
https://www.cocotb.org
BSD 3-Clause "New" or "Revised" License
1.68k stars 488 forks source link

Possible feature request: Define path of simulator binary #3939

Closed cweickhmann closed 2 weeks ago

cweickhmann commented 2 weeks ago

Using cocotb, I just realised the simulator binary (in my case ghdl) is fixed. Either it is /usr/bin/ghdl or what ever which ghdl returns. As far as I can see, simply setting an alias, does not help.

Can the simulator binary path be changed within a cocotb Makefile?

I've compiled ghdl 3.x with certain options and would like to use that on some testbenches. Unfortunately, my system comes with an ancient ghdl 1.0 installed under /usr/bin/ghdl.

ktbarrett commented 2 weeks ago

There's the CMD make variable, but it's not documented because this is not really a feature I see anyone else using.

I've compiled ghdl 3.x with certain options and would like to use that on some testbenches.

Why only "some"?

cweickhmann commented 2 weeks ago

Actually, I realise that this is not my main motive. The reason is that my host system ships with ghdl v1 and my initial work-around was to replace that binary (in /usr/bin) by the compiled ghdl v.3. However, updates to the ghdl package silently break this. So, I resorted to placing the binary in $HOME/.local/bin and calling it ghdl-3.

I think, for my purposes the CMD make variable does the job just fine. Thank you!