DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 3/23/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

10.6.4.2. Writing Application Specific Verification

Generally, use the threshold method for detecting mismatches in hardware for most designs. For more sophisticated designs you can write your own application specific verification function.

Procedure

  1. Click DSP Builder > Verify Design > Advanced.
  2. Turn on Import ModelSim results to MATLAB.
  3. Enter a MATLAB variable name in Import device output to variable.
  4. Optionally, enter a different variable name in Import valid map to variable field.
  5. Enter the name of the verification m-function in Verification function.
  6. Simulate and generate the hardware. DSP Builder modifies the ATB to write to a file the output signal values that ModelSim simulates:
    1. Click DSP Builder > Verify Design
    2. Turn on Run simulation and Verify at device level,
    3. Click OK
    MATLAB stores the simulation results using field names derived from the names of the output ports in your design.
    >> atbPaths = vsimOut.keys; vsimOut(atbPaths{1})
    ans =
     vout: [2000x1 embedded.fi]
     vout_stm: [2000x1 embedded.fi]
     cout: [2000x1 embedded.fi]
     cout_stm: [2000x1 embedded.fi]
     x: [2000x1 double]
     x_stm: [2000x1 double]
    The fields ending in _stm are from the stimulus files that Simulink normally writes out during simulation. You can use these as the golden standard against which to compare the simulated hardware output. The verification function you specified is started, passing this struct as the first parameter