Altera_Forum
Honored Contributor
13 years agoplease help large count of error i don't know why
this is my code i write it step by step but alarge amount of error appear i can't fix it can u help
-----------------------------------------
library ieee;
use ieee.std_logic_1164.all;
------------------------------------------------------------------
entity heat_sys is
port (manual_sig ,outside_sig ,room_sig:in std_logic;
specific_time_hours,timer_hours:integer range 0 to 24;
timer_miniut,specific_time_miniut:integer range 0 to 60;
keybad_inp:std_logic_vector (3 downto 0);
heat_value:integer range 0 to 38;
heat_on_off : buffer std_logic);
end entity;
------------------------------------------------------------------
architecture heat_sys_beh of heat_sys is
begin
process (manual_sig,outside_sig,room_sig,heat_value,keybad_inp,specific_time_hours,timer_hours,timer_miniut,specific_time_miniut)
begin
if outside_sig ='1' then
if ((timer_hours= specific_time_hours) and (timer_miniut=specific_time_miniut)) then
----------------------------------------------------------------------
if keybad_inp(0)='1' then
if heat_value >=38 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(1)='1' then
if heat_value >=30 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(2)='1' then
if heat_value >=36 then
heat_on_off='0';
else
heat_on_off='1';
end if;
else
if heat_value >=18 then
heat_on_off='0';
else
heat_on_off='1';
end if;
end if;
-------------------------------------------------------------------------
else
heat_on_off <='0';
end if;
-------------------------------------------------------------------------
elsif room_sig ='1' then
if keybad_inp(0)='1' then
if heat_value >=38 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(1)='1' then
if heat_value >=30 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(2)='1' then
if heat_value >=36 then
heat_on_off='0';
else
heat_on_off='1';
end if;
else
if heat_value >=18 then
heat_on_off='0';
else
heat_on_off='1';
end if;
end if;
-------------------------------------------------------------------------------
elsif manual_sig ='1' then
if keybad_inp(0)='1' then
if heat_value >=38 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(1)='1' then
if heat_value >=30 then
heat_on_off='0';
else
heat_on_off='1';
end if;
elsif keybad_inp(2)='1' then
if heat_value >=36 then
heat_on_off='0';
else
heat_on_off='1';
end if;
else
if heat_value >=18 then
heat_on_off='0';
else
heat_on_off='1';
end if;
end if;
---------------------------------------------------------------------------
else
heat_on_off <='0';
end if ;
end process;
end architecture ;