I am currently setting up a Cocotb based verification environment.
I just discovered that the example provided with Cocotb don't work in my case if using VHDL, because my simulator has no FLI (foreign language interface). I get the following message:
Error (suppressible): (vsim-FLI-3155) The FLI is not enabled in this version of ModelSim.
(I have the Altera Starter version of ModelSim, and indeed FLI is not included).
What surprises me is that the example works with Verilog. From my understanding, Verilog is not using FLI, but VPI.
Can someone explain me a little bit if the need for FLI is mandatory, and what feature can enable it in Cocotb?
Another question: What if my top is in Verilog, but the rest of my design in VHDL? Should it work?
Cocotb has an internal abstraction layer (GPI) for FLI, VPI and VHPI. E.g. if you use Cocotb with GHDL, it's using just VPI. You can try to compile Cocotb against VPI instead of FLI and load the VPI library instead of the FLI library.