SerialLite II IP Core User Guide

ID 683179
Date 7/13/2021
Public
Document Table of Contents

4.3.2. Simulation Pass and Fail Conditions

To understand the simulation, you need to know what it means when a simulation run ends and failure is reported.
The execution of a simulation run consists of the following components:
  • Create data to be transported through the link.
  • Verify that the data arrived with or without errors.
  • Verify that the various protocols were honored in the delivery of the data.
  • Confirm that the state of the link is consistent.
The testbench concludes by checking that all of the packets have been received. In addition, it checks that the Atlantic packet receivers (amon modules) have not detected any errors in the received packets.
  • If no errors are detected, and all packets are received, the testbench issues a message stating that the simulation was successful.
  • If errors were detected, a message states that the testbench has failed. If not all packets have been detected, the testbench eventually times out (time limit set by WATCHTIME), which causes an error and the testbench to fail.
In summary, the testbench checks the following:
  • Were all expected stimulus generated?
  • Did all expected packets arrive and was the data error-free?
  • If errors occurred on the data, did the SerialLite II logic detect the errors?
  • Were there any protocol errors?
  • Is there any evidence of the simulation running too long out of control?

If any of those checks detect a problem, the simulation is reported as failing. In a correctly operating testbench, the only reason for failing is the detection of deliberately inserted errors. There is a distinction between a simulation run failing and a test failing. If you insert errors and the errors are detected, the simulation fails. However, the test was successful because the errors were detected. For this reason, simulation failure is not by itself an indication of a problem. Example 5–1 shows the ModelSim log for a successful run.