Microprocessor Systems Design EEE315M2 - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Microprocessor Systems Design EEE315M2

Description:

introduce the architecture of a simple microprocessor and the ... Decodes and monitors execution of instructions. Control. unit. ALU. Registers. RAM | ROM ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 33
Provided by: martinmc7
Category:

less

Transcript and Presenter's Notes

Title: Microprocessor Systems Design EEE315M2


1
Microprocessor Systems Design(EEE315M2)
  • Dr. N.H. Siddique,
  • Room MG037, Ext. 75340,
  • email nh.siddique_at_ulster.ac.uk

2
Aims
  • The aims of the microprocessor part of this
    module are
  • introduce the architecture of a simple
    microprocessor and the fundamentals of
    microprocessor based systems (Lectures)
  • utilise assembly language programming to
    illustrate the architecture of a simple processor
    (laboratories)

3
Assessment
  • This module is assessed using continuous
    assessment methods.
  • Class test 1 (in Week 7/8) - marks 30 of CA
  • Assignment 1 (in week 11) - marks 30 of CA
  • Weekly laboratory (W1-W10) marks 40 of CA

4
Reading List
  • Recommended Reading
  • Huang Han-Way (2001), MC 68HC11 An Introduction,
    Software and Hardware Interfacing, Delmar Thomson
    Learning, ISBN 0-7668-1600-1
  • M. Rafiquzzaman.(1995), Microprocessors and
    Microprocessor-based System Design CRC Press,
    ISBN 0-8493-4475-1.

5
Computer Hardware Organization
6
Registers
  • Register is a storage location in the CPU
  • Used to hold data/address during execution of an
    instruction
  • Registers have faster access time than memory
  • Number of registers available for programming
    varies from ?P to ?P

7
Arithmetic Logic Unit (ALU)
  • ALU does all arithmetic and logical operations
  • ALU receives data from registers/memory and
    performs the task
  • ALU writes the result back to register/memory

8
Control unit
  • Contains hardware instruction logic
  • Decodes and monitors execution of instructions

9
Bus
  • Wires through which data and information are
    interchanged between units
  • Three types of bus (more later)
  • - Address bus - Data bus - Control bus

10
Program counter(PC)
  • Register within CPU
  • Holds the address of the next instruction to be
    fetched from memory
  • Goes through step by step counting sequence -
    causes the computer to read successive
    instruction stored in memory
  • PC is modified with new address when there is a
    jump or transfer or subroutine call instruction
  • example

11
Program counter (PC)
12
Status register
  • After an ALU operation following can occur
  • -carry/borrow for addition/subtraction
  • -overflow
  • -result zero, negative or positive
  • Register which contains flags to indicate these
    status of any processor operation
  • Programmer can use these status condition for
    program control
  • example

13
Flags
  • Carry flag
  • 0 0 1 1 0 1 0 1
  • 0 1 0 0 0 0 1 1
  • 0 0 1 1 1 1 0 0 0
  • 1 0 0 0 0 0 1 0
  • 1 0 1 0 0 0 1 1
  • 1 0 0 1 0 0 1 0 1

Carry 0
Carry 1
14
Index register
  • Almost all ?Ps have an index register
  • Holds a base address to be added to an offset
  • Base address and the offset forms the effective
    address
  • example

15
Index register
16
Stack pointer (SP)
  • An area of RAM used for temporary storage of
    data/return address is called stack
  • SP is a register within CPU that points to the
    next free location on the stack
  • Each time a byte is put onto stack, SP is
    decremented
  • Each time a byte is retrieved from stack, SP is
    incremented
  • example

17
Stack pointer
18
Stack pointer
19
Stack pointer
20
Instruction set
  • To program a ?P, a variety of data manipulation,
    arithmetic and logical instructions are featured
    for a processor
  • Instructions can be organised into functional
    groups
  • -Data movement -Arithmetic
  • -Logical -Bit manipulation
  • -Shift/rotate -Branch/Jump
  • -Subroutine call -Interrupt handling
  • -Miscellaneous
  • More detail later (for a specific processor)

21
Addressing modes
  • To perform an operation, operands are to be
    supplied
  • Operands can come from registers, memory
    locations or directly as part of an instruction
  • Addressing mode says from where the operands
    come from
  • Very common addressing modes are
  • -Immediate, direct, inherent, relative,
    indexed (more detail later)

22
Memory
  • Random Access Memory (RAM)
  • SRAM static RAM uses bipolar transistors (4-6)
    and very fast but expensive
  • DRAM dynamic RAM uses one transistor and one
    capacitor information stored in capacitor
    periodic refresh operation required

23
Memory
  • Read Only Memory (ROM)
  • Mask-programmed read-only memory (MROM)
    programmed when being manufactured
  • Programmable read-only memory (PROM) the memory
    chip can be programmed by the end user
  • EPROM programmable memory that can be erased
  • EEPROM programmable memory that can be erased by
    electrical signals and reprogrammed

24
Program
  • A program is sequence of instructions
  • A program can be written in
  • Low level language e.g. assembly language
  • High level language e.g. C, PASCAL
  • Assembly language program is converted to machine
    code by an assembler
  • High level language is translated into machine
    code by a compiler

25
Application of Microprocessor
26
(No Transcript)
27
HC11 Data transfer instruction
  • Data transfer from memory to register
  • LDAA ltoprgt A ? M
  • LDAB ltoprgt B ? M
  • LDD ltoprgt D ? M M1
  • LDX ltoprgt IXH ? M , IXL ? M1
  • LDY ltoprgt
  • LDS ltoprgt SPH ? M , SPL ? M1
  • ltoprgt can be immediate, direct, extended, or
    index mode
  • Examples
  • LDAA 10
  • LDX 1000

28
Data transfers from register to memory
  • STAA ltMgt Transfer contents of A to M M ? A
  • STAB ltMgt Transfer contents of B to M M ? B
  • STD ltMgt Transfer contents of D to M MM1 ?
    D

29
Data transfers from register to register
  • TBA Transfer contents of B to A A ? B
  • TAB Transfer contents of A to B B ? A
  • TAP Transfer contents of A to CCR CCR ? A
  • TPA Transfer contents of CCR to A A ? CCR

30
Example Program
  • Exercise 1 Load data into register and store it
    onto memory location
  • .area text
  • _main
  • LDAA 06 Loads accumulator A with hex value
    6
  • This is written as A? 06
  • STAA 2025 Stores the content of accumulator
    A on to memory location 2025, 2025 ? A
  • LDAB 2025 Loads accumulator B with the
    contents of memory location 2025, B?2025
  • STAB 1064 Stores the content of accumulator
    B on to memory
  • location 1064, 1064 ? B
  • SWI Returns to monitor

31
Example Program
  • Exercise 2 Data exchange between registers
  • .area text
  • _main
  • LDAB 03 B ? 03
  • TBA Transfer contents of B to A A ? B
  • STAA 1064 Store contents of A onto location
    1064, 1064 ? A
  • SWI

32
Example Program
  • Exercise 3 Addition of two numbers
  • .area text
  • _main
  • LDAB 02 B ?02
  • STAB 2025 2025 ? B
  • LDAA 01 A? 01
  • ADDA 2025 A?A 2025
  • STAA 1064 1064 ? A
  • SWI
Write a Comment
User Comments (0)
About PowerShow.com