Vous êtes sur la page 1sur 15

ARM Technical Support Knowledge Articles

Document Merge (0)

Favorite Articles (0)

What is the difference between a von Neumann architecture and a Harvard architecture?

Applies to: ARM1020/22E, ARM1026EJ-S, ARM1136, ARM720T, ARM7EJ-S, ARM7TDMI,


ARM7TDMI-S, ARM920/922T, ARM926EJ-S, ARM940T, ARM946E-S, ARM966E-S, ARM9TDMI

Answer

Harvard architecture has separate data and instruction busses, allowing transfers to be
performed simultaneously on both busses. A von Neumann architecture has only one bus which
is used for both data transfers and instruction fetches, and therefore data transfers and
instruction fetches must be scheduled - they can not be performed at the same time.

It is possible to have two separate memory systems for a Harvard architecture. As long as data
and instructions can be fed in at the same time, then it doesn't matter whether it comes from a
cache or memory. But there are problems with this. Compilers generally embed data (literal
pools) within the code, and it is often also necessary to be able to write to the instruction
memory space, for example in the case of self modifying code, or, if an ARM debugger is used, to
set software breakpoints in memory. If there are two completely separate, isolated memory
systems, this is not possible. There must be some kind of bridge between the memory systems
to allow this.

Using a simple, unified memory system together with a Harvard architecture is highly inefficient.
Unless it is possible to feed data into both busses at the same time, it might be better to use a
von Neumann architecture processor.

Use of caches

At higher clock speeds, caches are useful as the memory speed is proportionally slower. Harvard
architectures tend to be targeted at higher performance systems, and so caches are nearly
always used in such systems.

Von Neumann architectures usually have a single unified cache, which stores both instructions
and data. The proportion of each in the cache is variable, which may be a good thing. It would in
principle be possible to have separate instruction and data caches, storing data and instructions
separately. This probably would not be very useful as it would only be possible to ever access
one cache at a time.

Caches for Harvard architectures are very useful. Such a system would have separate caches for
each bus. Trying to use a shared cache on a Harvard architecture would be very inefficient since
then only one bus can be fed at a time. Having two caches means it is possible to feed both
buses simultaneously....exactly what is necessary for a Harvard architecture.

This also allows to have a very simple unified memory system, using the same address space for
both instructions and data. This gets around the problem of literal pools and self modifying code.
What it does mean, however, is that when starting with empty caches, it is necessary to fetch
instructions and data from the single memory system, at the same time. Obviously, two memory
accesses are needed therefore before the core has all the data needed. This performance will be
no better than a von Neumann architecture. However, as the caches fill up, it is much more likely
that the instruction or data value has already been cached, and so only one of the two has to be
fetched from memory. The other can be supplied directly from the cache with no additional
delay. The best performance is achieved when both instructions and data are supplied by the
caches, with no need to access external memory at all.

This is the most sensible compromise and the architecture used by ARMs Harvard processor
cores. Two separate memory systems can perform better, but would be difficult to implement.

See also:

ARM Related Books

ARM Processor Core Technical Reference Manuals

Article last edited on: 2008-09-09 15:47:38

Rate this article

Current article rating: 7/10

[Bad]||[Good]

Disagree? Move your mouse over the bar and click

Link to this article

Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential

Homexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

HOME

MICROCONTROLLERS
C/C++ CODES

LINUX

PROJECTS

ARTICLES

CONTACT US

Type your search

HomeDifference between RISC and CISC architecture

Difference between RISC and CISC architecture

LQFP-48

______________________________________________________________________________
______________________

What is ISA ?

Instruction set architecture(ISA) is the set of processor design techniques used to implement the
instruction work flow on hardware. In more practical words, ISA tells you that how your
processor going to process your program instructions.

Untitled

There is no standard computer architecture accepting different types like CISC, RISC, etc.

what is CISC ?

A complex instruction set computer (CISC /pronounce as ˈsisk’/) is a computer where single
instructions can execute several low-level operations (such as a load from memory, an arithmetic
operation, and a memory store) or are capable of multi-step operations or addressing modes
within single instructions, as its name suggest “COMPLEX INSTRUCTION SET”.
What is RISC ?

A reduced instruction set computer (RISC /pronounce as ˈrisk’/) is a computer which only use
simple instructions that can be divide into multiple instructions which perform low-level
operation within single clock cycle, as its name suggest “REDUCED INSTRUCTION SET”

Understand RISC & CISC architecture with example

Let we take an example of multiplying two numbers

A = A * B; <<<======this is C statement

The CISC Approach :- The primary goal of CISC architecture is to complete a task in as few lines of
assembly as possible. This is achieved by building processor hardware that is capable of
understanding & executing a series of operations, this is where our CISC architecture
introduced .

For this particular task, a CISC processor would come prepared with a specific
instruction (we’ll call it “MULT”). When executed, this instruction

Loads the two values into separate registers

Multiplies the operands in the execution unit

And finally third, stores the product in the appropriate register.

Thus, the entire task of multiplying two numbers can be completed with one instruction:

MULT A,B <<<======this is assembly statement

MULT is what is known as a “complex instruction.” It operates directly on the


computer’s memory banks and does not require the programmer to explicitly call any loading or
storing functions.
Advantage:-

Compiler has to do very little work to translate a high-level language statement into assembly

Length of the code is relatively short

Very little RAM is required to store instructions

The emphasis is put on building complex instructions directly into the hardware.

The RISC Approach :- RISC processors only use simple instructions that can be executed within
one clock cycle. Thus, the “MULT” command described above could be divided into three
separate commands:

“LOAD” which moves data from the memory bank to a register

“PROD” which finds the product of two operands located within the registers

“STORE” which moves data from a register to the memory banks.

In order to perform the exact series of steps described in the CISC approach, a
programmer would need to code four lines of assembly:

LOAD R1, A <<<======this is assembly statement

LOAD R2,B <<<======this is assembly statement

PROD A, B <<<======this is assembly statement

STORE R3, A <<<======this is assembly statement

At first, this may seem like a much less efficient way of completing the operation.
Because there are more lines of code, more RAM is needed to store the assembly level
instructions. The compiler must also perform more work to convert a high-level language
statement into code of this form.

Advantage:-

Each instruction requires only one clock cycle to execute, the entire program will execute in
approximately the same amount of time as the multi-cycle “MULT” command.

These RISC “reduced instructions” require less transistors of hardware space than the complex
instructions, leaving more room for general purpose registers. Because all of the instructions
execute in a uniform amount of time (i.e. one clock)

Pipelining is possible.

LOAD/STORE mechanism:- Separating the “LOAD” and “STORE” instructions actually reduces the
amount of work that the computer must perform. After a CISC-style “MULT” command is
executed, the processor automatically erases the registers. If one of the operands needs to be
used for another computation, the processor must re-load the data from the memory bank into
a register. In RISC, the operand will remain in the register until another value is loaded in its
place.

Comparison of RISC & CISC

CISC

RISC

Emphasis on hardware

Emphasis on software

Includes multi-clock
Single-clock

complex instructions

reduced instruction only

Memory-to-memory: “LOAD” and “STORE” incorporated in instructions

Register to register: “LOAD” and “STORE” are independent instructions

high cycles per second, Small code sizes

Low cycles per second, large code sizes

Transistors used for storing complex instructions

Spends more transistors on memory registers

Example of RISC & CISC

Examples of CISC instruction set architectures are PDP-11, VAX, Motorola 68k, and
your desktop PCs on intel’s x86 architecture based too .

Examples of RISC families include DEC Alpha, AMD 29k, ARC, Atmel AVR, Blackfin,
Intel i860 and i960, MIPS, Motorola 88000, PA-RISC, Power (including PowerPC), SuperH, SPARC
and ARM too.
Which one is better ?

We can not differentiate RISC and CISC technology because both are suitable at its specific
application. What counts is how fast a chip can execute the instructions it is given and how well
it runs existing software. Today, both RISC and CISC manufacturers are doing everything to get an
edge on the competition.

What’s new ?

You might thinking that RISC is nowdays used in microcontroller application widely so its better
for that particular application and CISC at desktop application. But reality is boh are at threat
position cause of a new technology called EPIC.

EPIC ( Explicitly Parallel Instruction Computing ) :-EPIC is a invented by Intel and is in a way, a
combination of both CISC and RISC. This will in theory allow the processing of Windows-based as
well as UNIX-based applications by the same CPU.

Intel is working on it under code-name Merced. Microsoft is already developing


their Win64 standard for it. Like the name says, Merced will be a 64-bit chip.

If Intel’s EPIC architecture is successful, it might be the biggest thread for RISC. All
of the big CPU manufactures but Sun and Motorola are now selling x86-based products, and
some are just waiting for Merced to come out (HP, SGI). Because of the x86 market it is not likely
that CISC will die soon, but RISC may.

So the future might bring EPIC processors and more CISC processors, while the
RISC processors are becoming extinct.

Suggested Reading

How To Select Right Microcontroller For Project

Difference between ARM and other Microcontrollers

Arduino Vs Raspberry Pi
If you like this Article, then don’t forget to Click on Social likes buttons.

24

24

Skip to main content

Home

HOME

ARTICLES

CIRCUITS

MICROCONTROLLER PROJECTS

ARDUINO

RASPBERRY PI

FORUM

CONTACT

Search form

Search

Search

Home What is the difference between microprocessor and microcontroller?

What is the difference between microprocessor and microcontroller?

By Apoorve 1 Comment
What is the difference between microprocessor and microcontroller?

You must always be confused when you are asked about difference between microprocessors
and microcontrollers. As it seems to be same but it’s not. So let’s discuss about them and point
out the major differences between them.

Microcontroller

It’s like a small computer on a single IC. It contains a processor core, ROM, RAM and I/O pins
dedicated to perform various tasks. Microcontrollers are generally used in projects and
applications that require direct control of user. As it has all the components needed in its single
chip, it does not need any external circuits to do its task so microcontrollers are heavily used in
embedded systems and major microcontroller manufacturing companies are making them to be
used in embedded market. A microcontroller can be called the heart of embedded system. Some
examples of popular microcontrollers are 8051, AVR, PIC series of microcontrollers,.

Microcontroller architecture

Above is architecture of 8051 microcontroller. And you can see all the required components for a
small project is present in a single chip.

Microprocessor

Microprocessor has only a CPU inside them in one or few Integrated Circuits. Like
microcontrollers it does not have RAM, ROM and other peripherals. They are dependent on
external circuits of peripherals to work. But microprocessors are not made for specific task but
they are required where tasks are complex and tricky like development of software’s, games and
other applications that require high memory and where input and output are not defined. It may
be called heart of a computer system. Some examples of microprocessor are Pentium, I3, and I5
etc.

microprocessor architecture

From this image of architecture of microprocessor it can be easily seen that it have registers and
ALU as processing unit and it does not have RAM, ROM in it.

So, what is the difference between microprocessor and microcontroller?


As now you are basically aware of what is a microcontroller and microprocessor, it would be easy
to identify the major differences between a microcontroller and microprocessor.

1. Key difference in both of them is presence of external peripheral, where microcontrollers have
RAM, ROM, EEPROM embedded in it while we have to use external circuits in case of
microprocessors.

2. As all the peripheral of microcontroller are on single chip it is compact while microprocessor is
bulky.

3. Microcontrollers are made by using complementary metal oxide semiconductor technology so


they are far cheaper than microprocessors. In addition the applications made with
microcontrollers are cheaper because they need lesser external components, while the overall
cost of systems made with microprocessors are high because of the high number of external
components required for such systems.

4. Processing speed of microcontrollers is about 8 MHz to 50 MHz, but in contrary processing


speed of general microprocessors is above 1 GHz so it works much faster than microcontrollers.

5. Generally microcontrollers have power saving system, like idle mode or power saving mode so
overall it uses less power and also since external components are low overall consumption of
power is less. While in microprocessors generally there is no power saving system and also many
external components are used with it, so its power consumption is high in comparison with
microcontrollers.

6. Microcontrollers are compact so it makes them favorable and efficient system for small
products and applications while microprocessors are bulky so they are preferred for larger
applications.

7. Tasks performed by microcontrollers are limited and generally less complex. While task
performed by microprocessors are software development, Game development, website,
documents making etc. which are generally more complex so require more memory and speed
so that’s why external ROM, RAM are used with it.
8. Microcontrollers are based on Harvard architecture where program memory and data
memory are separate while microprocessors are based on von Neumann model where program
and data are stored in same memory module.

CircuitDigest highly recommends EasyEDA for circuit and PCB design

Low Cost & Fast PCB Prototypes - EasyEDA

10 pcs 2 layers only $10, Join for EasyEDA.com Free & Get $5 Cash Coupon

Add new comment

Comments (1)

Ban-navti Bon-naventure's picture

Ban-navti Bon-n...

reply

how can you design a door lock system that wil prompt the user to enter password with
pic16f877a.

Aug 21, 2016

Leave a comment

Your name *

E-mail *

The content of this field is kept private and will not be shown publicly.

Subject

Comment *

More information about text formats

No HTML tags allowed.


Web page addresses and e-mail addresses turn into links automatically.

Lines and paragraphs break automatically.

SavePreview

RELATED CONTENT

RFID and Keypad Based Security System using 8051 Microcontroller

Alarm Clock using ATmega32 Microcontroller

Cell Phone Controlled Robot using 8051 Microcontroller

RFID Based Attendance System

Touch Keypad Interfacing with ATmega32 Microcontroller

LATEST POSTS

Smart Phone Controlled Bluetooth FM Radio using Arduino and Processing

Smart Phone Controlled FM Radio using Arduino and Processing

Raspberry Pi Tablet

DIY Raspberry Pi Tablet

Raspberry Pi Talking Book Player

Raspberry Pi Talking Book Player

How to Use Neopixel RGB LED Strip with Arduino and TFT LCD

How to Use NeoPixel LED Strip with Arduino and TFT LCD

Arduino based Tilt-to-Unlock Box

Arduino based Tilt-to-Unlock Box

Ping Pong Game using Arduino and Accelerometer

Ping Pong Game using Arduino and Accelerometer

ACTIVE FORUM TOPICS


IR remote and Arduino Clock controlled arduino How to calculate resistor and capacitor value in
555 astable mode? Frequency Counter using Arduino Uno Stepper motor - changing direction of
rotation

More

Ask Question

USER LOGIN

E-mail or username *

Password *

Create new account Request new password

Log in

FEATURED PROJECTS AND CIRCUITS

How to Use Neopixel RGB LED Strip with Arduino and TFT LCD

How to Use NeoPixel LED Strip with Arduino and TFT LCD

Make/answer call and Read/send SMS using Arduino

Call and Message using Arduino and GSM Module

Arduino Alarm Clock

Arduino Based Digital Clock with Alarm

Temperature and Humidity Monitoring over Internet using ThingSpeak and Arduino

Live Temperature and Humidity Monitoring over Internet using Arduino and ThingSpeak

Arduino Capacitance Meter

Capacitance Meter using Arduino

View all Featured Projects

SIGN UP FOR LATEST NEWS


Subscribe

Popular Topics: Robotics Projects | Arduino Uno Projects | Electronics Projects | 555 Timer
Circuits | ATmega32 Projects | ATmega8 Projects | Raspberry Pi Projects | 4017 Circuits

Copyright © 2016 Circuit Digest. All rights reservedPrivacy policy | Disclaimer | Contact Us |
Submit | Advertise

Vous aimerez peut-être aussi