diff options
Diffstat (limited to 'tests/efinix/tribuf.v')
-rw-r--r-- | tests/efinix/tribuf.v | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/efinix/tribuf.v b/tests/efinix/tribuf.v new file mode 100644 index 000000000..3fa6eb6c6 --- /dev/null +++ b/tests/efinix/tribuf.v @@ -0,0 +1,29 @@ +module tristate (en, i, o); + input en; + input i; + output reg o; +`ifndef BUG + + always @(en or i) + o <= (en)? i : 1'bZ; +`else + + always @(en or i) + o <= (en)? ~i : 1'bZ; +`endif +endmodule + + +module top ( +input en, +input a, +output b +); + +tristate u_tri ( + .en (en ), + .i (a ), + .o (b ) + ); + +endmodule |