blob: e188a2096806c0bd257356759a76c437604c6e09 [file] [log] [blame]
module tristate (en, i, o);
input en;
input i;
output reg o;
always @(en or i)
begin
case (en)
`ifndef BUG
1:o <= i;
`else
1:o <= ~i;
`endif
default :o <= 1'bZ;
endcase
end
endmodule
module top (
input en,
input a,
output b
);
tristate u_tri (
.en (en ),
.i (a ),
.o (b )
);
endmodule