Hubbry Logo
search
logo
1140098

Intel 8237

logo
Community Hub0 Subscribers
Read side by side
from Wikipedia
Intel 8237A-5, used on the original IBM PC motherboard
Pinout

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]
  1. ^ megabytes per second in 64KB block
  2. ^ In quantities of 100 and up
  3. ^ Sampling Q2 1986

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The Intel 8237 is a programmable direct memory access (DMA) controller developed by Intel as a peripheral interface circuit for microprocessor systems, enabling high-speed data transfers between memory and I/O devices without requiring continuous CPU involvement.[1] Part of Intel's MCS-85 family, it includes four independent DMA channels, each with dedicated address registers and byte count capabilities supporting up to 64 KB per transfer, and it requires an external 8-bit address latch for operation.[1] The device supports multiple transfer modes—single, block, demand, and cascade (for expanding beyond four channels)—along with autoinitialization after each transfer and options for address increment or decrement.[1] It also features memory-to-memory transfer capabilities, end-of-process (EOP) signaling, and independent control over request/acknowledge signal polarities.[1] The 8237 gained prominence as a core component in early personal computers, including the original IBM PC (model 5150), where it managed 8-bit "fly-by" DMA operations for peripherals like floppy disk controllers and early sound hardware, limited to a 16 MB address space due to its 8-bit page registers.[2]

History

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 GroupPinsTypeFunction
AddressA0–A3I/O (tri-state)Lower 4 address bits; inputs for register select, outputs during DMA
AddressA4–A7O (tri-state)Upper 4 address bits; enabled during DMA service
DataDB0–DB7I/O (tri-state)8-bit bidirectional data bus for programming and transfers
DMA RequestsDREQ0–DREQ3IAsynchronous channel request inputs (prioritized)
DMA AcknowledgesDACK0–DACK3OChannel acknowledge outputs (programmable polarity)
Bus ControlHRQOHold request to CPU
Bus ControlHLDAIHold acknowledge from CPU
Clock/TimingCLKISystem clock input (max 3–5 MHz)
Other ControlsCS, RESET, READY, EOP, IOR/IOW, MEMR/MEMW, AEN, ADSTBMixedChip select, reset, ready wait, end-of-process, I/O and memory controls, address enable/strobe
PowerVCC, VSSSupply+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:
BitNameDescription
7–6Transfer Mode00b: Demand; 01b: Single; 10b: Block; 11b: Cascade
5Addressing1b: Decrement (address decreases); 0b: Increment (address increases)
4Auto-Initialize1b: Enabled (reload from base on terminal count); 0b: Disabled
3–2Transfer Type00b: Verify; 01b: Write (peripheral to memory); 10b: Read (memory to peripheral); 11b: Illegal
This register must be set before initiating a transfer to define the direction, addressing scheme, and repetition behavior.[13][12] The command register, a global 8-bit register at port 08h, controls overall controller behavior and is cleared on reset or master clear. The port is used for writing the command register and reading the status register. Its defined bits are:
BitNameDescription
0M/M1b: Enable memory-to-memory transfer (using channels 0 and 1 as source/destination)
1CH01b: Address hold on channel 0 during transfers
2D/C1b: Disable controller (halts all DMA)
3C/T1b: Enable compressed timing
4F/R0b: Fixed priority (channel 0 highest); 1b: Rotating priority
5–7-Reserved
Programming this register typically occurs during initialization to configure global priorities and other behaviors, with rotating priority useful for fair arbitration among active channels. Channels are enabled or disabled separately via the mask register at port 0Ah.[1][12] The status register, read-only at port 08h (sharing the address with the command register), provides real-time feedback on channel states. Bits 0–3 indicate terminal count (TC) flags (1b if the channel's word count has reached zero, cleared on read or reset), while bits 4–7 reflect pending DMA requests (1b if DREQ is asserted for that channel). This allows software to poll for transfer completion without interrupts. The temporary register at port 0Ch also supports software commands beyond flip-flop clearing, such as setting the first/last flip-flop (write 01h) or master clear (write 02h, resetting all registers and modes). Basic setup involves sequencing these writes: clear the flip-flop, load addresses and counts, program modes and command, then unmask channels to begin operation.[1][12]

Priority Resolver and Arbitration

The Intel 8237 features a four-level priority encoder as its core priority resolver, which arbitrates among the four DMA channels (0 through 3) when multiple devices assert simultaneous requests via the DREQ (DMA Request) input lines.[1] This encoder evaluates active DREQ signals and selects the channel eligible for service based on the configured priority scheme, ensuring orderly bus acquisition from the CPU through the HRQ (Hold Request) output.[1] Upon receiving HLDA (Hold Acknowledge) from the CPU, the resolver asserts the corresponding DACK (DMA Acknowledge) output to the winning channel, initiating the transfer while inhibiting lower-priority requests until resolution.[1] The device supports two arbitration modes—fixed and rotating—selectable via a bit in the command register.[1] In fixed priority mode, channel 0 maintains the highest precedence, with priority decreasing sequentially to channel 3 as the lowest; this static hierarchy resolves ties by inherently favoring lower channel numbers during contention.[1] Fixed mode suits systems where specific devices require consistent access dominance, such as high-bandwidth peripherals on channel 0. Rotating priority mode, in contrast, dynamically shifts the hierarchy after each DMA service cycle, assigning the lowest priority to the channel just serviced and elevating others in sequence.[1] This cyclic adjustment guarantees that any active channel gains service after at most three intervening higher-priority operations in a standalone 8237 configuration, promoting equitable access across channels.[1] For systems with multiple 8237 controllers, daisy-chaining integrates arbitration through interconnected DREQ and DACK lines, where the master device's resolver oversees slaves in a hierarchical manner, preserving the selected fixed or rotating scheme across the expanded channel set.[1] Overall, the rotating mode enhances performance in multi-device environments by balancing DMA bandwidth and preventing indefinite starvation of lower-priority channels, thereby optimizing throughput for diverse peripheral loads.[1]

Operation

Initialization and Command Register

Upon power-on or reset, the Intel 8237 DMA controller initializes with all four channels disabled, as the Mask register is set to mask all DMA requests (DREQ inputs ignored), the Command, Status, Request, and Temporary registers are cleared to zero, and the byte/word counters for each channel are reset to zero, placing the device in an Idle state until software programming occurs.[14] This hardware reset ensures a known initial state but requires explicit software initialization to configure channels, load addresses and counts, and enable operations, as the controller does not automatically start DMA transfers post-reset.[14] The Command register, an 8-bit programmable register written during the Program Condition (CS low, HLDA low, IOW low), controls global operational parameters and must be programmed early in the initialization to set the controller's behavior before enabling channels.[14] Key bits relevant to initialization include bit 0 (Memory-to-Memory Transfer enable: 1 enables transfers using channels 0 and 1 as source/destination, with channel 2/3 disabled during such operations; 0 disables), bit 2 (Controller Disable: 0 enables the controller for DMA service; 1 disables all channels regardless of mask settings), and bit 3 (Compressed Timing: 0 for normal S1/S2/S3/S4 timing; 1 for compressed S1/S2 only, reducing cycle time for faster transfers).[14] Other bits configure priority (bit 4: 0 fixed, 1 rotating), write transfer timing (bit 5), and signal polarities (bits 6-7 for DREQ/DACK sense), but these are typically set once during setup and not altered frequently.[14] The Mask register, a 4-bit write-only register, allows per-channel control to isolate active DMA requests during initialization, with each bit corresponding to one channel (bit 0 for channel 0, etc.; 1 masks/disables the channel, 0 enables it).[14] Post-reset, all bits are set to 1, disabling channels; software must unmask specific channels after loading their registers to prevent unintended transfers. Masking can be done for all channels at once or individually by selecting the appropriate register address via A0-A3. This register is crucial for safe setup, as unmasked channels could initiate transfers if DREQ asserts before configuration completes.[14] The initialization sequence begins with a software Master Clear command to mimic power-on conditions, followed by setting the Mask register to mask all channels to ensure no transfers start prematurely.[14] Next, clear the byte pointer flip-flop to reset the register addressing for 16-bit loads, then program the Command register to disable the controller (set bit 2=1 for safety) and set global modes like memory-to-memory if needed.[14] For each channel, clear the flip-flop, load the base address (low byte then high byte using the channel's address register select via A0-A3), clear the flip-flop again, and load the word count (low byte then high byte using the count register select); set the Mode register for transfer type (e.g., verify, single, block), and optionally configure external page registers for full addressing beyond 64 KB; finally, unmask the desired channel(s) via the Mask register and enable the controller (set bit 2=0 in Command).[14] This sequence prepares the controller for DMA operations without referencing specific transfer modes beyond basic setup.[14]

Transfer Cycles and Timing

The transfer cycle of the Intel 8237 begins when a valid DMA request (DREQ) from a peripheral is detected on one of its channels, prompting the controller to assert the Hold Request (HRQ) signal to the CPU to seize control of the system bus.[1] Upon receiving the Hold Acknowledge (HLDA) from the CPU, which indicates that the processor has relinquished bus control, the 8237 enters its active cycle and outputs the memory address—comprising the lower four bits on A0–A3 and the upper eight bits latched externally via the Address Strobe (ADSTB) signal.[1] Simultaneously, the controller asserts the DMA Acknowledge (DACK) signal to the requesting peripheral, enabling the data transfer phase where data moves bidirectionally between the I/O device and memory over the appropriate bus lines, controlled by read/write strobes such as IOR, IOW, MEMR, or MEMW.[15] These operations are synchronized to the controller's internal clock, with a typical cycle time of 250 ns at a 4 MHz clock frequency, ensuring compatibility with contemporary microprocessor systems.[15] Key timing parameters include an address valid duration of approximately 100 ns from the clock's high phase and data setup times of around 170 ns relative to the strobe signals, allowing for reliable latching in external circuitry without excessive delays.[1] The 8237 supports both burst transfers, where multiple bytes are moved consecutively before bus release, and cycled operations that interleave with CPU activity, optimizing throughput based on system demands.[1] Following the completion of the data transfer, the 8237 deasserts HRQ, prompting the CPU to withdraw HLDA and regain bus mastery, thereby minimizing processor idle time.[15] The controller lacks integrated parity checking for data integrity during transfers, relying instead on external system mechanisms for error detection.[1] However, it generates a Terminal Count (TC) signal to indicate when the programmed byte count for a channel has been reached, signaling the end of the transfer sequence and potentially triggering interrupts or mode transitions.[15]

Transfer Modes

Single Transfer Mode

In Single Transfer Mode, the Intel 8237 DMA controller performs a single data transfer per DMA request from a peripheral device. When the peripheral asserts the DREQ (DMA Request) signal, the 8237 asserts HRQ (Hold Request) to the CPU to gain control of the system bus. Upon receiving HLDA (Hold Acknowledge) from the CPU, the 8237 asserts DACK (DMA Acknowledge) to the peripheral, completes the one-byte transfer between memory and the I/O device, updates the current address register by incrementing or decrementing it, and decrements the word count register by one. The DREQ must remain asserted until DACK is active; afterward, the 8237 releases HRQ, returning bus control to the CPU, which resumes normal operation until the next DREQ assertion initiates another single transfer.[1] This mode is configured by writing to the Mode Register (I/O port 0Bh for the primary controller), where bits 6 and 7 are set to 01 to select Single Transfer Mode for the targeted channel (selected by bits 0 and 1). Bits 2 and 3 specify the transfer type (e.g., 01 for I/O to memory write), bit 4 enables autoinitialization if needed, and bit 5 controls address direction. If the word count reaches zero (terminal count), the TC output signals completion, potentially triggering autoinitialization to reload registers for repeated operation.[14]

Block Transfer Mode

In Block Transfer Mode, the Intel 8237 DMA controller is configured by writing to the Mode Register for a specific channel, where bits 6 and 7 are set to binary 10 to select this mode.[1] This setting enables the controller to perform a continuous sequence of transfers upon activation, distinct from single-transfer operations that release the bus after each byte. The operation begins when a Device Request (DREQ) signal is asserted by the peripheral, prompting the 8237 to arbitrate for the bus, assert the Device Acknowledge (DACK), and seize control from the CPU. Once the bus is acquired, the controller transfers the entire block of data—up to the programmed word count of 65,536 bytes (64 KB)—without relinquishing control for intermediate CPU intervention.[1] The transfers continue until the Terminal Count (TC) is reached, which occurs when the 16-bit word count register decrements to FFFFh (indicating underflow from 0000h), or until an external End of Process (EOP) signal is received; at this point, the bus is released back to the CPU.[1] Internally, the 8237 handles addressing by continuously incrementing or decrementing the Current Address Register after each transfer cycle, based on the programmed address mode (auto-increment, auto-decrement, or fixed).[1] The word count is similarly decremented with each byte transferred, ensuring sequential progression through the block. Upon completion, the TC signal is asserted to notify the peripheral, and if autoinitialization is enabled (via bit 4 of the Mode Register), the original address and count values are restored from the Base Address and Base Word Count Registers for potential reuse.[1] By maintaining continuous bus ownership, block mode supports transfer rates up to approximately 800 KB/s on faster variants like the 8237A-5 at 5 MHz.[1][16]

Demand Transfer Mode

The Demand Transfer Mode of the Intel 8237 DMA controller enables high-throughput data transfers by allowing the controller to seize and hold the system bus for consecutive cycles as long as the peripheral device maintains the DMA request (DREQ) signal active. To configure a channel for Demand Transfer Mode, bits 6 and 7 of the per-channel Mode Set Register are programmed to binary 00, with bits 0 and 1 selecting the channel, the remaining bits setting transfer type (verify, I/O to memory, or memory to I/O), address increment/decrement, and auto-initialization if desired.[1] In this mode, transfers proceed byte-by-byte until one of three conditions is met: the programmed word count reaches terminal count (TC), an external end-of-process (EOP) signal is asserted, or the peripheral deasserts DREQ to pause the operation.[1] This contrasts with block mode, which runs continuously to TC or EOP without pausing for DREQ changes, making demand mode a flexible extension for peripherals that may intermittently require bus access.[1] When auto-initialize is enabled via bit 4, reaching TC reloads the base address and word count registers from their temporary storage, allowing indefinite transfers without CPU intervention as long as DREQ remains asserted across cycles.[1] The controller saves the current address and count between pauses, resuming seamlessly upon the next DREQ assertion after the higher-priority channel (if any) completes its service.[1] However, prolonged DREQ assertion can lead to CPU starvation, as the DMA controller retains bus mastership and prevents microprocessor access until release, potentially degrading system responsiveness in multi-tasking environments.[1]

Cascade Mode

Cascade mode in the Intel 8237 DMA controller enables the interconnection of multiple controllers to expand the number of available DMA channels beyond the standard four per device, facilitating system scalability for applications requiring additional independent transfer channels.[1] In this configuration, one 8237 acts as the master controller, interfacing directly with the CPU via its hold request (HRQ) and hold acknowledge (HLDA) signals to arbitrate bus access, while one or more slave controllers manage their local channels and forward requests through dedicated cascade connections.[1] To configure cascade mode, the master controller dedicates a specific channel—typically channel 0—for cascading, programming its mode register with bits 6 and 7 set to 11 to select cascade operation; this disables address generation and control outputs on that channel, which instead responds solely to direct memory access (DMA) request (DREQ) and DMA acknowledge (DACK) signals from the slave.[1] The slave controller's HRQ and HLDA pins connect to the master's DREQ and DACK on the cascade channel, forming a priority chain where a slave's DMA request propagates to the master only after internal arbitration within the slave.[1] When the master receives a request via the cascade channel and gains bus control from the CPU, it asserts HLDA to the slave, allowing the slave to perform transfers using the shared system bus while the master remains transparent to the operation.[1] This mode supports chaining up to four 8237 controllers in a multi-level hierarchy, with priorities from lower-priority slaves propagated through the chain to the master, preserving the overall arbitration scheme—either fixed or rotating—established in the primary controller.[1] Such expansion is particularly useful in systems demanding more than four DMA channels, enabling effective support for 7 or 8 channels through a master-slave arrangement without requiring a more complex custom controller.[1] The master's priority resolver briefly integrates cascade requests into its arbitration process, ensuring seamless coordination across the linked devices.[1]

Applications

Usage in IBM PC and XT

In the IBM PC and XT systems, a single Intel 8237 DMA controller was implemented to manage direct memory access for basic peripherals, mapped to the I/O address range 000h-00Fh.[17] This configuration handled four channels, with channel 0 dedicated to dynamic RAM refresh operations, channel 1 available for expansion cards or peripherals such as the monochrome display adapter or parallel printer, channel 2 hardwired to the floppy disk controller for disk I/O transfers, and channel 3 available for expansion cards such as hard disk adapters.[17][18] The hardwiring of channel 2 to the floppy controller limited system flexibility, as it prevented reassignment to other devices without hardware modifications.[17] The 8237's native 16-bit addressing restricted each channel to a 64 KB memory range, but this was extended to the full 1 MB (20-bit) system address space through external page registers at I/O ports 81h, 82h, 83h, and 87h for channels 2, 3, 1, and 0 respectively, which supplied the upper four address bits.[17][18] Operating at the system's 4.77 MHz clock speed, the controller supported 8-bit DMA transfers only, with no provision for 16-bit operations, resulting in a maximum theoretical throughput of approximately 950 KB/s limited by the five-clock cycle overhead per byte transfer.[17] For floppy disk operations, practical performance was capped at around 500 KB/s in multi-sector transfers, though actual rates were often lower due to media constraints like the 250 kbit/s double-density signaling.[17][18] This single-controller setup relied primarily on demand and block transfer modes for efficient peripheral handling, such as reading or writing floppy sectors without CPU intervention.[17] The design prioritized simplicity for the era's limited I/O needs but introduced bottlenecks for concurrent operations, as the priority resolver arbitrated among the few active channels.[18]

Usage in IBM PC AT

The IBM PC AT incorporates two Intel 8237 DMA controllers configured in a master-slave arrangement to expand DMA capabilities beyond the single-controller design of earlier models, supporting up to seven active channels for concurrent peripheral data transfers. The master controller, mapped to I/O ports 000h–00Fh, manages channels 0–3 for 8-bit operations, while the slave controller at 0C0h–0CFh handles channels 4–7, with channel 4 exclusively used in cascade mode to link requests from the master to the slave, effectively presenting channels 0–3 and 5–7 to the system. This cascading enables prioritized handling of DMA requests across both controllers, allowing the slave to intercept and process transfers transparently.[19][16] A significant upgrade in the PC AT is the provision for 16-bit DMA on slave channels 5–7, which connect to the 16-bit portion of the ISA bus and are wired such that transfers occur on odd addresses (channels 5 and 7) or even addresses (channel 6) due to the slave controller's address offset. DMA page registers at I/O ports 80h–8Fh extend each channel's 16-bit addressing to 20 bits, enabling access to the full 1 MB of system memory without crossing 64 KB boundaries per transfer. Operating at an 8 MHz clock derived from the ISA bus, these enhancements yield theoretical throughputs approaching 1 MB/s for 16-bit demand-mode operations, a doubling over 8-bit rates.[19][16][12] These DMA channels are assigned to critical peripherals in the PC AT: channel 3 for the fixed-disk (hard disk) adapter to handle high-volume sector transfers, channel 2 for the floppy disk controller supporting read/write operations at 250–500 Kb/s, and channel 1 typically for sound cards to stream audio data without CPU overhead. Channel 0 reserved for compatibility with earlier systems (previously used for dynamic RAM refresh). This allocation optimizes performance for storage and I/O-intensive tasks in the AT's 80286-based architecture.[19][20] The dual-8237 setup maintains backward compatibility with IBM PC and XT software through shared port mappings and command structures for channels 0–3, allowing existing programs to function unchanged in real mode. However, utilization of the new channels 5–7 requires BIOS-level programming updates to configure page registers and select 16-bit modes, as the original PC/XT BIOS lacks support for these features.[19][16]

Integration and Legacy

Incorporation into Chipsets

As personal computer architectures evolved in the mid-1980s, the Intel 8237's functionality began to be integrated into multi-function chipsets to reduce component count and board space while maintaining compatibility with existing peripherals. The Intel 82231, introduced in 1984 as part of the 82230/82231 chipset for PC/AT-compatible systems, incorporated the functions of two 8237 DMA controllers alongside other peripherals like the 8254 programmable interval timer and an 8284A clock generator. This integration allowed for seven DMA channels in total, emulating the original 8237's modes, registers, and addressing capabilities to support legacy ISA bus operations in 286-based systems.[21] During the 386 and 486 eras, further consolidation occurred with southbridge components that embedded 8237-compatible DMA logic. The Intel 82371SB (PIIX), released in 1995, included two integrated 8237 DMA controllers within its PCI-ISA bridge, providing compatibility for the four-channel 8-bit and 16-bit DMA operations, including single, block, demand, and cascade modes, through mapped registers accessible at standard I/O ports like 0x00-0x0F and 0xC0-0xDF. Similarly, the Intel 82378IB ISA System I/O Controller, used in 486 and early Pentium systems, integrated an enhanced seven-channel DMA unit based on dual 82C37 (CMOS 8237) designs, supporting the same transfer modes and priority schemes while adding bus mastering for PCI interactions. These implementations ensured seamless support for older ISA expansion cards without requiring discrete 8237 chips.[22] In the 1990s, as chipsets matured, southbridge ICs continued this trend to preserve legacy support amid the shift to PCI. The Intel 82371EB (PIIX4), introduced in 1996, featured distributed DMA peripherals with a full 8237 register map, enabling compatibility for ISA-based DMA requests while extending capabilities to PCI bus mastering for higher-performance devices like SCSI controllers. This allowed systems to handle both legacy 8/16-bit DMA at up to 8.3 MB/s and modern PCI transfers, bridging the gap for mixed environments.[23] By the Pentium era in the late 1990s, primary DMA operations had largely transitioned to PCI bus mastering protocols, which offered superior bandwidth and flexibility without the 8237's 16-bit address limitations. However, chipsets like the Intel 440FX (Neptune) retained 8237-compatible modes in their southbridges to ensure backward compatibility for essential peripherals such as floppy disk controllers and sound cards on the declining ISA bus. This preservation extended into early 2000s platforms, gradually phasing out as PCI and later AGP/PCIe supplanted ISA entirely.[22]

Successors and Modern DMA

By the late 1990s, the Intel 8237 DMA controller had largely been supplanted in mainstream computing by advanced bus architectures such as PCI, which enabled device-initiated bus mastering for direct memory access without relying on legacy ISA-style controllers.[24] USB interfaces further reduced the need for dedicated DMA hardware like the 8237 by providing standardized, high-speed peripheral connectivity with integrated transfer mechanisms managed by host controllers.[25] However, to maintain backward compatibility with older software and peripherals, Intel's 82801 I/O Controller Hub (ICH) series, starting from the ICH0 in 1999 and continuing through models like the ICH5, incorporated emulated logic equivalent to two cascaded 82C37 (8237-compatible) DMA controllers, supporting up to eight channels for legacy ISA emulation over PCI and LPC buses.[26] In parallel, software-based alternatives emerged to handle DMA operations more flexibly, particularly through bus mastering in operating system drivers. In Windows, drivers for PCI and other bus-mastering devices utilize scatter-gather DMA via APIs that map non-contiguous memory buffers into coherent transfers, allowing peripherals to initiate high-efficiency data movement without CPU intervention.[27] Similarly, Linux implements bus mastering through the DMA Engine framework, where drivers employ CPU instructions and scatter-gather lists to orchestrate transfers across fragmented memory regions, supporting both common and cyclic buffer modes for devices like network interfaces.[28] Contemporary DMA solutions have evolved into sophisticated integrated controllers that prioritize virtualization, security, and throughput. On ARM platforms, the PrimeCell PL330 DMA controller facilitates multi-channel, AXI-based transfers with support for burst modes and scatter-gather operations, achieving speeds up to approximately 400 MB/s in typical embedded benchmarks.[29] For x86 systems, Intel's VT-d (Virtualization Technology for Directed I/O), the implementation of IOMMU, enables secure, virtualized DMA remapping for peripherals, allowing isolated high-speed transfers—often exceeding 1 GB/s via PCIe—while preventing unauthorized memory access in virtualized environments. Despite these advancements, the 8237's design persists in niche applications through emulation, particularly in retro computing and certain embedded systems as of 2025. FPGA-based recreations, such as those targeting 1980s-era PCs like the IBM 286, faithfully replicate the 8237's operation for accurate hardware simulation in projects like the MiSTer platform and custom Ulx3s boards.[30][31] This emulation ensures compatibility for vintage software and hardware preservation, bridging the gap between legacy ISA protocols and modern reconfigurable logic.

Variants

Original and Enhanced Versions

The Intel 8237, introduced in 1979, served as the foundational NMOS implementation of the programmable DMA controller, operating at a base clock speed of 3 MHz and providing four independent channels for data transfers.[6] In the 1980s, Intel released the enhanced 8237A variant, which increased the clock speed to 5 MHz and addressed certain timing inconsistencies in signal generation, offering marginally better power efficiency under load; this version became the standard in most personal computers, including early IBM systems.[1] Compared to the original, the 8237A addressed certain timing inconsistencies in signal generation and offered marginally better power efficiency under load, while maintaining the same 40-pin dual in-line package (DIP) form factor for compatibility.[32] Both the 8237 and 8237A entered discontinuation during the 1990s as integrated chipsets supplanted discrete DMA controllers, though Intel published updated datasheets with full specifications as late as 1993.[13]

CMOS and Third-Party Variants

The 82C37A, introduced in the 1980s by Intersil (later acquired by Harris and Renesas), represents a low-power CMOS implementation of the original NMOS 8237A DMA controller. Fabricated using a 2-micron CMOS process, it maintains full pin compatibility and operational modes with the 8237A while offering significantly reduced power consumption through its static design, which supports gated clock operation and a standby mode with the clock stopped (maximum 10 µA). Operating at 5V (4.5V to 5.5V range), the 82C37A draws a maximum of 2 mA per MHz during active operation, enabling its use in power-sensitive applications such as early laptops and embedded systems paired with microprocessors like the 80C88 or 80C286.[10] Third-party variants expanded the 8237 family's reach, with AMD's Am9517 serving as the foundational design licensed by Intel for the original 8237. The Am9517, an NMOS device operating at 5V, provided four independent DMA channels with features like memory-to-memory transfers, autoinitialization, and cascade mode, achieving transfer rates up to 2 million words per second in compressed timing configurations. NEC's μPD71037, a CMOS-compatible high-speed adaptation from the 1980s, supported clock rates up to 10 MHz (with some references to 20 MHz variants) and four channels, targeting systems requiring faster DMA without altering the core interface. Additionally, Harris/Intersil produced the 82C37A-10, a 10 MHz CMOS variant that enhanced performance over the base 82C37A while retaining low-power benefits and compatibility for embedded and portable computing.[4][33][10] These CMOS and third-party implementations added value through improved electromagnetic interference (EMI) characteristics inherent to CMOS technology and standby power savings, making them suitable for battery-powered devices and embedded controllers into the 2000s. By the 2020s, production of these variants ceased, rendering them obsolete for new designs, though new old stock (NOS) parts remain available from surplus suppliers, and FPGA-based equivalents are offered for retrocomputing and legacy system emulation projects.[10]

References

User Avatar
No comments yet.