aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ice40/tribuf.v
blob: b2b5e37d6fc84f99bc2ed8a2a0f55d020e30b77f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module tristate (en, i, o);
    input en;
    input i;
    output reg o;

    always @(en or i)
		o <= (en)? i : 1'bZ;
endmodule


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

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

endmodule