Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Do NOT use AN502 SMBUS Altera IPCORE

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!

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.