You are on page 1of 26

EN-6110 Computer Architecture

EN-7110 Advanced Computer Architecture

Lecture # 1

Dr. Syed Azhar Ali Zaidi


Assistant Professor
azhar.ali@uettaxila.edu.pk

1
Course Objective
• This course aims to develop an understanding
of the programmer’s model (registers and
instruction set) and the hardware components
(based on this model) and their
interconnections. The optimizations done at
the architectural level in order to achieve a
particular system performance will also be
discussed.

2
Course Contents
Course Contents
1. Basic concepts
2. Performance Measurement of Computers
3. RISC-V Architecture
i. Instruction set of RISC-V Processor
ii. Operands
iii. Programming
iv. Machine Language
4. Computer Arithmetic
5. RISC-V Micro architecture
i. Single Cycle processor
ii. Multi-cycle processor
iii. Pipelined Processor
iv. Hazards of Pipelining
v. Advanced microarchitecture
6. Memory Systems 3
Reference Books
• David A. Patterson and John L. Hennessy, Computer
Organization and Design RISC-V Edition, MK Elsevier
• Sarah L. Harris and David M. Harris, Digital Design
and Computer Architecture RISC-V Edition, MK
Elsevier
• David A. Patterson and John L. Hennessy, Computer
Architecture: A quantitative approach, 6th Edition,
MK Elsevier
• William Stallings, Computer Organization and
Architecture: Designing for Performance, Pearson
4
Grading Criteria

Quizzes/Assignments/Research Paper
Presentations: 20%
Course Project: 20%
Mid Exam: 20%
Final Exam 40%

5
Course Project
• Possible Course Projects
– Design of a RISC Processor using HDL
– Implementation of a Research Paper related to
computer architecture
– Review paper on Some Computer Architecture
topic etc.

6
Background in Computer Architecture

?
7
Basic Concepts

8
Myopic View of Computer Architecture –
Instruction Set Architecture
• Computer architecture refers to those attributes of a system visible
to a programmer or, put another way, those attributes that have a
direct impact on the logical execution of a program.
• A term that is often used interchangeably with computer
architecture is instruction set architecture (ISA).
• The ISA defines instruction formats, instruction opcodes, registers,
instruction and data memory; the effect of executed instructions on
the registers and memory; and an algorithm for controlling
instruction execution.
• Examples of architectural attributes include:
– the instruction set
– the number of bits used to represent various data types (e.g., numbers,
characters)
– I/O mechanisms
– techniques for addressing memory. 9
Computer Organization and Hardware

Computer Organization (Microarchitecture)


• High-level aspects of a computer design such as the
memory system, memory interconnects and the design
of the internal CPU. E.g. use of a specific multiplier
architecture for executing the multiplication instruction.
– Intel core i7 and AMD Opteron uses the same instruction set
architectures (80x86) but have different organizations
(different pipeline and cache organizations)
• Hardware refers to the specifics of the computer
including the detailed logic design and the packaging
technology, cooling etc..

10
Computer Architecture

ISA

Organization

Hardware

11
Computer Architecture

Application
Operating
System
Compiler Firmware
Instruction Set
Architecture
Instr. Set Proc. I/O system
Datapath & Control
Digital Design
Circuit Design
Layout

12
The Instruction Set: a Critical Interface

software

instruction set

hardware

13
Goal of Computer Architect
• Meet the functional
requirements keeping in Technology Programming
view different Languages
constraints
– Price Applications
– Power
Computer Constraints
– Performance Architecture
– Availability e.g. cost, energy
• Determining the
functional requirements Operating
is also a major task of Systems
architect. History
• Must also aware of the
trends in technology and
the use of computers
14
Application Areas
• Scientific
• Mobile Devices
• Desktop
• Servers
• Clusters/warehouse-scale computers
• Embedded systems

15
Technology Trends
• IC Technology – Transistor count increased by
approx. 40-55% per year or doubling every 18-
24 months
• DRAM – quadrupling every three years. Now
decelerated in recent years
• Semiconductor Flash – doubling roughly 2
years
• Magnetic disk – varied between different
periods
• Network Technology
16
Moore’s Law
“About every eighteen months,
the number of transistors on a
CMOS silicon chip doubles and
the clock speed doubles”
– Transistors/Chip increasing by
50% per year (by 4X in 3.5
years)
– Gate Delay decreasing by 13%
per year (by ½ in 5 years)

17
Moore’s Law

18
Why Scaling?

The virtuous circle of the semiconductor industry

20
Computer Organization – Von Neumann Architecture

21
Complex Instruction Set Computer (CISC) Verses
Reduced Instruction Set Computer (RISC)
• 'Complex‘ means 'One Instruction' in CISC can
perform 'Complex functions'.
• The CISC approach attempts to minimize the number of
instructions per program by
– Sacrificing the number of cycles per instruction
• The RISC reduces the cycles per instruction at the cost
of the
– Number of instructions per program
• The simplest way to examine the advantages and
disadvantages of RISC architecture is by
– Contrasting it with CISC architecture by taking an example
22
Example: Multiplying Two Numbers in Memory

 Figure shows the storage scheme for a generic


computer
 The main memory is divided into locations numbered
from (row) 1: (column) 1 to (row) 6: (column) 4
 The execution unit is responsible for carrying out all
computations
 However, the execution unit can only operate on data
that has been loaded into one of the six registers (A,
B, C, D, E, or F)
 Let's say we want to find the product of two numbers
- one stored in location 2:3 and another stored in
location 5:2 - and then store the product back in the
location 2:3.

Figure Source: ARS TECHNICA

23
Multiplying Two Numbers :The CISC Approach (1/2)

• 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 and executing a series of operations
• For this particular task
– A CISC processor would come prepared with a specific
instruction (call it "MULT")
• When executed
– This instruction loads the two values into separate registers
– Multiplies the operands in the execution unit
– Then stores the product in the appropriate register
– The product is then transferred to the memory location
• Thus, the entire task of multiplying two numbers can be completed
with one instruction:
MULT 2:3, 5:2

24
Multiplying Two Numbers :The CISC Approach (2/2)

• MULT 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
• It closely resembles a command in a higher level language.
– For instance, let "a" represent the value of 2:3 and "b" represent
the value of 5:2, then this command is identical to the C
statement "a = a * b."
• Primary advantages of this system is that
– The compiler has to do very little work to translate a high-level
language statement into assembly
• The length of the code is relatively short, therefore
– Very little RAM is required to store instructions
• The emphasis is put on building complex instructions directly into
the hardware

25
Multiplying Two Numbers :The RISC Approach
• RISC processors only use simple instructions that can be executed within
one clock cycle
• The "MULT" command described in CISC 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
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
• This may seem like a much less efficient way of completing the operation
– There are more lines of code, more RAM is needed to store the
assembly level instructions.
– The compiler also perform more work to convert a high-level language
statement into code of this form.
26
Advantages of RISC
• The RISC strategy also brings some very important
advantages.
– Each instruction requires only one clock cycle to execute,
therefore
• The entire program will execute in approximately the same
amount of time as the multi-cycle "MULT" command
– RISC "reduced instructions" require less transistors of hardware
space than the complex instructions, leaving more room for
general purpose registers
– All of the instructions execute in a uniform amount of time (i.e.
one clock), pipelining is possible

27

You might also like