Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHow to Use Opencore's I2C IP for Nios?
hello everyone:
I integrated the Opencore's I2C core into SOPC builder. But I don't know what PIN primitive for the SDA and SCL output should I place in the Quartus2's BDF design? (a Output ,Input or Bidiretional pin?) Please note that in the Opencore's I2C-spec document,it says that we have to add TRI-state buffers for the SDA and SCL lines. Please help me to get the I2C core work. thanks very much. Best Regards.6 Replies
- Altera_Forum
Honored Contributor
Hello trout,
If you have integrated the I2C IP from Opencores into your system correctly there are only some more steps to bring it to work. 1. Insert -> Symbol ... 2. 2x primitives -> buffer -> tri 3. 2x primitives -> logic -> not 4. 2x primitives -> pin -> bidir 5. connect "scl_padoen_o" and "sda_padoen_o" to the input of the "not"-logics 6. connect "scl_pad_o" and "sda_pad_o" to the input of the "tri"-buffers 7. connect the output of the "not"-logics to the corresponding output-enables of the "tri"-buffers 8. name the output of the "tri"-buffers "i2c_scl" and "i2c_sda" 9. connect "i2c_scl" and "i2c_sda" to the corresponding inputs of the I2C IP 10. connect "i2c_scl" and "i2c_sda" to "bidir"-pins That's it! Bye, niosIIuser PS: Why can't we upload images? This function would be very helpful. - Altera_Forum
Honored Contributor
It works!Thank you very much,niosIIuser.
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif - Altera_Forum
Honored Contributor
Hey Trout,
Maybe you can post that SOPC Builder component into the IP section of the forum. I'm sure several others are interested in an Avalon I2C controller. - Altera_Forum
Honored Contributor
Done!
please refer to "post your oun ip" section of the forum. The title is "Integrate the Opencores's I2C ip into SOPC". regards. - Altera_Forum
Honored Contributor
--- Quote Start --- Done! please refer to "post your oun ip" section of the forum. The title is "Integrate the Opencores's I2C ip into SOPC". regards. --- Quote End --- hi.... i have the i2c hdl files which i got from opencores , i want to integrate this into sopc but finding some problems .can u just provide me the link of your project file as i am finding it difficult to find it in the forum.It would be helpful for me. regards Udayraj MP - Altera_Forum
Honored Contributor
Even I had used I2C verilog code from Opencores. I've successfully simulated it. But I'm unable to synthesize it in Synopsys synthesis tool.
Can anyone help me out???