Von Neumann architecture

Von Neumann architecture
In the 1940s, a mathematician called John Von Neumann described the basic arrangement (or architecture) of a computer. Most computers today follow the concept that he described although there are other types of architecture. When we talk about the Von Neumann architecture, we are actually talking about the relationship between the hardware that makes up a Von Neumann-based computer.

A Von Neumann-based computer is a computer that:

    • Uses a single processor.
    • Uses one memory for both instructions and data. A von Neumann computer cannot distinguish between data and instructions in a memory location! It ‘knows’ only because of the location of a particular bit pattern in RAM.
    • Executes programs by doing one instruction after the next in a serial manner using a fetch-decode-execute cycle.

In this chapter, we are going to build upon and refine the ideas introduced in an earlier chapter. You should re-read the relevant chapter on CPUs before you start this one. We have already said that the CPU was made up of 4 important components:

    • The ALU.
    • The registers.
    • The control unit.
    • The IAS (otherwise known as RAM or memory).

Because the IAS is so important, we are definitely going to move it to its own section in our model of a computer. (We discussed this previously). We need to get data into and out of the computer so we will include this as a separate section as well. We will also introduce the idea of a clock and clock cycles in the CPU. Our new model of a computer now looks like this:


Von Neumann Component 1 - The CPU
The CPU, or Central Processing Unit, is the name given to the component that controls the computer and works on the data. It can be split up into four sub-components:

 4 parts

We know a few things from before about the Von Neumann CPU.

1) The ALU, or Arithmetic Logic Unit
A Von Neumann CPU has an ALU. This is the part of the CPU that performs arithmetic and logic operations on data and acts as the revolving for the CPU, letting data enter and leave the CPU. We also know that CPUs have a ‘word size’. This is the number of bits that can be added, for example, in one go. The bigger a CPU’s word size, the more bits it can work on in one clock cycle and the more work you can get done.

2) The Control Unit
A Von Neumann CPU has a control unit. The control unit is in charge of ‘fetching’ each instruction that needs to be executed in a program by issuing control signals to the hardware. It then decodes the instruction and finally issues more control signals to the hardware to actually execute it.

3) Registers
A Von Neumann CPU has registers. These are very fast memory circuits. They hold information such as the address of the next instruction (Program Counter), the current instruction being executed (Current Instruction Register), the data being worked on and the results of arithmetic and logical operations (Accumulators), information about the last operation (Status Register) and whether an interrupt has happened (Interrupt Register). Registers are covered in a lot more detail later in this chapter.

4) The clock
Instructions are carried out to the beat of the clock! Some instructions take one beat and others more than one beat. Very roughly speaking, the faster the clock, the more clock beats you have per second so the more instructions per section you can do and the faster your computer will go.

Von Neumann Component 2 - IAS
We also know that the Von Neumann computer has an IAS, or Immediate Access Store, where it puts both programs and data. We often commonly refer to this memory as RAM. RAM is made up of lots of boxes that can store a bit pattern. Each box has a unique address.  A memory address might store an instruction (which is made up of an operator and an operand) or it might store just a piece of data. A Von Neumann computer can’t tell the difference between the bit patterns as such, but ‘knows’ indirectly because of where the bit pattern is stored in RAM. Pre-Von Neumann computers used to split up memory into program memory and data memory and this made computers relatively complex. Von Neumann was the first to realise that there was actually no difference between the nature of an instruction and the nature of a piece of data. One important function of an operating system is to manage memory and to keep track of the RAM addresses of applications as well as any data.

We also know that computers have an address bus, so that the CPU can address each individual memory location in the IAS, for example, when it wants to store a piece of data or retrieve a piece of data. The data itself is moved about between devices on a data bus. There is also a control bus, to generate signals to manage the whole process.

Von Neumann Component 3 - I/O
A computer needs peripherals for inputting and outputting data. It needs to be able to read data into itself and send data out. It reads data in and sends data out through its I/O ports. A port is simply a gateway, like a port used for shipping. Just like every port used for ships needs its own harbour master, so every I/O port needs to be managed. An I/O controller is the term used to describe the I/O port along with the circuits that manage data into and out of the port. It allows you to connect up any I/O device to the PC and transfer data in to or out of the computer. You wouldn’t want to connect an I/O device directly to a CPU because you would have to redesign the CPU every time a new type of device came along. Besides, a new type of device might need different voltages and control signals from the CPU, again necessitating a CPU redesign. The I/O controller acts as an interface to overcome these problems. Refining the diagram we saw in the previous chapter on CPUs, we now have:


A computer system showing the I/O controllers.
Of course, there are a whole range of other I/O controllers we could have included. We could have shown ones for devices such as a mouse, a MIDI device, a printer, a DVD player, a SCSI device as used with many scanners or a network card, to name just a few.

Von Neumann bottleneck
Whatever you do to improve performance, you cannot get away from the fact that instructions can only be done one at a time and can only be carried out sequentially. Both of these factors hold back the efficiency of the CPU. This is commonly referred to as the 'Von Neumann bottleneck'. You can provide a Von Neumann processor with more RAM, more cache or faster components but if real gains are to be made in CPU performance then a major review needs to take place of CPU design.