Question
If someone could help me with this problem I am not sure what to do with this, if someone can show me how to do
If someone could help me with this problem
I am not sure what to do with this, if someone can show me how to do it, or do a similar set of instructions to iload a, iload b, iadd, istore a that would be good too
Thanks
MIC-3 Pipelining
For the following set of IJVM instructions, show the pipelined sequences & stages for the following program (NOTE: a (offset 0 from LV), b (offset 1 from LV), you may also assume that reads and writes complete as described in the text book). You may place your answer in the table below; feel free to add or delete rows/columns as necessary.
iload a
iload b
iadd
istore a
Label goto (MBR) MAR = SP = SP-1: rd to next instruction Read in next-to-top word on stack H=top of stack Add top two words: write to new top of stack Read in next-to-top word on stack H=top of stack Subtract TOS from Fetched TOS-1 Read in next-lo-top word on stack H=top of stack AND Fetched TOS-1 with Tos Read in next-lo-top word on stack H=top of stack iadd1 MDR = TOS = MDR+H, wr; goto (MBR 1) MAR = SP = SP-1; rd isub1 MDR TOS MDR-H; wr; goto (MBR 1) and1 and2 H=TOS MDR= TOS = MDR AND H; wr; goto (MBR1) H=TOS MDR TOS-MDR OR H: wr, goto (MBR1) OR Fetched TOS-1 with TOS MAR = SP = SP + 1 MDR = TOS: wr; goto (MBR!) MAR = SP = SP 1: rd Increment SP: copy to MAR Write new stack word in next-to-top word on stack Wait for read Copy new word to TOS TOS = MDR; goto (MBR!) 2nd word from stack; set MAR to S Prepare to write new 2nd word Save new TOS; write 2nd word lo stack Copy old TOS to MDR Write old TOS to 2nd place on stack Update TOS Set up MAR for writing to new top of stack Update stack in TOS and memory Move LV +index to MAR: read operand Increment SP: Move new SP to MAR Update stack in TOS and memory Set MAR to LV+ index Copy TOS lor storing Decrement SP; read new TOS Wait for read Update Tos Next address is 0x100 ored with opcode MAR = SP MDR = TOS MAR = SP-1: wr TOS H: goto (MBR1) SP = MAR = SP + 1 MDR TOS MBR 1: wr; goto (MBR 1) MAR = LV + MBRIU: rd MAR = SP = SP + 1 TOS MDR; wr; goto (MBR1) MAR = LV + MBRIU MDR = TOS; wr MAR = SP = SP-1;rd bipush1 istore1 istore2 istore3 istore4 istore5 TOS = MDR: goto (MBR 1) goto (MBR1 OR 0x100) MAR = LV + MBR2U: rd: goto iload2 MAR = LV + MBR2U: goto istore2 MAR = CPP + MBR2U: rd: goto iload2 MAR = LV + MBRIU: rd wide-iload1 wide-istorel Identical to iload1 but using 2-byte index Identical to istore1 but using 2-byte index Same as wide iload1 but indexing off CPP Set MAR to LV +index for read Set H to constant Increment by constant and update Copy PC to H Add offset and update PC Have to wait for IFU to fetch new opcode Dispatch to next instruction Read in next-to-top word on stack Save TOS in OPC temporarily Put new top of stack in TOS Branch on N bit MDR MDRH; w: goto (MBR1) goto1 goto (MBR1) MAR = SP = SP-1; rd OPC = TOS TOS MDR N=OPC; if (N) goto T; else goto F Label goto (MBR) MAR = SP = SP-1: rd to next instruction Read in next-to-top word on stack H=top of stack Add top two words: write to new top of stack Read in next-to-top word on stack H=top of stack Subtract TOS from Fetched TOS-1 Read in next-lo-top word on stack H=top of stack AND Fetched TOS-1 with Tos Read in next-lo-top word on stack H=top of stack iadd1 MDR = TOS = MDR+H, wr; goto (MBR 1) MAR = SP = SP-1; rd isub1 MDR TOS MDR-H; wr; goto (MBR 1) and1 and2 H=TOS MDR= TOS = MDR AND H; wr; goto (MBR1) H=TOS MDR TOS-MDR OR H: wr, goto (MBR1) OR Fetched TOS-1 with TOS MAR = SP = SP + 1 MDR = TOS: wr; goto (MBR!) MAR = SP = SP 1: rd Increment SP: copy to MAR Write new stack word in next-to-top word on stack Wait for read Copy new word to TOS TOS = MDR; goto (MBR!) 2nd word from stack; set MAR to S Prepare to write new 2nd word Save new TOS; write 2nd word lo stack Copy old TOS to MDR Write old TOS to 2nd place on stack Update TOS Set up MAR for writing to new top of stack Update stack in TOS and memory Move LV +index to MAR: read operand Increment SP: Move new SP to MAR Update stack in TOS and memory Set MAR to LV+ index Copy TOS lor storing Decrement SP; read new TOS Wait for read Update Tos Next address is 0x100 ored with opcode MAR = SP MDR = TOS MAR = SP-1: wr TOS H: goto (MBR1) SP = MAR = SP + 1 MDR TOS MBR 1: wr; goto (MBR 1) MAR = LV + MBRIU: rd MAR = SP = SP + 1 TOS MDR; wr; goto (MBR1) MAR = LV + MBRIU MDR = TOS; wr MAR = SP = SP-1;rd bipush1 istore1 istore2 istore3 istore4 istore5 TOS = MDR: goto (MBR 1) goto (MBR1 OR 0x100) MAR = LV + MBR2U: rd: goto iload2 MAR = LV + MBR2U: goto istore2 MAR = CPP + MBR2U: rd: goto iload2 MAR = LV + MBRIU: rd wide-iload1 wide-istorel Identical to iload1 but using 2-byte index Identical to istore1 but using 2-byte index Same as wide iload1 but indexing off CPP Set MAR to LV +index for read Set H to constant Increment by constant and update Copy PC to H Add offset and update PC Have to wait for IFU to fetch new opcode Dispatch to next instruction Read in next-to-top word on stack Save TOS in OPC temporarily Put new top of stack in TOS Branch on N bit MDR MDRH; w: goto (MBR1) goto1 goto (MBR1) MAR = SP = SP-1; rd OPC = TOS TOS MDR N=OPC; if (N) goto T; else goto F
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started