
2.5.1.1 Programming 8-bit Task File Timing Registers
Architecture
The REGSTB, REGRCVR, and MISCCTL are used in reprogramming the timings for 8-bit task file registeraccesses. The required IDE timing parameters for 8-bit task file register accesses are defined in theATA/ATAPI-6 specification.
The REGSTB and REGRCVR can be programmed to match the parameters t
0
(cycle time), t
2
(strobetime), and t
2i
(recovery time). The HWNHLD bits in MISCCTL are used to program the hold time for thewrite data (t
4
parameter).
The REGSTB directly controls the number of clock cycles that the ATA_HIOR and ATA_HIOW strobes willbe asserted during 8-bit task file accesses. This corresponds to the strobe width timing parameter, t
2
.
The REGRCVR defines the number of clock cycles for the recovery time between task file accesses. Thiscorresponds to recovery timing parameter, t
2i
.
The sum of both parameters (t
2
+ t
2i
) must be equal or greater than the cycle time, t
0
. The HWNHLD nPbits in MISCCTL allow control over the number of clock cycles for the write data hold time during task filewrites. With knowledge of the IDE controller clock frequency, you can program the appropriate number ofclock cycles to match the timing requirements. Note that the timing registers must be programmed with avalue one less than the desired number of cycles, so a value of 0 specifies 1 clock cycle, a value of 1specifies 2 clock cycles, etc.
Example 1 and Example 2 illustrate how the 8-bit task file timing registers can be programmed.
Example 1. 8-Bit Task File Timing Registers Programming for Mode 0
Programming task file accesses for mode 0 operation using an IDE controller clock frequency of66 MHZ (15 ns period).
For mode 0 operation, t
2
requires a minimum of 290 ns, this translates to a minimum of 20 clock cycles(20 cycles נ15 ns = 300 ns). There is no requirement for t
2i
in mode 0 operation, but t
0
requires aminimum of 600 ns, or 40 clock cycles. This means REGSTB and REGRCVR can be programmed toany combination equaling 40 (or more) clock cycles, with REGSTB specifying at least 20 clock cycles.
Sample programming values are REGSTB = 13h (20 clock cycles) and REGRCVR = 13h (20 clockcycles), or REGSTB = 1Fh (32 clock cycles) and REGRCVR = 7h (8 clock cycles). In addition, theminimum write data hold time specified is 30 ns, so the HWNHLD nP bits in MISCCTL should beprogrammed to a value of at least 2 clock cycles. A sample value is HWNHLD nP = 2h (3 clock cycles)providing enough hold time and margin.
Example 2. 8-Bit Task File Timing Registers Programming for Mode 4
Programming task file accesses for mode 4 operation using an IDE controller clock frequency of99 MHZ (10.10 ns period).
For mode 4 operation, t
2
requires a minimum of 70 ns, this translates to a minimum of 7 clock cycles (7cycles נ10.10 ns = 70.70 ns). t
2i
is defined to be at least 25 ns, this translates to a minimum of 3 clockcycles (3 cycles נ10.10 ns = 30.30 ns). The minimum cycle time t
0
is 120 ns, or 12 clock cycles. Thismeans REGSTB and REGRCVR can be programmed to any combination equaling 12 (or more) clockcycles, with REGSTB specifying at least 7 cycles and REGRCVR specifying at least 3 cycles.
Sample programming values are REGSTB = 7h (8 clock cycles) and REGRCVR = 3h (4 clock cycles),or REGSTB = 8h (9 clock cycles) and REGRCVR = 2h (3 clock cycles). In addition, the minimum writedata hold time specified is 10 ns, so the HWNHLD nP bits in MISCCTL should be programmed to avalue of at least 1 clock cycle. A sample value is HWNHLD nP = 1h (2 clock cycles) providing enoughhold time and margin.
14 ATA Controller SPRUEQ3 – December 2007Submit Documentation Feedback