1 / 24

Computer Organization Lecture 18

Computer Organization Lecture 18. IF, ID, R-type microprogramming Exam 2 review. Microprogramming overview. Review instructions, understand goals Determine state diagram Microprogram individual instructions List tokens on one line Repeat for remaining clocks Merge all instructions

jonco
Download Presentation

Computer Organization Lecture 18

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. Computer OrganizationLecture 18 IF, ID, R-type microprogramming Exam 2 review University of Portland School of Engineering

  2. Microprogramming overview • Review instructions, understand goals • Determine state diagram • Microprogram individual instructions • List tokens on one line • Repeat for remaining clocks • Merge all instructions • Test, test, test University of Portland School of Engineering

  3. MicroAsm • Java application: MicroAsm.class, SavitchIn.class • Microinstruction: free format, no fixed fields • Requires input file: text-only, file.upg • Creates output file: file.txt • Errors: command line file name,file I/O, unrecognizable token • Execution: BlueJ or DOS command line University of Portland School of Engineering

  4. MicroAsm syntax • Directives org: nbr Sets uPC to value of nbr, used with branch token // comment Everthing after // ignored • Each line • directives (optional) • tokens (signals to assert) • last line contains return University of Portland School of Engineering

  5. MicroAsm source format University of Portland School of Engineering

  6. uProgram tokens University of Portland School of Engineering

  7. uProgram tokens, continued. University of Portland School of Engineering

  8. uProgram tokens, continued. University of Portland School of Engineering

  9. University of Portland School of Engineering

  10. University of Portland School of Engineering

  11. A B Reset Lw or Sw R-fmt C Beq Jump G I J Sw Lw D F H E Partial MDP16 state diagram University of Portland School of Engineering

  12. ID IF Reset 2 clocks sll srl lw sw R-fmt nop 1- 3 additional clocks j beq addi subi andi ori MDP16 state diagram University of Portland School of Engineering

  13. IF state ? • Write instruction from memory into IR • Increment the program counter IRwr PCinc University of Portland School of Engineering

  14. ID state ? • Determine optimistic branch address • Branch to opcode Alua-pc Alub-ext imm aluopadd branch University of Portland School of Engineering

  15. R-type instruction • Op code: 01 • Func bits (IR[3:0]) determine ALU operation • Write result into register file University of Portland School of Engineering

  16. R-type EX state? • Origin: 0x10 • Operation: clock 3 • RALUout = A funct B • Functional units • ALU funct = IR[0:3] • ALU inputs • R0 • R1 Org: 10 alua-r0 Alub-r1 University of Portland School of Engineering

  17. R-type WB state? • Next: return to IF • Operation: clock 4 • Reg [ IR(9)] = ALUout • Functional units • Must write to reg file • Data comes from RALU • Use IR[9] as destination register rwr reg-ralu return University of Portland School of Engineering

  18. Exam 2 review See website Syllabus & Reference page University of Portland School of Engineering

  19. University of Portland School of Engineering

  20. IF state ? • Write instruction from memory into IR • Increment the program counter IRWr PCinc University of Portland School of Engineering

  21. ID state ? • Determine optimistic branch address • Dispatch to opcode Imm aluA_Pc aluB_Ext aluOpAdd branch University of Portland School of Engineering

  22. IF, ID microprogram Two microinstructions, two ROM contents University of Portland School of Engineering

  23. R-type microprogram • Func bits (IR[3:0]) determine ALU operation • Write result into register file Rwr reg_Ralu Return aluA_R0 aluB_R1 University of Portland School of Engineering

  24. R-type microprogram University of Portland School of Engineering

More Related