MiSTer Developer's Guide with Quartus SignalTap II

Discussion of developmental aspects of the MiSTer Project.
RndMnkIII
Core Developer
Posts: 92
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

MiSTer Developer's Guide with Quartus SignalTap II

Unread post by RndMnkIII »

I would like to add this little mini guide to help those interested in debugging core signals for MiSTer with SignalTapII in Quartus:
  • Be sure to connect the DE10-nano board with the USB Blaster II cable (next to HDMI port).
  • Add SignalTap II support to your core project with:
    File> New File ...> Verification / Debugging Files> SignalTap II Logic Analyzer File.
  • Configure SignalTap II:
    a) Give your instance a name with Instance Manager.
    b) Configure the signals (Setup Tab). Important the clock used to capture the signals in each sample: in my case I chose emu: emu | CLK_50M and a sampling depth of 1K
    c) Add the signals you want to debug on the left: double-click and add the signals from the Node Finder: in my case I used the SignalTap II: post-fitting filter and added the signals from my core module:
    | sys_top | emu: emu | rndmnkiii_core: kon2cpu |
    d) Establish the trigger conditions for capturing signals that interest you and the data that you are going to capture. Disable everything that is not necessary as you will reduce the consumption of logical resources in the FPGA.
    e) Save the changes in the STP file with the SignalTap configuration.
    f) Recompile the project. Note that compilation time will increase compared to a project without SignalTap support.
    g) Open SignalTap window from Quartus:Tools> SignalTap II Logic Analyzer
    h) In JTAG Chain Configuration make sure that the hardware is detected correctly:
    Hardware: DE-SoC [USB-1]
    Device: @ 2: 5CSEBA6 ...

    With SOF Manager select the file to record in the FPGA, in my case is in the quartus proyect

    Code: Select all

    output_files
    folder:

    Code: Select all

    kon2_core.sof
    and then press the Program Device button.
    If everything was correct, a message should appear at the top: "JTAG ready".
  • VERY IMPORTANT: if your core loads a ROM file either directly or through MRA, it is very important to place this file (as uncompressed ROM) in the / fat directory of the SD card and that its name matches that of the SOF file generated by Quartus. In my case:

    Code: Select all

    kon2_core.rom
    This can be generated with the console tool mra:

    Code: Select all

    mra kon2_core.mra
    and the kon2_core.zip compressed roms.

    if not it will not load the rom it is question when you execute the capture with SignalTap.
  • Now from SignalTap II Window should be appears a message at the top showing: Ready to acquire. Open the Data Tab and from Processing Menu you can run: Start Analysis, Stop Analysis and the captured signals will show in this window. See attachment image as an example of capture.
  • Every time you modify the signals to capture, the trigger conditions or modify the main configuration, you will have to recompile the project. So spend some time making all the necessary adjustments for your capture and save the changes before to recompile.
Attachments
bus_selector_capture_WORK_RAM_RW.png
bus_selector_capture_WORK_RAM_RW.png (92.52 KiB) Viewed 3686 times
User avatar
Ordigdug
Posts: 1
Joined: Sun May 24, 2020 11:11 pm
Has thanked: 4 times

Re: MiSTer Developer's Guide with Quartus SignalTap II

Unread post by Ordigdug »

Where can I find the “mra console tool”?
Post Reply