OpenFPGA/vpr7_x2p/vpr/VerilogNetlists/io.v

17 lines
615 B
Coq
Raw Normal View History

2018-07-26 12:28:21 -05:00
//------ Module: iopad -----//
//------ Verilog file: io.v -----//
//------ Author: Xifan TANG -----//
module iopad(
input zin, // Set output to be Z
input dout, // Data output
output din, // Data input
inout pad, // bi-directional pad
2019-04-26 13:23:47 -05:00
input direction // enable signal to control direction of iopad
//input direction_inv // enable signal to control direction of iopad
2018-07-26 12:28:21 -05:00
);
//----- when direction enabled, the signal is propagated from pad to din
assign din = direction ? pad : 1'bz;
//----- when direction is disabled, the signal is propagated from dout to pad
assign pad = direction ? 1'bz : dout;
endmodule