RDRAM: Difference between revisions
Provide better details about setting Delay after reset.
(SpecFunc commands) |
(Provide better details about setting Delay after reset.) |
||
Line 345:
}}
'''Reset Complications:'''
RI is hardwired to use a write delay of 1 TCycle, this means the Write request packet is send starting from (TCycle 0, RCP Cycle 0), finishing after 3 TCycles. 64bits of Data is send starting at (TCycle 4, RCP Cycle 1), finishing at (TCycle7, RCP Cycle 1.75)
But the WriteDelay defaults to 4 TCycles after reset ''(probably<sup>[1]</sup>)'', Attempting to write a register will result in the Rambus device sampling 32bits of data during TCycles 7 and 8 (which is RCP Cycle 1.75 and 2.0), which is too late, It's going to be zeros or some other garbage.
Before we can do anything else at all, we need to somehow set the WriteDelay to the correct value of 001b, despite the fact the WregB command results in the Rambus device reading garbage. <Br>IPL3 gets around this problem by using MI's Repeat mode (called "Init mode" in some documentation), see [[MIPS_Interface#0x0430_0000_-_MI_MODE|MI_MODE]] for more details about MI's various modes.
By configuring a 16 byte repeat (<code>MI_MODE_REG] = 0x10f</code>), the next word written to an Rambus device register (or memory) will be repeated over 16 bytes. This causes RI to emit a 128bit burst request, with the data on the bus during TCycle 4-11. As the Rambus device is sampling the bus during TCycle 7 and 8, it will get valid data we control. <Br>But it's reading data halfway between two words. So IPL3 has to rotate the value by 16 bits to get the correct result. It wants to write <code>0x2838_1808</code>, but it actually writes <code>[0xA3F80000 + RDRAM_DELAY_REG] = 0x2808_2838</code>.
After updating WriteDelay with a broadcast write to all device, all future operations will have the correct timings.
''<sup>[1]</sup> I can't actually find any documentation that confirms WriteDelay defaults to 4 TCycles on reset. But the Toshiba 18Mbit datasheet shows that device only has 2 bits of WriteDelay, and defaults to 0b00. If we assume all version 1 Rambus devices share the same default WriteDelay, it's somewhat reasonable to assume 0b00 on a 2 bit device actually means 4 TCycles, and that devices with more bits default to 0b100 for compatibility. There is probably some way to design a hardware test for this. ''
==== <span style="display:none;">AdrS[9:2] 0x03 - Mode ====
|