Opposite logic of work
I'm using this board (ALTERA-CoreEP4CE6-EP4CE6E22C8N). I followed the example. The problem is that contrary to the description of the example, the behavior is the opposite of what is written.
Actual Block diagram (Quartus Prime Lite 22.1.1):
So, when starting, the key[0] and key[1] buttons are not pressed on the board and led[0], led[2], led[3], led[5] should be lit, because pins 86 and 87 are in logical "1", since they have a Weak Pull-Up Resistor (On).
But led[1] and led[4] really glow! In this case, inst5 (AND2) behaves like
OR2, inst6 (OR2) behaves like AND2, inst7 (XOR) behaves like XOR+NOT !!! What's happening?!
I will not write further, because the logic already contradicts the explicit scheme. The impression is that the Weak Pull-Up Resistor (On) setting in the Assigment Editor has no effect, and pins 86 and 87 are "dangling in the air." Although the "Cyclone IV Device Datasheet" says "All I/O pins have an option to enable weak pull-up except the configuration, test, and JTAG pins." But that's not all, it doesn't explain the behavior inst5, inst6, inst7 even with this assumption.
I'm stuck at this moment. Tell me please, what is the solution to the problem? Thanks for your help!
Actual Assigment editor (Quartus Prime Lite 22.1.1):
P.S.
On the block diagram, states 0 and 1 show the actual state of the leds of the working board, respectively, the state of key[0] (red) OR key[1] (blue), as well as key[0] AND key[1] (black). The project was tested in three versions of Quartus Prime Lite Edition - 17.1, 22.1, 22.1.1 - there are no compilation errors, the project behavior on the board is the same.
The project is written to the FPGA RAM, after the power is restarted, the test project "running led[0] - led[7]" from ROM is normally launched, that is, its logic corresponds to the factory one.