FPGARelated.com
Forums

MachXO2 I2C configuration. EFB I2C block synthesis error.

Started by atom1477 8 years ago2 replieslatest reply 8 years ago561 views
Summary A developer encountered synthesis errors while attempting to configure a MachXO2 FPGA via I2C using the Embedded Function Block (EFB) in Lattice Diamond 3.10.

A developer encountered synthesis errors while attempting to configure a MachXO2 FPGA via I2C using the Embedded Function Block (EFB) in Lattice Diamond 3.10. The issue was resolved by ensuring the I2C module's IPX file was properly imported into the Diamond project environment.

The discussion confirms that following the correct IP import procedure allows for successful I2C programming even when hardware resources like JTAG are restricted by small package pinouts.

  • The synthesis error occurred because the I2C IPX file was generated but not explicitly imported into the Lattice Diamond project.
  • Manually checking the 'Import IPX to Diamond Project' option during IPExpress generation is a critical step for successful synthesis.
  • Successful I2C configuration was verified on the MachXO2-1200HC after resolving the project file references.
  • The thread highlights that JTAG can be disabled to reclaim IO pins once I2C programming is functional.
Lattice DiamondMachXO2I2C ConfigurationFPGA Synthesis

Hello.

I creating project with LCMXO2-1200HC device in QFN32 package, so i have very limited number of IO pins and I want to configuring FPGA by I2C instead of JTAG.

I try to do this similarly to this descriprion:

http://buildingelectronics.blogspot.com/2017/09/ma...

Only differences are:

1. I use MachXO2 instead of MachXO3.

2. Trouble 4 not exist. I use Lattice Diamond 3.10, trouble exist only in Lattice Diamond 3.9 or i quess, in earlier versions. But in 3.10, WBCLKI is generated and i hope it is generated correctly.

So I generate I2C module using IPExpress:

i2c_1_23581.gif

i2c_2_68411.gif

Then I insert some code from generated i2c_tmpl.vhd file, to my main.vhd file.

And set some parameters in preferences (I2C ENABLE, JTAG DISABLE):

i2c_4_21422.gif

But when I try to synthetise this, I have this error:

i2c_3_48007.gif

Why?

In there something I forgot to do?


Complete project: I2C_configuration_test.zip.

[ - ]
Reply by mocomakersNovember 27, 2018

Hello. I'm not well-versed in VHDL, but I did get your project to synthesize by importing the i2c.ipx file.

importipx_75777.png


You did not check 'Import IPX to Diamond Project' when creating the I2C module via EFB and IPExpress.

I have not tested this solution beyond software synthesis.

However, I can point you to a working SPI programming configuration for the MachXO2 -

https://www.mocomakers.com/basic-setup-of-the-fipsy-fpga/

Best of luck.

[ - ]
Reply by atom1477November 27, 2018

[quote]You did not check 'Import IPX to Diamond Project' when creating the I2C module via EFB and IPExpress.[/quote]

Thank you very much.

This is it.

After adding the ipx file, the project has been synthesized and works (I mean: programming via I2C works).