| EDA Simulator Link™ IN | ![]() |
| On this page… |
|---|
Starting the HDL Simulator for Use with Simulink Determining an Available Socket Port Number |
The options available for starting the HDL simulator for use with Simulink vary depending on whether you run the HDL simulator and Simulink on the same computer system.
If both tools are running on the same system, start the HDL simulator directly from MATLAB by calling the MATLAB function nclaunch. Alternatively, you can start the HDL simulator manually and load the EDA Simulator Link™ IN libraries yourself. Either way, see Starting the HDL Simulator.
After you start the HDL simulator from MATLAB, load an instance of an HDL module for cosimulation with the HDL simulator command hdlsimulink. Issue the command for each instance of an HDL module in your model that you want to cosimulate. For example:
hdlsimulink work.manchester
This command opens a simulation workspace for manchester and displays a series of messages in the HDL simulator command window as the simulator loads the HDL module's packages and architectures.
You can check the connection status by clicking the Update diagram
button
or by selecting Edit > Update Diagram. If there is a connection error, Simulink will notify
you.
The MATLAB command pingHdlSim can also be used to check the connection status. If a -1 is returned, then there is no connection with the HDL simulator.
To run and test a cosimulation model in Simulink, click Simulation > Start or the Start Simulation button
in your Simulink model window. Simulink runs the model and displays
any errors that it detects.
If you need to reset a clock during a cosimulation, you can do so by entering HDL simulator force commands at the HDL simulator command prompt or by specifying HDL simulatorforce commands in the Post- simulation command text field on the Tcl pane of your EDA Simulator Link IN Cosimulation block's parameters dialog.
If you change any part of the Simulink model, including the
HDL Cosimulation block parameters, re-run the simulation or click
the Update diagram button
or select Edit > Update Diagram so that the diagram reflects those changes.
![]() | Incorporating Hardware Designs into a Simulink® Model | EDA Simulator Link™ IN MATLAB® Function Reference | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |