Unconstrained base clock in state machine design
I am trying to make a state machine for controlling LEDs as tail lights are controlled on Ford Thunderbird. The board I'm using is DE0 Nano with Cyclone IV.
The state machine part is working fine, by simulation in Questa. Problem occurred when I realized I need clock with period around 0.5s to run that state machine.
Board has 50MHz base clock so I made a component clk_divider, a simple counter that goes from 0 to 25000000 and then complements single-bit clk_reg which represents output of that divider. Also I made a sdc file to generate that virtual 50MHz clock for timing analysis. That clock is named clk_50 also as my main clock in state machine file(is that a problem maybe?).
Now I'm stuck at Timing Analyzer and it says I have 2 unconstrained base clocks. When I put code on fpga it's working very strangely, e.g. when haz switch is on all lights are flashing but it seems like duty cycle of flashing is not 50% (haz is for Hazard meaning all lights should flash on-off). Other functionalities are not working at all.
Does unconstrained clocks maybe represent the problem why my design is not working or should I look for problem somewhere else?
Here is screenshot of error I'm getting and also files of my design.
You created clk_50 as a virtual clock instead of a base clock because you didn’t set a target (typically with get_ports). Then you have to create a generated clock with the source as clk_50 and the target as the output of your clock divider and accurately describe the relationship between the two. You also should have input and output delay constraints for the I/O.