1 / 14

Direct Memory Access

Direct Memory Access. Sequence of events: A device (peripheral, CPU) requests a controller to transfer information; The controller request control over the buses from the CPU by asserting the HOLD signal;

napua
Download Presentation

Direct Memory Access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Direct Memory Access • Sequence of events: • A device (peripheral, CPU) requests a controller to transfer information; • The controller request control over the buses from the CPU by asserting the HOLD signal; • The CPU upon receiving the HOLD signal will respond in a few clock cycles by suspending program execution, placing all buses in high impedance state, and acknowledging the request by asserting HLDA; • The DMA controller has control over the buses;

  2. Direct Memory Access • The DMA controller performs data transfers; • DMA read – transfer from memory to I/O device; • DMA write - transfer from I/O device to memory; • Memory to memory transfers; • When transfers are completed the DMA controller returns control of the buses to the CPU by removing the HOLD signal; • The CPU gains control over the buses and it removes the HLDA signal.

  3. 8237 – DMA Controller • Features: • Four Independent Maskable Channels with Autoinitialization Capability; • Cascadable to any Number of Channels • High Speed Data Transfers: • Up to 4MBytes/sec with 8MHz Clock • Up to 6.25MBytes/sec with 12.5MHz Clock • Memory-to-Memory Transfers

  4. 8237 – DMA Controller • Static CMOS Design Permits Low Power Operation • ICCSB = 10mA Maximum • ICCOP = 2mA/MHz Maximum • Fully TTL/CMOS Compatible • Internal Registers may be Read from Software

  5. 8237 – Block Diagram

  6. 8237 – Pin Definitions • CLK: Clock input. • CS’: Enable for 8237 programming. • RESET: Clears the command, status, request, temporary registers and first/last flip-flop. Sets the mask register. • READY: Logic 0 on READY causes the 8237 to enter wait states for slow memory or I/O device operation. • HLDA: Signal the 8237 that the CPU has relinquished the bus.

  7. 8237 – Pin Definitions • DREQ0-DREQ3: DMA request inputs. • DB0-DB7: Data bus. • IOR’: I/O read. • IOW’: I/O write. • EOP’: End of process. • A0-A3: Address lines used to select the internal registers. • HRQ: Hold request. • DACK0-DACK3: DMA channel acknowledge.

  8. 8237 – Pin Definitions • AEN: Address enable. • ADSTB: Address strobe. • MEMR’: Memory read. • MEMW’: Memory write.

  9. 8237 – Internal registers • The 8237 has several register to be used in its operation. They are listed below. • Current address register - CAR; • Current word count register - CWCR; • Base address register - BA; • Base word count register - BWC; • Command register – CR; • Mode register – MR; • Bus request register – BR; • Mask register set/reset – MRSR; • Mask register – MSR; • Status register – SR.

  10. 8237 – Software Commands

  11. 8237 – Programming • Programming • The 82C37A will accept programming from the host processor anytime that HLDA is inactive, and at least one rising clock edge has occurred after HLDA went low. It is the responsibility of the host to assure that programming and HLDA are mutually exclusive. • Disable the controller (setting bit 2 in the Command register) or masking the channel before programming any of its registers. Once the programming is complete, the controller can be enabled/unmasked. • After power-up it is suggested that all internal locations be loaded with some known value, even if some channels are unused. This will aid in debugging.

  12. 8237 – Programming

  13. 8237 – Programming

  14. 8237 – Programming

More Related