# The DMA controller: Hitachi HD63450 ## The chip (DOC: DMAC-H, the HD63450 data sheet in Hitachi's 1987 peripheral LSI data book, printed p. 307 on; DMAC-M, Motorola's MC68450 manual; DMAC-AN, Hitachi's HD68450 application notes) The HD63450 is the CMOS version of the NMOS HD68450 (which Motorola second-sourced as the MC68450), "upward compatible" with it, adding "Multi-Block Transfer with DONE" (the block-restart operation) (DMAC-H, description). Its features, from the same page: 68000 bus compatible; four independent channels with programmable priority; memory to memory, memory to device and device to memory; 8- or 16-bit devices; auto-request and external-request modes; single-block (unchained) and multi-block (continue mode, array chaining, linked array chaining, multi-block with DONE) transfers; 68000 bus-exception support (it reacts to BERR, HALT and retry during its own cycles); **two vectored interrupts per channel** (normal, NIV, and error, EIV); "up to 5.0 Mbytes/sec at 10.0 MHz". Each channel has CSR/CER (status, error code), DCR (device control: burst or cycle-steal request mode, with or without hold; device type and port size), OCR (direction, operand size, chaining mode, request generation), SCR (address count up/down), CCR (start, continue, halt, abort, interrupt enable), MTC (memory transfer count), MAR/DAR (memory and device addresses), BTC/BAR (base count and address for chaining and continue), NIV, EIV, MFC/DFC/BFC (function codes) and CPR (priority); the chip has one GCR (burst time and bandwidth for cycle steal with hold) (DMAC-H register descriptions; the request modes' encoding 00 burst, 10 cycle steal without hold, 11 cycle steal with hold; array chaining 10 and linked array chaining 11 in OCR). ## On the X68000 - Registers at E84000: channel n at E84000 + 0x40 n, GCR at E840FF (the chip's own layout, DOC: DMAC-M figure 3-1; the base address is HYPOTHESIS, consistent with the IPL's writes at E84084-E840B9 and E840C4-E840F9: OBSERVED addresses). - **Channel use** (HYPOTHESIS: community knowledge): channel 0 the FDC, channel 1 the hard disk (SASI/SCSI), channel 2 the user and expansion channel (also used for memory-to-memory copies), channel 3 the MSM6258 ADPCM. - **What the IPL writes (OBSERVED, first 60 frames):** channel 2: DCR = 08, MFC/CPR/DFC/ BFC = 05/03/05/05, NIV = 0x68, EIV = 0x69; channel 3: DCR = 80, SCR = 04 (memory address counts up, device address fixed), NIV = 0x6A, EIV = 0x6B, DAR written as the word pair 00E9/2003 = E92003 (the MSM6258's data port), MFC/CPR/DFC/BFC = 05/01/05/05. (Register offsets from DMAC-M figure 3-1, "Register Memory Map", p. 3-2, read from the page image: channel bases 00/40/80/C0; DCR +04, OCR +05, SCR +06, CCR +07, MTCR +0A, MAR +0C, DAR +14, BTCR +1A, BAR +1C, NIVR +25, EIVR +27, MFCR +29, CPR +2D, DFCR +31, BFCR +39; GCR at FF only.) DCR = 80 on channel 3 reads as cycle steal without hold (DOC encoding) and DAR = E92003 ties channel 3 to the ADPCM data port: the first piece of evidence for the channel table above. - Request lines: the FDC's DRQ to channel 0, the hard-disk interface's to channel 1, the MSM6258's data request to channel 3, the expansion bus's to channel 2 (HYPOTHESIS). - Interrupts at level 3 (HYPOTHESIS), vectored from NIV/EIV. ## Modelling level and timing Transaction level with each bus cycle charged to the 68000's bus: the DMAC is a bus master that steals the 68000's bus, so every DMA cycle is a cycle the CPU does not run and an access other domains can see. The data sheet's timing diagrams give the cycle structure (DMAC-H's timing chapter; DMAC-AN's worked examples). Unknowns: the arbitration latency between the 68000 releasing the bus and the first DMA cycle on this board (U5), and the wait states the X68000's memory and I/O impose on DMA cycles (U6). ## Reuse No family core models a 68450-family DMAC. Other users in the family's plans: none known (the Sega CD, PC Engine CD and Amiga use their own DMA). It stays in the board (chip rule).