Altera_Forum
Honored Contributor
14 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. Attached my code:
module TestSwitch (clk, Switch, Led);
input clk;
input Switch;
output Led;
assign Led = (Switch != 0 ); // switch led on if a button is pressed
assign Led = (Switch | Switch); // same
end
I already tested alll switches by the command:
assign Led = Switch;This design works well with my hardware. So the pin assignment should be ok. I also tried another version with a Block diagram / schematics file using an or8. Same effect. Thank you for your help! Andreas