I’m attempting to run two of my pins in tri-state inout mode. It didn’t work so I began narrowing down the problem. The test case below does not run correctly.
pin12 has an internal pullup and is connected to ground via a button
PIN_4, the tristate pin is connected to an active low LED for the test case
assign PIN_4 = pin12 ? 1 : 0;
The above code successfully turns the LED on when the button is pressed, and off when it’s not. However…
assign PIN_4 = pin12 ? 0 : 0'bz;
causes the LED to always be on, and
assign PIN_4 = pin12 ? 1 : 1'bz
also causes the LED to always be on (in active-high configuration)
I thought tri-state operation was possible due to this post, but it is strangely not working for me. I’m using the standard toolchain setup.
Any help would be appreciated