1 / 20

MIPS Data Path

MIPS Data Path. Ellen Spertus MCS 111 October 23, 2001. Readings and lectures . HP has been growing in importance through the semester Now it is vital Recommendation Read before lecture Ask questions in lecture Review as needed. Big Picture.

Download Presentation

MIPS Data Path

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. MIPS Data Path Ellen Spertus MCS 111 October 23, 2001

  2. Readings and lectures • HP has been growing in importance through the semester • Now it is vital • Recommendation • Read before lecture • Ask questions in lecture • Review as needed

  3. Big Picture • Given devices that implement simple boolean functions… • Understand how a computer works • Build an actual computer that you will program • Study the MIPS architecture • Write assembly language programs • Learn the implementation of a MIPS subset

  4. Implementing MIPS subset • Review: Mite • Definition of MIPS subset (5.1) • Elements of the data path (5.2) • Control of elements (5.3) • Optimization (6)

  5. Review:Mite

  6. MIPS subset Mite • Word size: 32 bits • Number of registers: 32 • Instruction length: 32 bits • Types of instructions: • Memory: lw, sw • Arithmetic-logical: add, sub, and, or, slt • Control flow: beq, jump

  7. S t a t e S t a t e e l e m e n t C o m b i n a t i o n a l l o g i c e l e m e n t 1 2 C l o c k c y c l e Clocking methodology • Defines when signals can be read and when they can be written. • Write values on rising edge of clock

  8. Data path elements • Memory: PC, instruction, registers, data • ALU • Which of these does Mite have?

  9. Closer look at program counter (PC)

  10. Sample instruction: add $t1, $t2, $t3 add $9, $10, $11 Closer look at register file

  11. Register file: read

  12. Register file: write

  13. Increment PC Read registers Use ALU add $t1, $t2, $t3 add $9, $10, $11 Data path usage: arithmetic-logical 10 11 9

  14. Increment PC Read registers Use ALU lw $t0, 1($s0) lw $8, 1($16) D a t a R e g i s t e r # A d d r e s s P C I n s t r u c t i o n R e g i s t e r s A L U A d d r e s s R e g i s t e r # I n s t r u c t i o n D a t a m e m o r y m e m o r y R e g i s t e r # D a t a Data path usage: memory

  15. Increment PC Read registers Use ALU lw $t0, 1($s0) lw $8, 1($16) Data path usage: memory

  16. A closer look at load/store lw $8, 1($16)

  17. Mite: six bits to eight

  18. Assembly code slt $t0, $a0, 2 bne $t0, $zero, recur mov $v0, $t0 jr $ra recur: add $sp, $sp, 12 sw $ra, 8($sp) ... Machine code 0: slti $8, $4, 2 4: bne $8, $0, __ 8: add $2, $0, $8 12: jr $31 recur: 14: addi $29, $29, 12 16: sw $31, 8($29) ... Assembly of conditional branches

  19. Increment PC Read registers Use ALU Add offset to PC beq $t1, $t2, label Data path usage: control flow

  20. The Simple Datapath

More Related