Vhdl Temperature simulation help

AI Thread Summary
The discussion focuses on troubleshooting VHDL code for a temperature comparison component and an 8-bit up/down counter. Initially, the user faced issues with simulation results being inaccurate despite the code compiling correctly, later discovering that the simulation tool settings were incorrect. The user then shared their progress on an up/down counter, detailing the entity and architecture, including control signals for counting. They seek assistance with ensuring the counter functions properly, particularly when both up and down signals are active. The conversation highlights common challenges in VHDL simulation and coding practices.
keith03
Messages
31
Reaction score
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;
 
Engineering news on Phys.org


I figured it out, the code was fine, but the simulation tool was not appropriatly set.
 


hello everyone!
i have to do a sychronous 8-bit up/down counter.
to the momment i am here. My entity is right.
As for the up/down control, we have the inputs up and down,
and If up = 1 it counts up, if down =1 it counts down and if both of them are 1 it does nothing.

can anyone help?

this is what i have done so far.

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity up_down_counter is
port (
cout :out std_logic_vector (7 downto 0);
data :out std_logic_vector (7 downto 0);
up,down :in std_logic; -- up_down control for counter
clk :in std_logic; -- Input clock
reset :in std_logic -- Input reset
);
end entity;

architecture rtl of up_down_counter is

signal count :std_logic_vector (7 downto 0);
begin
process (clk, reset) begin
if (reset = '1') then
count <= (others=>'0');
elsif (rising_edge(clk)) then
if (up XOR down = '1') then
if(up = '1') then
count <= count + 1;
else
count <= count - 1;
end if;
end if;
end if;
end process;
cout <= count;
end architecture;
 
Thread 'I need a concave mirror with a focal length length of 150 feet?'
I need to cut down a 3 year old dead tree from top down so tree causes no damage with small pieces falling. I need a mirror with a focal length of 150 ft. 12" diameter to 36" diameter will work good but I can't think of any easy way to build it. Nothing like this for sale on Ebay. I have a 30" Fresnel lens that I use to burn stumps it works great. Tree service wants $2000.
Hi all, i have some questions about the tesla turbine: is a tesla turbine more efficient than a steam engine or a stirling engine ? about the discs of the tesla turbine warping because of the high speed rotations; does running the engine on a lower speed solve that or will the discs warp anyway after time ? what is the difference in efficiency between the tesla turbine running at high speed and running it at a lower speed ( as fast as possible but low enough to not warp de discs) and: i...
Thread 'Where is my curb stop?'
My water meter is submerged under water for about 95% of the year. Today I took a photograph of the inside of my water meter box because today is one of the rare days that my water meter is not submerged in water. Here is the photograph that I took of my water meter with the cover on: Here is a photograph I took of my water meter with the cover off: I edited the photograph to draw a red circle around a knob on my water meter. Is that knob that I drew a red circle around my meter...
Back
Top