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++
公告
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 讨论

How to Use Opencore's I2C IP for Nios?

Altera_Forum
名誉分销商 II
1,843 次查看

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 项奖励
6 回复数
Altera_Forum
名誉分销商 II
674 次查看

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 项奖励
Altera_Forum
名誉分销商 II
674 次查看

It works!Thank you very much,niosIIuser. 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif
0 项奖励
Altera_Forum
名誉分销商 II
674 次查看

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 项奖励
Altera_Forum
名誉分销商 II
674 次查看

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 项奖励
Altera_Forum
名誉分销商 II
674 次查看

 

--- 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 项奖励
Altera_Forum
名誉分销商 II
674 次查看

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 项奖励
回复