EmbDev.net

Forum: FPGA, VHDL & Verilog executing optical sensors with vhdl


von Kobi (Guest)


Attached files:

Rate this post
useful
not useful
Hello everybody, and thank you for having me here with you.
i'm having troubles executing this optical sensor module that i created 
physically using VHDL in collaboration with DE-2/115
the pic i added should explain what i am trying to do... i want to be 
able to make this work by pressing one of the buttons on my board which 
cause a LED to light
this is the code i've written so far:
and for some reason it's not working :/

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
entity mouse_lab IS
port(reset,clock_in: in STD_LOGIC;
IF2: IN STD_LOGIC;
LED1: OUT STD_LOGIC);
END mouse_lab;
architecture behave OF mouse_lab IS
BEGIN
PROCESS (clock_in,IF2)
BEGIN
if reset = '0' then
led1 <='1';
else
IF clock_in'event and clock_in = '1' then
if IF2 = '0' then
led1 <='0';
else
led1 <='1';
end if;
end if;
end if;
END process;
END behave;

von Klakx (Guest)


Rate this post
useful
not useful
The sensitivity List should have reset instead of IF2.
How is your Testbench working. Also people often wrongly apply clock to 
wrong Pin

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.