1
9.0kviews
What is Microprogram? Write microprogram for following operations.

i) ADD R1, M, Register R1 and Memory location M are added and result store at Register R1.
ii) MUL R1, R2 Register R1 and Register R2 are multiplied and result store at Register R1.

1 Answer
0
589views

Microprogram

  • Microprogramming is the process of writing microcode for a microprocessor.
  • Microcode is low-level code that defines how a microprocessor should function when it executes machine-language instructions.
  • Typically, one machine language instruction translates into several microcode instructions, on some computers, the microcode is stored in ROM and cannot be modified.

Micro Program to add R1, M.

T-state Operation Micro Instructions
T 1 PC → MAR PCout, Marin, Read, Clear y, set Cin, Add, Zinn
T 2 M → MBR PC <-- PC + 1 Zout, PCin, Wait for memory fetch cycle
T 3 MBR → IR MBRout, IRin
T 4 R1 → x R1out, Xin, CLRC
T 5 M → ALU Mout, ADD, Zin
T 6 Z → R1 Zout, R1in
T 7 Check for intr Assumption enabled intr pending, CLRX, SETC, Spout, SUB, Zin
T 8 SP <-- SP – 1 Zout, Spin, MARin
T 9 PC → MDR PCout, MDRin, WRITE
T 10 MDR → [SP] Wait for Mem access
T 11 PC <--IS Raddr PCin IS Raddr out

Micro Program to MUL R1, R2

T- state Operation Micro Instructions
T 1 PC → MAR PCout, Marin, Read, Clear y, set Cin, Add, Zinn
T 2 M → MBR PC<--PC + 1 Zout, PCin, Wait for memory fetch cycle
T 3 MBR → IR MBRout, IRin
T 4 R1 → x R1out, Xin, CLRC
T 5 R2 → ALU R2out, MUL, Zin
T 6 Z → R1 Zout, R1in
T 7 Check for intr Assumption enabled intr pending, CLRX, SETC, Spout, SUB, Zin
T 8 SP <-- SP – 1 Zout, Spin, MARin
T 9 PC → MDR PCout, MDRin, WRITE
T 10 MDR → [SP] Wait for Mem access
T 11 PC <-- IS Raddr PCin IS Raddr out.
Please log in to add an answer.