Documentation

MATLAB Cosimulation

Cosimulate HDL code with MATLAB®

Functions

cosimWizard Run HDL Cosimulation Wizard
dec2mvl Convert decimal integer to binary character vector
hdldaemon Control MATLAB server that supports interactions with HDL simulator
hdlsimmatlab Load instantiated HDL design for verification with Cadence Incisive and MATLAB
matlabcp Associate MATLAB component function with instantiated HDL design
matlabtb Schedule MATLAB test bench session for instantiated HDL module
matlabtbeval Call specified MATLAB function once and immediately on behalf of instantiated HDL module
mvl2dec Convert multivalued logic to decimal
nclaunch Start and configure Cadence Incisive simulators for use with HDL Verifier software
nomatlabtb End active MATLAB test bench and MATLAB component sessions
notifyMatlabServer Send HDL simulator event and process IDs to MATLAB server
pingHdlSim Block cosimulation until HDL simulator is ready for simulation
vsim Start and configure ModelSim for use with HDL Verifier
vsimmatlab Load instantiated HDL module for verification with ModelSim and MATLAB
waitForHdlClient Wait until specified event ID is obtained or time-out occurs

System Objects

hdlverifier.HDLCosimulation Construct System object for HDL cosimulation with MATLAB

Topics

Startup and Connection

Startup for HDL Cosimulation

Describes the requirements for machine configurations when using HDL Verifier™ with MATLAB and Simulink®

Supported EDA Tools and Hardware

List of supported third-party EDA software and FPGA boards.

Set Up MATLAB-HDL Simulator Connection

Cosimulation requires a connection between MATLAB and your HDL simulation tool.

TCP/IP Socket Ports

Provides some direction for choosing TCP/IP socket ports

Cross-Network Cosimulation

Provides instructions for performing cosimulation across a local network

Run MATLAB-HDL Cosimulation

Run your test bench or component, including the cosimulation of your HDL module.

Cosimulation with System Object

Create a MATLAB System Object

You can verify HDL modules using the HDL Cosimulation System object™.

Verify Viterbi Decoder Using MATLAB System Object and Mentor Graphics ModelSim

This example shows you how to use MATLAB® System objects and Mentor Graphics® ModelSim® to cosimulate a Viterbi decoder implemented in VHDL.

Import HDL Code for MATLAB System Object

Generate a MATLAB System object to cosimulate your HDL code.

Cosimulation with Test Bench Function

Create a MATLAB Test Bench

Verify HDL modules using HDL Verifier cosimulation features in a MATLAB test bench.

Set Up Cosimulation Test Bench

Set up a MATLAB test bench to cosimulate your HDL module.

Verify HDL Module with MATLAB Test Bench

Set up and run a ModelSim® and MATLAB test bench session.

Import HDL Code for MATLAB Function

Generate a MATLAB function to cosimulate your HDL code.

Test Bench and Component Function Writing

Describes how to use the input and output arguments to a MATLAB function created for use with the HDL Verifier commands matlabtb and matlabcp.

Cosimulation with Component Function

Create a MATLAB Component Function

Visualize HDL modules in MATLAB using HDL Verifier cosimulation features.

Set Up Cosimulation Component

Set up a MATLAB component to cosimulate your HDL module.

Verify Raised Cosine Filter Design Using MATLAB

This tutorial guides you through the basic steps for setting up an HDL Verifier cosimulation that uses MATLAB and the HDL Simulator.

Import HDL Code for MATLAB Function

Generate a MATLAB function to cosimulate your HDL code.

Test Bench and Component Function Writing

Describes how to use the input and output arguments to a MATLAB function created for use with the HDL Verifier commands matlabtb and matlabcp.

Automatic Verification

Automatic Cosimulation Verification

Cosimulate the device-under-test (DUT) in ModelSim or Cadence Incisive®.

Verify Code with HDL Test Bench

Simulate the generated HDL design under test (DUT) with test vectors from the test bench using the specified simulation tool.

All Cosimulation

HDL Cosimulation

The HDL Verifier software consists of MATLAB functions, a MATLAB System object, and a library of Simulink blocks, all of which establish communication links between the HDL simulator and MATLAB or Simulink.

Import HDL Code for Cosimulation

Prepare for cosimulation and choose whether to cosimulate your HDL code as a function, System object, or block.

Data Type Conversions

If your HDL application needs to send HDL data to a MATLAB function, you may first need to convert the data to a type supported by MATLAB and the HDL Verifier software.

Race Conditions in HDL Simulators

Describes ways to avoid race conditions in hardware cosimulations with MATLAB and Simulink software

Was this topic helpful?