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

Run the s imulation ty pe do sta rtdo at the vs im

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: h-> dec ode-> ex ec ute c y c le for our brok en ins truc tion ADD R0, R6, 5 s hould oc c ur from 300-600 ns after the s tart of the s imulation. Run the s imulation. Ty pe do sta at the vs im prompt Ty pe run 1000 at the vs im prompt to run the s imulation for 1000 ns . If y ou want, z oom in to where the ADD ins truc tion ex ec utes by s elec ting Zoom-> Zoom Range and entering 300 ns for the s tart time and 640 ns as the s top time. If y ou do this s tep, y our window s hould look lik e the following. Here are s ome things that y ou s hould notic e about this waveform. 1. The CARout tells us whic h s tate the c ontrol unit is in. As a reminder, the fetc h s tages of the c ontrol unit oc c ur during s tates 18, 33, and 35. The dec ode s tage oc c urs during s tate 32. The ex ec ute s tage for the ADD ins truc tion oc c urs in s tate 1. Notic e how the value of CARout progres s es through the s tates 18, 33, 35, 32, and 1 to ex ec ute the ADD ins truc tion and then return to s tate 18 to begin fetc hing the nex t ins truc tion. 2. The c ontent of R6 is x 300D when the ADD ins truc tion is fetc hed. If we ex ec ute the *ADD R0, R6, 5 *ins truc tion, we s hould s ee the c ontents of R0 c hange to after x 3012 (= x 300D + x 0005) after we leave the ex ec ute s tate of the ADD ins truc tion: s tate 1. Notic e that value of R0 never c hanges ! Debugging the micr oinstr uction To debug the mic roins truc tion, we need to figure out whic h s ignals c ould potentially c aus e an error with the ex ec ute phas e of the ADD ins truc tion. Sinc e we are adding an immediate value of 5, we us e the s ec ond ADD ins truc tion from above to determine that the ADD ins truc tion s hould ex ec ute the following RTL ins truc tions : DR< -SR1+ SEXT(im m 5), se t NZP. Let's look at the datapath to determine whic h s ignals we need to s et to ex ec ute this RTL ins truc tion. The ADD ins truc tion us es the ALU to add the c ontents of SR1 (R6 in this c as e) to the immediate s tored in the ins truc tion regis ter (IR). The output of the ALU s hould t...
View Full Document

This document was uploaded on 03/22/2014.

Ask a homework question - tutors are online