13. Sram_data_32bit_test
13.1. Function description:
This demo shows the function of SRAM Write & Read, the memory data bus width is 32bits.
Initialize & configure the GMC SRAM controller.
Timing configuration & enable GMC.
Writing the initial value to SRAM bank1 address in word, half-word or byte, and then read out to compare, covering:
Write to SRAM and then read out to compare in a continue address range by word, half word and byte;
Set/Clear bit one by one step by word, half word and byte, and then read out to compare;
Align test, although the memory data bus width is 32bits, but also can noramlly access the address which the offset is 1/2/3 byte;
First write to 3 continue address regions from start, middle, and end address, then read out to compare for boundary test.
Note
The model is 2KB with 32bit width and memory data bus width is 32bits, so accessible maximux address is 8KB.
13.2. Detail configuration:
13.2.1. Sram controller
Bank |
Addr/Data multiplexing enable |
Memory bank enable |
Memory type |
Flash access enable |
Bank mapping |
Data width |
Write enable |
Extened mode enable |
Continuous clock enbale |
Signale extend |
bank 1 |
disable |
enable |
Nor-Flash |
enable |
SDRAM bank2 remapped |
32 bits |
enable |
enable |
enable |
NOE |
13.2.2. Timing configure
Addr setup time |
Addr hold time |
Data setup time |
Bus turnaround |
Data latency |
Early time |
Access mode |
Clock divide ratio |
4 |
0 |
4 |
10 |
0+2 |
1 |
mode B |
1+1 |
Note
Only data latency’s unit is gmc clk cycle, others is bus clock cycle; gmc clk = bus clk / Clock Divide Ratio.
13.3. Test result:
If the data read from SDRAM is same as the data writted to SDRAM, then print pass, if not print fail.
13.4. IO connection:
None