Altera_Forum
Honored Contributor
13 years agoI2C and Modelsim
I have a NIOS II system created with a bidirectional I2C SDA pin on SOPC.
How can I add a pullup to this pin, as a pin in an SOPC component, so I can simulate my design? Thank you.I have a NIOS II system created with a bidirectional I2C SDA pin on SOPC.
How can I add a pullup to this pin, as a pin in an SOPC component, so I can simulate my design? Thank you.You need to do it in your testbench. And you should do it for SCL as well.
In Verilog, declare the signal as tri1. In VHDL, declare it as std_logic as usual but add an assignment of 'H'.What testbench? The testbench is generated by SOPC by clicking the simulation checkbox.
Ah I think I got you. Ignore what I just said. I will get back if what I try now does not work.
Thank you.In Assignment Editor choose "Passive Resistor" for a pin and set it to Pull-Up. This is for functional simulation only.
I am running the modelsim simulation from eclipse so only the sopcinfo/bsp stuff is being simulated. That is my problem.