Figure 7'14 A simple 32bit instruction format - PowerPoint PPT Presentation

About This Presentation
Title:

Figure 7'14 A simple 32bit instruction format

Description:

Most frequently used, include instruction to move data from memory to general ... Example: increment a value, decrement a value or resetting a value. ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 37
Provided by: jimmy50
Category:

less

Transcript and Presenter's Notes

Title: Figure 7'14 A simple 32bit instruction format


1
Figure 7.14 A simple 32-bit instruction format
A Simple 32-bit Instruction Format
2
Classification of Instructions
  • Data movement instructions (LOAD, STORE, and
    others)
  • Most frequently used, include instruction to move
    data from memory to general registers, from
    general registers to memory, between different
    general registers
  • Arithmetic instructions
  • There may be several different integer arithmetic
    instruction formats providing various
    combinations of register and memory access in
    different addressing modes

3
  • Boolean logic instructions
  • Example NOT, AND , OR instructions
  • Single operand manipulation instructions
  • Most of them operate on the value in the
    register, but some of them operate on memory
    values as well
  • Example increment a value, decrement a value or
    resetting a value.
  • Bit manipulation instructions
  • Provide setting and resetting of individual bits
    in a data word.

4
Figure 7.17 Typical register shifts and rotates
Shift and Rotate Instructions
Page 192
5
  • Shift and rotate instructions
  • Logical shift simply shift the data
  • Arithmetic shift used to multiply or divide the
    original value by a power of 2. The leftmost bit
    is not shift.
  • Program control instructions control the flow
    of a program, include jumps, branches and
    subroutine CALL and RETURN instructions.

6
Figure 7.18 Operation of CALL and RETURN
instructions
7
Stack instructions
  • Stack instructions
  • Stack data storage used to store data when the
    most recently used data will be the first needed.
    LIFO last-in, first-out structures.
  • Stacks are an efficient way of storing
    intermediate data values during complex
    calculations. Example PUSH and POP instructions
  • others

8
Figure 7.19 Using a stack
Using a Stack
9
Figure 7.22 Using a block of memory as a stack
10
Buses
11
Buses
  • Definition a collection of electrical conductors
    (eg wires, traces) with a common purpose
  • The physical connection that makes it possible to
    transfer data from one location in the computer
    system to another.
  • Each wire or trace is called a line
  • Typically, buses carry information from one place
    to another

From our first lecture
Ed k c
12
bus
Ports
Printer Mouse Keyboard Modem
Diskcontroller
Graphicscard
Monitor Speakers
CPU
Soundcard
RAM
Networkcard
Computer
13
Lines
  • Each line carries a single electrical signal.
  • The signal can represent one bit of a memory
    address, or sequence of data bits, or a timing
    control that turns a device on and off at the
    proper time.
  • General categories
  • data
  • addressing
  • control and power.

14
Types of Buses (1 of 3)
  • Point-to-point. The bus carries signals from a
    specific source to a specific destination.

Serial port
Modem
Control unit
ALU
15
Types of Buses (2 of 3)
  • Multipoint used to connect several points together

Computer
Computer
Computer
Computer
CPU
Memory
Disk controller
Video controller
16
Types of Buses (3 of 3)
  • Daisy chain

Device controller
Device
Device
Device
Terminator
17
Figure 7.8 Point-to-point and multipoint buses
18
Buses Inside a Computer
CPU
Data bus Address bus Control bus
Memory
I/O Module
I/O Device
19
Data Bus
  • Carries data between the CPU and memory or I/O
    devices
  • Bi-directional
  • Data transferred out of the CPU for write
    operations
  • Data transferred into the CPU for read
    operations
  • Typical sizes 8, 16, 32, 64 lines
  • Signal names
  • D0, D1, D2, D3, etc.

20
Address Bus
  • Carries an address from the CPU to Memory or I/O
    devices
  • Unidirectional
  • The address is always supplied by the CPU
  • Typical sizes 16, 20, 24 lines
  • Signal names
  • A0, A1, A2, A3, etc.

21
Control Bus
  • Collection of signals for coordinating CPU
    activities
  • Each signal has a unique purpose
  • Typical sizes 10-20 lines
  • Signals are output, input, or bi-directional
  • Typical signals
  • /RD (read)
  • /WR (write
  • CLK (clock)
  • /IRQ (interrupt request)
  • etc.

22
Input / OutputChapter 8Sections 8.0-8.4
23
Introduction
  • I/O predominant factor in computers
  • LMC I/O baskets correspond to a set of busses and
    registers in a hardware I/O module
  • Programmed I/O (data is transferred one word at a
    time)
  • Complicating factors
  • Many I/O devices. Need
  • Device identification
  • Synchronization of operations
  • I/O operations take a lot of computer time. Need
    to run them in parallel with CPU activity gt
    Operating System

24
Background
  • Operating System
  • Manage I/O devices and data transfer operations
  • Manage multiple programs

25
Characteristics of Typical I/O Devices
  • Characteristics of I/O devices affect computer
    performance
  • Example 1 Keyboard
  • Slow data is transferred one word at a time
  • Two types of input expected and unexpected
    (unpredicted) ltCtrl-Cgt, ltCtrl-Alt-Delgt
  • Possibly many keyboards
  • Example 2 disks
  • Data can be transferred in blocks fast
  • Possible many disks
  • Example 3 network interfaces

26
Characteristics of Typical I/O Devices
  • I/O operations are typically initiated by
    programs, but sometimes I/O devices need to
    initiate them too
  • Devices are connected to the CPU via hardware I/O
    modules (device controllers)
  • Requirements for efficient I/O. Must have
  • Individual addressing of I/O devices
  • Method for devices to initiate communication with
    the CPU
  • Programmed I/O for slow devices non-programmed
    I/O for fast devices
  • Means to handle uniformly very different devices

27
Differences in I/O devices
  • Data format
  • One piece of data to blocks of data
  • Parallel and sequential transmission
  • Speed and synchronization
  • Data flow
  • Electromechanical requirements must be met

28
Examples of I/O Devices
  • Device Input/Output Date Rate (Kbytes/s)
  • Keyboard Input 0.01
  • Mouse Input 0.02
  • Voice input (microphone) Input 0.02
  • Scanner Input 200
  • Voice output (speaker) Output 0.5
  • Dot-matrix printer Output 1
  • Laser printer Output 100
  • Graphics display Output 30,000
  • Local area network Input/output 200 20,000
  • Optical disk Storage (I/O) 500
  • Magnetic tape Storage (I/O) 2,000
  • Magnetic disk Storage (I/O) 2,000

See Text Figure 8.1 - page 207
29
Programmed I/O
  • I/O operations are under direct control of
    software (program)
  • Software initiates the I/O operation
  • Disadvantage
  • Slow (data is transferred one word at a time)
  • Uses a lot of CPU resources
  • Advantage
  • Simple

30
Simple I/O Configuration
31
More Complex I/O Module Arrangement
Multiple devices
32
I/O Configurations (1 of 2)
CPU
Keyboard Mouse Voice input (microphone) Scanner V
oice output (speaker) Dot-matrix printer Laser
printer Graphics display Local area network
Optical disk Magnetic tape Magnetic disk
  • Can take many forms, e.g.,
  • Sound card controller
  • Disk controller

I/O module
I/O device
33
I/O Configurations (2 of 2)
CPU
I/O data
I/O address
I/O control
I/O module
I/O module
I/O device
I/O device
I/O device
34
Programmed I/O (1/2)
35
Programmed I/O (2/2)
36
Thank you
Write a Comment
User Comments (0)
About PowerShow.com