Forum Discussion
Altera_Forum
Honored Contributor
15 years agoSimple Key-Led design does not work
Hello Im using a EPM3064ATC CPLD. My design has 8 switches and two leds. If a button is pressed, then a led should be on. I already tested different variants of code but had no sucess. ...
Altera_Forum
Honored Contributor
15 years agoTry to do like this
input switch;
input clk;
output reg led;
always@(posedge clk)
begin
if(switch)
led <= 1;
else led <=0;
end