quasar/InoutPort.v

9 lines
211 B
Verilog

module InoutPort( inout [15:0] a,
input [15:0] b,
input sel,
output [15:0] c);
assign a = sel ? 'bz : b;
assign c = sel ? a : 'bz;
endmodule