To create a clock, a 1 Hz clock was created and used as the clock for the 1 second, 1 minute, and 1 hour counters. Here is an illustration of this.
However, this would be an asynchronous design and would result in an unreliable circuit. Then, how can we generate 1 second?
The most reliable single clock synchronous circuit is to supply the same clock to all flip-flops in the design.
To signal every second... we could use the clock enable signal. If we can build a circuit that counts up only when the count enable goes high, we can create a one-second period with a synchronous design!
However, going high once every second means that one second must be counted, and since 1 MHz is 1/1000000 seconds per cycle, we know that we can make a signal that goes high only when the count goes high after counting 1000000 cycles.
So, the advice I received from my seniors was, "What signal do you want? Then, what signal can I use for it? And how do you get the desired signal using the available signal?" They asked me these questions.
1. The desired signal is a signal that goes high once per second.
2. The signal that can be used is a 1 MHz clock and the output of a 20-bit counter that counts 1000000 times.
3. To create the desired signal, a signal of 1000000 = 20'b1111110001010100010001000...
Ah! If we AND each bit of the 20-bit counter, we can do it!
It was quite easy to figure out just by following these three steps. It was easier to understand if I thought about it while drawing a picture.
Until now, bus signals were just a collection of serial signals, and I had missed the point of focusing on individual signals.
By focusing on two signals, the desired signal and the available signal, I was able to think about it more easily.
I felt a little "engineer-like" when I understood that everyone thinks this way when they are stuck.
New Engineer's Blush Blog Articles