This is a Finite State Machine (FSM) that utilizes an instantiated module of the “CLK Frequency Divider” by Ramón Sarmiento to perform internal counting for a traffic light control system. Its state diagram is as follows:
In the provided source code from this tinytapeout submission, you can find a signal called "count," which increments every second due to frequency division using a module. Additionally, in the "src" folder, there is a testbench for the circuit. When running this testbench, the following results are obtained in the console:
Set the first input to “1” and await the activation of the Red light. It will remain active for 30 seconds, provided the correct frequency is employed. Afterward, it will transition to the Green state within 3 seconds, remaining in this state for an additional 20 seconds. Finally, it will transition back to the Red state over the course of 3 seconds.