mirror of https://github.com/YosysHQ/yosys.git
24 lines
242 B
Coq
24 lines
242 B
Coq
|
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
|