How can I add a switchable pullup to a Tri-State pin?
There are the "Tri-State" and the "Pull-Up" blocks in icestudio. I want to combine them into a "Tri-State with Pull-Up" block that has another input that allows to enable or disable the pull-up (if the tri-state is in input mode of course).
Just using a signal ('pu') instead of a constant like shown here:
SB_IO #(
.PIN_TYPE(6'b1010_01),
.PULLUP(pu)
) io_pin (
.PACKAGE_PIN(pin),
.OUTPUT_ENABLE(oe),
.D_OUT_0(din),
.D_IN_0(dout)
);
results in a non-constant value error and does not synthezise.
It should synthezise and by that provide another input 'pu' that allows to set the state of the pull-up (1=enabled/on or 0=disabled/off).
If this behaviour is not possible, is there another way (work-a-round) to get switchable pullups?