1 / 16

CSCI 211 Intro

CSCI 211 Intro. Computer Organization Consists of gates for logic And Or Not Processor Memory I/O interface. Instructions. Instructions are in memory Fetch instruction, then execute it Fetch execute cycle More detailed Fetch instruction Fetch operands Execute instruction

Download Presentation

CSCI 211 Intro

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. What’s inside • Everything in the computer is represented with 0’s and 1’s (on-off) • Integers • Characters • Boolean • Float • Instructions (machine language)

  5. Languages • Machine Language • Just 0’s and 1’s • 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) • PC=PC+4

  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 0’s • 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)

More Related