Bi-directional Pin Use

I am working on a memory interface where the data path in bi-directional. I have internal signals data_write and data_read. I need to tristate data_write when data comes into the device for data_read. I have a internal tri_state signal but can't seem to figure out the correct way to code this.

Thanks

Reply to
xyzzy
Loading thread data ...

have internal signals data_write and data_read. I need to tristate data_write when data comes into the device for data_read. I have a internal tri_state signal but can't seem to figure out the correct way to code this.

assume an IO pad similar to following:

module IO(PAD, IN, OUT, OE);

inout PAD; output IN; // from the pad IN to the core input OUT; // OUT from the core input OE;

wire IN = PAD;

wire PAD = OE ? OUT : 1'bZ

endmodule

and see if you connect your data and tri-state signals to the ports of the IO. Normally you just need to connect your tri-state to the data PADs and your data_write & data_read should go to the control signals of the external memory.

Reply to
m

Now in VHDL :)

Reply to
Weddick

data_pins 'Z');

Reply to
Symon

I was just about to have to ask this very question. Much obliged.

Reply to
Rob Gaddi

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.