Von-Neumann vs Harvard Architecture

KS3 Computer Science

11-14 Years Old

48 modules covering EVERY Computer Science topic needed for KS3 level.

GCSE Computer Science

14-16 Years Old

45 modules covering EVERY Computer Science topic needed for GCSE level.

A-Level Computer Science

16-18 Years Old

66 modules covering EVERY Computer Science topic needed for A-Level.

GCSE Von Neumann Architecture (14-16 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

A-Level Contemporary processors (16-18 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

The term Computer architectures refer to a set of rules stating how computer software and hardware are combined together and how they interact to make a computer functional, furthermore, the computer architecture also specifies which technologies the computer is able to handle.

Computer architecture is a specification, which describes how software and hardware interact together to produce a functioning platform.

When a person thinks of the word “architecture”, the human mind will probably think of the assembly of buildings or houses, moreover, with the same principle in mind, computer architecture involves the construction of a computer system internally and externally.

There are three main categories in computer architecture:

  • System design:
    • The system design is the hardware parts, which includes multiprocessors, memory controllers, CPU, data processors, and direct memory access. The system design can be considered to be the actual computer system.
  • Instruction set architecture:
    • This revolves around the CPU. It includes the CPU capabilities and functions, furthermore it also includes the CPU’s data formats, programming language and processor register types and instructions, which are used by the computer programmers.
    • The CPU is the part in a computer, which makes a program run, whether it was the operating system or an application like Photoshop.
  • Microarchitecture:
    • The microarchitecture in a system will define the storage element/data paths and how they will be implemented into the instruction set architecture, the microarchitecture also is responsible for data processing.

All these will gel together in a certain order to make the system functional.

What is the von Neumann Architecture?

In 1945, John von Neumann, who was a mathematician at the time, had delved into the study that, a computer could have a fixed simple structure and still be able to execute any kind of computation without hardware modification. This is providing that the computer is properly programmed with proper instructions, in which it is able to execute them.

Von Neumann’s primary advancement was referred to as “conditional control transfer”, which had allowed a program sequence to be interrupted and then reinitiated at any point, furthermore, this advancement had allowed data to be stored with instructions in the same memory unit.

This was beneficial because if instructions were desired, they can be arithmetically modified in the same way as the data.

The von Neumann architecture describes a design model for a stored program digital computer that incorporates only one single processing unit and one single separate storage structure, which will hold both instructions and data.

The von Neumann architecture refers to one that keeps the data as well as the programmed instructions in read-write RAM (Random Access Memory).

Characteristics of von Neumann Architecture

As mentioned above, the von Neumann Architecture is based on the fact that the program data and the instruction data are stored in the same memory unit. This can also be referred to as the “stored program concept”.

This design is still used in the computer produced nowadays:

Von-Neumann vs Harvard Architecture: Characteristics of von Neumann Architecture

Central Processing Unit (CPU):

  • The CPU is an electronic circuit, which executes instructions of the computer program.
  • The CPU can also be referred to as a microprocessor or a processor.

Within the CPU, there is the ALU, CU, and the registers, which are described in more detail below:

Control Unit:

  • Controls the operation of the ALU, memory, and input/output, instructing them how to respond to the instructions from the program it had just read and interpreted from the memory unit. The control unit directs the operations of the CPU by executing the following jobs:
    • Coordinating and controlling activities of the CPU
    • Managing data flow between other components and the CPU
    • Acknowledging and accepting the next instruction
    • Decoding instructions
    • Storing the resulting data back into a memory unit      

Arithmetic and Logical Unit (ALU):

  • Allows logical and arithmetic operations to be carried out such as addition and subtraction.
  • (Logical operators are: AND, OR, NOT, XOR)              

Memory Unit:

  • Consists of RAM, which is partitioned out and consists of an address and its contents, which are in binary form.
  • RAM (Random Access Memory) is a fast type of memory unlike hard drives, it is also directly accessible by the CPU.
  • The existence of RAM in a CPU, allows it to function a lot quicker and hence more efficiently.

Registers:

  • Small block in the CPU that consists of a high-speed storage memory cells that store data before it is processed, all logical, arithmetic, and shift operations occur here.
  • The register consist of 5 components     
    • Program Counter (PC): Holds the address of the next instruction to be executed
    • Accumulator (AC): Storage area where logic and arithmetic results are stored
    • Memory Address Register (MAR): Holds the address of a location of the data that is to be read from or written to
    • Memory Data Register (MDR): Temporary storage location that stores data that has been read, or data that still needs to be written
    • Current Instruction Register (CIR): Area where the current instruction is being carried out. The operation is divided into operand and opcode.
      • Operand: Contains data or the address of the data (where the operation will be performed)
      • Opcode: Specifies type of instruction to be executed

Buses:

  • These are a set of parallel wires, which connect components (two or more) inside the CPU. Within the CPU, there are three types of buses, and these are all referred to a system bus. The types of buses are: Data bus, Control bus, and Address bus.
  • Data bus: This bus is referred to as a bi-directional bus, which means “bits” can be carried in both ways. This bus is used to transport data and instructions between the processor, memory unit, and the input/output.
  • Address bus: Transmits the memory address specifying where the relevant data needs to be sent or retrieved from. (The address bus does not carry the data, only the address)
  • Control bus: This is also a bi-directional bus used to transmit “control signals”/commands from the CPU (and status signals from other components) in order to control and coordinate all the activities within the computer.

Input/Outputs:

  • Information passed from the user/information received by the user.

Advantages and Disadvantages of von Neumann Architecture

AdvantagesDisadvantages
The control unit retrieves instruction and data in the same way from one memory unit. This simplifies the development and design of the control unitParallel executions of programs are not allowed due to serial instruction processing
The above advantage would also mean that data from memory and from devices are accessed the same way. Therefore increasing efficiencyOnly one “bus” can be accessed at a time. This results in the CPU being idle (as it’s faster than a data bus) This is considered to be the von Neumann Bottleneck
An advantageous characteristic is that programmers have control of memory organisationAlthough both instructions and data being stored in the same place can be viewed as an advantage as a whole. This can however result in re-writing over it, which results in data loss, due to an error in a program
 If a defective program fails to release memory when they don’t require it (or finish with it), it may cause the computer to crash, as a result of insufficient memory available

Von Neumann bottleneck

As processors, and computers over the years have had an increase in processing speed, and memory improvements have increased in capacity, rather than speed, this had resulted in the term “von Neumann bottleneck”. This is because the CPU spends a great amount of time being idle (doing nothing), while waiting for data to be fetched from the memory. No matter how fast the processor is, this ultimately depends on the rate of transfer, as a matter of fact, if the processor is faster, this just means that it’ll have a greater “idle” time.

Approaches to overcome this bottleneck include:

  • Caching:
    • Data which is more easily accessible in RAM, rather than stored in the main memory. The type of data stored here will be the type of data, which is frequently used.
  • Prefetching:
    • The transport of some data into cache before it is requested. This will speed access in the event of a request of the data.
  • Multithreading:
    • Managing many requests at the same time in separate threads.
  • New types of RAM:
    • Such as DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory).
    • This type of RAM activates output on both the falling edge and the rising edge of the system clock, instead of just the rising edge.
    • This can potentially double the output.
  • RAMBUS:
    • A subsystem connecting RAM controller, RAM, and the bus (path) connecting RAM to the microprocessor and devices within the computer that utilise it.
  • Processing in Memory (PIM):
    • PIM’s integrate a processor and memory in single microchip.

What is Harvard Architecture?

Harvard architecture is named after the “Harvard Mark I” relay-based computer, which was an IBM computer in the University of Harvard.

The computer-stored instructions on “punched tape” (24 bits wide), furthermore the data was stored in electro mechanical counters. The CPU of these early computer systems contained the data storage entirely, and it provided no access to the instruction storage as data.

Harvard architecture is a type of architecture, which stores the data and instructions separately, therefore splitting the memory unit.

The CPU in a Harvard architecture system is enabled to fetch data and instructions simultaneously, due to the architecture having separate buses for data transfers and instruction fetches.

Characteristics of Harvard Architecture

Both types of architectures contain the same components, however, the main difference is that in a Harvard architecture the instruction fetches and data transfers can be performed at the same time (simultaneously) (as the system has two buses, one for data transfers and one for instruction fetches).

Characteristics of Harvard Architecture

Advantages and Disadvantages of Harvard Architecture

AdvantagesDisadvantages
Due to instructions and data being transferred in different buses, this means there is a smaller chance of data corruptionThe memory dedicated to each (data and instructions) must be balanced by the manufacturer. Because if there is free memory data memory, it cannot be used for instructions and vice versa
Instructions and data can be accessed the same wayHowever, this advantage (to the left) results in a more complex architecture, as it requires two buses. This means it takes more time to manufacture and it makes these systems more expensive
Harvard architecture offers a high performance, as this architecture allows a simultaneous flow of data and instructions. These are kept in a separate memory and travel via separate busesThis architecture, however, despite the high performance, is very complex, especially for main board manufacturers to implement
There is a greater memory bandwidth that is more predictable, due to the architecture having separate memory for instructions and dataThough as mentioned above, to achieve the advantage on the left, Harvard architecture requires a control unit for two buses. Which increases complexity and makes development more difficult. All of which increase the price of the system

Modified Harvard Architecture

Von Neumann Architecture vs. Harvard Architecture:

Von Neumann ArchitectureHarvard Architecture
Based on the stored-program computer conceptBased on the Harvard Mark I relay-based computer model
Uses the same physical memory address for instructions and dataIt uses separate memory addresses for instructions and data
The processors require two clock cycles to execute an instructionProcessor requires only one cycle to complete an instruction
The von Neumann architecture consists of a simpler control unit design, which means less complex development is required. This means the system will be less costlyHarvard architectures control unit consists of two buses, which results in a more complicated system. This adds to the development cost, resulting in a more expensive system
Instruction fetches and data transfers cannot be performed at the same timeInstruction fetches and data transfers can be performed at the same time
Used in laptops, personal computers, and workstationsUsed in signal processing and micro-controllers

Modified Harvard Architecture:

A pure Harvard architecture suffers from the disadvantage that the mechanism must be provided to separate the load from the program to be executed into instruction memory and thus leaving any data to be operated upon into the data memory.

However modern systems nowadays use a read-only technology for the instruction memory and read/write technology for the same memory.

This allows a system to allow the execution of a pre-loaded program as soon as power is applied.

However, the data will be in an unknown state, therefore it cannot provide any pre-defined values to the program.

The solution to this is to provide machine language instructions so that the contents of the instruction memory can be read as if they were data, as well as providing a hardware pathway.

Most adoptions of Harvard architecture nowadays is a modified form, this is to loosen the strict separation between the data and the code, whilst still maintaining a high-performance concurrent data and instruction access of the original Harvard architecture.

The modified Harvard architecture is a variation of the original Harvard architecture. However, the difference between the two of them is, the modified architecture allows the contents of the instruction memory to be accessed as data.

The three main modifications applied to a Modified Harvard Architecture are:

  • Split-cache architecture:
    • Very similar to the von Neumann architecture, this modification builds a memory hierarchy with CPU caches for instructions and data at lower levels of hierarchy.
  • Instruction-memory-as-data architecture:
    • This modification allows to access the content of the instruction memory as the data. This can be carried because data cannot directly get executed as instructions.
    • (Though there is a debate to whether or not this actually can be named as “Modified” Harvard architecture)
  • Data-memory-as-instruction architecture:
    • Executing instructions fetched from any memory segment, unlike Harvard architecture, which can only execute instructions, fetched from the program memory segment.

Summary and Facts

The von Neumann Architecture was a large advancement from the program-controlled computers, which were used in the 1940’s. Such computer were programmed by setting the inserting patch leads and switches to route data and control signals between different functional sets.

Whereas nowadays, the majority of computer systems share the same memory for both data and program instructions.

The CPU in a Harvard architecture system is enabled to fetch data and instructions simultaneously, due to the architecture having separate buses for data transfers and instruction fetches.

What is the von Neumann Architecture?

The von Neumann architecture refers to one that keeps the data as well as the programmed instructions in read-write RAM (Random Access Memory).

Characteristics of von Neumann Architecture:

  • Central Processing Unit (CPU)
  • Control Unit
  • Arithmetic and Logical Unit (ALU)
  • Memory Unit
  • Registers:
    • Program Counter (PC)
    • Accumulator (AC)
    • Memory Address Register (MAR)
    • Memory Data Register (MDR)
    • Current Instruction Register (CIR)
  • Buses:
    • Data bus
    • Address bus
    • Control bus
  • Input/Outputs

Advantages:

  • Less expensive/complex compared to Harvard architecture
  • Efficient

Disadvantages:

  • Von Neumann Bottleneck
  • Greater chance of data loss

What is Harvard Architecture?

  • The Harvard architecture is a computer system that contains two separate areas for data and commands/instructions.
  • Harvard architecture is a type of architecture, which stores the data and instructions separately, therefore splitting the memory unit.

Advantages:

  • Less chance of data corruption
  • High performance
  • Greater memory bandwidth

Disadvantages:

  • Complex
  • Expensive

Modified Harvard Architecture:

The modified Harvard architecture is a variation of the original Harvard architecture. However, the difference between the two of them is, the modified architecture allows the contents of the instruction memory to be accessed as data.

The three main modifications applied to a Modified Harvard Architecture are:

  • Split-cache architecture
  • Instruction-memory-as-data architecture
  • Data-memory-as-instruction architecture

References:

  1. https://www.techopedia.com/definition/19737/harvard-architecture
  2. https://tdck.weebly.com/uploads/7/7/0/5/77052163/03_-_harvard_architecture_comparison.pdf
  3. https://getrevising.co.uk/grids/von-neumann-architecture
  4. http://differencebetween.net/technology/difference-between-von-neumann-and-harvard-architecture/
  5. https://en.wikipedia.org/wiki/Von_Neumann_architecture
  6. https://www.geeksforgeeks.org/computer-organization-von-neumann-architecture/
  7. https://www.techopedia.com/definition/32480/von-neumann-architecture
  8. http://www.computinghistory.org.uk/det/3665/John-von-Neumann/
  9. https://www.computerscience.gcse.guru/theory/von-neumann-architecture
  10. https://en.wikipedia.org/wiki/Modified_Harvard_architecture
  11. https://www.edaboard.com/threads/harvard-vs-modified-harvard-architechture.111764/