Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21325 Discussions

Do NOT use AN502 SMBUS Altera IPCORE

Altera_Forum
Honored Contributor II
1,733 Views

Hi all, 

Beware of using this SMBUS protocol published at Altera website! 

 

I've spent 2 months on trying to implement and use this core. It has a lot of bugs, the manual is by all means different than the code, as if 2 different people wrote it and didn't talk to each other.  

even the test bench supplied with it has bugs. 

It is written awful, and not readable.The obvious example is that the enable signal mentioned in the manual sheet is logic inverted compared with the one used in the code, and I had to dig into the code for 2 days to find out why it's not even starting to work! 

It's a shame company like Altera publish this core and it doesn't work at all!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
546 Views

You can use the I2C master found on Opencores also for SMBus. IIRC it works also with several I2C masters, as you can find commonly on SMBus systems.

0 Kudos
Altera_Forum
Honored Contributor II
546 Views

Hi, 

First, I need multi master capabilities (with arbitration), does it have it? 

second, in Opencores they use the wishbone bus, which I'm not familier with, and I'm using the avalon of altera, so in this case, I will need to make adjustment between those 2 buses, more work... 

And last, it is just frustrating I'm trying to use a core full of bugs and they put it on their site, such dignified company like Altera...
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

The Altera wiki has a ported version to Avalon: http://www.alterawiki.com/wiki/i2c_(opencores). I've been using it with success. 

I've never used it with multiple masters though. It has an arbitration loss detection but I don't remember whether this is enough to make it compatible with multiple masters on SMBus. You may have to make a few tests yourself.
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

I didn't realise someone had ported the I2C core from opencores already, I did my own port + qsys wrapper for our boards Altera based boards. Core has worked well, you just have to watch the sign of the enable bit for the tristate driver when wiring it up. Shouldn't take 2 months to figure that out through! A day to integrate, few hours in signal tap and you should have it running. Usage isn't bad, it's a few hundred registers. Sure it can be improved but at that better to just move on.

0 Kudos
Reply