Matlab HDL cosimulation for Lattice CPLD
I regularly develop VHDL code for controllers that is supposed to run on FPGAs/CPLDs and I’m looking for possibilities to co-simulate this code in a closed-loop simulation environment that mimics the behavior of the controlled system. So what I would like to have is that I can define a dyamic model in Matlab (e.g., as a state-space model or a transfer function) and to simulate this model together with the controller’s HDL implementation using the outputs of the models as stimuli for the controller and the output of the controller as input for the dynamic model. Is there any way I can accomplish this with Matlab? If so, what do I have to look for?
What I found so far is apparently called HDL verifier and seems to be pretty much what I want. However, I’m currently using Lattice MachXO2 CPLDs and Lattice diamond comes with "ModelSim Lattice FPGA Edition" as a simulator. According to this post
https://ch.mathworks.com/matlabcentral/answers/493504-which-modelsim-editions-can-i-use-for-cosimulation-with-hdl-verifier
HDL verifier requires a FLI (foreign language interface), which the Lattice Edition of ModelSim does not provide. Is there any way I can use HDL verifier, e.g., by using a different simulator?I regularly develop VHDL code for controllers that is supposed to run on FPGAs/CPLDs and I’m looking for possibilities to co-simulate this code in a closed-loop simulation environment that mimics the behavior of the controlled system. So what I would like to have is that I can define a dyamic model in Matlab (e.g., as a state-space model or a transfer function) and to simulate this model together with the controller’s HDL implementation using the outputs of the models as stimuli for the controller and the output of the controller as input for the dynamic model. Is there any way I can accomplish this with Matlab? If so, what do I have to look for?
What I found so far is apparently called HDL verifier and seems to be pretty much what I want. However, I’m currently using Lattice MachXO2 CPLDs and Lattice diamond comes with "ModelSim Lattice FPGA Edition" as a simulator. According to this post
https://ch.mathworks.com/matlabcentral/answers/493504-which-modelsim-editions-can-i-use-for-cosimulation-with-hdl-verifier
HDL verifier requires a FLI (foreign language interface), which the Lattice Edition of ModelSim does not provide. Is there any way I can use HDL verifier, e.g., by using a different simulator? I regularly develop VHDL code for controllers that is supposed to run on FPGAs/CPLDs and I’m looking for possibilities to co-simulate this code in a closed-loop simulation environment that mimics the behavior of the controlled system. So what I would like to have is that I can define a dyamic model in Matlab (e.g., as a state-space model or a transfer function) and to simulate this model together with the controller’s HDL implementation using the outputs of the models as stimuli for the controller and the output of the controller as input for the dynamic model. Is there any way I can accomplish this with Matlab? If so, what do I have to look for?
What I found so far is apparently called HDL verifier and seems to be pretty much what I want. However, I’m currently using Lattice MachXO2 CPLDs and Lattice diamond comes with "ModelSim Lattice FPGA Edition" as a simulator. According to this post
https://ch.mathworks.com/matlabcentral/answers/493504-which-modelsim-editions-can-i-use-for-cosimulation-with-hdl-verifier
HDL verifier requires a FLI (foreign language interface), which the Lattice Edition of ModelSim does not provide. Is there any way I can use HDL verifier, e.g., by using a different simulator? vhdl, hdl simulation, hdl verifier, cosimlation, fpga MATLAB Answers — New Questions