SECTION VI-12: Harvard Architecture in the PIC

Every microprocessor must have memory space to store program (code) and data. The PIC is no exception with its code ROM space and data RAM (file register) space. Code provides instructions to the CPU, the data provides the information to be processed. The CPU uses buses (wire traces) to access the code ROM and data RAM memory spaces. The early computers used the same bus for accessing both the code and data. Such an architecture is commonly referred to as von Neumann Princeton architecture. For von Neumann computers, the process of accessing the code or data could cause them to get in each other's way and slow down the processing speed of the CPU, as each had to wait for the other to finish fetching. To speed up the process of program execution, some CPU's use what is called Harvard architecture.

In Harvard architecture, we have separate buses for the code and data memory. That means we need four sets of buses as follows:

  1. A set of data buses for carrying data into and out of the CPU
  2. A set of address buses for accessing the data.
  3. A set of data buses for carrying code into the CPU.
  4. An address bus for accessing the code.

 

Von Neumann VS Harvard Architecture
von-neumann-architecture.jpg
harvard-architecture.jpg

 

This is easy to implement inside an IC chip such as a microcontroller where both ROM code and data RAM are internal (on-chip) and distances are on the micron and millimeter scale. But to implement Harvard architecture for systems such as x86 IBM PC-type computers is very expensive because the RAM and ROM that hold code and data are external to the CPU. Separate wire traces for data and code on the motherboard will make the board large and expensive. For Pentium microprocessor with a 64 bit data bus and a 32 bit address bus we will need about 100 wire traces on the mother board if it is von Neumann architecture (96 for address and data plus a few others for control signs of read and write). But the number of wire traces will double to 200 if we use Harvard architecture. Harvard architecture will also necessitate a large number of pins coming out of microprocessor itself. For this reason you do not see Harvard architecture implemented in the world of PC's and workstations. This is also the reason that microcontroller(s) such as PIC use Harvard architecture internally, but they still use non Neumann architecture if they need external memory for code and data space. The von Neumann architecture was developed at Princeton University, while the Harvard architecture was the work of Harvard University.

 

 

More From Iamtechnical.com

Advertisement:

SiteLock