You are on page 1of 20

CS209 Computer Architecture

HW/SW Abstraction
Somanath Tripathy
IIT Patna
This Class
• Computer Designing goal

• Moore’s law (Technology development)

• Abstraction/ Level of Transformation

• Instruction Execution
Computer Architecture
• Computer Architecture: The idea of designing,
selecting, and interconnecting hardware
components to create a computing system meeting
with desired goals (functional, performance,
energy consumption, cost, etc.)

• Goal : To familiarize with both fundamental operation


principles and design tradeoffs of processor, memory,
and platform architectures in computer system.
– Strong emphasis on fundamentals and design
tradeoffs.
Computer Designing Goals
• Reliable
– Continue to perform correctly?
• High performance
– Speed, throughput
• Low power
– Energy (battery life)
• Low cost
– Per unit manufacturing cost

• Balancing all these goals is constantly


changing
An Enabler: Moore’s Law

Moore, “Cramming more components onto integrated circuits,”


Electronics Magazine, 1965. Component counts double every other year
5
Image source: Intel
Number of transistors on an integrated circuit doubles ~ every two years
6
Image source: Wikipedia
Processor performance

Source: H&P Textbook


Inside a computer

8
Abstraction
• An abstraction omits unneeded detail,
helps us cope with complexity

– Delving into the depths reveals more


information

9
Levels of Transformation, Revisited
◼ A user-centric view: computer designed for users
Problem
Algorithm
Program/Language User

Runtime System
(VM, OS, MM)
ISA
Microarchitecture
Logic circuits

Breaking the abstraction layers and knowing what is


underneath enables you to solve problems and design
better future systems
10
Software Abstraction
int sum(int x, int y) 0x401040 <sum>: 0x55
{ 0x89
int t = x+y; C
0xe5
return t; 0x8b
} 0x45
_sum: 0x0c
assembly 0x03
pushl %ebp
movl %esp,%ebp 0x45
movl 12(%ebp),%eax 0x08
addl 8(%ebp),%eax 0x89
movl %ebp,%esp 0xec
popl %ebp machine 0x5d
ret code 0xc3
11
Hardware Abstraction
CPU Memory
Addresss Instructions
PC MAR 0000
0001 I1
IR MBR
0002 I2
Acc IOAR 0003
IOBR

Decode&Exec

IO
Data
Buffers d1
-- d2
--
--

------
How to perform a Task?
• Task/ Program is a sequence of steps
– For each step, an arithmetic or logical operation is done
• For each operation, a different set of control signals is
needed

• Hardwired
– Connect to a particular hardware component
– Hardwired systems are inflexible
• Micro-program
– General purpose hardware can do different tasks, given
correct control signals
– Instead of re-wiring, supply a new set of control signals
Instruction Cycle
• Instruction cycle constitutes of two steps:
• Fetch
• Execute
Fetch Cycle
• Program Counter (PC) holds address of next
instruction to fetch
• Processor fetches instruction from memory
location pointed to by PC
• Increment PC
– Unless specified.
• Load Instruction into Instruction Register (IR)

• Processor decodes instruction and


performs required actions
Different types of Actions
• Data Transfer
– processor-memory
– Processor I/O
• Data processing
– Arithmetic or logical operation on data
• Control
– Alteration of sequence of operations
– e.g. jump

• Combination of above
Example of Program Execution
Ex. Let The processor has
a single data register AC
Let the PC content is 300
16-bit Instruction has 4-bit
opcode and 12-bit operand field

Let: Stored code


300: LDA [940], AX
ADD [941], AX
STA AX, [941]
Opcode meaning

0x1 Load AC from memory


0x2 Store AC to memory

0x5 Add AC and memory


ADD [941],AX

STA AX, [941]


Instruction Cycle State Diagram
Thanks

You might also like