Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

Correct constrain (error 332060: "... was determined to be a clock but ...")

Altera_Forum
Honored Contributor II
1,846 Views

Hi, 

 

I have a warning that I want to disappear.  

 

"s_synth_clk was determined to be a clock but was found without an associated clock assignment" 

 

Yes, this is a clock. Does anyone here know how I "correctly" can constrain it (and make the warning disappear)? 

 

----------------------------------------------------------------------------------------------------------------------------------- 

 

syntclk : process(clk, reset, synth_div, synth_tacho_en) 

begin 

if (synth_tacho_en = "10") then --ENABLE 

if reset = '1' then 

s_synth_clk <= '0'; 

s_synth_cnt <= (others => '0'); 

elsif (rising_edge(clk)) then 

s_synth_cnt <= s_synth_cnt + 1; 

if (synth_div(7) = '1') then  

s_synth_clk <= s_synth_cnt(7); 

elsif (synth_div(6) = '1') then  

s_synth_clk <= s_synth_cnt(6); 

elsif (synth_div(5) = '1') then  

s_synth_clk <= s_synth_cnt(5);  

elsif (synth_div(4) = '1') then  

s_synth_clk <= s_synth_cnt(4); 

elsif (synth_div(3) = '1') then  

s_synth_clk <= s_synth_cnt(3); 

elsif (synth_div(2) = '1') then  

s_synth_clk <= s_synth_cnt(2); 

elsif (synth_div(1) = '1') then  

s_synth_clk <= s_synth_cnt(1); 

else 

s_synth_clk <= s_synth_cnt(0); 

end if; 

end if; --CLK 

else --NOT ENABLE 

s_synth_cnt <= (others => '0'); 

s_synth_clk <= '0'; 

end if; 

end process; 

synth_clk <= s_synth_clk;
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
846 Views

Generating logic clocks like this is very bad practice in FPGAs. As are asynchronous enables. 

You should generate clock enables instead - this will remove the warning.
0 Kudos
Altera_Forum
Honored Contributor II
846 Views

OK, how do I do that and get the same functionality?

0 Kudos
Altera_Forum
Honored Contributor II
846 Views

a clock enable would just go high for 1 clock in N cycles, depending on what division you wanted.  

All you need is an edge detector for each counter bit. Then you'll get the same pattern you had before. Did you really want your clock to have a varying duty cycle?
0 Kudos
Reply