Hi dsimon19,
Thank you verymuch, because of your suggestions and ideas. I have realised what you wanted to imply by 'warining message'. Yes there are lots of warning without any error.(Ahhahh!)But, what can be the reason I "could not" find the reason! It drives me crazy(Puuaahh!!)I have tried so many things. And the last version of my vhdl code is below. Please clarify the situation. I'm at the starting point of the vhdl road. There are to many details. How can I approach to the topic with a conscious and cool way? I have downloaded somany documents, but %90 of them are rubish.
Regards,
Oppenheimer
---------------------------------------------------------------------
WARNING:Xst:2170 - Unit Sayici : the following signal(s) form a combinatorial loop: clock_cmp_eq0000, value<0>.
WARNING:Xst:2170 - Unit Sayici : the following signal(s) form a combinatorial loop: value<0>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<1> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<1>, Result, Data<1>, Sayici/value<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<2> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<2>, Result, Sayici/value<2>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<3> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value<3>, Result, Sayici/value_addsub0000<3>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<4> : the following signal(s) form a combinatorial loop: Sayici/value<4>, Result, Sayici/value_addsub0000<4>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<5> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<5>, Sayici/value<5>, Result, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<6> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value<6>, Sayici/value_addsub0000<6>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<7> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value<7>, Result, Sayici/value_addsub0000<7>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<8> : the following signal(s) form a combinatorial loop: Result, Data<1>, Sayici/value_addsub0000<8>, Sayici/value<8>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<9> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<9>, Sayici/value<9>, Result, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<10> : the following signal(s) form a combinatorial loop: Result, Sayici/value_addsub0000<10>, Sayici/value<10>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<11> : the following signal(s) form a combinatorial loop: Sayici/value<11>, Sayici/value_addsub0000<11>, Data<1>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<12> : the following signal(s) form a combinatorial loop: Data<1>, Result, Sayici/value_addsub0000<12>, Sayici/value<12>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<13> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<13>, Data<1>, Result, Sayici/value<13>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<14> : the following signal(s) form a combinatorial loop: Sayici/value<14>, Sayici/value_addsub0000<14>, Data<1>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<15> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<15>, Data<1>, Result, Sayici/value<15>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<16> : the following signal(s) form a combinatorial loop: Sayici/value<16>, Data<1>, Sayici/value_addsub0000<16>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<17> : the following signal(s) form a combinatorial loop: Data<1>, Result, Sayici/value<17>, Sayici/value_addsub0000<17>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<18> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value<18>, Sayici/value_addsub0000<18>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<19> : the following signal(s) form a combinatorial loop: Sayici/value<19>, Result, Sayici/value_addsub0000<19>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<20> : the following signal(s) form a combinatorial loop: Result, Sayici/value<20>, Sayici/value_addsub0000<20>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<21> : the following signal(s) form a combinatorial loop: Sayici/value<21>, Result, Data<1>, Sayici/value_addsub0000<21>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<22> : the following signal(s) form a combinatorial loop: Result, Sayici/value_addsub0000<22>, Sayici/value<22>, Data<1>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<23> : the following signal(s) form a combinatorial loop: Result, Sayici/value<23>, Data<1>, Sayici/value_addsub0000<23>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<24> : the following signal(s) form a combinatorial loop: Result, Data<1>, Sayici/value<24>, Sayici/value_addsub0000<24>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<25> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<25>, Data<1>, Result, Sayici/value<25>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<26> : the following signal(s) form a combinatorial loop: Sayici/value_addsub0000<26>, Data<1>, Sayici/value<26>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<27> : the following signal(s) form a combinatorial loop: Sayici/value<27>, Sayici/value_addsub0000<27>, Data<1>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<28> : the following signal(s) form a combinatorial loop: Sayici/value<28>, Data<1>, Sayici/value_addsub0000<28>, Result.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<29> : the following signal(s) form a combinatorial loop: Result, Sayici/value<29>, Data<1>, Sayici/value_addsub0000<29>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<30> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value<30>, Result, Sayici/value_addsub0000<30>.
WARNING:Xst:2170 - Unit Madd_value_addsub0000_Mxor_Result<31> : the following signal(s) form a combinatorial loop: Data<1>, Sayici/value_addsub0000<31>, Result, Sayici/value<31>.
---------------------------------------------------------------------
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--Library UNISIM;
--use UNISIM.vcomponents.all;
entity Sayici is
Port ( clk : in STD_LOGIC; --system clk
rst : in STD_LOGIC; --main reset
upbtn : in STD_LOGIC; --up buton
downbtn : in STD_LOGIC; --down buton
cs : out STD_LOGIC; --segment selector
data : out STD_LOGIC_VECTOR (6 downto 0)) ; --output data bus
end Sayici;
architecture Behavioral of Sayici is
signal Cclk,enb,scanclk,clock: STD_LOGIC:= '0';
signal value: STD_LOGIC_VECTOR (31 downto 0):= "00000000000000000000000000000000";
signal bcd,bcd1,bcd2: STD_LOGIC_VECTOR (3 downto 0) := "0000" ;
begin
process(clk)
begin
if rising_edge(clk) then
Cclk<= upbtn or downbtn or rst;
end if;
end process;
enb<= not Cclk and (upbtn or downbtn or rst);
process(clk)
begin
if rising_edge(clk) then
if enb= '1' then
if rst= '1' then
bcd1<= "0000";
bcd2<= "0000";
end if;
if UpBtn= '1' then
if bcd1= "1001" then
if bcd2= "1001" then
bcd1<= "0000";
bcd2<= "0000";
else
bcd2<= bcd2 + 1;
bcd1<= "0000";
end if;
else
bcd1<=bcd1 + 1;
end if;
end if;
if DownBtn= '1' then
if bcd1= "0000" then
if bcd2= "0000" then
bcd1<= "1001";
bcd2<= "1001";
else
bcd1<= "1001";
bcd2<= bcd2 - 1;
end if;
else
bcd1<=bcd1 - 1;
end if;
end if;
end if;
end if;
end process;
-- clk_div16_inst1 : clk_div16
-- port map (
-- clkdv => div1, -- Divided clock output
-- clkin => clk ); -- Clock input
--
-- clk_div16_inst2 : clk_div16
-- port map (
-- clkdv => div2, -- Divided clock output
-- clkin => div1 ); -- Clock input
--
-- clk_div16_inst3 : clk_div16
-- port map (
-- clkdv => div3, -- Divided clock output
-- clkin => div2 ); -- Clock input
--
-- clk_div16_inst4 : clk_div16
-- port map (
-- clkdv => div4, -- Divided clock output
-- clkin => div3 ); -- Clock input
--
process(clk)
begin
value<= value + 1;
if value= 500_000 then
clock<= not clock;
value<= "00000000000000000000000000000000";
else
clock<= clock;
end if;
scanclk<= clock;
cs<= scanclk;
end process;
process(scanclk)
begin
if scanclk= '0' then
bcd<= bcd1;
else
bcd<= bcd2;
end if;
case bcd2 is
when "0000" => Data<= "0111111";
when "0001" => Data<= "0000110";
when "0010" => Data<= "1011011";
when "0011" => Data<= "1001111";
when "0100" => Data<= "1100110";
when "0101" => Data<= "1101101";
when "0110" => Data<= "1111101";
when "0111" => Data<= "0000111";
when "1000" => Data<= "1111111";
when "1001" => Data<= "1101111";
when others => Data <= "1000000";
end case;
end process;
end Behavioral;