mauromj
Newbie level 1
I am using VHDL to try and simulate an I2C master and slave.
My slave has an inout port named i2c_sda.
My master has a in port named i2c_sda_in and a output port named i2c_sda_out.
In actual hardware, this assignment is very easy to do. All that needs to be done is the following:
This does not work however for simulations. What is the work around for this? I have attempted to "switch" between the assignments using a mux but have not found a working solution yet.
Thanks
My slave has an inout port named i2c_sda.
My master has a in port named i2c_sda_in and a output port named i2c_sda_out.
In actual hardware, this assignment is very easy to do. All that needs to be done is the following:
Code dot - [expand] 1 2 3 4 5 6 7 8 i2c_sda <= '0' when i2c_sda_out = '0' else 'Z'; i2c_master_instance : i2c port map ( master_sda_in => i2c_sda, master_sda_out => i2c_sda_out )
This does not work however for simulations. What is the work around for this? I have attempted to "switch" between the assignments using a mux but have not found a working solution yet.
Thanks
Last edited by a moderator: