DESIGN AND IMPLEMENTATION OF I2C SINGLE MASTER ON FPGA USING VERILOG

Similar documents
THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

An Efficient Designing of I2C Bus Controller Using Verilog

DESIGN OF WISHBONE INTERFACED I2CMASTER CORE CONTROLLER USING VERILOG

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

FPGA Implementation Of SPI To I2C Bridge

IMAGE COMPRESSION ON FPGA AND TRANSFER USING ZIGBEE/I2C PROTOCOL

HCTL Open Int. J. of Technology Innovations and Research HCTL Open IJTIR, Volume 4, July 2013 e-issn: ISBN (Print):

Prototyping of On-chip I2C Module for FPGA Spartan 3A series using Verilog

ASIC IMPLEMENTATION OF I 2 C MASTER BUS CONTROLLER FIRM IP CORE

The Cubesat Internal bus: The I2C

ASIC Implementation of I2CMaster Bus Controller

Tutorial for I 2 C Serial Protocol

Growing Together Globally Serial Communication Design In Embedded System

International Journal of Applied Sciences, Engineering and Management ISSN , Vol. 05, No. 02, March 2016, pp

Introduction to I2C & SPI. Chapter 22

Design Development and Implementation of SPI

Design of an Efficient FSM for an Implementation of AMBA AHB in SD Host Controller

Design and Implementation of VLSI 8 Bit Systolic Array Multiplier

Novel Design of Dual Core RISC Architecture Implementation

Physical Design Implementation of I2C Bus Master Controller

AREA OPTIMIZATION OF SPI MODULE USING VERILOG HDL

Design of an AMBA AHB Reconfigurable Arbiter for On-chip Bus Architecture

THANG LUONG CAO. Serial bus adapter design for FPGA. Master of Science Thesis

International Journal of Advance Engineering and Research Development DESIGN AND IMPLEMENTATION OF SPI PROTOCOL

Design and Simulation of UART for Serial Communication

How to Implement I 2 C Serial Communication Using Intel MCS-51 Microcontrollers

Controller IP for a Low Cost FPGA Based USB Device Core

Design of AHB Arbiter with Effective Arbitration Logic for DMA Controller in AMBA Bus

Raspberry Pi - I/O Interfaces

Keywords: Soft Core Processor, Arithmetic and Logical Unit, Back End Implementation and Front End Implementation.

High Speed SPI Slave Implementation in FPGA using Verilog HDL

Simulation & Synthesis of FPGA Based & Resource Efficient Matrix Coprocessor Architecture

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

DEVELOPMENT AND VERIFICATION OF AHB2APB BRIDGE PROTOCOL USING UVM TECHNIQUE

I 2 C Slave Controller. I 2 C Master o_timeout_intr

AMBA AHB Bus Protocol Checker

DESIGN AND VERIFICATION ANALYSIS OF APB3 PROTOCOL WITH COVERAGE

Design and Implementation of High Security Optical Shaft Encoder for an Artificial Limb using Xilinx on FPGA

2. BLOCK DIAGRAM Figure 1 shows the block diagram of an Asynchronous FIFO and the signals associated with it.

Design and Implementation of Hamming Code on FPGA using Verilog

Synthesis & Simulation Model of Parallel Lift Controller Using Verilog

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

or between microcontrollers)

DESIGN OF MULTI-CHANNEL DATA ACQUISITION AND PROCESS CONTROL MODULE

I 2 C Bus Interface - Slave ver 3.08

1.3inch OLED User Manual

DESIGN AND IMPLEMENTATION OF VLSI SYSTOLIC ARRAY MULTIPLIER FOR DSP APPLICATIONS

DESIGN AND IMPLEMENTATION OF SDR SDRAM CONTROLLER IN VHDL. Shruti Hathwalia* 1, Meenakshi Yadav 2

High Speed Fault Injection Tool (FITO) Implemented With VHDL on FPGA For Testing Fault Tolerant Designs

I2C a learn.sparkfun.com tutorial

Design and Verification of Serial Peripheral Interface 1 Ananthula Srinivas, 2 M.Kiran Kumar, 3 Jugal Kishore Bhandari

I 2 C Master Control FSM. I 2 C Bus Control FSM. I 2 C Master Controller

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

Bus Matrix Synthesis Based On Steiner Graphs for Power Efficient System on Chip Communications

Implementation of Convolution Encoder and Viterbi Decoder Using Verilog

RL78 Serial interfaces

FPGA based Design of Low Power Reconfigurable Router for Network on Chip (NoC)

Basics of UART Communication

SILICON MICROSTRUCTURES

Implementation of MCU Invariant I2C Slave Driver Using Bit Banging

Design and Verification of Configurable Multichannel

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design

SPART. SPART Design. A Special Purpose Asynchronous Receiver/Transmitter. The objectives of this miniproject are to:

HIGH-PERFORMANCE RECONFIGURABLE FIR FILTER USING PIPELINE TECHNIQUE

FPGA Implementation of a High Speed Multiplier Employing Carry Lookahead Adders in Reduction Phase

FPGA based Simulation of Clock Gated ALU Architecture with Multiplexed Logic Enable for Low Power Applications

Lecture 25 March 23, 2012 Introduction to Serial Communications

High Performance Interconnect and NoC Router Design

DESIGN AND VERIFICATION OF LOW SPEED PERIPHERAL SUBSYSTEM SUPPORTING PROTOCOLS LIKE SPI, I 2 C AND UART

I2C a learn.sparkfun.com tutorial

Academic Course Description. VL2001 Digital System Design using Verilog First Semester, (Odd semester)

PINE TRAINING ACADEMY

I2C interface Tutorial

Microcontroller Systems. ELET 3232 Topic 23: The I 2 C Bus

Exercise 2 I 2 C Management 1/7

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Handson Technology. I2C Specification and Devices. 1

Laboratory Finite State Machines and Serial Communication

Interfacing Techniques in Embedded Systems

FPGA Implementation of MIPS RISC Processor

: : (91-44) (Office) (91-44) (Residence)

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

IMPLEMENTATION OF IEEE MAC TRANSMITTER USING VHDL

More on IO: The Universal Serial Bus (USB)

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Field Programmable Gate Array (FPGA)

ISSN Vol.05, Issue.12, December-2017, Pages:

Design of Convolution Encoder and Reconfigurable Viterbi Decoder

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

DESIGN AND VERIFICATION OF UART USING VERILOG HDL

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)

Design and Implementation of High Performance DDR3 SDRAM controller

Novel Architecture for Designing Asynchronous First in First out (FIFO)

Laboratory 5 Communication Interfaces

Microtronix Avalon I 2 C

Verilog for High Performance

Serial Buses in Industrial and Automotive Applications

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

Transcription:

DESIGN AND IMPLEMENTATION OF I2C SINGLE MASTER ON FPGA USING VERILOG Shivani Mehrotra 1, Nisha Charaya *2 1 M.Tech (ECE), 2 Assistant Professor, Amity University Gurgaon (Haryana), India Abstract: This paper focuses on the design of I2C single master which consists of a bidirectional data line i.e. serial data line (sda) and serial clock line (scl). This protocol has the ability to support multiple masters. I2C is a two-wire, bidirectional serial bus that provides a simple and efficient method of data exchange between devices and is used for faster devices to communicate with slower devices and each other without data loss. It requires only two lines for communication with two or more chips and can control a network of device chips with just two general purpose I/O pins whereas, other bus protocols require more pins and signals to connect devices. The complete module is designed in Verilog and simulated in ModelSIM Index Terms: Verilog, ModelSIM, I2C bus, Master, Slave, SDA, SCL, FPGA, HDL, Synthesis. I. INTRODUCTION In the world of serial data communication, there are protocols like RS-232, RS-422, RS-485, SPI (Serial peripheral interface), microwire for interfacing high speed and low speed peripherals. These protocols require more pin connections in the IC (Integrated Circuit) for serial data communication to take place. But as the physical size of IC have decreased over the years, a less amount of pin connection for serial data I2C PROTOCOL It is most suitable for applications requiring occasional communication over a short distance between many devices. The I2C standard is a communication protocol including collision detection and arbitration that prevents data corruption if two or more masters attempt to control the bus simultaneously. Resource requirements depend on the implementation. The two lines of the I2C-bus, SDA and SCL, are bidirectional and open-drain, pulled up by resistors. Devices on the bus pull a line to ground when a logical zero is to be sent and release a line when a logical one is to be sent. Each device is recognized by a unique address whether it s a microcontroller, LCD driver, memory or keyboard interface and can operate as either a transmitter or receiver, depending on the function of the device [2].Obviously an LCD driver is only a receiver, whereas a memory can both receive and transmit data. Devices are considered as masters or slaves when performing data transfer. A master is the device which initiates a data transfer on the bus and generates the clock signals to permit that transfer. At that time, any device addressed is considered a slave. transfer is required. USB/SPI/Microwire and mostly UARTS are all just one point to one point data transfer bus systems. These protocols use multiplexing of the data path and forwarding of messages to service multiple devices. To overcome this problem, the I2C protocol was introduced by Phillips [2] [3] [10]. Corresponding Authors:[1] 1. Ms. Shivani Mehrotra, PG Students, Department of ECE, Amity University Gurgaon (Haryana), India Email Id: shivanimtech5@gmail.com 2. Ms. Nisha Charaya, Assistant Professor, Department of ECE, Amity University Gurgaon (Haryana), India, Figure 1: Logical Diagram of I2C Master Slave [ref]

Features data transfers: serial, 8-bit oriented, bi-directional master can operate as transmitter or receiver bit transfer (level triggered) SCL = 1, SDA = valid data one clock pulse per data bit stable data during high clock data change during low clocks [6] Fig 2: Change of word occurring during low clock [ref] Start Condition (S) SDA 1 to 0 transition when SCL = 1 Stop Condition (P) I2C Master Fig 3: Start Condition [ref] SDA 0 to 1 transition when SCL = 1 controls the SCL Fig 4: Stop Condition [ref] starts and stops the data transfer mechanism controls addressing mechanism of other devices I2C Slave device addressed by master I2C single Master works as a transmitter or a receiver. Master as transmitter sends data to slave-receiver (RW=0 i.e write state) Master as receiver requires data from slavetransmitter(rw=1 i.e read state) [6] II. DESIGN METHODOLOGY Finite State Machine (FSM) that describes the design of single Master is shown in Figure 5. Algorithm State 1: Ready condition: I2C bus doesn t perform any operation.(scl and SDA remains high) and enable is low. If ena becomes HIGH it enters into next state. State 2: Start condition: When ena is HIGH, Master initiates data transmission by entering into the next state adr. State 3: adr state: In this next adr state, master sends the slave address serially (11010000) to the slave. bit_cnt is used as counter to count the bits of address transferred and as it becomes 0,it enters into next state. State 4: ack state: If the slave address matches with the slave(here single slave is considered hence no need to match it as it is taken as state) it sends an acknowledgement bit in response to the master. Now R/W bit is checked if it is LOW, it enters write state else read state. State 5: Write state: The 8 bit data to be transmitted is sent to the slave by the master. After receiving the data, slave acknowledges the master. State 6: Read state: The 8 bit data is read from the slave by the master. After reading the data, acknowledgement is sent. State 7: Stop condition: After the transmission of the data, STOP bit is sent.(scl is high and SDA is from Low to high). Master sends a STOP bit to

terminate the connection. Again ena is checked if it is still LOW it remains in STOP state else it enters the READY state. For performing read operation, write operation is performed first and then read operation is done. Slave address used is of 3 bit (010). i. Figure 6, shows the data is written from the register in_data serially through the sda to register out_data ii. Figure 7, shows the data that is written is now read serially through the sda and is shown at the output through register read_out iii. Figure 8, shows the combined simulation result of write and read cycle.. Fig 5: Finite State Machine for Design of Single Master[ref] Functional Description The functional description of I2C master is described in the Verilog HDL. That is called design module. The test bench program is developed to test the design module. The test bench gives the input to the design module & verifies the output. The test bench is written in such way that the design module can be checked in all possible conditions. The signals given from the test bench to test the working of the prototype design of the I 2 C master are: ena ack en in_data sda_r Fig 6: Modelsim Simulation for Writing of Data Fig 7: Modelsim Simulation for Reading of Data II. SIMULATION RESULTS The I2C single master has been designed in Verilog and simulated in simulator tool ModelSim which is used to verify the design functioning. This design works for both read and write cycle. Fig 8: Modelsim Overall Simulation

The data transmitted by master is successfully stored and read by it. III. FPGA SYNTHESIS RESULTS XILINX 14.1 has been used for the synthesis of Single Master on FPGA. RTL Schematic diagram: Figure 9 shows the Resistortransistor logic diagram. Figure 10 shows the diagrammatic view of connection of given input output at Register Transfer Level (RTL) Fig 11: Technology Tree of Single Master Fig 9: RTL Schematic Diagram of I2C Single Master HDL (Hardware Description Language) Synthesis Report: Figure 12 shows the synthesis report obtained from XILINX 14.1 Fig 12: HDL Synthesis Report Fig 10: Diagrammatic view of given input output at RTL level Technology Tree schematic: Figure 11 shows the technology tree of the I2C Single Master Device Utilization Summary on FPGA: Table no. 1 shows the Design Summary of the I2C single master. The result shows that minimal resources are utilized in designing the I2C master as only 3% slices, 0% flip flops and 2% LUTs are utilized.

Table No. 1: Device Utilization Summary Timing Summary: Figure 13 shows the timing summary of the designed single master. The design meets the timing constraints and there is no violation of time. Fig 13: Timing Summary of I2C Single Master [5]. Philips Semiconductor I2C Bus Specification version 2. 1, January 2000 [6]. Tomáš ášmatoušek I2C bus Inter Integrated Circuits bus Integrated Circuits bus by Philips Semiconductors [7]. O. Romain, T.Cuenin & P.Garda: Design &modeling of an I2c Bus Controller, FDL 0 3, Frankfurt, Deutschland, Sept 23-26, 2003 [8]. Prof. Jai Karan Singh, Prof. Mukesh Tiwari,Vishal Sharma Design and Implementation of I2c master controller on FPGA using VHDL International Journal of Engineering and Technology (IJET),ISSN : 0975-4024 Vol 4 No 4,Aug-Sep 2012 [9]. Pankaj Kumar Mehto, Pragya Mishra, Sonu Lal Design and Implementation for Interfacing Two Integrated Device Using I2C Bus IJRICCE, ISSN (Online): 2320-9801, Vol. 2, Issue 3, March 2013 [10]. Bollam Eswari, N.Ponmagal, K.Preethi, S.G.Sreejeesh Implementation of I2C Master Bus Controller on FPGA in IEEE, International conference on Communication and Signal Processing, April 3-5, 2013 [11]. J. J Patel, Prof B. H. Soni, Design And Implementation Of I2c Bus Controller Using Verilog in Proc. Journal Of Information, Knowledge And Research In Electronics And Communication Engineering ISSN: 0975 6779, VOLUME 02, ISSUE 02, NOV 12 TO OCT 13 [12]. Ashwini s. Tadkal, Padmapriya Patil, DESIGN OF DUAL MASTER I2C BUS CONTROLLER IJRET, Volume: 03,Special Issue:03, May-2014 IV. CONCLUSION & FUTURE SCOPE I2C Single Master is successfully designed using Verilog, simulated in Modelsim and synthesized using Xilix. As the number of devices connected to a system is going to increase, there is a need for a system which supports multiple protocols. This project can be further extended to design for multiple masters. REFERENCES [1]. Samir Palnitkar, Verilog HDL A guide to Digital Design and Synthesis SunSoft Press,1996 [2]. Stuart Sutherland, Verilog HDL Quick Reference Guide, IEEE Std 1364-2001 [3]. M.Morris Mano, Digital Design EBSCO publishing Inc., 2002 [4]. Philips Semiconductor I2C Bus Specification, April 1995