Lab 15 - FL13 - ECE 198 JL - University of Illinois - Engineering Wiki

Step 3 design the microinstructions us ing y our mic

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p 2: Design the machine code instruction Bas ed on y our mic roprogram, determine what information y ou need in y our mac hine c ode to c ontrol the LC-3 arc hitec ture and implement the as s embly c ode. Des ign y our mac hine c ode ins truc tion on the work s heet. Step 3: Design the microinstructions Us ing y our mic roprogram and y our mac hine c ode ins truc tion, determine the binary c ontrol word for eac h mic roins truc tion in y our s tate mac hine. Us e the ROM table on the work s heet. You may leave unus ed ROM loc ations blank . Step 4: Implement and debug Us ing the tec hniques that y ou learned from the debugging ex erc is e, implement y our new ins truc tion in HDLDes igner. To mak e s ure it work s , y ou will need to write an mac hine c ode program that ex ec utes y our new ins truc tion. Wr iting and testing the new instr uction with the LC-3 The proc es s of writing ins truc tions to the LC-3 in HDLDes igner is s imilar to how we wrote mic roins truc tions in the Control ROM. In the Des ign Brows er, open the CPU c omponent Double-c lic k on the Memory c omponent. Lik e the ControlStore c omponent, a tex t file s hould open that des c ribes how the memory work s . Sc roll down until y ou get to a line that s ay s "-- Ins ert Memory Vec tors Here". As we mentioned earlier, the s imulation s tarts ex ec uting programs at memory addres s x 3000 (or 12288 in dec imal), s o our new program will need to s tart at that addres s . The mac hine c ode ins truc tions are s tored as s tdlogic vec tors s tored at different memory loc ations . For ex ample, for our previous ins truc tion ADD R0, R6, 5 is s tored at memory addres s x 3001 or 12289 in dec imal. The mac hine c ode for that ins truc tion is 0001 000 110 1 00101 = x 11A5. whic h c reates the line of c ode mm129:T_tlgcetrX1A"; e(28)=osdoivco("15) To tes t y our ins truc tion, write a mac hine c ode program that performs at leas t the following operations : 1. update the c ontents of a regis ter to have a non-z ero value 2. negates the c onte...
View Full Document

Ask a homework question - tutors are online