Main Content

hdlcosim

Create HDLCosimulation System object

Description

hdlc = hdlcosim creates an hdlverifier.HDLCosimulation System object™ with default properties. This System object provides an interface to your HDL simulation in your MATLAB® workspace.

hdlc = hdlcosim('HDLSimulator',Simulator) creates an hdlverifier.HDLCosimulation to use with HDL simulator of choice and default properties.

example

hdlc = hdlcosim('HDLSimulator','Vivado Simulator') creates an hdlverifier.VivadoHDLCosimulation System object with default properties.

example

hdlc = hdlcosim(___, Name,Value) specifies additional properties using one or more name-value arguments.

example

Examples

collapse all

Create a System object to use with Synopsys® VCS®. Set input and output signals, and specify a socket connection with port number 1234.

To run a cosimulation, see Verify Viterbi Decoder Using MATLAB System Object and HDL Simulator.

hdlc = hdlcosim('HDLSimulator','VCS', ... 
              'InputSignals', {'/viterbi_block/In1','/viterbi_block/In2'}, ...
              'OutputSignals', {'/viterbi_block/Out1'}, ...
              'OutputSigned', false, ...
              'OutputFractionLengths', 0, ...
              'Connection', {'Socket',1234}, ...
              'PreRunTime', {10,'ns'}, ...
              'SampleTime', {10,'ns'});

Create a System object to use with the Vivado® simulator. Set input and output signals, and specify XSI data.

To run a cosimulation, see Verify Viterbi Decoder Using MATLAB System Object and HDL Simulator.

obj = hdlcosim( ...
  'HDLSimulator', 'Vivado Simulator', ...
  'InputSignals', {'/viterbi_block/In1','/viterbi_block/In2'}, ...
  'OutputSignals', {'/viterbi_block/Out1'}, ...
  'OutputSigned', false, ...
  'OutputDataTypes', {'fixedpoint'}, ...
  'OutputFractionLengths', 0, ...
  'ClockResetSignals',{'/viterbi_block/clk' '/viterbi_block/reset' '/viterbi_block/clk_enable'},...
  'ClockResetTypes', {'Active Rising Edge Clock' 'Step 1 to 0' 'Step 0 to 1' }, ...
  'ClockResetTimes', {{10,'ps'} {8,'ps'} {1,'ps'} }, ...
  'PreRunTime', {0,'ps'}, ...
  'SampleTime', {10,'ps'}, ...
  'XSIData', xsiData);

Note

To configure and create a System object for the Vivado simulator, use the Cosimulation Wizard.

Input Arguments

collapse all

HDL simulator for cosimulation, specified as one of the following:

Name-Value Arguments

Specify optional pairs of arguments as Name1,Value1,...,NameN,ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: hdlc = hdlcosim('HDLSimulator','Vivado Simulator','InputSignals','in1')

For a complete list of property names and values, see the properties of the returned System object, HDLCosimulation or VivadoHDLCosimulation.

Output Arguments

collapse all

Interface to the HDL DUT, returned as an HDL Cosimulation System object, For example:

Version History

Introduced in R2012b

expand all