Simulink Software-ModelSim Workflow

The following table lists the steps necessary to cosimulate an HDL design using Simulink software.

In MATLAB...In the ModelSim HDL simulator...In Simulink...
  1. Start the MATLAB application and invoke the ModelSim simulator (see Starting the HDL Simulator)

  
 
  1. Create the HDL model.

 
  1. Compile and elaborate the HDL model using vsim.

    Load elaborated HDL model with EDA Simulator Link MQ libraries. See Loading an HDL Design for Verification.

  
  
  1. Create a new Simulink model.

  2. Add an HDL Cosimulation block (see Incorporating Hardware Designs into a Simulink Model).

  3. Define the block interface (see Defining the Block Interface).

  4. Add other Simulink blocks to complete the Simulink model.

 
  1. (Optional) Set breakpoints for interactive HDL debug.

 
  
  1. Run the simulation.

  2. Verify that the revised model runs as expected. If it does not, then:

    1. Modify the VHDL or Verilog code, and simulate it in the HDL simulator.

    2. Determine whether you need to reconfigure the HDL Cosimulation block. If you do, repeat steps 7 and 10.

  3. Consider using a To VCD File block to verify cosimulation results.

  


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