Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

How to Use Opencore's I2C IP for Nios?

Altera_Forum
Honored Contributor II
1,844 Views

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.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
675 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
675 Views

It works!Thank you very much,niosIIuser. 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif
0 Kudos
Altera_Forum
Honored Contributor II
675 Views

Hey Trout,  

Maybe you can post that SOPC Builder component into the IP section of the forum. I&#39;m sure several others are interested in an Avalon I2C controller.
0 Kudos
Altera_Forum
Honored Contributor II
675 Views

Done! 

please refer to "post your oun ip" section of the forum. 

The title is "Integrate the Opencores&#39;s I2C ip into SOPC". 

 

regards.
0 Kudos
Altera_Forum
Honored Contributor II
675 Views

 

--- Quote Start ---  

Done! 

please refer to "post your oun ip" section of the forum. 

The title is "Integrate the Opencores&#39;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
0 Kudos
Altera_Forum
Honored Contributor II
675 Views

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???
0 Kudos
Reply