Verify HLS Code That Has an HDL Test Bench - MATLAB & Simulink (original) (raw)

Main Content

Simulate the generated High-Level Synthesis (HLS) design under test (DUT) with test vectors from the test bench files.

  1. Start the MATLAB to HDL Workflow Advisor.
  2. In the HDL Workflow Advisor, select MATLAB to HLS as the Code generation workflow.
  3. Select the Workflow as High Level Synthesis and Synthesis tool asCadence Stratus HLS in the Select Code Generation Target step.
  4. For HDL Verification, click Verify with HDL Test Bench.
  5. Optionally, select Simulate generated HDL test bench. This option enables MATLABĀ® to simulate the HLS test bench by using the HLS DUT.
  6. Click Run.
    If the test bench and simulation executes without error, you see messages similar to these messages in the message pane:

Begin TestBench generation.

Code generation successful.

Collecting data...

Begin HDL test bench file generation with logged samples

Generating test bench data file: /tmp/mlhdlc_sfir/codegen/mlhdlc_sfir/hdlsrc/x_in.dat.

Generating test bench data file: /tmp/mlhdlc_sfir/codegen/mlhdlc_sfir/hdlsrc/y_out_expected.dat.

Generating test bench data file: /tmp/mlhdlc_sfir/codegen/mlhdlc_sfir/hdlsrc/delayed_xout_expected.dat.

Generating test bench file: mlhdlc_sfir_fixptClass_tb.hpp

Running Stratus Importer on the generated testbench.

Working on mlhdlc_sfir_fixpt_bdw_import_log.txt as /tmp/mlhdlc_sfir/codegen/mlhdlc_sfir/hdlsrc/stratus_prj/mlhdlc_sfir_fixpt_bdw_import_log.txt.

Stratus Importer successful.

Simulating the design 'mlhdlc_sfir_fixpt' using 'Cadence Stratus HLS'.

Generating Simulation Report /tmp/mlhdlc_sfir/codegen/mlhdlc_sfir/hdlsrc/stratus_prj/mlhdlc_sfir_fixpt_sim_BEH_log_sim.txt

Simulation successful.

Elapsed Time: ' 64.6783' sec(s)

If the errors appear in the message pane, fix the errors and clickRun.

Additional Notes

See Also

Topics