Main Content

sltest.xil.framework.Stimulation Class

Namespace: sltest.xil.framework

Control external input to test bench

Since R2022a

Description

Use sltest.xil.framework.Stimulation methods to control input to the test bench. You can also use it to control signal generation on one or more test benches.

The sltest.xil.framework.Stimulation class is a handle class.

Creation

You cannot create an sltest.xil.framework.Stimulation object. A Stimulation object exists only as a member of an sltest.xil.framework.Framework object. Create a Framework object first and then use the Stimulation methods from within that Framework object.

Methods

expand all

Examples

collapse all

import sltest.xil.framework.*
frm = Framework;

frm.Configuration.addModelAccessPort(...
    'MAPort1','asamxil.v2_1',...
    VendorName='ABC Co.',...
    ProductName='ABC Test Bench',...
    ProductVersion='1.7',...
    PortConfigFile=fullfile(pwd,'myConfigFile.xml'));

frm.Configuration.addTestVariableMapping(...
    'Input1','MAPort1','simpleXIL/Input1');

frm.init;

Input1 = frm.createVariable('Input1');
tseries = timeseries(cos(2*pi*(0:1000)/200)*10,(0:1000)/200);
frm.Stimulation.setupWithVariablesAndData(...
   {{Input1,tseries}},LoopCount=2);

frm.Stimulation.start;
frm.start;

Version History

Introduced in R2022a

Go to top of page