Computer Architecture Assign
Computer Architecture Assign
Group Members:
Name: Itlal Ahmed Reg No: FA15-BSE-008
Name: Yawar Abbas Reg No: FA15-BSE-080
Name: Imran khan Reg No: FA15-BSE-142
Name: Hamza Ejaz Reg No: FA15-BSE-110
Name: Zawar Hussain Reg No: FA15-BSE-117
Name:Qaim Raza Reg No: FA15-BSE-041
Name:Shoaib Maqbool Reg No: FA15-BSE-053
Name:Arif Mehmood Reg No: FA15-BSE-070
Name: Hammad Ahmad Reg No: FA14-BCS-093
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.
Comparison Chart:
Von Neumann Harvard Architecture
It is a theoretical design based on the It is a modern computer architecture
stored-program computer concept based on the Harvard mark I relay based
computer model
It uses same physical memory address It uses separate memory addresses for
for instructions and data instructions and data
Processor needs two clock cycles to Processor needs one cycle to complete
execute an instruction an instruction
Simpler control unit design and Control unit for two buses is more
development of one is cheap and faster complicated which adds to development
cost
Data transfers and instruction fetches Data transfers and instruction fetches can
cannot be performed simultaneously be performed at the same time
Used in personal computers, laptops and Used in microcontrollers and signal
workstations processing
1. Very large instruction sets reaching up to and above three hundred separate
instructions.
3. More specialized addressing modes and registers also being implemented, with
variable length instruction codes.
5. Many complex instructions can access memory, such as direct addition between data
in two memory locations.
2. Simplified and reduced instruction set, numbering one hundred instructions or less.
Because of simple instructions, RISC chips requires fewer transistors to produce
processors. Also the reduced instruction set means that the processor can execute the
instructions more quickly, potentially allowing for greater speeds.
3. Addressing modes are simplified back to four or less, and the length of the codes is
fixed in order to allow standardization across the instruction set.
RISC CISC
1. RISC stands for Reduced Instruction 1. CISC stands for Complex Instruction
Set Computer. Set Computer.
2. RISC processors have simple 2. CSIC processor has complex
instructions taking about one clock cycle. instructions that take up multiple clocks
The average clock cycle per instruction for execution. The average clock cycle
(CPI) is 1.5 per instruction (CPI) is in the range of 2
and 15.
3. Performance is optimized with more 3. Performance is optimized with more
focus on software focus on hardware.
4. It has no memory unit and uses a 4. It has a memory unit to implement
separate hardware to implement complex instructions.
instructions..
5. It has a hard-wired unit of 5. It has a microprogramming unit.
programming.
6. The instruction set is reduced i.e. it has 6. The instruction set has a variety of
only a few instructions in the instruction different instructions that can be used for
set. Many of these instructions are very complex operations.
primitive.
7. The instruction set has a variety of 7. CISC has many different addressing
different instructions that can be used for modes and can thus be used to represent
complex operations. higher-level programming language
statements more efficiently.
8. Complex addressing modes are 8. CISC already supports complex
synthesized using the software. addressing modes
9. Multiple register sets are present 9. Only has a single register set
10. RISC processors are highly pipelined 10. They are normally not pipelined or
less pipelined
11. The complexity of RISC lies with the 11. The complexity lies in the
compiler that executes the program microprogram
12. Execution time is very less 12. Execution time is very high
13. Code expansion can be a problem 13. Code expansion is not a problem
14. Decoding of instructions is simple. 14. Decoding of instructions is complex
15. It does not require external memory 15. It requires external memory for
for calculations calculations
16. The most common RISC
microprocessors are Alpha, ARC, ARM, 16. Examples of CISC processors are the
AVR, MIPS, PA-RISC, PIC, Power System/360, VAX, PDP-11, Motorola
Architecture, and SPARC. 68000 family, AMD and Intel x86 CPUs.
17. RISC architecture is used in high-end
applications such as video processing, 17. CISC architecture is used in low-end
telecommunications and image applications such as security systems,
processing. home automation, etc.