Documentation
Application Notes Products Summary
DI2CMS-Ava

I2C Bus Interface - Master/Slave with Avalon interface


The I2C is a two-wire, bi-directional serial bus that provides a simple and efficient method of data transmission over a short distance between many devices. The DI2CMS-Avalon core provides an interface between parallel Avalon bus and an I2C bus. It can work as a master or slave transmitter/receiver depending on working mode determined by microprocessor. The DI2CMS-Avalon core incorporates all features required by the latest I2C specification including clock synchronization, arbitration, multi-master systems and High-speed transmission mode. The DI2CMS-Avalon supports all the transmission speed modes. Built-in timer allows operation from a wide range of the clk frequencies.
The DI2CMS-Avalon is a technology independent VHDL or VERILOG design that can be implemented in a variety of process technologies and can be fully customized accordingly to customer needs.
The DI2CMS-Avalon is delivered with fully automated testbench and complete set of tests allowing easy package validation at each stage of SoC design flow.



I2C Overview



The I2C-bus supports any IC fabrication process (NMOS, CMOS, bipolar). Two wires, serial data (SDA) and serial clock (SCL), carry information between the devices connected to the bus. Each devices is recognised by a unique address – whether it is a microcontroller, LCD driver, memory or keyboard interface – and can operate as either a transmitter or receiver, depending on the function of the device. Obviously an LCD driver is only a receiver, whereas a memory can both receive and transmit data. In addition to transmitters and receivers, devices can also be considered as masters or slaves when performing data transfers (see Figure below).



A master is the device which initiates a data transfer on the bus and generates the SCL clock signals. A slave is the device addressed by a master.
The I2C-bus is a multi-master bus. This means that more than one device capable of controlling the bus can be connected to it. As masters are usually microcontrollers or microprocessors.

For more information about the I2C Bus protocol please see....

Key Features

Applications

  • Compliant with Avalon interface specification, Revision 1.0
  • Single Avalon input clock for registers and I2C bus serial clock generation
  • Conforms to v.3.0 of the I2C specification
  • Master mode
    • Master operation
      • Master transmitter
      • Master receiver
    • Support for all transmission speeds
      • Standard (up to 100 kb/s)
      • Fast (up to 400 kb/s)
      • Fast Plus (up to 1 Mb/s)
      • High Speed (up to 3,4 Mb/s)
    • Arbitration and clock synchronization
    • Support for multi-master systems
    • Support for both 7-bit and 10-bit address-ing formats on the I2C bus
    • Build-in 8-bit timer for data transfers speed adjusting
  • Slave mode
    • Slave operation
      • Slave transmitter
      • Slave receiver
    • Supports 3 transmission speed modes
      • Standard (up to 100 kb/s)
      • Fast (up to 400 kb/s)
      • Fast Plus (up to 1 Mb/s)
      • High Speed (up to 3,4 Mb/s)
    • Allows operation from a wide range of input clock frequencies
    • User-defined data setup time
  • User-defined timing (data setup, start setup, start hold, etc.)
  • Interrupt generation
  • Fully synthesizable
  • Static synchronous design
  • Positive edge clocking and no internal tri-states
  • Scan test ready
  • Embedded microprocessor boards
  • Consumer and professional audio/video
  • Home and automotive radio
  • Low-power applications
  • Communication systems
  • Cost-effective reliable automotive systems


Symbol

 reset
 clk
irq 
 sdai
sdao 
 scli
sclo 
sclhs 
 writedata (7:0)
 readdata (7:0)
 write
 read
 chipselect

Pins description

PinTypeDescription
resetinputGlobal reset
clkinputGlobal clock
sdaiinputI2C bus data line (input)
scliinputI2C bus clock line (input)
writedata (7:0)inputAvalon write data bus
readdata (7:0)inputAvalon read data bus
writeinputAvalon write control
readinputAvalon read control
chipselectinputAvalon chip select
irqoutputInterrupt request
sdaooutputI2C bus data line (output)
sclooutputI2C bus clock line (output)
sclhsoutputHigh-speed clock line (output)

Block diagram

Data Unit
sdai
sdao
Control Logic
Clock Unit
scli
sclo
sclhs
Timer
Avalon Interface
writedata (7:0)
readdata (7:0)
write
read
chipselect
reset
clk
irq

Units

Data Unit

It controls SDA line, performs data and address shifts during the data transmission and reception. Input data spikes are also filtered.

Control Logic

Control Logic manages execution of all commands sent via interface. Synchronizes internal data flow. Includes Control Register used for performing all types of I2C Bus transmissions, and Status Register indicates state of the I2C Bus and the DI2CMS core.

Clock Unit

Performs clock synchronization, clock generation in master mode, and clock stretching in slave mode.

Timer

Timer allows operation from a wide range of the input frequencies. It is programmed by an user before transmission and can be reprogrammed to change the SCL frequency.

Avalon Interface

Avalon Interface performs the interface functions between DI2CMS internal blocks and Avalon bus. Allows easy connection of the core to existing Avalon systems.

Performance


Each core has been tested in variety of FPGA and ASIC technologies. Its implementation's results are summarized below.

ImplementationSpeed
grade
Utilized Area
[LC]
Frequency
[MHz]
MAX3000A-719849
MAX7000AE-519867
MAX 2-3291187
APEX20KC-7394150
CYCLONE-6370220
STRATIX-5291254
CYCLONE II-6354263
STRATIX II-3337380

DI2CMS-Avalon implementation results for ALTERA devices. The all features have been included.


Family summary

DesignI2C specificationOperation typeStandard mode   Fast     modeFast Plus modeHigh Speed modeMulti master7 bit address10 bit addressInterrupt gen.Passive elements interfaceMicrocontroller interfaceUser defined timing
100 kb/s400 kb/s1 Mb/s3.4 Mb/s
DI2CMv. 3.0MASTER++++++++-++
DI2CSv. 3.0SLAVE++++++-+-++
DI2CSBv. 3.0SLAVE++++++--+--
DI2CMSv. 3.0MASTER/SLAVE++++++++-++


The main features of each I2C bus controllers family members have been summarized in table above. It gives a briefly member characterization helping user to select the most suitable IP Core for its application.