Question
This is vhdl code can you please explain how they got the answer?
How many sor following instructions are executed by the MIPS single-cycle per instruction processor from class proces cycles
0 0
Add a comment Improve this question Transcribed image text
Answer #1

There are three instructions before the loop.

Therefore total number of cycles taken before the loop gets executed is: 3

The total number of instructions within the loop is 6.

The loop will get executed if the values in registers $3 and $2 are not equal.

The initial values of the registers when the loop gets executed first( total 6 instructons) :

$3 = 0

$2 = 20

Hence total 6 cycles for first time of loop execution.

In the first iteration of loop, the value of register $3 gets changed to 4.

As the values of registers $2 and $3 are not equal, the loop gets executed second time.

In the second iteration of loop the value of register $3 gets changed to 8. As the values of $2 and $3 are not equal, the loop gets executed third time.

Like that the loop gets iterated 5 times. In the last fifth iteration the value of register $3 gets changed to 20. Now both the registers $3 and $2 are equal. Hence loop get exited and the instruction nop which the next instruction after the loop is executed.

Therefore the total number of instructions before nop instruction is :

Number of instructions before loop + number of times loop executed * number of instructions in the loop

3 + 5*6= 33

As it is a single cycle per instruction, the total number of cycles taken before reaching nop instruction is: 33

Add a comment
Know the answer?
Add Answer to:
This is vhdl code can you please explain how they got the answer? How many sor following instructions are executed by the MIPS single-cycle per instruction processor from class proces cycles will...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT