Generic Serial Flash Interface Intel® FPGA IP User Guide
ID
683419
Date
11/09/2021
Public
A newer version of this document is available. Customers should click here to go to the newest version.
1.1. Release Information
1.2. Device Family Support
1.3. Signals
1.4. Parameters
1.5. Register Map
1.6. Using Generic Serial Flash Interface Intel® FPGA IP
1.7. Generic Serial Flash Interface Intel® FPGA IP Reference Design
1.8. Flash Access Using the Generic Serial Flash Interface Intel® FPGA IP
1.9. Nios II HAL Driver
1.10. Generic Serial Flash Interface Intel® FPGA IP User Guide Archives
1.11. Document Revision History for the Generic Serial Flash Interface Intel® FPGA IP User Guide
1.8.2. Flash Operations to Read Flash Registers
The following flash operations are used to read flash registers:
- Read device ID
- Read status register
- Read flag status register
- Read configuration register
- Read bank register
- Read enhanced volatile configuration register
The following registers are used to read the status of a register:
- Flash command setting register
- Flash command control register
- Flash command read data 0 register
Perform the Read Device ID Operation
proc read_device_id { } {
global mp flash_cmd_setting flash_cmd_ctrl flash_cmd_read_data_0
master_write_32 $mp $flash_cmd_setting 0x0000489F
master_write_32 $mp $flash_cmd_ctrl 0x1
set device_id [master_read_32 $mp $flash_cmd_read_data_0 1]
puts $device_id
}
To perform the read device ID operation, follow these steps:
- Define the global variables.
- Customize the read device ID operation by writing to the flash command setting register.
- Set bit [7:0] of this register to 9F as 9Fh is the operation code of the read device ID operation.
- Set bit [10:8] to 0 as this operation does not carry any address byte.
- Set bit 11 to 1 as the number of byte declared in bit [15:12] is the read data from the flash device.
- Set bit [15:12] to 4 as you will be reading 4 bytes device ID data from the flash.
- Write 1 to bit 0 of the flash command control register to start the read device ID operation.
- Read the device ID from the flash command read data 0 register.