Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Question: How can the GPIF2 state machine of cyfxsrammaster firmware example be modified to address SRAM with 22 address lines?
Answer: The default firmware example cyfxsrammaster that comes with FX3SDK can address only up to 1KB (2^8 * 32 bits) of memory. This firmware uses LD_ADDR_COUNT to keep track of address locations already read by the state machine. The current design uses lesser memory (only 1KB), and hence the entire SRAM is read and stored in FX3 buffers.
You can modify the GPIF state machine to address SRAMs with 22 address lines (2^22 * 32 bits = 16 MB). Two threads (TH0 and TH1) are used to read and commit 1 KB of memory chunks alternatively. You will use both counters (LD_ADDR_COUNT and LD_DATA_COUNT) to keep track of address locations. LD_ADDR_COUNT is set to 2^22 and it keeps track of the entire SRAM memory, whereas LD_DATA_COUNT is set to 255 to keep track of 1KB memory. Figure 1 shows the snippet of GPIF2 SM to read SRAM. Figure 1 is the flow diagram of GPIF2 SM to read large SRAM.
Figure 1. Flow diagram for GPIF State Machine to Access Large SRAM
ADDRESS LARGE SRAMS USING GPIF2 STATE MACHINE - KBA225268.zip