I2C Slave Peripheral using Embedded Function Block

Related Products

Reference Design LogoThe I2C interface (Inter-Integrated Circuit) also known as two-wire interface is a multi-master serial single-ended bus invented by Philips. I2C is widely used for communications between devices on the same board. Every MachXO2 device contains two hardened I2C IP cores designated as “Primary” and “Secondary” I2C cores. Each core can operate as an I2C master or as an I2C slave.

This reference design provides a ready to use RTL code segment that implements intuitive interface between:

  • An external I2C master and the XO2 internal registers (user logic)
  • An external I2C master and memory extension in XO2

The I2C slave interface is used to received commands and data from an external I2C master. A typical application of this design would be to provide GPIO expansion to an I2C compliant micro-controller master or interfacing the I2C micro-controller to the Embedded Block RAM (EBR) in the XO2.

Benefits

  • Ready to use RTL code
  • Prevents user from learning I2C and Wishbone Protocol; Shortens Development Time
  • Programmable Slave Interrupts

Jump to

Block Diagram

I2C Slave Peripheral using Embedded Function Block

Performance and Size

Device Family Tested Devices1 Language fmax I/O Pins Utilization Architectural
Resources
Revision
MachXO2™ 2 LCMXO2-1200ZE-3MG132C Verilog >45MHz 100 185 LUTs EFB 1.0

1. May work in other devices as well.
2. Performance and utilization characteristics generated using the specified test device and Lattice Diamond™ 1.4 software.

Note: The performance and design sizes shown above are estimates only. The actual results may vary depending upon the chosen parameters, timing constraints, and device implementation. See the design's documentation for details. All coding and design work was done on a PC platform unless noted otherwise.

Documentation

Technical Resources
TITLE NUMBER VERSION DATE FORMAT SIZE
Select All
I2C Slave Peripheral using Embedded Function Block - Documentation
FPGA-RD-02073 1.5 11/8/2021 PDF 1.1 MB
I2C Slave Peripheral using Embedded Function Block - Source Code
FPGA-RD-02073 1.5 11/8/2021 ZIP 1015.5 KB

*By clicking on the "Notify Me of Changes" button, you agree to receive notifications on changes to the document(s) you selected.