Forum Discussion
Altera_Forum
Honored Contributor
11 years ago[HELP ] VHDL Parking Lot
Hello guys, i'm not idea how resolve this problem, please help me parking lot, shown in the Fig. 2, has space for 10 cars. There is only one entrance to the parking lot, consequently one car at...
Altera_Forum
Honored Contributor
11 years agoHere my vhdl code, is something wrong about the design, tell me. So the question is if my vhdl code is good abut the statement of the problem, if I'm missing something, if I'm missing signals
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity parking_lot is
port (detector_1 : in std_logic; -- entrando carro
detector_2 : in std_logic; -- saliendo carro
libre : out std_logic;
lleno : out std_logic
);
end parking_lot;
architecture behavioral of parking_lot is
begin
process (detector_1,detector_2)
begin
if (detector_1 = '0') then
libre <= '1';
elsif (detector_1 ='1') then
libre <= '0';
elsif (detector_2 = '0') then
lleno <= '0';
elsif (detector_2 ='1') then
lleno <= '1';
end if;
end process;
end behavioral; i'm trying to design a test bench