Harvard architecture is a type of computer organization where the memory for storing instructions (programs) and data are kept separate, each with its own dedicated memory and bus system. This separation allows the CPU to access instructions and data simultaneously, which improves processing speed and efficiency compared to architectures where both share the same memory and bus (like von Neumann architecture)[1][2][5][6][8].
Context in Computer Organization
In computer organization, the CPU needs to fetch instructions (commands to execute) and read/write data (values to process). In Harvard architecture:
- There are two separate memory units: one exclusively for instructions and one exclusively for data.
- Each memory has its own address bus and data bus.
- This means the CPU can fetch an instruction from the instruction memory at the same time as it reads or writes data from/to the data memory.
- This parallelism reduces bottlenecks and speeds up execution.
How Data and Instructions Are Stored in Harvard Architecture
- Instruction Memory: Stores the program instructions. This memory is often read-only or flash memory in embedded systems, meaning instructions are fixed and protected from accidental modification.
- Data Memory: Stores the data that the program manipulates during execution. This memory is usually read-write, like RAM.
- The instruction memory and data memory can have different sizes, word lengths, and technologies. For example, instructions might be 16 or 32 bits wide, while data might be 8 bits wide.
- Because of separate memories, the instruction address space and data address space are independent. Address 0 in instruction memory is not the same as address 0 in data memory.
Summary of Key Points
| Aspect | Harvard Architecture |
|---|
| Memory for instructions | Separate memory from data, often read-only or flash |
| Memory for data | Separate memory, usually read-write RAM |
| Buses | Separate address and data buses for instructions and data |
| Access | Simultaneous access to instructions and data |
| Instruction length | Usually fixed length for faster processing |
| Performance | Faster execution due to parallel fetching |
| Usage | Common in embedded systems, DSPs, microcontrollers |
| Flexibility | Less flexible for modifying instructions at runtime |
Why Harvard Architecture is Faster
Because instructions and data do not share the same bus, the CPU can fetch the next instruction while simultaneously reading or writing data. This parallelism eliminates the bottleneck present in von Neumann architecture, where instruction fetch and data access compete for the same bus[2][5][6][8].
Practical Example
Imagine a microcontroller running a program:
- The program instructions (like "add two numbers") are stored in instruction memory (e.g., ROM).
- The data (the actual numbers to add) are stored in data memory (e.g., RAM).
- The CPU fetches the instruction from instruction memory while simultaneously accessing the data from data memory.
- This leads to faster processing, especially important in real-time systems like traffic lights, audio processing, or embedded devices[2][6][8].
This explanation covers the essential concepts of Harvard architecture in simple terms, focusing on how instructions and data are stored separately and accessed simultaneously to improve performance. This should help you score well in your computer organization topic.