Intel 8237
View on Wikipedia

Intel 8237 is a direct memory access (DMA) controller, a part of the MCS 85 microprocessor family. It enables data transfer between memory and the I/O with reduced load on the system's main processor by providing the memory with control signals and memory address information during the DMA transfer.
The 8237 is a four-channel device that can be expanded to include any number of DMA channel inputs. The 8237 is capable of DMA transfers at rates of up to 1.6 megabyte per second. Each channel is capable of addressing a full 64k-byte section of memory and can transfer up to 64k bytes with a single programming.[1]
A single 8237 was used as the DMA controller in the original IBM PC and IBM XT. The IBM PC AT added another 8237 in master-slave configuration, increasing the number of DMA channels from four to seven.[2] Later IBM-compatible personal computers may have chip sets that emulate the functions of the 8237 for backward compatibility. The Intel 8237 was actually designed by AMD (called Am9517[3]). It was part of a cross licensing agreement, allowing AMD to manufacture Intel processors, that made the design available for Intel as well. This is why the Intel package has "(C) AMD 1980" printed on it. The 8237, that operate at 3MHz and 5MHz was made by Intel as described in variants while NEC has developed the μPD71037, a version that operates at 10MHz.[4]
Modes
[edit]The 8237 operates in four different modes, depending upon the number of bytes transferred per cycle and number of ICs used:
- Single - One DMA cycle, one CPU cycle interleaved until address counter reaches zero.[5]
- Block - Transfer progresses until the word count reaches zero or the EOP signal goes active.[5]
- Demand - Transfers continue until TC or EOP goes active or DRQ goes inactive. The CPU is permitted to use the bus when no transfer is requested.[5]
- Cascade - Used to cascade additional DMA controllers. DREQ and DACK is matched with HRQ and HLDA from the next chip to establish a priority chain. Actual bus signals is executed by cascaded chip.[5]
Memory-to-memory transfer can be performed. This means data can be transferred from one memory device to another memory device. The channel 0 Current Address register is the source for the data transfer and channel 1 and the transfer terminates when Current Word Count register becomes 0.
In auto initialize mode the address and count values are restored upon reception of an end of process (EOP) signal. This happens without any CPU intervention. It is used to repeat the last transfer.[5]
The terminal count (TC) signals end of transfer to ISA cards. At the end of transfer an auto initialize will occur configured to do so.
Single mode
[edit]In single mode only one byte is transferred per request. For every transfer, the counting register is decremented and address is incremented or decremented depending on programming. When the counting register reaches zero, the terminal count TC signal is sent to the card.[6][7]
The DMA request DREQ must be raised by the card and held active until it is acknowledged by the DMA acknowledge DACK.[6]
Block transfer mode
[edit]The transfer is activated by the DREQ which can be deactivated once acknowledged by DACK. The transfer continues until end of process EOP (either internal or external) is activated which will trigger terminal count TC to the card. Auto-initialization may be programmed in this mode.[6]
Demand transfer mode
[edit]The transfer is activated by DREQ and acknowledged by DACK and continues until either TC, external EOP or DREQ goes inactive. Only TC or external EOP may activate auto-initialization if this is programmed.[6]
Internal registers
[edit]The internal registers used in the 8237 for data transfer are as follows:
- Base address register: To store the initial address from where data transfer will take place
- Base word count register: To store the number of transfers to be performed
- Current address register: To store the current address from where data is being transferred
- Current word count register: To store the number of transfers remaining to be performed
- Temporary address register: To hold address of data during memory-to-memory transfer
- Temporary word count register: To hold number of transfers to be performed in memory-to-memory transfer
- Mode register: 8-bit register which stores the channel to be used, the operating mode, i.e. the transfer mode, and other transfer parameters
- Command register: 8-bit register which initializes the channel to be used for data transfer
- Request register: 8-bit register used to indicate which channel is requesting for data transfer
- Mask register: 8-bit register used to mask a particular channel from requesting for DMA service
- Status register: 8-bit register used to indicate which channel is currently under DMA service and some other parameters
IBM PC use
[edit]As a member of the Intel MCS-85 device family, the 8237 is an 8-bit device with 16-bit addressing. However, it is compatible with the 8086/88 microprocessors. The IBM PC and PC XT models (machine types 5150 and 5160) have an 8088 CPU and an 8-bit system bus architecture; the latter interfaces directly to the 8237, but the 8088 has a 20-bit address bus, so four additional 4-bit address latches (all actually part of a single 74LS670 device), one for each DMA channel, are added alongside the 8237 to augment the address counters. However, because these external latches are separate from the 8237 address counters, they are never automatically incremented or decremented during DMA operations, making it impossible to perform a DMA operation across a 64 KiB address boundary. Attempts to cross a 64 KiB boundary in a DMA transfer will wrap around within one 64 KiB block of memory. (For example, if a DMA channel and the associated address latch were programmed to transfer 256 bytes to ascending addresses starting at address 0x3FF8C, instead of transferring to addresses 0x3FF8C through 0x4008B, data would be transferred to addresses 0x3FF8C through 0x3FFFF and then to 0x30000 through 0x3008B.)
The IBM PC also used one channel of its 8237 to refresh its dynamic memory by tying the input of a DMA channel to the output of the system board's timer counter. This arrangement caused periodic read cycles on the memory chips, which refreshed the memory.[8]
The IBM PC AT (machine type 5170) and 100% compatibles use an 80286 CPU and a 16-bit system bus architecture. In addition to the 8237 from the PC and XT models, a second, cascaded 8237 is added, for 16-bit DMA transfers. This is possible, despite the 8237 being an 8-bit device, because the 8237 performs transfers between an I/O port and memory as "fly-by" transfers in which the data is placed onto the bus by the source memory or I/O port and directly read at the same time by the destination I/O port or memory, without being handled by the 8237. For this mode of transfer, the width of the data bus is essentially immaterial to the 8237 (as long as it is connected to a data bus at least 8 bits wide, for programming the 8237 registers). The second 8237 in an AT-class PC provides three 16-bit DMA channels (its channels 1 through 3, named channels 5 through 7 in the PC AT); its channel 0 (named channel 4 in the PC AT) is used in cascade mode to connect the 8237 for 8-bit DMA as the "slave" in the cascade arrangement; the 8237 providing the 16-bit channels is the "master". So that it can address 16-bit words, it is connected to the address bus in such a way that it counts even addresses (0, 2, 4, ...) instead of single addresses. Like the first 8237, it is augmented with four address-extension registers. In an AT-class PC, all eight of the address augmentation registers are 8 bits wide, so that full 24-bit addresses—the size of the 80286 address bus—can be specified. DMA transfers on any channel still cannot cross a 64 KiB boundary. (16-bit DMA is limited to 32,768 16-bit words, even though a DMA channel can count through 65536 addresses; the most-significant bit of the address counter from a 16-bit DMA channel is ignored.) Because the 8237 memory-to-memory DMA mode operates by transferring a byte from the source memory location to an internal temporary 8-bit register in the 8237 and then from the temporary register to the destination memory location, this mode could not be used for 16-bit memory-to-memory DMA, as the temporary register is not large enough. Additionally, memory-to-memory 16-bit DMA would require use of channel 4, conflicting with its use to cascade the 8237 that handles the 8-bit DMA channels. However, on the AT, 8-bit DMA channel 0 is no longer used for DRAM refresh, having been replaced by specialized refresh logic, so it should be possible to perform 8-bit memory-to-memory DMA using channels 0 and 1 without interrupting DRAM refresh.
The design of 8237-based DMA in PC AT compatibles was not updated with the move to the 32-bit CPUs and 32-bit system bus architectures. Consequently, a limitation on these machines is that the 8237 DMA controllers with their companion address "page" extension registers only can address 16 MiB of memory, according to the original design oriented around the 80286 CPU, which itself has this same addressing limitation.[9] This means that for other memory areas, the data has to be transferred first by DMA from the I/O device to an intermediate buffer in the first 16 MiB of the physical address space, and then moved to the final memory by the CPU; or, in the other direction, it must be transferred from the initial memory to the intermediate buffer by the CPU before being transferred by DMA from that buffer to the I/O device. This technique is called "bounce buffer". In general, it loses any overall speed benefit associated with DMA, but it may be necessary if a peripheral requires to be accessed by DMA due to either demanding timing requirements or hardware interface inflexibility.
In the PS/2 series of computers, IBM did update the DMA hardware to support 32-bit data and addresses in some systems with 80386 CPUs, but they did this by replacing the 8237 with a new DMA controller design. The new design includes an 8237 compatibility mode for downward compatibility with the PC AT.
Integration into chipsets
[edit]Although this device may not appear as a discrete component in modern personal computer systems, it does appear within system controller chip sets. For example, the PIIX integrated two 8237 controllers for ISA bus DMA.[10][11]
Variants
[edit]| Model Number | Clock Speed | Transfer Speed[list 1] | Package | Price (USD)[list 2] |
|---|---|---|---|---|
| 8900 | 3 MHz | |||
| 8237 | 3 MHz | 44-Pin PLCC[list 3][12] | ||
| 8237-2 | 5 MHz | 1.6 mps | $20.00[13] |
See also
[edit]- Intel 8284 - Clock generator
- Intel 8288 - Bus controller
- 8250 UART - Asynchronous serial controller (EIA-232)
- Intel 8253 - Programmable Interval Timer (PIT)
- Intel 8255 - Programmable Peripheral Interface (PPI)
- Intel 8259 - Programmable Interrupt Controller (PIC)
- Parallel ATA (P-ATA)
- Industry Standard Architecture (ISA)
References
[edit]- ^ Intel microprocessors by Barry B Brey
- ^ N. MATHIVANAN (2007). PC-BASED INSTRUMENTATION: CONCEPTS AND PRACTICE. PHI Learning Pvt. Ltd. pp. 227–229. ISBN 978-81-203-3076-4.
- ^ "Am9517A Multimode DMA Controller" (PDF). Retrieved 2024-01-04.
- ^ "pPD71037 Direct Memory Access (DMA) Controller" (PDF). Retrieved 2024-01-04.
- ^ a b c d e aluzina.org - Intel 8237/8237-2 High performance. Programmable DMA controller (.pdf) datasheet
- ^ a b c d books.google.com - Advanced Microprocessors And Peripherals, 2006 p312/313
- ^ pinouts.ru - ISA bus pinout and wiring, 2008-10-20
- ^ Technical Reference (PDF). International Business Machines Corporation. August 1981. p. 2-4. Retrieved 24 June 2025.
- ^ brokenthorn.com - Operating Systems Development Series
- ^ "8237A HIGH PERFORMANCE PROGRAMMABLE DMA CONTROLLER" (PDF). PDOS. Retrieved 7 May 2024.
- ^ "82371FB (PIIX) and 82371SB (PIIX3)" (PDF). Data Sheet Catalog. Retrieved 7 May 2024.
- ^ Ashborn, Jim; "Advanced Packaging: A Little Goes A Long Way", Intel Corporation, Solutions, January/February 1986, Page 2
- ^ Intel Corporation, "Microcomputer Components: New Intel 8237 DMA Controller provides a 5 MHz DMA answer for 8088 and 8085A-2 based systems", Intel Preview, May/June 1979, Pg 9.
External links
[edit]- DMA: What it is and How it Works FreeBSD Developers' Handbook. 1997 (internet archive).
Intel 8237
View on GrokipediaHistory
Development Origins
The Intel 8237 DMA controller originated from a design developed by Advanced Micro Devices (AMD) as the Am9517, under a 1976 patent cross-licensing agreement between AMD and Intel that permitted mutual manufacturing and use of each other's processor and peripheral technologies.[3] This collaboration enabled AMD to leverage Intel's microprocessor architectures while providing Intel access to AMD's innovative peripheral designs, fostering compatibility across emerging computing ecosystems in the late 1970s. The Am9517, later adopted and rebranded by Intel as the 8237, was fabricated using N-channel silicon gate MOS technology, reflecting the era's emphasis on efficient, low-power integrated circuits for microprocessor-based systems.[4] Development of the Am9517/8237 was closely aligned with Intel's MCS-85 family (including the 8080 and 8085 microprocessors) and the nascent x86 architecture, such as the 8086 introduced in 1978, to address the growing demand for high-performance input/output operations in single-board computers and early personal systems.[4] At the time, microprocessors like the 8085 were increasingly paired with peripherals requiring rapid data movement, such as floppy disk drives and emerging hard disk storage, where CPU-mediated transfers bottlenecked system performance. The controller's design prioritized direct memory access (DMA) to offload the processor, enabling seamless integration into memory-mapped I/O environments typical of these 8-bit and early 16-bit platforms.[4] Central to the device's architecture were four independent DMA channels, each supporting up to 64 KB transfers via 16-bit address and byte count registers, optimized for 8-bit data paths to match the prevailing bus standards of the period.[4] These features allowed for versatile transfer modes, including demand, block, and single transfers, with expandability through cascading for multi-controller setups, ensuring scalability for high-speed peripherals while maintaining compatibility with NMOS-based systems operating at clock speeds up to 4 MHz.[4] This focus on programmable efficiency marked a significant advancement in peripheral support, directly responding to the limitations of earlier DMA solutions like the Intel 8257.Release and Early Adoption
The Intel 8237, a programmable direct memory access (DMA) controller fabricated using NMOS technology, was released by Intel in 1979 to support efficient data transfers in microprocessor-based systems, with an initial operating clock speed of up to 3 MHz.[5][6] Its design addressed limitations in earlier DMA controllers like the Intel 8257 by introducing features such as memory-to-memory transfer capabilities between channels 0 and 1, enabling up to 64 KB per operation compared to the 8257's 16 KB limit, and providing enhanced programmable control for dynamic reconfiguration during operation.[6][7] The official datasheet for the 8237 was published by Intel in 1980, highlighting these advancements and positioning the device as a high-performance peripheral for improving system throughput in data-intensive applications.[6] Early commercial availability targeted original equipment manufacturers (OEMs), with volume pricing around $25 per unit for the 3 MHz variant in quantities of 100, making it accessible for integration into custom designs.[8] Initial adoption occurred primarily in industrial and embedded systems leveraging the Intel 8086 microprocessor, including data acquisition setups and process control equipment where DMA offloaded the CPU for real-time I/O handling.[9] These applications benefited from the 8237's compatibility with the 8086's 16-bit architecture and its ability to manage four independent channels for peripherals like disk controllers and sensors. AMD released a parallel version, the Am9517, under cross-licensing arrangements around the same period.[4]Architecture
Block Diagram and Key Components
The Intel 8237 is housed in a 40-pin dual in-line package (DIP) fabricated using NMOS technology, designed to operate at a single 5 V supply with a typical power dissipation of up to 1.5 W.[1][5] At its core, the 8237 features four independent DMA channels, each equipped with 16-bit address counters and byte counters capable of handling up to 64 KB transfers, along with a bidirectional 8-bit data bus interface and integrated control logic that facilitates direct data transfers between I/O peripherals and system memory without CPU intervention.[1] The control logic encompasses major functional blocks including a timing control unit for generating internal clocks and external signals, a program command control section for decoding operational instructions, and a priority encoder to manage channel arbitration during concurrent requests.[1] The block diagram of the 8237 illustrates these elements interconnected via internal data paths, with input/output request lines (DREQ0–DREQ3) serving as asynchronous inputs from peripherals to initiate DMA cycles, and corresponding acknowledge signals (DACK0–DACK3) output to grant access and notify devices of active transfers.[1] Address generation is handled through 16-bit address bus drivers, where lower-order bits (A0–A7) are provided directly and higher-order bits are multiplexed over the data bus (DB0–DB7) using external latches for extension to 24-bit addressing in larger memory systems.[1] The chip supports byte and word transfers, as well as verify operations for data integrity checks, with an internal first/last flip-flop that tracks the initial and final cycles of multi-byte transfers to optimize bus usage and signaling.[1] Registers within the channels are briefly referenced for configuring transfer parameters, but their detailed programming is handled separately.[1]Pin Configuration and Interfaces
The Intel 8237 DMA controller is housed in a 40-pin dual in-line package (DIP) and features a pinout designed for integration with microprocessor systems, providing direct control over memory addressing and data transfer during DMA operations. The address interface includes eight pins for the lower address bits: A0–A3 are bidirectional tri-state outputs that serve as inputs during programming cycles and outputs during active DMA cycles, while A4–A7 are dedicated tri-state outputs enabled only during DMA service to provide the upper four bits of the 8-bit on-chip address. To support full 16-bit or 20-bit addressing (as required for systems like the 8086), external page registers latch the upper address bits (A8–A15 or A16–A19), effectively extending the addressing capability to 64 KB per channel without additional pins on the 8237 itself. The data bus consists of eight bidirectional tri-state pins (DB0–DB7) that handle both programming data from the CPU and actual DMA data transfers between memory and peripherals.[1][10] Key control signals facilitate bus arbitration and DMA cycle management. The CLK pin accepts a single-phase clock input, with a maximum frequency of 3 MHz for the standard 8237 and up to 5 MHz for the 8237-2 variant, synchronizing all internal operations. HRQ (hold request) is an output pin that signals the CPU to relinquish the bus, while HLDA (hold acknowledge) is an input pin where the CPU confirms bus release, enabling the 8237 to take control for DMA transfers. DMA channel requests are handled via four input pins (DREQ0–DREQ3), which are asynchronous and prioritized internally (DREQ0 highest), and corresponding output acknowledge pins (DACK0–DACK3), whose polarity is programmable but defaults to active low. Additional control pins include CS (chip select, active low for I/O addressing), RESET (active high to initialize the device), READY (input to extend cycles for slow peripherals), and EOP (bidirectional end-of-process signal for terminating transfers). Memory and I/O operations are controlled by outputs such as MEMR/MEMW (memory read/write, active low) and IOR/IOW (I/O read/write, bidirectional), along with AEN (address enable, active high) and ADSTB (address strobe, active high) for latching external addresses.[6][11][10] The 8237 is electrically compatible with TTL logic levels, with input high voltage (VIH) minimum of 2.0 V, input low voltage (VIL) maximum of 0.8 V, output high voltage (VOH) minimum of 2.4 V at -400 μA, and output low voltage (VOL) maximum of 0.45 V at 8 mA, ensuring seamless integration with TTL-based systems. Timing specifications include a DREQ setup time to CLK low of 0 ns (asynchronous), a READY setup time to CLK low of 100 ns minimum, and hold times of 0 ns for most inputs relative to CLK. Power requirements are +5 V DC (VCC) with ground (VSS), and the device operates over a temperature range of 0°C to 70°C for commercial versions.[1][10] Designed primarily for the 8080/8085 microprocessor bus, the 8237 interfaces with the 8086/8088 via external latches (such as the 8282 or 8283) to handle the multiplexed address/data bus, where address bits are latched during the first T cycle and data is transferred in subsequent cycles. For expansion, the device supports cascading multiple 8237s by connecting the HRQ and HLDA of a master to a slave's DREQ and DACK pins, allowing up to four controllers (16 channels total) while maintaining a single bus interface to the CPU; in this configuration, lower-priority channels on slaves are arbitrated only after master channels are serviced.[1][6][10]| Pin Group | Pins | Type | Function |
|---|---|---|---|
| Address | A0–A3 | I/O (tri-state) | Lower 4 address bits; inputs for register select, outputs during DMA |
| Address | A4–A7 | O (tri-state) | Upper 4 address bits; enabled during DMA service |
| Data | DB0–DB7 | I/O (tri-state) | 8-bit bidirectional data bus for programming and transfers |
| DMA Requests | DREQ0–DREQ3 | I | Asynchronous channel request inputs (prioritized) |
| DMA Acknowledges | DACK0–DACK3 | O | Channel acknowledge outputs (programmable polarity) |
| Bus Control | HRQ | O | Hold request to CPU |
| Bus Control | HLDA | I | Hold acknowledge from CPU |
| Clock/Timing | CLK | I | System clock input (max 3–5 MHz) |
| Other Controls | CS, RESET, READY, EOP, IOR/IOW, MEMR/MEMW, AEN, ADSTB | Mixed | Chip select, reset, ready wait, end-of-process, I/O and memory controls, address enable/strobe |
| Power | VCC, VSS | Supply | +5 V and ground |
Internal Structure
Registers and Programming
The Intel 8237 DMA controller incorporates a set of programmable registers that enable software configuration of transfer parameters, channel selection, and operational modes for its four independent channels. These registers are accessed via the chip's 8-bit bidirectional data bus using I/O read (IOR) and write (IOW) signals, with address lines A0–A3 decoding the specific register (ports 00h–0Fh). Each channel maintains eight 8-bit registers internally: two for the 16-bit current address (CAR), two for the 16-bit current word count (CWCR), two for the 16-bit base address (BAR), and two for the 16-bit base word count (BWCR). The current address and word count registers are directly programmable by the CPU, while the base registers are loaded automatically from the current registers upon the first transfer when auto-initialize is enabled, allowing repeated transfers without CPU intervention.[1][12] Programming the address and count registers requires a preliminary step to manage the first/last flip-flop, which determines whether the low or high byte is accessed. This flip-flop is cleared by writing 00h to the temporary register at port 0Ch, ensuring the subsequent write targets the low byte. For a given channel, the low byte of the current address is then written to the channel's address port (e.g., 00h for channel 0, 02h for channel 1), followed by the high byte to the same port; the process repeats for the count port (e.g., 01h for channel 0). The address value specifies the starting memory or I/O location for the transfer, incrementing or decrementing based on the mode register configuration, while the word count (decremented per transfer, with terminal count signaled at 0000h after FFFFh rollover) defines the number of bytes or words to move. Base registers, though not directly accessible, are software-initiated by loading the current registers prior to enabling auto-initialize.[13][12] The mode register, one per channel and write-only at port 0Bh, configures transfer specifics and is programmed by specifying the channel in bits 0–1 (00b for channel 0, 01b for channel 1, 10b for channel 2, 11b for channel 3). Its 6-bit format (bits 2–7) includes:| Bit | Name | Description |
|---|---|---|
| 7–6 | Transfer Mode | 00b: Demand; 01b: Single; 10b: Block; 11b: Cascade |
| 5 | Addressing | 1b: Decrement (address decreases); 0b: Increment (address increases) |
| 4 | Auto-Initialize | 1b: Enabled (reload from base on terminal count); 0b: Disabled |
| 3–2 | Transfer Type | 00b: Verify; 01b: Write (peripheral to memory); 10b: Read (memory to peripheral); 11b: Illegal |
| Bit | Name | Description |
|---|---|---|
| 0 | M/M | 1b: Enable memory-to-memory transfer (using channels 0 and 1 as source/destination) |
| 1 | CH0 | 1b: Address hold on channel 0 during transfers |
| 2 | D/C | 1b: Disable controller (halts all DMA) |
| 3 | C/T | 1b: Enable compressed timing |
| 4 | F/R | 0b: Fixed priority (channel 0 highest); 1b: Rotating priority |
| 5–7 | - | Reserved |