1 / 8

Week 7

Week 7. Microcode!!!. Microcode multiplication example. Microcode instructions are 22 bits long These are executed in a 5 phase cycle Phase 1: 1-8 Phase 2: 9-14 Phase 3: 15-16 Phase 4: 17-22 Phase 5: Control lines marked ‘Phase 5’. Microcode multiplication example.

anja
Download Presentation

Week 7

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. Week 7 Microcode!!!

  2. Microcode multiplication example • Microcode instructions are 22 bits long • These are executed in a 5 phase cycle • Phase 1: 1-8 • Phase 2: 9-14 • Phase 3: 15-16 • Phase 4: 17-22 • Phase 5: Control lines marked ‘Phase 5’

  3. Microcode multiplication example • We have registers A,B, C etc • Instructions are stored in the Micro memory • Current instruction is stored in the MIR • MPC is used to specify which instruction to execute • We have an adder that can subtract and do shift left

  4. Microcode multiplication example • We can do ‘TESTZERO’ on register A (1 if zero 2 if >0) • We have main memory accessible using the MDR for data and MAR for address, CS 15 and 16 used to specify read/write. • Buses are used to move data around.

  5. Microcode multiplication example Task: Write a program to multiply the contents of register C by the contents of register A. The result is to be stored in location 1 of the main memory.

  6. Microcode multiplication example The Algorithm: multiple { set MDR to 0 repeat A times add C to the MDR end repeat move 1 to the MAR and tell the main memory to write }

  7. Microcode multiplication example The Program sketch: Address Instruction 0 0 + 0 -> MDR; MPC + 1 -> MPC 1 MPC + TESTZERO -> MPC 2 5 -> MPC 3 C + MDR -> MDR; MPC + 1 -> MPC 4 A - 1 -> A; 0 + 1 -> MPC 5 0 + 1 -> MAR; write; MPC + 1 -> MPC

  8. Microcode multiplication example The Microcode program:

More Related