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.