Before verifying numerical equivalence:
Configure your model for SIL or PIL simulation.
cgv.Config class of the CGV
API to verify the model configuration for SIL or PIL simulation.
Configure your model for code generation. For more information, see Configure Model for Code Generation Objectives by Using Code Generation Advisor.
Save your model. If you modify a model without saving it, CGV can issue an error.
To verify numerical equivalence:
Set up the tests for the first execution environment. For example, simulation.
run to run the tests
for the first execution environment.
Set up the tests for the second execution environment. For example, top-model PIL.
cgv.CGV.run to run the tests for the second
getOutputData to get
the output data for each execution environment.
display the signal names in the output data. (optional)
Build a list of signal names for input to other
to create a file correlating tolerance information with output signal names.
compare to compare
the output signals of the first and second execution environments for
Simulink® Test™ is a separate product that provides additional capabilities for SIL and PIL testing, for example, test sequence construction and test management.