|
Hi,
It is my understanding that when the clock enters the tick state, the results get processed by the combinational logic, and that those combinational results will then be reflected by the sequential components when the clock enters the next tock state.
If this is so, suppose we have the machine operation 'D=A'. Then in the tick state the D input pin will consume the current output of the A register. Then when the clock enters the tock state, the D output will reflect that value.
I have a question regarding the DRegister output in CPU.cmp. In the compare file, the value of DRegister on changes on the tick clock state: 1+, 3+, 7+, etc. For example, it seems like the value of D should be the same in clock states 1 and 1+, but reflect the new value in clock state 2.
It seems like having a CPU which resembles the CPU.cmp, but reflects the DRegister state changes on the tock instead of the tick would function correctly in a computer. In fact, it seems like it would take much MORE work to implement a CPU which changes on the tick (and produces a CPU.out which matches the CPU.cmp).
Am I misunderstanding something here? Why does DRegister need to change on the tick clock state instead of the tock?
(I am asking this question here because I am a hobbyist and am working through the book on my own for fun. I don't have a professor or other students to ask this question.)
Thanks!
|