Main Content

Numerical Equivalence Testing

Compare results from model simulation and generated code by using test benches

Test numerical equivalence between your model and generated code by comparing simulation results to test bench results. You can generate a test bench during code generation. The test bench contains the model simulation output results, which are then compared to the generated code output results. The generated code output results are the results from running the generated code in the target IDE.

Topics

Test Bench Verification

Verify numeric equivalence between generated code and models by using test benches.

Import Structured Text Code Automatically

Open generated code directly in your IDE.

Import and Verify Structured Text Code

Verify generated code against the original Simulink® model in your IDE by using a generated test bench.

Generate Code That Has Multiple Test Benches

Provide multiple signal groups as subsystem input so that multiple test benches are generated for code verification.

Author, Manage, and Execute Simulation-Based Tests of Generated Code

Workflow for using Simulink Test with PLC Coder.

Featured Examples