You are on page 1of 3
COE 341 MAJOR 2 mm 2008] KEY ID: 1) G0 points) Engineer Moataz argued that there should be more constants in the constant pool of Micl. He Suggests that constant pool of Mie1 should be larger to hold more constants, So in order not to break his heart we decided to increase the index size of constant pool from 16 bit to 24 bit size. Now, write the microinstructions for MIC| for the following instruction: OX 9FH = MOATAZ index. MOATAZ instruction should store the top of stack value to location in constant pool indicated by the index. In this instruction index is 24 bit which occupies 3 consecutive locations after the op-code in I-Cache. mn Tearml PLPC 5 Retch poten Mond fC aPC ae Moa Hs meeceg : fetan pe MAD TO Peay noe He Hook meee 5 fet MAS T= PCH moa R= Boe mag teten (RSS TS} moa, MR CPR + Mow Mos ToS; WW | foto Maint Ne ORinp the SF bye _ 5 eee shovtd be 4 ge zeery Hining pieblen —3 MPL missy -B 2) (30 points) Shown below is the microinstructions for HADEL instruction. Show the control store contents for each microinstruction. ig wh - ST 41 LV=TOS=SP=H+LV+1; wr F 42 CPP=-1, goto K 43 gotoF 44 N-OPC+H; if (N) goto T; else goto F K 45. SP=LV-1; wr; goto (MBR) T, K and F are labels in the program. Please write the code in binary format. next add. simp. ALU 3) 40 points) Engineer Jamshaid wants a special conditional load instruction which works as follows. Please write the microinstructions for this instruction. JAMSHAID Varnum ‘Varnum is a byte size number as usual. Description: + Iftop value of stack is zero, push contents of local variable pointed by Varnum to stack, . + iftop value of stack is negative, clear the contents of local variable, (make it zero) \ * If top value of stack is positive, don’t do anything and proceed to the next instruction, \ Maw! Pe tec41 ) dete pn pote mBbR %= TOS, ih (2) goto Telse FI \o FloON= TOS; Uf Cn) gabe Tr ele 2 Rock FL PO =PC41 ; Pere fo main 4 Tr hav MAR 2 H+ MGA 4 Cd MAR = SP= SPH} TOSS MOR {W-: pate F2 a H=uv MAR = + pp Me =O. WF; pote FZ Rete fester) a lene Late pietetney + a.

You might also like