CSCI 211 Intro - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

CSCI 211 Intro

Description:

Hardware that electrons flow through to accomplish an instruction ... Dish Network set top box. Tivo DVR. Pioneer Plasma TV. HP Color laser printer. Many more ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 17
Provided by: william104
Category:

less

Transcript and Presenter's Notes

Title: CSCI 211 Intro


1
CSCI 211 Intro
  • Computer Organization
  • Consists of gates for logic
  • And
  • Or
  • Not
  • Processor
  • Memory
  • I/O interface

2
Instructions
  • Instructions are in memory
  • Fetch instruction, then execute it
  • Fetch execute cycle
  • More detailed
  • Fetch instruction
  • Fetch operands
  • Execute instruction
  • Save result
  • Determine next instruction

3
Processor Components
  • Datapath
  • Hardware that electrons flow through to
    accomplish an instruction
  • Control
  • Tells hardware what to do and when to do it.
  • Registers
  • Small amount of memory (32 4-byte for MIPS) that
    can be operated upon.

4
Whats inside
  • Everything in the computer is represented with
    0s and 1s (on-off)
  • Integers
  • Characters
  • Boolean
  • Float
  • Instructions (machine language)

5
Languages
  • Machine Language
  • Just 0s and 1s
  • Very hard to program
  • Assembly
  • Symbolic for machine language
  • Easy to create a program to translate from
    assembly language to machine language (almost 1
    to 1)
  • Keeps track of variables addresses

6
Why Learn Assembler
  • Understand what the machine does
  • Helps you to be a better guesser
  • Needed to write a compiler (431)
  • Needed to build CPUs
  • Faster to execute
  • To determine timing
  • Gives you the power to access anything
  • Maintaining older systems

7
Why not USE assembly
  • Tedious
  • Error prone
  • Slow to write
  • Machine dependent
  • Good compilers produce fast code already

8
MIPS CPU
  • Used in many systems
  • SGI workstations
  • Sony PS2
  • Dish Network set top box
  • Tivo DVR
  • Pioneer Plasma TV
  • HP Color laser printer
  • Many more

9
MIPS Layout
  • Control
  • Register file (32 registers with 32 bits each)
  • ALU
  • Program Counter (PC)
  • Memory
  • 32 bit address (232 bytes addressable 4Gb)
  • Instruction register (IR)

10
Control Unit
  • Sends the proper control signals to each
    component to accomplish instruction
  • Input to the control unit
  • Instruction
  • Cycle number which step of the instruction

11
Register File
  • A group of registers
  • Input
  • Which register (5 bits)
  • Read or Write
  • 32 bit value (for write)
  • Outputs a 32 bit value for read

12
Register Conventions
  • 0 0
  • 1 used by the assembler
  • 2, 3 function return values
  • 4-7 Arguments to a function
  • Etc.

13
Other components
  • ALU
  • Performs arithmetic and logic (and, or, shift)
  • PC
  • Program counter address of next instruction
  • Memory
  • 32 bit address
  • Addresses a byte (8 bits)
  • Some instructions use word (4 bytes), halfword (2
    bytes), or byte operands
  • All instructions are 4 bytes (on MIPS)
  • PCPC4

14
Instruction Register
  • IR
  • Holds the 32 bit instruction just fetched
  • Needed for control unit to determine what control
    signals to send

15
Instruction Format
  • Opcode
  • First 6 bits
  • 3 Formats
  • R type
  • Opcode all 0s
  • Three 5-bit fields for registers (2 for operand,
    1 for result)
  • 5-bit shift amount (for shift instructions)
  • 6-bit function code

16
Other formats
  • I Type
  • Two 5-bit register numbers
  • 16-bit value as the third operand
  • J type
  • Jump instructions
  • 26 bit address field (64M)
Write a Comment
User Comments (0)
About PowerShow.com