Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Lattice EFB I2C core works in simulation, but not on hardware

Reply
Thread Tools

Lattice EFB I2C core works in simulation, but not on hardware

 
 
littlegamer
Guest
Posts: n/a
 
      10-23-2013
Hello,

Perhaps someone with Lattice experience can answer this for me. I am building a design on a MachXO2 using the EFB for I2C slave communication. I builtmy own state machine for writing and reading to the wishbone bus. In simulation, it works perfectly. I can read and write to the I2C lines, see what the wishbone bus is doing, data is processed correctly. In simulation. WhenI synthesize the design and feed it to an actual MachXO2, it doesn't work at all. The I2C core is alive, it responds to addresses by sending ACKs, also when writing data, but when trying to read the exact same address, it feeds me rubbish (like 0x0B or 0x0F), repeatedly writing will cause the device to crash by pulling the SDA or SCL lines hard low.

I'm using the internal oscillator at 8MHz portmapped to the Wishbone bus. I've changed the statemachine to do the same thing specified in the reference designs (as in, discarding the read buffer twice, disabling and re-enabling the interrupt source for TRRDY, waiting for BUSY low etc). Apart from the extra wishbone transactions, simulation results and hardware results remain the same. I have no clue where to look for. Can anyone give me pointers?

Regards,
littlegamer
 
Reply With Quote
 
 
 
 
alb
Guest
Posts: n/a
 
      10-25-2013
Hi littlegamer,

On 23/10/2013 19:00, littlegamer wrote:
[]
> Perhaps someone with Lattice experience can answer this for me. I am
> building a design on a MachXO2 using the EFB for I2C slave
> communication. I built my own state machine for writing and reading
> to the wishbone bus. In simulation, it works perfectly. I can read
> and write to the I2C lines, see what the wishbone bus is doing, data
> is processed correctly. In simulation. When I synthesize the design
> and feed it to an actual MachXO2, it doesn't work at all.


have you run a post-synth simulation? Have you performed static timing
analysis? If not I strongly invite you to do so before going on the bench.

> The I2C
> core is alive, it responds to addresses by sending ACKs, also when
> writing data, but when trying to read the exact same address, it
> feeds me rubbish (like 0x0B or 0x0F), repeatedly writing will cause
> the device to crash by pulling the SDA or SCL lines hard low.


Be aware that often simulation vs. reality mismatches are due to
'incomplete simulation environment'. Check that all the input to your
logic is properly modeled in your simulation, including timing and most
of all power-up/rst sequence.

HTH,

Al

p.s.: How do you define a 'device crash'? I've seen a car crash
yesterday and I bet that I do not have to explain you what a car crash
is. My suggestion: try to describe your problem according to your
observations, not to your - understandable - frustration for having a
not working hardware.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lattice iCECube2 for iCE40 Devices rickman VHDL 2 01-10-2013 11:19 PM
ieee.math_real-support in Synplify for Lattice Sean Durkin VHDL 2 09-10-2009 02:47 PM
Lattice's Online Store Now Sells Silicon - No Minimum Order Quantity bart VHDL 14 06-15-2007 12:47 AM
Core Solo & Core Duo are not Core microarchitecture; 65nm Pentium M chips bigal Hardware 0 03-22-2006 11:24 AM
Bug in DDR template in Lattice FPGAs ? ALuPin VHDL 8 04-28-2005 07:22 AM



Advertisments