Intel P4040
   HOME

TheInfoList



OR:

The Intel 4040 ("''forty-forty''") is the second
4-bit 4-bit computing is the use of computer architectures in which integer (computer science), integers and other data (computer science), data units are 4 bits wide. 4-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures a ...
microprocessor designed and manufactured by
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
. Introduced in 1974 as a successor to the
Intel 4004 The Intel 4004 was part of the 4 chip MCS-4 micro computer set, released by the Intel, Intel Corporation in November 1971; the 4004 being part of the first commercially marketed microprocessor chipset, and the first in a long line of List of I ...
, the 4040 was produced with a 10 μm process and includes
silicon gate In semiconductor electronics fabrication technology, a self-aligned gate is a transistor manufacturing approach whereby the gate electrode of a MOSFET (metal–oxide–semiconductor field-effect transistor) is used as a mask for the doping of the ...
enhancement-load
PMOS logic PMOS or pMOS logic, from p-channel metal–oxide–semiconductor, is a family of digital circuits based on p-channel, enhancement mode metal–oxide–semiconductor field-effect transistors (MOSFETs). In the late 1960s and early 1970s, PMOS ...
technology. The 4040 contained 3,000
transistor A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch electrical signals and electric power, power. It is one of the basic building blocks of modern electronics. It is composed of semicondu ...
s and could execute approximately 62,000
instructions per second Instructions per second (IPS) is a measure of a computer's Central processing unit, processor speed. For complex instruction set computers (CISCs), different Machine code, instructions take different amounts of time, so the value measured depen ...
. General performance, bus layout and
arithmetic logic unit In computing, an arithmetic logic unit (ALU) is a Combinational logic, combinational digital circuit that performs arithmetic and bitwise operations on integer binary numbers. This is in contrast to a floating-point unit (FPU), which operates on ...
(ALU) were identical to the 4004. The main improvement was to use a larger 24-pin
dual in-line package In microelectronics, a dual in-line package (DIP or DIL) is an Semiconductor package, electronic component package with a rectangular housing and two parallel rows of electrical connecting pins. The package may be through-hole technology, throu ...
, giving it 8 more pins than the 16-pin 4004. Two of these were used to implement
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
s, which were lacking in the 4004 and considered a major oversight. Two more implemented a halt/stop system, which put the processor into a low-power mode and also allowed for single-step operation that made debugging much easier. Another pin was used to bank select a second
read-only memory Read-only memory (ROM) is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device. Read-only memory is useful for storing sof ...
(ROM), doubling the amount of ROM the processor could address compared to the 4004. To make use of these new pins, the
instruction set In computer science, an instruction set architecture (ISA) is an abstract model that generally defines how software controls the CPU in a computer or a family of computers. A device or program that executes instructions described by that ISA, s ...
was expanded, increasing it to 60 instructions from the original 46. Additionally, the internal
register file A register file is an array of processor registers in a central processing unit (CPU). The instruction set architecture of a CPU will almost always define a set of registers which are used to stage data between memory and the functional units on ...
and pushdown stack were expanded to support rapid interrupt processing.


Description


4004

The 4004 was designed to be used in an
electronic calculator An electronic calculator is typically a portable Electronics, electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics. The first solid-state electronic calculator was created in the early 1960s. ...
and many of its design notes are related to this role. For instance, program code can only be read from an area dedicated to
read only memory Read-only memory (ROM) is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device. Read-only memory is useful for storing s ...
, not RAM. Although one could implement the "ROM space" using RAM chips, there were no instructions able to write to that area of memory, and no instructions able to read program code from RAM space. The idea was that systems would supply the system program on ROM, and small amounts of RAM would be used only for data, if at all. In typical use, the internal "index registers" would be used for storage during calculations, with the 16 4-bit registers able to hold a single 8-digit
binary-coded decimal In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used f ...
value, the data format used by calculators. It also had four 12-bit registers for holding addresses, the top-most was the
program counter The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, ...
and the next three operated as a push-down stack for
subroutine In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times. Callable units provide a ...
calls. To reduce pin count to only 16, the original 4004 had only four data pins,
multiplexed In telecommunications and computer networking, multiplexing (sometimes contracted to muxing) is a method by which multiple analog or digital signals are combined into one signal over a shared medium. The aim is to share a scarce resource— ...
for both data and addresses. Additional pins indicated whether the address was in ROM or one of several "banks" of RAM. As addresses were 12 bits long, expressing an address took three cycles along with the subsequent read or write, and external circuitry had to
latch A latch or catch (called sneck in Northern England and Scotland) is a type of mechanical fastener that joins two or more objects or surfaces while allowing for their regular separation. A latch typically engages another piece of hardware on the ...
each 4 bit part of the address between cycles. Instructions were 8 bits, so loading the next instruction required many cycles, which led to the slow performance in spite of what was a relatively fast cycle time for the era.


4040

The 4040 was essentially an expansion of the 4004, with additional pins, more registers and new instructions to take advantage of both. The 4004 had a single ROM pin, whereas the 4040 added another ROM pin to allow two banks of ROM. This effectively increased the ROM address from 12 to 13 bits, or 8 kB. Unlike later designs where the two lines could be
binary Binary may refer to: Science and technology Mathematics * Binary number, a representation of numbers using only two values (0 and 1) for each digit * Binary function, a function that takes two arguments * Binary operation, a mathematical op ...
encoded and thus support four banks, the ROM chips used with the 4004 and 4040 used these lines like
chip select Chip select (CS) or slave select (SS) is the name of a control line in digital electronics used to select one (or a set) of integrated circuit An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic cir ...
pins, and thus the two lines could only support two banks. The 4004 lacked
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
s, a serious limitation. The 4040 added a new input pin for calling an interrupt, as well an output pin to indicate the interrupt signal had been noticed and was being acted on. As interrupts also need to save a return address, the stack register file was expanded to seven entries, up from three.by default only one level of interrupt was supported, as further servicing was disabled once an initial interrupt was acknowledged and could only re-enabled on RTI, essentially allowing three levels of subroutine stacking within an interrupt itself occurring within a three-deep subroutine, but detection could be forced back on with a specific command.
Interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine (ISR), is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, software ...
code normally starts by saving out values in the registers to allow the interrupt code to use them, and then at the end it copies the values back from memory so that the processor returns to its original pre-interrupt state. With the multi-cycle memory access of the design, this would have been extremely slow. To address this, eight additional registers were added in a new "bank 1", the original sixteen registers retroactively becoming "bank 0". The idea was that programmers would attempt to place their critical data in the first eight registers of bank 0. When an interrupt was received, the handler code would call an instruction to swap banks, which would cause bank 1's registers to override bank 0's registers 0 through 7. The handler code would then use these eight registers for any local data, leaving the original values untouched. When the handler completed, it simply swapped bank 0 back in. This reduced the switching time to a single instruction, greatly improving interrupt response times. Another addition was the input stop pin, and the associated output stop acknowledge. These could be used to stop the processor while the system performed
input/output In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
or other non-CPU tasks, but was more widely used for
debugging In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
by allowing the processor to be single-stepped. When the processor was in stopped mode, most of the chip hardware put into a low-drain, high-impedance condition, reducing power use. The machine cycle clocks were kept running for the benefit of external devices, including any interrupt controllers needed to wake the chip back up, which relied on these controllers staying in sync. To take advantage of these new features, and to support the new logical AND and OR operators, the instruction set added 14 new instructions, bringing the total to 60.


Characteristics

* Data bus:
4-bit 4-bit computing is the use of computer architectures in which integer (computer science), integers and other data (computer science), data units are 4 bits wide. 4-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures a ...
* Address bus: 12-bit for ROM (multiplexed onto data bus; addresses took three bus cycles to transmit, same as in the 4004), effectively 13-bit with use of bank-switching commands; effectively 10-bit or 8-bit for RAM (8-bit direct address plus one-of-four, i.e. 2-bit equivalent, bank select; the additional 256 "status" memory locations required use of I/O commands to read or write, from an overall 8-bit address space) * Voltage: −15 V DC * Operating frequency: 500 to 740 kHz main clock (2-phase, overlapping); 62500 to 92500 8-clock machine cycles per second, each instruction requiring either one or two machine cycles to read and execute, meaning a rough average of 62  kIPS at 740 kHz with an equal mix.This may not be entirely accurate and is based on the 4004 characteristics; some of the added instructions may require additional cycles to execute, especially any external register stacking required for interrupt handling, but it is not made clear in the documentation as to whether this is the case; halt/step are special cases which naturally take potentially many millions of cycles to "execute", but as these essentially occur "outside" of the usual program flow, they don't count for speed calculation. * Performance: Claimed execution time of ~850 μs to add two 32-bit (8-digit BCD) numbers, or around 1175 such operations per second and about 10 machine cycles per digit pair.Likewise, based on claimed 4004 performance; "850 μs" is a somewhat rounded-off figure claimed in an early Intel brochure and may not be particularly precise, but the total execution time works out to approximately 79 or 80 machine cycles, which fits neatly with either 10 cycles per digit pair, 9 cycles per pair plus 7 for setup and any necessary post-processing, or 8 per pair plus 15 extra (...etc). The actual instruction mix wasn't specified, so without both source code and a list of instruction execution times it's impossible to be sure. A more efficient addition routine might have been possible on the 4040 vs the 4004, but the extra instructions don't suggest any obvious method for achieving this and appear to be focussed on addressing the earlier chip's more obvious shortcomings, e.g. a lack of interrupts and haltability.


Designers

Federico Faggin Federico Faggin (, ; born 1 December 1941) is an Italian-American physicist, engineer, inventor and entrepreneur. He is best known for designing the first commercial microprocessor, the Intel 4004. He led the 4004 (MCS-4) project and the desig ...
proposed the project, formulated the architecture and led the design. The detailed design was done by Tom Innes. The original mask show next to Tom Innes‘ initials (TI) two further initials from sofar unidentified other designers (JO, EL).


New support chips

* 3216 and 3226 4-bit parallel bus driversProvides "high" current (~25mA) handling capacity for external I/O devices. Allegedly intended solely for use with the 4289, but design appears fairly generic and may be adaptable to a bare 4004/4040? * 4101 – 256 × 4-bit
Static RAM Static random-access memory (static RAM or SRAM) is a type of random-access memory (RAM) that uses latching circuitry (flip-flop) to store each bit. SRAM is volatile memory; data is lost when power is removed. The ''static'' qualifier differ ...
i.e. combining the ''main'' storage of four 4002s into a single individually-selectable chip, but with neither the 4-bit I/O port nor additional 64 words of I/O-command-accessed "status" memory. As it has a dedicated, 8-bit address bus, and two separate 4-bit data input and output buses, the 4101 is intended only for use as a downstream peripheral of the 4289. This is further emphasised by the SRAM's claim to be "used for writeable Program Memory", something not achievable by a bare 4004 or 4040. * 4201 – Clock Generator, 500 to 740 kHz, using 4.000 to 5.185 MHz crystals * 4207 – General Purpose 8-bit Output port * 4209 – General Purpose 8-bit Input port * 4211 – General Purpose 8-bit I/O port * 4265 - Programmable general-purpose I/O. It contains four 4-bit I/O ports. It has 14 software-selectable modes that can be programmed to interface with these ports. Not only this can interface with this processor and 8080A processor as well. It was available in sample quantities in stock in March (1976).Intel Corporation, "4269 and 4265 Programmable I/O Components Introduced for Intel MCS-40 4-bit Systems", Intel Microcomputer News, Volume 3, No. 1, January 1976, page 3 * 4269 – Programmable keyboard/display. It has system software configuration in this chipset via instructions that controls how these ports can be handled. It was available in sample quantities in March (1976). ** Keyboard Features: It generates an interrupt when the key is pressed. It stores up to 8 characters FIFO buffer prior servicing the CPU. It can be interfaced with sensors, panel switches and keyboards which it supports full teletypewriter size. That can be key input encoding, polling, character input buffer storage, and keyboard over-entry recovery. ** Display Features: It operates and refresh displays or indicator arrays up to 128 elements or lights. It also supports gas-discharge display such as Burroughs Self-Scan display up to 20 characters can be driven. * 4289 – Standard Memory Interface (replaces 4008/4009)Allows connection of "standard" memory (8-bit parallel data and/or up to 12-bit parallel addressing, the latter in the form of 8-bit address plus 4-bit binary chip select) and devices to the 4004 or 4040, as well as the use of RAM as Program Memory (the 4289 can be installed so as to appear like a regular 4001 ROM to the processor regardless of what's connected on the other side; furthering the illusion, it also provides the same four I/O lines that a 4001 would offer). A 4040 making use of two 4289s could offer various combinations of ROM and RAM in 2KB segments up to 8KB total with a relatively simplistic segregated addressing scheme and a small number of 4101s and 4308s, e.g. 3× 4308 and 8× 4101 for 6KB ROM and 1KB RAM. * 4308 – 1K × 8-bit ROM plus 4 × 4-bit IO portsDirectly replaces four separate 4001s with a single chip, including being available in four "metal" variants that respond to logical chip addresses 0–3, 4–7, 8–11 and 12–15, simulating the sixteen original versions of the 4001 * 4316 – 2K × 8-bit ROMIntended for use downstream of a 4289, as it presents an 11-bit parallel address input bus and separate 8-bit parallel data output bus, as well as three binary-coded chip select lines (thus allowing provision of up to 16KB ROM with an addressing scheme incompatible with the 4004/4040 on several different levels - although only two 4316s, thus 4KB of ROM, or one 4316 plus RAM, can be ''directly'' addressed by a 4289 without additional hardware and/or special programming techniques) * 4702 – 256 × 8-bit EPROMi.e. UV-erased rather than electronically, and is again intended for use with the 4289, as it has separate, 8-bit parallel, address input and data output buses


Use in computers

The 4040 was first used in a microcomputer in
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
's
Intellec The Intellec computers were a series of early microcomputers Intel produced in the 1970s as a development platform for their processors. The Intellec computers were among the first microcomputers ever sold, predating the Altair 8800 by at leas ...
4 Mod 40 development system, released in early 1975. According to ''
Byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
'' magazine, the first third-party microcomputer designed around the Intel 4040 was the Micro 440, released by
Comp-Sultants The Micro 440 was an early microcomputer released by Comp-Sultants, Inc.. Powered by an Intel 4040 microprocessor, it was, by ''Byte'' magazine's estimation, the first third-party computer based on that chip. It sold poorly, and the company fol ...
of Huntsville, Alabama, in late 1975.


See also

*
Intel Intellec 4 Mod 40 The Intellec computers were a series of early microcomputers Intel produced in the 1970s as a development platform for their processors. The Intellec computers were among the first microcomputers ever sold, predating the Altair 8800 by at leas ...


Notes


References


Further reading


ChipDB Datasheets: i4040 (PDF)Bitsavers: MCS-40 Users Manual, November 1974 (PDF)Wikichip: MCS-40
{{Intel processors, discontinued 4040 4-bit microprocessors Computer-related introductions in 1974