Do you have IP for SPI/I2C interface?
Category: I/O
Tool: Diamond
Device: MachXO2, MachXO3
The XO2/XO3 series has an SPI/I2C hard macro, so there is a way to make use of this.
It uses a macro called "EFB" (Embedded Function Block), but generates a module with Diamond's IPexpress enabling the intended functions such as SPI/I2C. After this you can achieve this by instantiating it in your RTL. Since you're using EFB, you're going to be using dedicated IO (except Secondary I2C).
If you want to implement SPI/I2C configuration with an external controller, you can do it with just the EFB without configuring any logic to interface to the FPGA fabric.
Also, when implementing user functions via the EFB's SPI/I2C interface on an FPGA, it is necessary to connect the user logic via the WISHBONE interface provided by the hardware macro. User logic is implemented including the Wishbone Master function.
On the other hand, if you don't want to use EFB and want to configure SPI/I2C in FPGA fabric using soft IP and GPIO, we have various reference designs. RD1046 (I2C Master), RD1054/RD1140 (I2C Slave), RD1075/RD1141/RD1142 (SPI), etc. Please refer to these related documents on the Lattice website for details.
Experienced FAE
Free consultation is available.
From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.