Altera_Forum
Honored Contributor
17 years agoBidirectional IOs in FPGA
Hi,
In my project, I have 2 bidirectional IO buses of 32-bit width. I need to connect both of them together for 2-way data transfer. I've tried two options in VHDL: bus1 <= bus2 This was mentioned in the help section of Quartus II. It mentions that we dont need to use any control signals for the direction of the IO. The tool will automatically handle this and effect the bidir transfer. I tried this option and it seems to work. The only prob is that data transfer one way is fast while the other way is slow with lots of delay ~20ns. This is not acceptable for me as I need the data at the appropriate time for latching it. I then changed some options in the tool (for max speed optimization) and now the above code snippet yields a warning stating that the transfer is only one way. Now I had to use the WE# signal to control the data flow: bus1 <= bus2 when we# = '0' else (others => 'Z'); (write transaction) bus2 <= bus1 when we# = '1' else (others => 'Z'); (read transaction) This synthesized without warnings or errors but the data transfer does not take place. Can anyone help me regarding this bidir data IO? I need this very urgently to finish my project. Thx