Introduction.
There are times when you may want to check the register information of the QSPI Flash used in the configuration of Agilex™ 3 in ASx4 mode, check the data being written (read), or rewrite the data as necessary (write).
The Configuration Debutter Tool included in Quartus® Prime Pro can be used to access the QSPI Flash connected to Agilex™ 3 in ASx4 mode to read/write registers and data as needed. The Configuration Debugger Tool can be used to read/write registers and data as needed.
This article describes how to use the Configuration Debugger Tool to debug the QSPI Flash connected to the Agilex™ 3 in ASx4 mode.
Key point: The Configuration Debugger is included in Quartus® Prime Pro. Therefore, you can use it if you have already installed Quartus® Prime Pro.
Point: Although we use Agilex™ 3 as an example, the procedure is similar for other Agilex™ families and device families that use Secure Device Manager (SDM), such as Stratix® 10.
1. AS x4 Configuration
The connection diagram for the AS x4 configuration (AS Single Device Configuration) of Agilex™ 3 is shown below.
[Figure 1] AS x4 Single Device Configuration Connection Diagram
(Source: Device Configuration User Guide Agilex™ 3 FPGAs and SoCs)
2. QSPI Flash Debugging Procedure (Configuration Debugger)
This section describes the process of debugging QSPI Flash by launching the Configuration Debugger.
2-1. configure the device
Before checking the voltage with the Configuration Debugger, the device must be configured. Any design can be configured. Please refer to the following article for the configuration procedure.
Reference material:Let's Try Agilex 3 - FPGA Configuration
2-2. start Configuration Debugger
Next, start the Configuration Debugger, which can be started from Tools -> Configuration Debugger in the Quartus® Prime menu bar.
[Figure 2] Launching the Configuration Debugger
Point: Although we have shown how to start the Configuration Debugger from Quartus® Prime, it can also be started from the Quartus Programmer. gt; Configuration Debugger from the Quartus Programmer menu bar.
2-3. Hardware Setup and Load Device Settings
1) After the Configuration Debugger is launched, click the [Hardware Setup] button first. Then the GUI named "Hardware Setup" will be launched.
[Figure 3] Launching the Hardware Setup GUI
2) Available hardware items lists the available hardware. In this case, select Atum A3 Nano.
[Figure 4] Before selecting Hardware
Note: If Hardware is not displayed, click the "Hardware Setup" button and reboot several times.
3) If the Hardware is successfully selected, the settings will be configured as shown in the figure below.
[Figure 5] After Hardware Selection
4) Next, click the "Load Device" button to recognize the device. If the device is successfully recognized, the model number will be displayed as shown below. In this explanation, the following model number is displayed when the [Load Device] button is clicked.
Device model number : A3C(Y135BB18A|Z135BB18A)[Figure 6] Execution of Load Device
Point: When multiple devices are included in the JTAG chain, there will be multiple devices to be recognized. In this case, select the appropriate device from the pull-down menu.
2-4. Debugging QSPI Flash
The Configuration Debugger has several tabs for different purposes. In this case, we will select the Flash tab to check QSPI Flash.
[Figure 7] Selecting the Flash tab
Click the [Auto-detect] button to read the QSPI Flash information (Manufacturer ID / Device ID).
Manufacturer ID : 0x20 (MICRON)
Device ID (Memory type) : 0xBB (1.8V)
Device ID (Memory capacity) : 0x18 (128Mb)
* For detailed information, please refer to the QSPI Flash memory vendor's data sheet. Please refer to the QSPI Flash memory vendor's datasheet for detailed information.
There are three more tabs in the Flash tab, depending on the application.
- QSPI Flash tab
- QSPI Controller and SFDP tab
- Remote System Update tab
1) QSPI Flash Tab
The QSPI Flash tab is used to read/write registers, read/write memory, erase and program.
[Figure 7] Selecting the QSPI Flash tab in the Flash tab
1-1) Register Read
Set OPECODE to read the register value.
For example, to read the SFDP signature (0x5A), do the following
[After clicking the Read Registers button, the SFDP signature, 0x50444653, will appear in the message window.
[Figure 7] Register Read in the QSPI Flash tab in the Flash tab
1-2) Memory Read/Write
Memory read/write is performed.
The following is an example of reading 8 words of memory from address 0x0.
[Click the "Read Memory" button, and the read data will be displayed in the message window.
[Figure 8] Memory Read in the QSPI Flash tab within the Flash tab
The following is an example of writing data from address 0x0 to 0x12345678.
[After clicking the "Write Memory" button, the message window will display "Info: Operation done.
Then, in the Memory Read section, set the appropriate address (0x0 in this case) and click the [Read Memory] button.
read data will be displayed in the message window, confirming that the write was successfully executed.
[Figure 9] Memory Write & Memory Read in the QSPI Flash tab in the Flash tab
1-3) Erase
Erase is executed sector by sector.
Set the sector address and the number of sectors to be erased, and click the [Erase Sectors] button to execute Sector Erase.
After that, set the corresponding address in the Memory Reasd section (0x0 in this case) and click the [Read Memory] button, and you will see data (FFFFFFFFFFFF) in the message window to confirm that the erase was successfully executed.
[Figure 10] Sector Erase & Memory Read in the QSPI Flash tab in the Flash tab
1-4) Program
Program the QSPI Flash using the rpd file.
Specify the start address for writing, set the rpd file and click the [Program RPD] button.
Please wait... The message "Please wait..." will appear and the Configuration Debugger will be in a temporary no-response state.
[Figure 11] Writing rpd file
After a while, the writing of the rpd file is completed and is displayed in the message window.
[Figure 12] Writing of rpd file completed
2) QSPI Controller and SFDP tab
Click the [Read] button in the Confroller Settings and SFDP Info section to display the SFDP information.
To change the SFDP information, click the [Active] button in the QSPI Debugging section.
[Figure 13] QSPI Controller and SFDP Tab Screen
For example, to change the command mode from QPI mode to SPI mode, change Command Mode: (4-4-4) to (1-1-1).
After making the change, click the Submit button.
[Figure 14] Example of QSPI Command Mode Change: Before change
Click the "Read" button in the Controller Settings and SFDP Info section to confirm that the Command Mode has been changed.
[Figure 15] Example of QSPI Command Mode Change: After Change
3) Remote System Update tab
The Remote System Update tab allows you to write update data for Remote System Update and check the status.
Please refer to the article "I tried Remote System Update with Agilex 3 - Hardware Sequencer Edition" to be published soon.
[Figure 16] Remote System Update screen
Conclusion
Using the SDM feature of Agilex™ 3 and other SDM-equipped devices (Agilex™ family / Stratix® 10), it is possible to debug QSPI Flash connected in ASx4 mode configuration using Configuration Debugger via JTAG. The SDM functionality of the ASx4 mode configuration (Stratix® 10) can be used to debug QSPI Flash connected in ASx4 mode configuration via JTAG using the Configuration Debugger.
Although this article focuses on debugging QSPI FLash using the Configuration Debugger, the Configuration Debugger can also check device information, voltage, temperature, and other information.
These functions are explained in a separate article in the "My Trials with Agilex™ 3 Series," so please take a look at that article as well.
Click here for the full list of the 'Let's Try Agilex™ 3' series.