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

Found pins functioning as undefined clock

Altera_Forum
Honored Contributor II
3,563 Views

Hi, 

 

I'm encountering the following "Warning: Found pins functioning as undefined clocks and/or memory enables". 

I've gone into the "Classic Timing Analysis Settings", set an individual clock and applied it to the correct node but it doesn't have an effect on the error. 

 

Does anyone have any ideas on how to fix the warning? Any help would be greatly appreciated. 

 

Thanks, 

 

Jesse
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
1,730 Views

Have you some code you can post? Difficult to analyse without that...

0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Without seeing your code or .qar archive, this one sounds like you are using a signal IO pin as a clock input. The FPGA clock pins give you low skew and latency and should be preferred. You can use signal pins that connect to register or memory clock pins but the latency (delay from pin to clock pin inside chip) is much higher and sometimes timing wont work.

0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

 

--- Quote Start ---  

llandis 

 

Re: Found pins functioning as undefined clock 

Without seeing your code or .qar archive, this one sounds like you are using a signal IO pin as a clock input. The FPGA clock pins give you low skew and latency and should be preferred. You can use signal pins that connect to register or memory clock pins but the latency (delay from pin to clock pin inside chip) is much higher and sometimes timing wont work.  

--- Quote End ---  

 

 

You we're right llandis; I checked the pins again and I am using a dedicated input pin and not an actual clock pin, but even changing the pin to one of the dedicated clock pins I still get the error. I've attached my code below. I'm still yet to refine the timing, I want to get the code correct before playing around with that. 

 

LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY ClkTest IS PORT ( clk : IN STD_LOGIC; -- system clock lcd_enable : IN STD_LOGIC; -- latches data into lcd controller lcd_bus : IN STD_LOGIC_VECTOR( 9 DOWNTO 0 ); -- data and control signals busy : OUT STD_LOGIC := '1'; -- lcd controller busy / idle feedback rs, rw : OUT STD_LOGIC; -- setup/data, and read/write e1, e2 : OUT STD_LOGIC; -- enable for the lcd lcd_data : OUT STD_LOGIC_VECTOR( 7 DOWNTO 0 )); -- data signals for the lcd END ClkTest; ARCHITECTURE behav OF ClkTest IS TYPE CONTROL IS( power_up, initialize, ready, send ); SIGNAL state : CONTROL; CONSTANT freq : INTEGER := 20; -- system clock frequency in MHz BEGIN PROCESS( clk ) VARIABLE clk_count : INTEGER := 0; -- event counter for timing BEGIN IF RISING_EDGE( clk ) THEN CASE state IS -- wait 20 ms to ensure Vcc has risen and required LCD wait is met WHEN power_up => busy <= '1'; IF( clk_count < ( 20000 * freq )) THEN -- wait 20 ms clk_count := clk_count + 1; state <= power_up; ELSE -- power-up complete clk_count := 0; rs <= '0'; rw <= '0'; lcd_data <= "00110000"; -- function set command (1) state <= initialize; END IF; -- cycle through initialize sequence WHEN initialize => busy <= '1'; clk_count := clk_count + 1; IF( clk_count < ( 5000 * freq )) THEN -- wait 5 ms state <= initialize; ELSIF( clk_count < ( 5010 * freq )) THEN -- function set command (2) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 6000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 6010 * freq )) THEN -- function set command (3) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 7000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 7010 * freq )) THEN -- function set (8-bits, 1 line, 5x7 font) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 8000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 8010 * freq )) THEN -- display off lcd_data <= "00001000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 9000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 9010 * freq )) THEN -- clear display lcd_data <= "00000001"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 29000 * freq )) THEN -- wait 20 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 29010 * freq )) THEN -- entry mode set (increment mode, entire shift off) lcd_data <= "00000110"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 30000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 30010 * freq )) THEN -- display on (cursor on, blink off) lcd_data <= "00001110"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 31000 * freq )) THEN lcd_data <= "00000000"; e1 <= '0'; e2 <= '0'; state <= initialize; ELSE clk_count := 0; busy <= '0'; state <= ready; END IF; -- check for busy flag and then latch in the instruction WHEN ready => IF( lcd_enable = '1' ) THEN busy <= '1'; rs <= lcd_bus(9); rw <= lcd_bus(8); lcd_data <= lcd_bus( 7 DOWNTO 0 ); clk_count := 0; state <= send; ELSE busy <= '0'; rs <= '0'; rw <= '0'; lcd_data <= "00000000"; clk_count := 0; state <= ready; END IF; -- send instructions to the lcd WHEN send => busy <= '1'; IF( clk_count < ( 50 * freq )) THEN busy <= '1'; IF( clk_count < freq ) THEN e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 14 * freq )) THEN e1 <= '1'; e2 <= '1'; ELSIF( clk_count < ( 27 * freq )) THEN e1 <= '0'; e2 <= '0'; END IF; clk_count := clk_count + 1; state <= send; ELSE clk_count := 0; state <= ready; END IF; END CASE; END IF; END PROCESS; END ARCHITECTURE behav;
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

 

--- Quote Start ---  

llandis 

 

Re: Found pins functioning as undefined clock 

Without seeing your code or .qar archive, this one sounds like you are using a signal IO pin as a clock input. The FPGA clock pins give you low skew and latency and should be preferred. You can use signal pins that connect to register or memory clock pins but the latency (delay from pin to clock pin inside chip) is much higher and sometimes timing wont work.  

--- Quote End ---  

 

 

You were correct llandis; I was using a dedicated input pin as a clock input, but even changing to a dedicated clock pin the error is still there. I've attached the code below. I'm still yet to refine the timing, I want to get the code compiled without errors and get the test bench working first. 

 

 

LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY ClkTest IS PORT ( clk : IN STD_LOGIC; -- system clock lcd_enable : IN STD_LOGIC; -- latches data into lcd controller lcd_bus : IN STD_LOGIC_VECTOR( 9 DOWNTO 0 ); -- data and control signals busy : OUT STD_LOGIC := '1'; -- lcd controller busy / idle feedback rs, rw : OUT STD_LOGIC; -- setup/data, and read/write e1, e2 : OUT STD_LOGIC; -- enable for the lcd lcd_data : OUT STD_LOGIC_VECTOR( 7 DOWNTO 0 )); -- data signals for the lcd END ClkTest; ARCHITECTURE behav OF ClkTest IS TYPE CONTROL IS( power_up, initialize, ready, send ); SIGNAL state : CONTROL; CONSTANT freq : INTEGER := 20; -- system clock frequency in MHz BEGIN PROCESS( clk ) VARIABLE clk_count : INTEGER := 0; -- event counter for timing BEGIN IF RISING_EDGE( clk ) THEN CASE state IS -- wait 20 ms to ensure Vcc has risen and required LCD wait is met WHEN power_up => busy <= '1'; IF( clk_count < ( 20000 * freq )) THEN -- wait 20 ms clk_count := clk_count + 1; state <= power_up; ELSE -- power-up complete clk_count := 0; rs <= '0'; rw <= '0'; lcd_data <= "00110000"; -- function set command (1) state <= initialize; END IF; -- cycle through initialize sequence WHEN initialize => busy <= '1'; clk_count := clk_count + 1; IF( clk_count < ( 5000 * freq )) THEN -- wait 5 ms state <= initialize; ELSIF( clk_count < ( 5010 * freq )) THEN -- function set command (2) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 6000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 6010 * freq )) THEN -- function set command (3) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 7000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 7010 * freq )) THEN -- function set (8-bits, 1 line, 5x7 font) lcd_data <= "00110000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 8000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 8010 * freq )) THEN -- display off lcd_data <= "00001000"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 9000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 9010 * freq )) THEN -- clear display lcd_data <= "00000001"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 29000 * freq )) THEN -- wait 20 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 29010 * freq )) THEN -- entry mode set (increment mode, entire shift off) lcd_data <= "00000110"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 30000 * freq )) THEN -- wait 1 ms state <= initialize; e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 30010 * freq )) THEN -- display on (cursor on, blink off) lcd_data <= "00001110"; e1 <= '1'; e2 <= '1'; state <= initialize; ELSIF( clk_count < ( 31000 * freq )) THEN lcd_data <= "00000000"; e1 <= '0'; e2 <= '0'; state <= initialize; ELSE clk_count := 0; busy <= '0'; state <= ready; END IF; -- check for busy flag and then latch in the instruction WHEN ready => IF( lcd_enable = '1' ) THEN busy <= '1'; rs <= lcd_bus(9); rw <= lcd_bus(8); lcd_data <= lcd_bus( 7 DOWNTO 0 ); clk_count := 0; state <= send; ELSE busy <= '0'; rs <= '0'; rw <= '0'; lcd_data <= "00000000"; clk_count := 0; state <= ready; END IF; -- send instructions to the lcd WHEN send => busy <= '1'; IF( clk_count < ( 50 * freq )) THEN busy <= '1'; IF( clk_count < freq ) THEN e1 <= '0'; e2 <= '0'; ELSIF( clk_count < ( 14 * freq )) THEN e1 <= '1'; e2 <= '1'; ELSIF( clk_count < ( 27 * freq )) THEN e1 <= '0'; e2 <= '0'; END IF; clk_count := clk_count + 1; state <= send; ELSE clk_count := 0; state <= ready; END IF; END CASE; END IF; END PROCESS; END ARCHITECTURE behav;
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Is this all of the code? can you post the .qar file?

0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Nothing in that code is causing your error - there are no undefined clocks and/or memory enables. Running it through Quartus, on it's own, confirms that. 

 

So, I suspect there is a bit more code involved...? 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Are you using TimeQuest to setup your timing constraints? Try using the node finder feature to make sure you have the right name that TimeQuest will be able to match clock name and actual node in your design.

0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Hi all, 

 

This project has taken a back seat recently, but I'm back to it now. I created a new project, copied the code over and set the individual clock in the Classic Timing Analysis Settings again (I also used the node finder to match the clock name with the correct node). Still coming up with the same error though.  

 

Tricky/Alex I've attached the .qar file, hope that helps. 

 

Thanks, 

Jesse
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Finally worked out why I kept receiving that warning! 

Under:  

..Classic Timing Analyzer Settings\More Settings 

Ignore clock settings was "on" therefore ignoring all user-defined clock settings. Once I turned that "off" the warning went away. 

 

Thanks, 

Jesse
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

What version of quartus are you using? you would be far better off using Timequest with SDC constraints

0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Hmmm, a bit of an old device eh.... 

 

I don't have Quartus 9.0 installed on my machine any more - is that surprising?! However, opening and compiling your project in Quartus 14.1, having changed the device family to something newer, does not produce the warning you mention. 

 

So, it could be a bug in Quartus 9.0sp2, although they usually iron out bugs by service pack 2. Can I recommend that you update your environment and use a modern device? Do you have to use ACEX1K? 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

 

--- Quote Start ---  

Tricky 

Re: Found pins functioning as undefined clock 

What version of quartus are you using? you would be far better off using Timequest with SDC constraints  

 

--- Quote End ---  

 

 

I'm using Quartus 9.0sp2, unfortunately I need to use ACEX1K and this version of quartus is the last one that has compatibility with the ACEX devices. 

 

I worked out what was causing the warning. One of the default settings for the Classic Timing Analyzer is to ignore all user-defined clocks. Once I turned that off the warning went away.
0 Kudos
Altera_Forum
Honored Contributor II
1,730 Views

Glad you got this working!

0 Kudos
Reply