top.v 320 Bytes
Newer Older
1 2 3 4 5 6 7 8
module tribuf (en, i, o);
    input en;
    input i;
    output o;

    always @*
		begin
			if (en)
9
`ifndef BUG
10
				o = i;
11 12 13
`else	
				o = ~i;
`endif
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
			else
				o = 1'bZ;
		end
endmodule


module top (
input en,
input a,
output b
);

tribuf u_tri (
        .en (en ),
        .i (a ),
        .o (b )
    );

endmodule