Answer.
Step 1
Logical expression for the Control Signal:
- Memory address <----[PC], Read memory,
IR <---- Memory data,
PC <-- [PC] + 4
- Decode instruction,
RA <---- [R4], RB <---- [R5]
- RZ <---- [RA] + [RB]
- RY <-- [RZ]
- R3 <---- [RY]
1. Memory address <---- [PC],
Read memory,
IR <---- Memory data,
PC <-- [PC] + 4
2. Decode instruction, RA <-- [R7]
3. RZ <-- [RA] + Immediate value X
4. Memory address <-- [RZ],
Read memory,
RY <---- Memory data
5. R5 <-- [RY]
Step 2
1. Memory address <-- [PC],
Read memory,
IR <---- Memory data,
PC <---- [PC] + 4
2. Decode instruction,
RA <-- [R8], RB <-- [R6]
3. RZ <-- [RA] + Immediate value X, RM <-- [RB]
4. Memory address <-- [RZ], Memory data <-- [RM],
Write memory
5. No action
- Memory address <-- [PC], Read memory,
IR <---- Memory data,
PC <-- [PC] + 4
- Decode instruction
- PC <-- [PC] + Branch offset
- No action
- No action
- Conditional branch: Branch_if_[R5]=[R6]
LOOP
- Memory address <-- [PC],
Read memory,
IR <---- Memory data,
PC <-- [PC] + 4
- Decode instruction, RA <-- [R5], RB <-- [R6]
- Compare [RA] to [RB],
If [RA] = [RB], then PC <-- [PC] + Branch offset
- No action
- No action
- Subroutine call with indirection: Call_register
R9
- Memory address <-- [PC],
Read memory, IR <--- Memory data,
PC <-- [PC] + 4
- Decode instruction, RA <-- [R9]
- PC-Temp <-- [PC],
PC <-- [RA]
- RY <---- [PC-Temp]
- Register LINK <-- [RY]
Kindly upvote please,
Thank you.