Mixed language simulation #168
Replies: 1 comment
-
Hi @jeremyherbert! Nice to meet you again 😄 Have a look at ghdl.github.io/ghdl-cosim: VHPIDIRECT » Notebook » How to use GHDL from an external C program?. That is the summary of a dialogue in ghdl/ghdl#1512. It is focused on VHPIDIRECT, but it mentions/explains other solutions, such as the ones mentioned by you. In microwatt, GHDL and Verilator are used together. The verilog sources are verilated, and executed as a module/component from VHDL, using GHDL as the simulator. Check the Makefile. Overall, the complexity relies on the fact that each HDL language expects to be the root/kernel of the execution, the one deciding when "simulation time" advances. That is a challenge for any kind of mixed-language simulation, and there is no open source solution available that solves it. Hence, for now we need to translate/convert/transpile VHDL or Verilog to something else.
I'd use the last option because I rely on non-synth VHDL features for advanced testing/verification, so other alternatives are not usable for me. However, in your case, since you want to use NEORV32 as a black box, I might suggest to try NOTE: there have been attempts to write a "distributed kernel" for mixing multiple HDL/Spice engines. Let me know if you are interested in that topic. |
Beta Was this translation helpful? Give feedback.
-
The main thing which keeps me from using neorv32 in my designs is that I do simulations in verilator (for which VHDL is not supported). I have been trying to work out a way to do mixed language simulation using free tools, and have come up with the following options:
I should clarify that I am trying to simulate the interaction between my own designs and the neorv32 core, rather than debugging the core itself, so I think the netlist output of the core should be ok.
Does anyone have any experience doing this sort of thing? Has anyone tried one of the above strategies with neorv32 (or some other one) ?
Beta Was this translation helpful? Give feedback.
All reactions