Altera_Forum
Honored Contributor
16 years agoquartus error
Hello.
I am trying to compile some VHDL code (deserializer) in Quartus II and the compiler returns me a bunch of errors: Error (10818): Can't infer register for "qs[0]" at deserializer.vhd(101) because it does not hold its value outside the clock edge for all the qs[ ] I tryed to compile the same source in modelsim and it worked fine. Althought i can make a schematic file or write it in AHDL and it will work as VHDL code. So i cannot understand why the VHDL file is not syntesizable. Maybe someone can help me with it. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; entity deserializer is --- {{{ interface signals declaration port( --- {{{ system clock sclk : in std_logic; -- 270 Mhz deserializer clock. Deserializes data into 2-bit words. pclk : in std_logic; -- 27 Mhz word rate clock. reset : in std_logic; -- Async active high reset --- }}} --- {{{ interface 1 data_in : in std_logic; -- 10-bit parallel unscrambled data in --- }}} --- {{{ interface 2 q : out std_logic_vector(9 downto 0) -- 1-bit deserialized data output. --data_10b_out : out std_logic_vector(9 downto 0); -- 10-bit parallel unscrambled data in --- }}} ); end deserializer; --- }}} --- {{{ RTL Architecture Declaration architecture STRUCTURE of deserializer is --- {{{ internal signals declaration signal inc : std_logic_vector (3 downto 0):="0000"; signal qs : std_logic_vector(9 downto 0) :="0000000000" ; --- }}} begin -- rtl --- {{{ sequential process -- purpose: sequential process -- type : sequential -- inputs : sclk, rst -- outputs: q sync_count : process(sclk,pclk, reset) --variable inc : std_logic_vector (3 downto 0); begin if (reset = '1') then qs <= "0000000000"; elsif rising_edge(pclk) then q<=qs ; -- pour pouvoir synthètiser le bloc avec quartus end if; if (rising_edge(sclk)) then inc <= inc+1; if (inc = "1001") then -- return to '0' when inc achieve '9' inc <= "0000"; end if; case inc is -- i is the counter in 0 to 9 when "0000" => qs(9) <= data_in; when "0001" => qs(8) <= data_in; when "0010" => qs(7) <= data_in; when "0011" => qs(6) <= data_in; when "0100" => qs(5) <= data_in; when "0101" => qs(4) <= data_in; when "0110" => qs(3) <= data_in; when "0111" => qs(2) <= data_in; when "1000" => qs(1) <= data_in; when "1001" => qs(0) <= data_in; when others => qs <= "0000000000"; end case; end if; end process sync_count; --- }}} end STRUCTURE; thank you for your help