Chapter 2
Creating Golden Reference Models
Algorithm developers use MATLAB and Simulink to develop mathematical models of algorithms and testbenches. You start by building behavioral models to capture algorithm behavior and then prepare the models for implementation in FPGAs or ASICs.
Refining Reference Models
Tasks involved in preparing reference models include:
- Converting frame-based operations to streaming architectures by serializing or deserializing data streams.
- Converting floating-point models to fixed-point or integer representation with appropriate dynamic ranges to cover the range of expected operating conditions.
Because the golden reference model has similar input/output to the RTL, it’s a best practice to exhaustively simulate this model back-to-back with your behavioral model so you can use it as a golden reference for RTL verification.
Use Test Harnesses to Prepare Unit Tests
Systematic model verification starts by taking the requirements document and tracing individual requirements to the design as a reference model in Simulink. You can then isolate components of the design for testing using test harnesses.
A test harness acts as a highly configurable, parameterized testbench. Test harnesses isolate each component under test from the rest of the reference model and are stored apart from the reference models, preserving the integrity of the Simulink reference model.
Test harnesses for each subsystem can ultimately be exported to SystemVerilog for use in unit testing in ASIC and FPGA verification environments (see Reusing Reference Models in Design Verification)
You can apply test harnesses to each component and run simulations to measure model coverage statistics and identify uncovered conditions. This approach enables you to assess testbench coverage far earlier in the design process than with traditional testbench development methods.
True or False?
You can identify missing coverage at the model level prior to running simulations with an HDL simulator.
True!
You can run simulations in Simulink and measure coverage to identify gaps in testing earlier, at the model level.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)