Running Cosimulation Sessions

Starting the HDL Simulator for Use with Simulink

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 launchDiscovery. Alternatively, you can start the HDL simulator manually and load the EDA Simulator Link DS libraries yourself. Either way, see Starting the HDL Simulator.

Determining an Available Socket Port Number

To determine an available socket number use: ttcp -a.

Checking the Connection Status

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.

Managing a Simulink Cosimulation Session

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 change any part of the Simulink model, including the HDL Cosimulation block parameters, rerun the simulation or click the Update diagram button or select Edit > Update Diagram so that the diagram reflects those changes.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS