aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ecp5/tribuf.v
blob: 870a0258412efadf17e29e5a41dd6d49d09767a3 (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 o;

	assign o = en ? i : 1'bz;

endmodule


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

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

endmodule