- #1
keith03
- 31
- 0
Vhdl help!
Please help...This is driving me crazy. I am just trying to setup a simple comparing component. The code compiles fine, but the simulation is WAAAAAYY off. could somebody please check this? Thanks
--Temprature high or low
--
library ieee;
use ieee.std_logic_1164.all;
entity thermostat is
port
(
data_in_mux : in std_logic_vector (3 downto 0);
set_main : in std_logic_vector (3 downto 0);
data_out : out std_logic_vector (1 downto 0)
);
end thermostat;
--
architecture behave of thermostat is
begin
process (set_main, data_in_mux)
begin
if (set_main < data_in_mux) then
data_out <= "00";
elsif (set_main > data_in_mux) then
data_out <= "11";
else data_out <= "01";
end if;
end process;
end behave;
Please help...This is driving me crazy. I am just trying to setup a simple comparing component. The code compiles fine, but the simulation is WAAAAAYY off. could somebody please check this? Thanks
--Temprature high or low
--
library ieee;
use ieee.std_logic_1164.all;
entity thermostat is
port
(
data_in_mux : in std_logic_vector (3 downto 0);
set_main : in std_logic_vector (3 downto 0);
data_out : out std_logic_vector (1 downto 0)
);
end thermostat;
--
architecture behave of thermostat is
begin
process (set_main, data_in_mux)
begin
if (set_main < data_in_mux) then
data_out <= "00";
elsif (set_main > data_in_mux) then
data_out <= "11";
else data_out <= "01";
end if;
end process;
end behave;