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.
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.
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.