EDSAC-2 was designed and built in the University of Cambridge Computer Laboratory. It provided the main computing service for the University between 1958 and 1965. It implemented floating-point (32-bit mantissa and 8-bit exponent) and followed the von Neumann stored-program design pattern. Primary storage available to the user initially consisted of 1024 words of 40 bits, addressable in half-word locations. A second fixed-store contained a permanent library of scientific, I/O and debugging routines, with a special instruction implemented to invoke these routines (the 59 Order).
The principal improvements over the world-leading EDSAC-1 computer, that was its predecessor in the department, were:
Following on from the famous "Initial Orders" of EDSAC-1, it had a built-in assembler/loader (essentially an operating system) that made it as easy to use.
The basic architecture can be summarised as A10D40, meaning it could address 1024 40-bit words. But it also supported half-word addressing of the main store (A11D20 style). But more memory than address space was available in reality, since there were two primary stores, known often as 'free' and the 'fixed', selected between with an additional address bit held in a control flip-flop.
In mid life, (possibly November 1962) the architecture was augmented with an additional index register, RB, which was 14 bits in width, instead of the 11 bits used in all other addressing registers (user index/modifiers and micro-architecture state). This helped address the so-called 'main' store option extension of 16386 words to be addressed. Since the term 'main store' has a very specific meaning in the EDSAC-2 context, it is helpful to not use that term for the primary store. The ISA was extended with several orders (instructions) to support the main store, but the DJW26 portfolio does not appear to contain any main store circuits or information. See "PROGRAMMING FOR EDSAC 2 WITH MAIN STORE" by D. Barron.
DJW26: The six portfolio binders received.
In 2026, a set of six portfolio springback binders of EDSAC-2 schematics together with a microcode listing and other documents was returned to the Computer Laboratory. This came from the house of DJ Wheeler, so it is currently called the DJW26-portfolio. The binders will be handed over to the University Library soon. Meanwhile, these materials are being studied. Some preliminary findings are being put on this page. Also, interviews with extant users have been recorded and can be released soon.
A complete reverse-engineering and proof of correctness of the EDSAC-2 microcode, based on the DJW26 portfolio, is being assembled on these pages and will be written up as a white paper.
Another set of valuable resources was supplied by Geoff Daniell and is here known as the GJD archive. (DJW, DJG and GJD have very similar initials!)
A preliminary listing of the portfolio content. I will increase the level of detail here...
This folder is very interesting - no valves, but transistors and a ferrite core shift register! [FIFO queue? ]
Not yet digitised by DJG.
Not yet digitised by DJG.
Creed High Speed Punch with check back. Type 3000. Circuit Manual - February 17th 1962
Again, this is transistorised (OC44 etc) but with some ferrite logic.
Not yet digitised by DJG.
Enclosed is a document entitled - "The Line Printer Buffer Store" that starts 'In order to make the best used of the "Hollerith" Parallel Printer on EDSAC 2 a buffer has been built. It consists of 80 x 12 ferrite core store and a number of flip-flops ...'
Otherwise, this might be a copy of Vol.4 - we need to play spot the difference.
Not yet digitised by DJG.
This springback binder contains a single sheet - a schematic for some ferrite logic.
As well as the six springback binders, there is an unbound pile of dyeline schematic prints. From the page titles, these appear, for now, to be schematics for the line printer and were probably in Binder 6 at some earlier time...
The schematics from binders 1 and 2 have mostly been digitised. The microcode had been OCR'd and largely validated for self-consistency. Operational semantics have been written for each VLIW operation (micro-command) invoked by the microcode. This has formed the basis for a microcode-based simulator/emulator that has run the 14580 instructions of the hello_world.eds program supplied in the GJD archive. That program writes Hello World in dot matrix form on the display CRT, one of the output devices connected to EDSAC-2. As well as the application, the fixed-store contents had also to be assembled into machine code and loaded into the emulator, alongside a model of the paper-tape reader and the microcode itself. The CRT output was collected in a file and viewed with Gnuplot. A few mistakes in the microcode have been fixed and 3 extended ISA instructions had to be implemented in fresh microcode. The average CPI is about 13. Micro-order coverage is ... A proper report will follow ... ... Coverage : 236 distinct micro-order addresses used out of 847 (before DJG ISA extensions)
Unlike EDSAC, EDSAC-2 did not use mnemonics for machine orders (instructions). They are simply numbered in decimal, but with some structure to the pattern as expressed in base 10, so that they might be easier to remember. Here is a handy sheet giving a summary of the order codes and fixed-store routines from 1960.
But one aspect of the underlying binary coding is manifested in special 'modifier' semantics for instructions between 64 and 95.
The full details that a programmer should need are given in the following booklet.
Three editions were issued as the architecture was revised. This is the first edition. We don't currently
have a second edition. The third edition was scanned as part of the GJD archive and (will be) attached below.
Booklet: Wilkes 1958: Programming For EDSAC 2
PDF
Naming: EDSAC-2 uses single-letter acronyms in most places, such as 'M' for the accumulator. This is painful for the modern user, or when coding the semantics formally, or just when searching textually for a given item. With only 26 letters in the arabic alphabet, letters are commonly reused for different things, although a partially complete disambiguation sheet is provided in the DJW26 documentation. In this analysis, I have avoided single-letter names for those reasons. I have lightly renamed. For instance, I have put the letter 'R' in front of all the register names.
Bit numbering: The 41-bit registers are indexed -1 through to 39. The nominal most-significant bit is bit 0, with bit -1 being used for carry and overflow detection (except in memory, where it is a parity bit). Bit 39 is the least-significant bit when holding a fixed point fraction. The 11-bit registers are indexed 9 through to 19. Eg. RW[e9..19] denotes the whole of register RW. These bit names are used since they align with the same bit numbers in RX when data is transferred to and from RX in the BIU for memory (or conceivably I/O) into the control unit registers. Actually, there is lane steering (controlled by the G2 flip-flop), so when loading from an odd address, it is bits RX[e29..39] aka RX[v10..0] that are moved to or from RW[e9..19].
Bit inserts and bit extracts: Since part of this analysis emits the EDSAC-2 design as Verilog, and since modern computing generally numbers bits from the right with positive integers, it is necessary to distinguish between bit-fields expressed in EDSAC form from those expressed in standard RTL. Here we distinguish EDSAC with conventional bit numbering by inserting either the letter 'e' or the letter 'v' (for Verilog) right after the open square bracket.
For example, the program counter (or sequence control register) in EDSAC-2 is RR. It has 11 bits. Both RR[e9..19] and RR[v10..0] denote the whole of register RR, as does not bit-indexing it at all.
Note: the EDSAC bit numbering makes sense for the arithmetic mill registers, as the numbering is the power-of-two weighting (if negated) for fixed-point fractions (as explained in Programming For EDSAC-2).
Registers in Memory: EDSAC and EDSAC-2 refer to an instruction as an 'order' and the opcode is an 'ordercode'. This causes little trouble to the modern reader. On the other hand, the terms 'registers in memory' and 'memory registers' are used in the EDSAC documentation. This is too jarring for the modern reader, I fear, so I have modernised and use the term 'location' to denote a place in memory. Note that the EDSAC-2 memory bus has a word width of 40 bits plus parity. That is the same length as the accumulator register RM (after ignoring the carry/overflow bit). But instructions are 20-bits long, with two being fetched over the memory bus at once. I shall call the 20-bit quantity a half-word, with the bus transferring a whole word at once. The memory itself is half-word addressed. Hence the 11-bit program counter RP, or any other modifier register etc., points to memory on a half-word granularity. EDSAC-2 is big endian, meaning the high order 20 bits of a word are addressed when the lsb of RP, ie RP[e19] or RP[v0], is zero.
Operator's Control Panel
The operators panel houses all of the main, day-to-day controls, needed to operate the machine. At the top right are the power status indicators and on/off buttons in three groups, labelled MAIN AC, HT and AUX AC.
At the top left is the 'manual register'. This consists of 40 post office keys in four columns with rows numbered 0 to 9. A 40-bit binary number can be manually entered. Its value can be read by op120. op120 can also read a timer and stop the machine based on a mask applied to certain other front panel keys - the optional stop keys.
A vertical row of indicators numbered 1 to 1024 (11 off) shows in binary the address where the machine has stopped from order 101 or 102. The additional indicators for 'free' and 'reserved' show one further effective bit of address. Code cannot be executed from the later-added 'main' store, so a stop in main store did not become possible.
Buttons for 'Run', 'Set start' and 'Clear to ones' force control to the start of the microcode, clear the memory to all ones, clear the CRT display and commence executio\ n.
Other switches enable or swap over the paper tape readers and turn on or off the three punches and the line printer.
A large yellow indicator marked PUNCH ERROR shows that the readback after punching a row of paper tape failed to compare correctly.
A volume control adjusted the speaker volume. It was common to 'listen' to the sound of early computers by connecting an amplifier to one or two bits of appropriate registers. GJD writes "The loudspeaker on EDSAC2 was connected to the 32 bit of the address part of the current instruction". The following sound file was recorded on the original machine, perhaps using Richard Jennings music compiler .
There are various other indicators and controls. A full description of how they worked is not yet to hand, but the GJD simulator implements many of them.
Engineer's Control Panel
The Engineer's control panel enabled the clock frequency to be adjusted. Two fixed rates were supported, with a third setting allowing a variable capacitor (rotary knob) to set the speed. Single step was also supported, at a micro-order or user-level order granularity. The engineer stepped the program by pressing a button. They would watch the status in binary of all of the registers in the machine (not memory locations of course).
Engineer's Display Panel
Every flip-flop on every chassis was rendered on this large panel of neons. The top section shows the 41-bit registers of the arithmetic mill and RX, which is 40 bits. An extra indicator on the right shows the parity bit for RX, RC and +? (power?). Reading from the top, the registers are RX, RC, RH, RM (the accumulator), +?, RF?, RE, RL, RK and RD.
The lower half shows the status of the 11-bit addressing/modifier registers, in the order RU, RQ, +?, RP, RR, RW, RS and RT.
DJG: surely, when single-stepping by micro-order we'd want to see the micro-order program counter bits (10 bits worth, but one hot, making 1024... so impractical ...?)
EDSAC-2 CPU overall architecture (excluding peripherals)
The principle components of EDSAC 2, like any von Neumann computer, are the execution unit, the control unit, the primary storage and the peripherals.
In EDSAC 2, the execution unit has two distinct parts: the arithmetic mill (a djg name), implemented with 41 instances of chassis CT1 and the address unit that is implemented with 11 instances of CT2. The central bus interface unit (BIU) connects everything together. The BIU uses 20 instances of CT3, which are a two-bit slice. Multiplexors inside CT3 implement the lane steering translations needed to store 20-bit half-words in 40-bit full words.
The EDSAC 2 control unit is famously microcoded. The microcode is implemented with a hardwired matrix of ferrite beads that act as a ROM.
The primary memory for EDSAC 2 is 40 planes of ferrite cores, supporting storage of 40-bit words. The data wires connect to the CT3 instances and address bits are hardwired to RP. An additional, high-order address bit comes from the fixed/free control flip-flop. This is slaved from a similar flip-flop that is logically an extension of the PC (normally held in RR), but sometimes overridden when a fixed-store instruction needs to access the free store (or vice versa).
The I/O devices were connected to 40-bit input and output busses. These connect to the CT3 instances as well. Additionally, control and status wires connect to the CT11 (and CT10?). Interrupt wires are ... text not yet ready ...
EDSAC-2 CPU Micro-architecture and Primary Storage Connections
Concentrating now on what we'd now call the CPU, the EDSAC-2 central processor unit divides into two main parts plus the memory and I/O BIU third part.
The arithmetic mill is shown at the top. This is implemented using 41-bit registers and an adder. The user programming model registers are M, L and K, here marked RM, RL and RK.
The precision is nominally 40 bits, with the extra but, designed -1, serving as a carry or overflow bit. The extra bit is not used at all for various of the registers, so conceivably the valves were not installed on the -1 chassis, but this would require extra-care when hot swapping.
The extended precision available when RM and RL are paired is an extra 39 bits. This is because the zeroth bit of RL is bypassed in the carry and rotate backplane wiring. DJG: I can see no reason for this decision, even though the zeroth bit is nominally the sign bit, it has no specialised behaviour hardwired, so a full further 40 bits of precision should have been readily available?
Each register is implemented as a broadside transparent latch, so, to achieve a master-slave edge-triggered effect, such as when left-shifting the accumulator, the current contents need to be explicitly transferred into a master section, such as RF for RM using one microcoded step and then transferred back again, modified accordingly. Hence, the system operates a bit like the 8008 microprocessor, being based on two-phase, non-overlapping clock signals.
The address/modifier unit is shown lower left. It has a second adder, the address adder. The registers that form part of the user's programming model are RS, RT and RB. RB is the program counter. Again, these are all transparent latches, so the same shoot-through considerations apply regarding permissable simultaneous transfers, both within the address/modifier unit and, more generally, between all CPU component registers. In later versions of EDSAC-2, a further modifier register, RB was added, presumably to this unit, and supported with new instructions and as implemented in the GJD simulator. This is not documented in DJW26.
The bus interface unit (BIU), which also serves for I/O is shown centre right. This contains the RX register that is the source and destination for all data entering or leaving the CPU. It also contains a further 40-bit register, RD, where output data to peripherals is first stored.
Note that memory is always physically accessed at the full-word addressed by the top ten bits of RP, i.e. RP[v10..1]. Hence directly addressable memory in EDSAC-2 is 1024x40 or 1024 words, each of 40 bits. Half-word extract/insert logic in CT3 supports half-word operations at the ISA level.
Contemporary parlance divides computer memory into registers, main (aka primary) store and secondary storage (e.g. tapes, disks, SSDs). EDSAC-2 has the the same three forms in its memory hierarchy. [DJG will add a note about caches here, known as the slave store.]
Unfortunately, 'main memory' has a special meaning in EDSAC-2 terms. It refers specifically to 16k words of primary store that were added to the machine at a date seemingly after anything in the DJW26 portfolio. Hence we have a potential source of confusion of terms here!
As already mentioned, EDSAC-2 has a 1024x40 primary storage address space. This is used for both code and data since it is essentially a von Neumann machine. But, even without the 'main store' extension, this address space is replicated two-fold, being partitioned into the fixed and the free 'pages' or 'segments'. The 1960's documentation does not use such a terms: it just speaks of two stores. The fixed store is variously known as the 'reserved' or 'wired' store. It is intended to act like a ROM, containing permanently-installed subroutines. These are invoked with a dedicated instruction (order 59) whose microcode saves the user program counter (that addresses the free store) and commences operation in fixed address space. The fixed space does not seem to be overly fixed, since the first hundred or so words of it are used as scratchpad for these routines and to store the user return address and user's RS content. I am finding out a bit more about that right now.
Also, the machine is not strictly von Neumann, since when executing out of fixed store, certain instructions can access data in the free store! The precise semantics of these is documented as 'guessed' in the GJD simulator. But an explanatory note in DJW26 and inspecting the microcode from DJW26 are shining a light ...
Note that ferrite core store has destructive read out. Hence, operands and instructions read must be written back again to give the impression of non-destructive read. For EDSAC-2, the write-back can be seen as an explicit step in the microcode. But, in cases like an exchange instruction or a store of just one half-word to a 40-bit word, the data written back is accordingly not the same as the data read. Hence, no write lanes, as we'd call them today, are needed for main store write.