Professional Documents
Culture Documents
Microprocessor and Assembly Language: Lecture-2-Computer Architecture
Microprocessor and Assembly Language: Lecture-2-Computer Architecture
Microprocessor and Assembly Language: Lecture-2-Computer Architecture
ASSEMBLY LANGUAGE
LECTURE-2-COMPUTER ARCHITECTURE
MUHAMMAD HAFEEZ
DEPARTMENT OF COMPUTER SCIENCE
GC UNIVERSITY LAHORE
TODAY’S AGENDA
Von Neumann Architecture
Harvard Architecture
VON NEUMANN
ARCHITECTURE
Advantages:
Memory:
The computer will have memory that can hold
data and instructions to process that data.
Today’s RAM
Control Unit:
Control unit will manage the processing of data
by coordinating between different components of
Computer – one at a time
Arithmetic and Logic Unit
Bus
Input/ Output Devices
POPULARITY OF VON
NEUMANN ARCHITECTURE
Most Successful architecture
Modern Computers have CU and ALU on its
Chip
Memory concept is manifested as RAM
BOTTLENECKS OF VON
NEUMANN ARCHITECTURE
Every piece of data has to pass the Data
Bus to reach to CPU and Main Memory
(called von Neumann bottleneck)
CPU spends most of the time waiting for
instructions
Solutions?
Data and Program share the same memory
(Memory Management)
The rate at which data and instruction are
required often different but in von
Neumann architecture they both reach at
same speed
HARVARD ARCHITECTURE
Split Program and Data Memory
Advantages
Disadvantages
Application
MACHINE INSTRUCTION
CYCLE
MACHINE INSTRUCTION
CYCLE
Fetch: The address of instruction moves
from PC to AR. The control unit fetches the
next instruction from the memory at
location pointed by AR into IR, and
increments the Program Counter.
Decode: The control unit decodes the
instruction to determine what the
instruction will do. The instructions input
operands are passed to the ALU, and
signals are sent to the ALU indicating the
operation to be performed
MACHINE INSTRUCTION
CYCLE
Fetch operands: If the instruction uses an
input operand located in memory, the
control unit uses a read operation to
retrieve the operands and copy it into data
registers (DR)
Execute: The ALU executes the instruction
using the Accumulator register and data
register as operands and sends the output
to Accumulator register and/or memory.
The ALU updates status flags providing
information about the processor state.
Store output operand: If the output
operand is in memory, the control unit uses
a write operation to store the data
CPU PERFORMANCE
DEPENDS UPON MEMORY
READ/ WRITE
READING FROM MEMORY
Cycle 1: The address bits of memory
operands are placed on Address Bus
(ADDR)
Cycle 2: The Read Line (RD) is set low,
indicating memory that a read operation is
to be performed
Cycle 3: CPU waits for Memory to respond,
during this cycle memory controller places
the operand on data bus (DATA)
The Read Line (RD) set high indicating the
CPU to read data from data bus.
MEMORY DELAYS
Example:
A computer has 16MB Memory, How many
bytes?
DATA BUS AND ADDRESS
BUS
Data Bus: Bi-Directional Bus to carry data
in/out of RAM, more wider the bus more
data can travelled .. Cost increase too
??????????????????????????