4/29/2020
Loongson 3A3000 / 3B3000 Processor User Manual
48
55
Just set it to 0.
(13) After the adjustment, perform two Lvl_req operations respectively, and observe Lvl_resp_x [7: 5] and
The value of Lvl_resp_x [4: 2] changes. If each increase is Burst_length / 2, continue to step 13
Operation; if not 4, you may need to add or subtract one to Rd_oe_begin_x
Burst_length / 2, it is likely that some fine-tuning of the value of Dll_gate_x
(14) Set Lvl_mode (0x180) to 2'b00 to exit Gate Leveling mode;
9.5.4
Initiate MRS commands separately
The order of MRS commands issued by the memory controller to the memory are:
MR2_CS0, MR2_CS1, MR2_CS2, MR2_CS3,
MR3_CS0, MR3_CS1, MR3_CS2, MR3_CS3,
MR1_CS0, MR1_CS1, MR1_CS2, MR1_CS3,
MR0_CS0, MR1_CS1, MR1_CS2, MR1_CS3.
Among them, whether the MRS command corresponding to CS is valid or not is determined by Cs_mrs, and only the corresponding chip select on Cs_mrs
Is valid, the MRS command will be issued to the DRAM. The corresponding value of each MR is determined by the register Mr * _cs *.
These values are also used for MRS commands when initializing memory.
The specific operations are as follows:
(1)
Set the registers Cs_mrs (0x168) and Mr * _cs * (0x190 – 0x1B8) to the correct values;
(2) Set Command_mode (0x190) to 1 to make the controller enter the command sending mode;
(3) Sampling Status_cmd (0x190), if it is 1, it means the controller has entered command sending mode
Go to the next step, if it is 0, you need to continue to wait;
(4) Write Mrs_req (0x198) to 1, send MRS command to DRAM;
(5) Sampling Mrs_done (0x198), if it is 1, it means that the MRS command has been sent and can be exited, such as
Page 60
Godson 3A3000 / 3B3000 Processor User Manual • Volume 1
If it is 0, you need to continue to wait;
(6) Set Command_mode (0x190) to 0 to make the controller exit the command sending mode.
9.5.5
Any operation control bus
The memory controller can send any command combination to the DRAM through the command sending mode, and the software can set Cmd_cs,
Cmd_cmd, Cmd_ba, Cmd_a (0x168), issued to DRAM in command sending mode.
The specific operations are as follows:
(1)
Set the registers Cmd_cs, Cmd_cmd, Cmd_ba, Cmd_a (0x190) to the correct values;
(2) Set Command_mode (0x190) to 1 to make the controller enter the command sending mode;
(3) Sampling Status_cmd (0x190), if it is 1, it means the controller has entered command sending mode
Go to the next step, if it is 0, you need to continue to wait;
(4) Write Cmd_req (0x190) to 1 to send commands to DRAM;
(5) Set Command_mode (0x190) to 0 to make the controller exit the command sending mode.
9.5.6
Self-loop test mode control