1292 - Mico32: How to use Reveal to debug?<br>
A typical issue in debugging a new system design is that an error becomes apparent to a software algorithm, but the software and GDB debugger have no visibility into the internal logic of a component that may be producing errors.
For example, a new system design may interface with a new custom memory component on a new board. A software memory test is written to perform the standard walking, all set, all clear, random pattern, etc. memory tests on the hardware. An error is discovered when the software checking routine reads back a value it does not expect. The problem is that in the software domain, it may be impossible to determine if the error is on the write side, the read side, the data bus adaptation, the component interface, etc. This is where Reveal can help.
Create a Reveal Inserter project that captures the signals in question, for example, the read data bus from the component. Use a trigger from a top-level signal that can be set by the software checking routine, such as a GPIO net that drives an error LED. The software can then set this GPIO bit immediately upon detecting the error and trigger Reveal to capture the trace. Since the data bus activity will have occurred before the trigger, set the trigger point at the end (90%) of the capture buffer. This will allow you to inspect the hardware signals that were present around the time of the detected error.
From this example, if the read data bus already shows corrupted data, the monitor point can be moved into the component's internal logic, or to the FPGA I/O to see if the data is coming into the FPGA valid or corrupted.
The following steps provide the most success when simultaneously using Reveal and MSB debugger.
1. Download the design using ispVM
2. Connect the Reveal Logic Analyzer to the design
3. Start the MSB debugger
4. Run the executable program that detects the error
5. Upon seeing the error indicator (LED output), either halt the debugger or set a breakpoint after the LED is set.
6. After MSB finishes halting the debugger and gathering state info, Reveal will see the trigger has occurred and upload the trace data for analysis