30 likes | 143 Views
RA1. RA2. Input. Output. M- Reg. LDM. WOUT. OpCode. Reg File. EMR. EALU. EI. A L U. S H I F T. WM. Mem Unit. RM. WR. SC. WA. Addr. EM. WAD. Control sequence to add two registers. We want to add register R2 and R5 and write result back in R3
E N D
RA1 RA2 Input Output M- Reg LDM WOUT OpCode Reg File EMR EALU EI A L U S H I F T WM Mem Unit RM WR SC WA Addr EM WAD Control sequence to add two registers • We want to add register R2 and R5 and write result back in R3 • Set RA1=010, RA2=101, WA=011, WR=1, OpCode=100, SC=00, LDM=0, EMR=0, EALU=1, EI=0, WOUT=0, WM=0, RM=0, EM=0, WAD=0
RA1 RA2 Input Output M- Reg LDM WOUT OpCode Reg File EMR EALU EI S H I F T A L U WM Mem Unit RM WR SC WA Addr EM WAD Control sequence to read memory into R3 • We want to read a memory location into R3 • Which memory location? Say address is in R2 • Two steps, transfer R2 in Addr register in one cycle • Then read memory into R3 in the next cycle • Why can’t we do in one cycle?
RA1 RA2 Input Output M- Reg LDM WOUT OpCode Reg File EMR EALU EI S H I F T A L U WM Mem Unit RM WR SC WA Addr EM WAD Control sequence to write memory into R3 • Next we want to write contents of R3 in memory location whose address is in R2 • Again we need two steps • Transfer R2 in Addr register in one cycle • Then write contents of R3 in the next cycle • Write control signals for two steps