Hammer111
Junior Member level 3
xst:1426
Hi
I'm new to VHDL coding and I need a little help.
I'm trying to make one traffic light for cars and other for pedestrian.
I made this code wich works great with simulator but when I tried to put it on chip I got this error:
ERROR:Xst:825 - "C:/sustav/test/test1.vhd" line 49: Wait statement in a procedure is not accepted.
I USED FPGA FROM MY UNIVERSITY(50 MHz kvartz) so I had to count 50000000 low to high transitions to get 1 second.
here's the code:
entity test1 is
Port ( clock : in STD_LOGIC;
key : in STD_LOGIC;
yellow : out STD_LOGIC :='0';
green : out STD_LOGIC :='1';
red : out STD_LOGIC :='0';
pred : out STD_LOGIC :='1';
pgreen : out STD_LOGIC :='0');
end test1;
architecture Behavioral of test1 is
signal sec : integer range 0 to 50 :=0;
signal nsec : integer range 0 to 50 :=0;
begin
process
begin
wait until key='1';
for j in 1 to 38 loop
for i in 1 to 50000000 loop
wait until clock='1';
nsec<=nsec+1;
end loop;
sec<=sec+1;
nsec<=0;
if ((sec<=2) or (sec>=34 and sec<=36)) then
yellow<='1';
else
yellow<='0';
end if;
if (sec>2 and sec<=36) then
red<='1';
else
red<='0';
end if;
if (sec>2 and sec<=36) then
red<='1';
else
red<='0';
end if;
if (sec>36) then
green<='1';
else
green<='0';
end if;
if (sec>5 and sec<=30) then
pgreen<='1';
pred<='0';
else
pgreen<='0';
pred<='1';
end if;
end loop;
end process;
end Behavioral;
please if someone can tell me what's wrong with it? I'm working with Xilinx ISE 8.1i
I was trying to find what's wrong for over a few days(I'm so frustrated)
I MUST SAY SIMULATOR WORKS PERFECTLY
Hi
I'm new to VHDL coding and I need a little help.
I'm trying to make one traffic light for cars and other for pedestrian.
I made this code wich works great with simulator but when I tried to put it on chip I got this error:
ERROR:Xst:825 - "C:/sustav/test/test1.vhd" line 49: Wait statement in a procedure is not accepted.
I USED FPGA FROM MY UNIVERSITY(50 MHz kvartz) so I had to count 50000000 low to high transitions to get 1 second.
here's the code:
entity test1 is
Port ( clock : in STD_LOGIC;
key : in STD_LOGIC;
yellow : out STD_LOGIC :='0';
green : out STD_LOGIC :='1';
red : out STD_LOGIC :='0';
pred : out STD_LOGIC :='1';
pgreen : out STD_LOGIC :='0');
end test1;
architecture Behavioral of test1 is
signal sec : integer range 0 to 50 :=0;
signal nsec : integer range 0 to 50 :=0;
begin
process
begin
wait until key='1';
for j in 1 to 38 loop
for i in 1 to 50000000 loop
wait until clock='1';
nsec<=nsec+1;
end loop;
sec<=sec+1;
nsec<=0;
if ((sec<=2) or (sec>=34 and sec<=36)) then
yellow<='1';
else
yellow<='0';
end if;
if (sec>2 and sec<=36) then
red<='1';
else
red<='0';
end if;
if (sec>2 and sec<=36) then
red<='1';
else
red<='0';
end if;
if (sec>36) then
green<='1';
else
green<='0';
end if;
if (sec>5 and sec<=30) then
pgreen<='1';
pred<='0';
else
pgreen<='0';
pred<='1';
end if;
end loop;
end process;
end Behavioral;
please if someone can tell me what's wrong with it? I'm working with Xilinx ISE 8.1i
I was trying to find what's wrong for over a few days(I'm so frustrated)
I MUST SAY SIMULATOR WORKS PERFECTLY