Forum Discussion
Altera_Forum
Honored Contributor
16 years agoQuartus reverses functions of AND and OR gates
I am using the schematic/block editor to put an AND gate into a .bdf file and run it on a Nios Cyclone devkit and getting the wrong result. Two input pins from pushbuttons --> AND Gate --> in...
Altera_Forum
Honored Contributor
16 years agoAssuming you are talking about the Cyclone (one) Nios dev kit the push buttons are active low (they have pull ups) and the LEDs are active high (they have pull downs).
So your logic should be: assign led = (!pin[0]) & (!pin[1]); or this using that law I learned in school but can't remember what it's called :) assign led = !(pin[0] | pin[0]);