0% found this document useful (0 votes)
3 views

MP_Lect_1

The document outlines the course contents for a Microprocessor Systems Design class, covering topics such as microprocessor fundamentals, assembly language programming, memory management, and external interfacing. It includes an introduction to microprocessors, the differences between microprocessors and microcomputers, and the stored program concept. Additionally, it describes the architecture and operation of microprocessors, including the fetch-execute cycle and various components like the ALU and memory management.

Uploaded by

amohamed5373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

MP_Lect_1

The document outlines the course contents for a Microprocessor Systems Design class, covering topics such as microprocessor fundamentals, assembly language programming, memory management, and external interfacing. It includes an introduction to microprocessors, the differences between microprocessors and microcomputers, and the stored program concept. Additionally, it describes the architecture and operation of microprocessors, including the fetch-execute cycle and various components like the ALU and memory management.

Uploaded by

amohamed5373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Microprocessor Systems Design

Lecture 1
Course Contents
 Introduction to Microprocessors
 Assembly Language Programming
 Data Transfers Instruction
 Addressing Modes
 Arithmetic Instructions
 Procedures and Stack Operations
 Conditional Processing
 Integer Arithmetic
 Memory Management
 Linear Addresses
 Translating Logical Addresses to Linear Addresses
 Paging
 Descriptor Tables
 Segment Descriptor Details
2 Page Translation 02/28/2025
Course Contents
 External interfacing
 Interrupts
 An overview of advanced Architecture
(CISC/RISC/DSP) microprocessors.
 A survey on Advanced Architecture
Microprocessors
 Comparison of CISC/RISC/DSP design
philosophies
 Bus timing analysis and design considerations
for high-performance systems
 Open Architecture Buses
3 02/28/2025
References
 Kip R. Irvine, “Assembly Language for x86
Processors”

 Barry B. Brey, “The Intel Microprocessors:


Architecture Programming, and Interfacing”,
2008, Prentice Hall.

4 Microprocessors I: Lecture 1 02/28/2025


Lecture Contents
 Introduction to Microprocessors
 Microprocessor vs Microcomputer
 An Elementary Microprocessor
 Example for Stored Program

5 02/28/2025
Introduction
 A microprocessor is a very complex electronic
circuit.

 It consists of thousands of microscopic


transistors squeezed onto a tiny chip of
silicon.

 The chip is placed in a package containing


anywhere from 40 to 64 leads.
Microprocessor vs Microcomputer
 The microprocessor unit, or MPU, is a
complex logic element that performs
arithmetic, logic, and control operations.
 The trend is to package it as a single
integrated circuit.

 A microcomputer contains a microprocessor,


but it also contains other circuits such as
memory devices to store information,
interface adapters to connect it with the
outside world, and a clock to act as a master
timer for the system. (See the microcomputer
diagram)
Microcomputer Diagram
Stored Program Concept
 A microcomputer is capable of performing
many different operations such as add and
subtract, logical operations, read from an
input device and transmit to an output
device.

 These operations are called instructions. A


few typical instructions such as add, sub and
mov.

 A group of instructions that allows the


computer to perform a specific job is called a
stored program.
Computer Word
An Elementary Microcomputer
 A block diagram of a basic microcomputer is
shown in the figure, which shows the
microprocessor, the memory, and the I/O
circuitry.
The Micro-
processor
Unit [MPU]
The Microprocessor Unit [MPU]
 The operation that the ALU performs
(add/sub/compare) is determined by signals
on the various control lines (marked C on the
block diagram).
 ALU receives two 8-bit numbers from the
accumulator and the data register. (Called
operand)
The Microprocessor Unit [MPU]
 The two inputs are called Operands.
 The two operands may be added,
subtracted, or compared, and the result of the
operation is stored back in the accumulator.
 For example, assume that two numbers [7 and
9] are to be added. Before the numbers can
be added, one operand (9) is placed in the
accumulator; the other (7) is placed in the
data register.
 The proper control line is then activated to
implement the add operation. The ALU adds
the two numbers together, producing their
sum (16) at the output.
The Microprocessor Unit [MPU]
 As shown in Figure B, the sum is stored in the
accumulator, replacing the operand that was
originally stored there.
The accumulator
 The accumulator is the most useful register
in the microprocessor.

 During arithmetic and logic operations it


performs a dual function.

 Before the operation, it holds one of the


operands.

 After the operation, it holds the resulting


sum, difference, or logical answer.
Data Register and Address Register
 The data register is a temporary storage
location for data going to or coming from the
data bus.

 The address register is another temporary


storage location. It holds the address of the
memory location or I/O device that is used in
the operation presently being performed.
Program Counter and Instruction
Decoder
 The program counter controls the sequence
in which the instructions in a program are
performed. At any given instant, the count
indicates the location in memory from which
the next byte of information is to be taken.

 The instruction decoder decodes the


instruction after an instruction is pulled from
memory and placed in the data register. The
decoder examines the 8-bit code and
decides which operation is to be performed
(256 instructions).
Controller Sequencer
 The controller-sequencer produces a variety
of control signals to carry out the
instruction.

 Since each instruction is different, a different


combination of control signals is produced for
each instruction.

 This circuit determines the sequence of


events (phases) necessary to complete the
operation described by the instruction.
Memory
 A simplified diagram of the 256-word, 8-bit
read/write memory in our hypothetical
microcomputer is shown in the figure.
Memory
 The memory consists of 256 locations, each of
which can store an 8-bit word, the size
memory (256x8).
 The address bus will carry an 8-bit, which
can specify 256 locations, from the MPU to the
memory address decoder.
 Each location is assigned a unique number
called its address.
 The first location is given the address 0 and
the last location is given the address 255,
which is 1111 1111 in binary and FF in
hexadecimal.
 A specific location is selected by placing its 8-
Memory
 The address decoder decodes the 8-bit
number and selects the proper memory
location.
 The memory also receives a control signal
from the MPU.
 A READ signal indicates that the selected
location is to be read out.
Memory
 The MPU can also initiate a WRITE operation.
Fetch-Execute Sequence
 The instructions initially stored in memory.
 Instructions must be fetched, one at a time,
from memory by the MPU.
 The instruction is then executed by the
MPU.
 The operation of the microcomputer can be
broken down into two phases.
A Sample Program
 The program looks like this:
LDA 7
ADD 10
HLT
The simple program as a stored program
Fetch Phase
 First the
contents of
the Program
Counter (PC)
are
transferred to
the Address
Register
Fetch Phase
 Once the address
is safely in the
Address
Register, the
program counter
(PC) is incremented
by one.

 That is, its contents


change from
00000000 to
00000001
Fetch Phase
 Next, the
contents of
the
Address
Register
[0000
0000] are
placed on
the Address
Bus
Fetch Phase
 The contents of
the selected
memory location
are placed on the
Data Bus and
transferred to the
Data Register in
the MPU.
 After this
operation, the
Opcode for the
LDA instruction
will be in the data
register.
Fetch Phase
 The opcode is
transferred to the
Instruction Decoder.
 This circuit recognizes
that the opcode is that
of an LDA instruction.
 It informs the Controller-
Sequencer of this fact
and the Sequencer
produces the
necessary control
pulses to carry out the
instruction.
 The fetch phase in
Hypothetical MP has
been completed.
Execute Phase
 The MPU now knows
that this is an LDA
instruction.
 It must carry out this
instruction by reading
out the next byte of
memory and placing it
in the Accumulator
Register.

 Then, the first step is to


transfer the address of
the next byte from the
Program Counter to the
Address Register.
Execute Phase
 Two operations are
shown in Figure.
 First, the Program
Counter is
incremented to
00000010 in
expectation of the
next fetch phase.
 Second, the
contents of the
Address Register
[00000001] are
placed on the
Execute Phase
 The address is decoded
and the contents of
memory location
00000001 (Operand) are
loaded into the Data
Register (value of 7)
 The number is transferred
to the accumulator.
 Thus, the Execute phase
of the first instruction
ends with the number 7 in
the accumulator register.

You might also like