Site Search

To create a clock, I created a 1Hz clock and used it as the clock for the 1 second, 1 minute, and 1 hour counters. Here is the image of it.

However, that would result in an asynchronous design, resulting in an unreliable circuit. So how do you create 1 second...?

 

The most reliable single-clock synchronization circuit is to supply the same clock to all flip-flops in the design.

Then all flip-flops will also be clocked at 1MHz. In order to input a signal every 1 second, it seems that the clock enable signal can be used. If you create a circuit that counts up only when the count enable goes high, you can create 1 second with a synchronous design!

 

But going high once every second means you have to count the second. 1MHz means 1/1000000 seconds per cycle, so you can count 1000000 cycles and create a signal that goes high only then.

The advice I received from my seniors was, "What signal do you want? Then what signal can be used for that? How can I use the available signal to generate the desired signal?"

 

1. The desired signal is a signal that goes high once per second.

2. Usable signals are the 1MHz clock and the output of a 20bit counter that counts 1000000 times.

3. To produce the desired signal, a signal of 1000000 = 20'b11110001010001000...

Ah! You can do this by ANDing each bit of a 20-bit counter!

 

It's pretty easy to do just by following these 3 steps. It was easier to understand when I thought about it while drawing a picture.

Until now, the bus signal was just a collection of serial signals, and the point of focusing on individual signals was missing.

 

I was able to think about it easily by focusing on two signals, the desired signal and the usable signal.

When everyone got stuck, I could understand that they were thinking like this, and I thought it was a little "engineer-like" (laughs).