ECE 290_ LAB #8 Solutions

ECE 290_ LAB #8 Solutions - 12290 130 10(initially This is...

This preview shows pages 1–4. Sign up to view the full content.

ECE 290: LAB #8 Solutions Lab 8 Solutions Part 2 a) b) circle6 ADDMI ADRS, #imm11 circle6 ADDMR ADRS, SR c) Page 1 of 4 Mallard ECE 290: Computer Engineering I - Spring 2007 - ECE 290: LAB #8 Solutions 4/20/2007 https://mallard.cites.uiuc.edu/ECE290/material.cgi?SessionID=mding3_1070420_040634...

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
d) Simulation Results: Page 2 of 4 Mallard ECE 290: Computer Engineering I - Spring 2007 - ECE 290: LAB #8 Solutions 4/20/2007 https://mallard.cites.uiuc.edu/ECE290/material.cgi?SessionID=mding3_1070420_040634...
Part 3 a) Of course, there is more than one way to do this. Congrats if your progam used fewer instructions than mine. The explanations next to each entry weren't required - they're there to help show what's going on. b) Of course during operation, location 12291 will change. 12288 ADD R0, R0, #3 R0 <- 3, R0 will be used as a counter 12289 ADDMI 130, #-1 M[M[12290]] <- M[M[12290]]-1 This is where the memory decrement happens

This preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: 12290 130 10 (initially) This is the first memory location to decrement. Each time through the loop this value gets incremented 12291 LD R1, #-2 R1<-M[12290] 12292 ADD R1, R1, #1 R1<-R1+1 (M[12290]+1) 12293 ST R1, #-4 M[12290]<-R1 (M[12290]+1) 12294 ADD R0, R0, #-1 R0<-R0-1, decrement the counter 12295 BRzp #-7 If counter is not negative yet, loop to instruction at 12289 Page 3 of 4 Mallard ECE 290: Computer Engineering I - Spring 2007 - ECE 290: LAB #8 Solutions 4/20/2007 https://mallard.cites.uiuc.edu/ECE290/material.cgi?SessionID=mding3_1070420_040634. .. Simulation Results: Mallard Copyright © 1995-2000 Course Content Copyright© 1995-2007 Donna J. Brown. All rights reserved. Page 4 of 4 Mallard ECE 290: Computer Engineering I - Spring 2007 - ECE 290: LAB #8 Solutions 4/20/2007 https://mallard.cites.uiuc.edu/ECE290/material.cgi?SessionID=mding3_1070420_040634. .....
View Full Document

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern