5075 - How to use Reveal with Soft JTAG in Diamond?

5075 - How to use Reveal with Soft JTAG in Diamond?

For devices without a hard JTAG block (for example, CrossLink (LIFMD) device family), Reveal JTAG support is implemented using Soft JTAG debugger logic with GPIO pins as the four JTAG pins (JTAG_TCK, JTAG_TDI, JTAG_TMS, and JTAG_TDO).

Assuming you have a project with Reveal already inserted, you may follow the steps below to use Reveal with Soft JTAG:

Assigning the JTAG pins

Notes
Make sure the Reveal file is active. The name of the Reveal file will be highlighted in bold if it is active. If not active, you can right-click the Reveal file and choose ‘Set as Active Debug File’ to make the file active. 
  • Run Synthesis and Map.
  • Open the Spreadsheet View from the Tools menu. You will notice that new IO with JTAG naming has been automatically added to the design. Assign these pins to the GPIO corresponding to the appropriate header pins on the board. The same can be done by manually modifying the LPF constraint file. 
  • [For CrossLink] Locate pins JTAG_TCK, JTAG_TDI, JTAG_TMS, and JTAG_TDO on the same bank, preferably bank-0, and leave bank-1/bank-2 available for DDR, MIPI or LVDS usage.
  • [For CrossLink] Locate the JTAG_TCK pin to PCLK or GR_PCLK to avoid using general routing, as clock general routing may violate the CLK 1-PLC rule. An example of a locate preference in the LPF file:
              LOCATE COMP "JTAG_TCK" SITE "F2" ;
  • [For CrossLink] Set a FREQUENCY preference as follows:
              FREQUENCY PORT "JTAG_TCK" 6.000000 MHz;
    Please follow Reveal guidelines when setting frequency preference.
  • Continue the design flow and generate a bitstream. 
Notes
Make sure that the pins used for Reveal are not being used by other components to avoid contention. JTAG pins will be removed if Reveal is made inactive

Programming the FPGA

Reveal Analyzer requires the design with Reveal Inserter running on the device. Hence, we must first program the device before running Reveal Analyzer
  • Open the Programmer (via Tools > Programmer, or click the Programmer icon).
  • Connect the USB cable (both 2A and 2B cables will work).
  • Connect the TCK, TDI, TDO, and TMS wires of the USBN-2A/2B cable as per the pin assignments on the board.  Also, connect the GND and VCC of the cable to the ground pin and bank VCCIO pin of the device.
Notes
If there was a previous run on Diamond Programmer to configure CrossLink, then the user may need to open Windows Task Manager and end the cableserver.exe process to allow Reveal Analyzer to access the USB cable.

Using Reveal Analyzer

After programming the device, we can go back to Diamond for Reveal Analyzer. 
  1. If you have an existing Reveal Analyzer (*.rva) file, open it. Else, create a new Reveal Analyzer by clicking on the icon of Reveal Analyzer or going to Tools > Reveal Analyzer.
  2. Detect the USB port. This should automatically detect the correct USB device you are using. If it does not, manually select the correct device through the drop-down menu.
  3. Specify the RVL source file (*.rvl) by clicking 'Browse...'.
  4. Click 'OK'.
Notes
Do not use 'Scan' function with softJTAG.  The softJTAG interface does not have access to configuration logic, so there are no programming and scanning functions available (source:  Reveal User Guide).
Reveal Analyzer should launch and work properly.

For more information, please refer to the Reveal User Guide from the Start Page of the Lattice Diamond tool.