Industrial Application of The Serial Peripheral Interface Protocol On Field Programmable Gate Arrays
Industrial Application of The Serial Peripheral Interface Protocol On Field Programmable Gate Arrays
Industrial Application of The Serial Peripheral Interface Protocol On Field Programmable Gate Arrays
Abstract— The Uni versal Asynchronous Recei ver components, including sensors, actuators, and control units.
Transmitter UART, Serial Peripheral Interface (SPI), Serial co mmunication protocols serve as the fundamental
and Inter -Integrated Circuit (I2 C) are wi del y utilized framework for transmitting data over considerable distances,
hardware communication protocols. The process of facilitating the smooth integration and coordination of
selecting one option from a set of alternati ves may numerous devices. The employment of FPGA technology
provi de di fficulties owing to the uni que benefits and facilitates the simultaneous explo itation of many
drawbacks connec ted wi th each choice. This article is a communicat ion protocols within a single device, hence
thorough examinati on of the three protocols, wi th a providing significant benefits across a wide range of
detailed expl anati on of their elements, functi ons, and industrial applicat ions [2]. This article aims to evaluate and
potenti al advantages and disadvantages. After doing a analyze several p rotocols to ascertain their suitability fo r
comparison i nvestigati on of the transmission ranges, it implementation in industrial environ ments. Specifically, the
becomes apparent that the modern SPI protocol comparison and contras t will focus on key factors such as
demonstrates a greater degree of superiority. The UART data rates, range limitations, noise immunity, and
protocol demonstrates enhanced reliability in scalability.
performance, however, the SPI protocol provi des greater
di versity i n terms of communication options wi th fewer II. LITERATURE REVIEW
resources. In the context of power consumption, it can be To facilitate efficient communication between two
observed that UART has superior performance electronic devices, it must adhere to a common protocol.
compared to the other two protocols. This study ai ms to Protocols serve as the official terminology for these
offer a fresh and uni que viewpoint on the i mportance of prescribed compilations of regulations. The process of
design. transmitting data ensures the maintenance of data integrity
[3]. The UA RT is a popular choice for serial data transfer.
Keywords—Serial Communicati on Protocols,
Both the UART Sender and the UART Receiver are crucial
Uni versal Asynchronous Recei ver Transmi tter, Serial
parts of the system. Shift register, odd/even parity generator,
Peripheral Interface , Inter-Integrated Circuit, Fiel d finite state machine (FSM), and several auxiliary blocks are
Programmable Gate Array.
only some of the important parts of a UART's transmitter
module. Since the baud rate generators in the transmitter and
I. INT RODUCT ION receiver are identical, it follows that the baud rate (also
known as the baud clock) will be stable between the two
The achievement of effective and reliable data devices. The maximu m length of a data frame transmitted
transmission between electronic equip ment in many over the UART is 11 bits. The concept of odd parity is used
industrial applications is unfeasible without the presence of in this investigation[4]. The transmission protocol is
serial co mmunicat ion standards. The utilization of s field composed of a solitary start bit, succeeded by eight data bits,
Programmab le Gate Array (FPGAs) as platfo rms for the one parity bit for parity indication, and a closing stop bit to
construction of serial co mmun ication interfaces has been denote the termination of the transmission. When the input
demonstrated, owing to its inherent adaptability, remarkab le system clock operates at a frequency of 64 M Hz, the
performance, and configurability [1]. Th is study investigates resulting baud rate at the output is 4 Mbps. Verilog HDL is
and evaluates various serial co mmun ication protocols often widely regarded as the preferred language for the
emp loyed in industrial environ ments and implemented on development and verification of UART. The Vivado 2020
FPGA. In industrial settings, the establishment of efficient software developed by Xilin x is utilized to simulate and
and dependable commun ication networks is vital to synthesize UART capabilities. The Zed FPGA board is
facilitate the interconnection of diverse equipment widely acknowledged as the most optimal choice for UART
synthesis, garnering recognition in both educational and accompanied by suitable circumstances. The analysis
professional settings. When properly configured, the board commences by doing a thorough examination of the
can be utilized in setups linked to the Internet of Things structural and functional elements of the three discrete serial
(IoT) [5]. interface types [9-10]. The implementation of a multi-
A UART consists of three primary constituents: a function serial interface on the FPGA platform has the
transmitting unit, a receiving unit, and a baud rate generator. potential to substantially reduce hardware requirements by a
UART chips are extensively utilized within the industrial factor of three as compared to the utilization of three separate
sector. The UART possesses the capability to establish serial co mmunication interfaces. The user's writing lacks
communication links with both FPGA and Microcontrollers sufficient information or context to be rewritten
(MCUs). The study encompasses many application domains, academically.
namely the military forces, medical sector, communications
industry, and industrial control systems. In contrast to the III. SERIAL COMMUNICATION
SPI, which has faced ongoing restrictions arising fro m load PROTOCOL
capacitors despite extensive refinement efforts over the
A. UART
years, UART technology presents several advantages in
terms of cost-effectiveness, stability, and dependability. The UA RT is a co mmunicat ion protocol that enables the
Nevertheless, a considerable amount of untapped potential transmission and receipt of data at variable speeds. To
remains. Subsequent research endeavors could perhaps achieve precise synchronization, a method known as
exp lore the underlying factors contributing to the relative sequential transmission is employed, wherein data bits are
inferiority of UART in comparison to alternative serial ports transmitted in a specific sequence, progressing from the
[6]. least significant bit (LSB) to the most significant bit (MSB).
Within the given context, the abbreviation "I2C" The regulation of voltages for UA RT signals is
denotes the expanded term "Inter-Integrated Circuit." The accomplished by the utilization of a dedicated driver circu it.
credit for the development of the serial bus protocol is Frequently, in the realm of debugging, connections of a
commonly assigned to Philips Semiconductor. The I2C bus shorter kind are established, emp loying widely utilized
is extensively utilized in various applications due to its signal levels such as RS-232, RS-485, and raw TTL. The
inherent simplicity. The I2C protocol is employed by s initial versions of teletypewriters emp loyed current loops as
(CPUs) to establish communication with peripheral devices a mechanism for functioning as presented in Figure 1.
operating at low speeds. This technique enables efficient
communication across devices with varying processing
speeds while guaranteeing the integrity and retention of all
transmitted data. The I2C bus controller functions as the
intermed iate between the master and slave devices. The I2C
bus, implemented on an FPGA, is widely regarded as a
comparatively simpler bus architecture. This is mostly due to
its utilization of only two wires and a decreased number of
pin connections [7].
The primary focus of the development process [8]
for the master controller revolved around the utilization of
the I2C protocol. When connected to a computer or CPU,
this controller possesses the capacity to comprehend
instructions presented in the 8-b it I2C format. After
comprehending the instructions, they are transformed to
assure adherence to the SPI standard. To enable the Fig.1 Basic Transmitter and Receiver System
sequential transfer of data, a register with a length of 32 bits
is configured to conform to the established specifications of
the SPI. The emulation of the VHDL-based module can be The lack of a centralized clock signal is ascribed to the
efficiently achieved by utilizing the Model SIM program. In asynchronous nature of its operation. On the other hand, the
addition, the synthesis technique employed in Xilin x XST transmission protocol utilizes start and stop bits as a means
12.1 integrates enhancements on power consumption and of encapsulating the transmitted data. In the context of data
area utilization. The aforementioned methodology exhibits frames, it is customary for a low-level start bit to precede
extensive versatility in scenarios wherein a CPU requires each frame, which is then followed by one or more high -
interaction with an SPI device. The aforementioned level stop bits. The potential benefits of incorporating an
component acts in a reverse fashion, serving as a subordinate additional parity bit inside the UART protocol lie in its
to the CPU while assuming a superior position over the SPI ability to facilitate error detection [11]. To ensure efficient
device. The probability of experiencing data loss is low as a communication, all devices must maintain consistent baud
result of the optimization of the design to accommodate the rates, as this factor directly impacts the transmission speed.
slower transfer rate of the SPI device. Numerous The default configuration of the UART is half-duplex,
communication protocols have been developed to facilitate allowing for the transfer of data in both directions. The
the transport of data using universal serial communication necessity for device compatibility arises due to the
interfaces. Every individual needs to be positioned within a utilization of discrete voltage levels to symbolize logic 0
conducive atmosphere that fosters respect and is and logic 1.
Table 1. Performance Comparison of SPI, UART, I2C Table 2. Resource utilization of Protocols
SPI vs UART vs I2C Number Number The Number FPGA
of Slice of Slice number of LUT
Aspect SPI UART I2C registers LUTs used as Flip
Asynchronous Synchronous Synchronous logic Flops
Pairs
Protocol Serial Serial Serial used
Type Communication Communication Communication Shantha 356 547 98 230 Spartan
Selva 6
Master, Slave,
Kumari[4]
Transmitter, Serial Data
Jai Karan 460 398 102 378 Virterx
Key Receiver, Baud Master, Slave, Line (SDA), Singh[5] 5
Components Rate Generator Shift Registers Clock (SCL) 320 430 190 496 Spartan
Xingchun 6
1 Start Bit, 8 Variable Data Liu[6]
Data Bits, 1 Variable Data Bits, Proposed 120 145 93 148 Spartan6
Data Frame Parity Bit, 1 Bits, No Parity, Acknowledge SPI
More Multi-Master
Basic Error Advanced Error Bus,
Data Checking Checking Arbitration for
Integrity (Parity Bit) (CRC) Data Collision