Give the sequence of microoperations required to Fetch and Execute AVR’s RET ins
ID: 3597712 • Letter: G
Question
Give the sequence of microoperations required to Fetch and Execute AVR’s RET instruction
Consider the pseudo-CPU discussed in class augmented with a single-port register file (i.e., only one register value can be read at a time) containing 32 8-bit registers (RO-R31) and a Stack Pointer (SP) register. Suppose the pseudo-CPU can be used to implement the AVR instruction RET (Return from Subroutine) with the format shown below: 1001 0101 0000 1000 RET pops the return address from the stack and jumps to the return address. Give the sequence of microoperations required to Fetch and Execute AVR's RET instruction. Your solutions should result in minimum number of microoperations. Assume the memory is organized into addressable bytes (i.e., each memory word is a byte), MDR is 8-bit wide, and SP, PC, IR, and MAR are 16-bit wide. Also, assume Internal Data Bus is 16-bit wide and thus can handle 8-bit or 16-bit (as well as portion of 8-bit or 16-bit) transfers in one microoperation and SP has the capability to increment itself. Clearly state any other assumptions made.Explanation / Answer
Solution : Fetch and Execute micro operations are :
R3 R1 + R2 Contents of R1 plus R2 transferred to
R3 R3 R1 – R2 Contents of R1 minus R2 transferred to
R3 R2 R2 Complement the contents of R2 (1’s complement)
R2 R2 + 1 2’s complement the contents of R2 (negate)
R3 R1 + R2 + 1 R1 plus the 2’s complement of R2 (subtraction)
R1 R1 + 1 Increment the contents of R1 by one
R1 R1 – 1 Decrement the contents of R1 by one
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.