Control-Lines Flashcards
- Important confusing points:*
- Once we put data in Yin(B) - we can call the command ADD/SUB with another input and Zin to the result is saved in Z.*
- Another info is that the first argument is always placed in Y(the saved register).*
- That is, if we want to substract x-y, then x should be placed in Yin.*
- Important points:*
- instead of saving addresses(using brXX) - it is easier to use labels, just recall that we should use lar and not la.*
- not operation changes all bits (1’s complement) - in order to have the last digit use andi R, R , 1*
- Never use address assignment inside a loop. all one-operations should occur once.*
In order to compute imod32 - we should call andi r1, r1, 31
important tip - instead of running from 1000 to 5092, use relative addressing.
- la r1, 4092*
- ld r2, 1000(r1)*
- sub r1,r1,1*
- brpl REPEAT r1*
- If each address holds 2 bytes, PC<- PC+2 and M[X] := Mem[X]#Mem[X+1]*
- A and C are helping registers for the ALU unit(with the case of 1 bus)*
Memorize!
Memorize
Glimpse into the condition unit
Note, the can create new condition to help us create new command
Great demonstration of how “goto6” works.
It loads 010 into the step counter
Name important points regarding the attached image of the control unit
- All control signals have an expression at the output of the control unit
-
A control signal is implemented using relations between:
- Opcode which is using it
- Conditions: other signals from the data path - CON, n=0
- Interrupts and other external signals
- Control step decoder
Note the way goto7 is implemented such that if it gets 1 it load the step counter
Important points regarding control signal language:
- CONin -> the system knows we want to use a condition. We just need to specifiy who is to be checked.
- All ALU operations go to C. Anyway - excepts for C=B, we should mention Cin
-
ld operation always put the output in n, and by output we mean 5 LSB’s on bus.
- if n = 5 it means the “goto” operation occurs 6 times because n=0 is still a valid state.
- Conditional control signals: CON,n=0, are written the same in RTN and as a control signal.
Amazing solution for this problem
Note that the “end” control signal tells the program to end.
If it appears in a general case: the program ends..
If it appears for COND-> it ends the program only if COND=1.