User`s guide
Basic Approach to Component Verification
11-5
• For closed-loop simulations, verify a component within the context of its container
model by logging the signals to that component and storing them in a data file.
If those signals do not constitute a complete test suite, generate a harness model
and add or modify the test cases in the Signal Builder.
• For open-loop simulations, verify a component independently of the container
model by extracting the component from its container model and creating a
harness model for the extracted component. Add or modify test cases in the
Signal Builder and log the signals to the component in the harness model.
2
Prepare component for verification.
3
Create and log test cases. If desired, merge the test case data into a single data file.
The data file contains the test case data for simulating the component. If you cannot
achieve the desired results with a certain set of test cases, add new test cases or
modify existing test cases in the data file, and merging them into a single data file.
Continue adding or modifying test cases until you achieve a test suite that satisfies
the goals of your analysis.
4
Execute the test cases in Software-in-the-Loop or Processor-in-the-Loop mode.
5
After you have a complete test suite, you can:
• Simulate the model and execute the test cases to:
• Record coverage.
• Record output values to make sure that you get the expected results.
• Invoke the Code Generation Verification (CGV) API to execute the generated code
for the model that contains the component in simulation, Software-in-the-Loop
(SIL), or Processor-in-the-Loop (PIL) mode.
Note: To execute a model in different modes of execution, you use the CGV API to
verify the numerical equivalence of results. For more information about the CGV
API, see “Programmatic Code Generation Verification”.
The next sections describe the steps for component verification in more detail:
• “Verify a Component Independently of the Container Model” on page 11-6
• “Verify a Model Block in the Context of the Container Model” on page 11-7