Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
K. GANGADHARAN
Roll No: 11131D8106
M. Tech. in VLSI and Embedded Systems
Key Features
• Serial clock with programmable polarity and phase
• User programmable baud rate
• User defined SPI word length
4-Aug-19 CRC 4
SPI Master & Slave Interaction
4-Aug-19 CRC 6
SPI Slave architecture
4-Aug-19 CRC 7
User programmable baud rate
• The frequency of the clock is selected using spr2,spr1,spr0
• The various frequencies are generated using counter based
baud rate generator
• But more precise speed rates can be achieved using digital
frequency synthesizers
4-Aug-19 CRC 8
Clock phase & Clock polarity
• The Clock Polarity (CPOL) parameter indicates the level of the
clock signal when it is idle.
I. CPOL=0
Clock idle state is low.
II. CPOL=1
Clock idle state is high.
• The clock phase (CPHA) parameter indicates when the data should
be sampled.
I. CPHA=0
The first edge on the sclk line is used to sample the data bit
II. CPHA=1
The second edge on the sclk line is used to sample the data bit
4-Aug-19 CRC 9
Timing Diagram – Showing Clock
polarities and phases
4-Aug-19 CRC 10
Block diagram of the design
.
.
SCLK SCLK
.
MOSI MOSI
SPI Slave 1
MISO MISO
SPI Master SS
SS1
SS2
. . SCLK
.
SS3 MOSI
SS4 MISO
SPI Slave 2
SS
. . SCLK
. MOSI
MISO
SS
SPI Slave 3
SCLK
MOSI SPI Slave 4
MISO
SS
4-Aug-19 CRC 11
Simulation results of SPI Master
4-Aug-19 CRC 12
Simulation results of SPI Slave
4-Aug-19 CRC 13
Simulation results of SPI for
CPHA=0, CPOL=0
4-Aug-19 CRC 14
Simulation results of SPI for
CPHA=1, CPOL=0
4-Aug-19 CRC 15
Simulation results of SPI for
CPHA=0, CPOL=1
4-Aug-19 CRC 16
Simulation results of SPI for
CPHA=1, CPOL=1
4-Aug-19 CRC 17
Comparison of Occupied Slices
4-Aug-19 CRC 18
Comparison of Delays
4-Aug-19 CRC 19
Conclusion
• All the results, either for slice occupation or delays, are
obtained using the default options of the implementation
software (Xilinx ISE 9.1) with the selection of the fastest
speed grade for each FPGA device.
• From the above table, the clock to setup delay is low when
mapped onto Virte-5 device. So, a maximum transfer rate with
a utilization ratio of 2% can be obtained when mapped on to
Virte-5 FPGA device.
4-Aug-19 CRC 20
Future work
• Further improvements can be done, such as to integrate a
purely digital frequency synthesizer instead of the counter
based baud rate to allow a more precise user defined speed
rates.
4-Aug-19 CRC 21
References
[1] A.K. Oudjida, M.L. Berrandjia, A. Liacha, R. Tiar, K. Tahraoui, , “FPGA
Implementation of I2C and SPI Protocols: A Comparative Study”,
Proceedings of the 16th edition of the IEEE ICECS, pp. 507 -510,
December 13-16 2009, Yasmine Hammamet, Tunisia..
[2] A.K. Oudjida, M.L. Berrandjia, A. Liacha, R. Tiar, K. Tahraoui, Y.N
Alhoumays, “Design and test of general-purpose SPI Master/Slave IPs on
OPB bus”. 7th International Multi-Conference on Systems, Signals &
Devices,2010.
[3] Motorola Inc., “SPI Block Guide V03.06,” February 2003.
[4] F. Leens, “An Introduction to I2C and SPI Protocols,” IEEE
Instrumentation & Measurement Magazine, pp. 8-13, February 2009.
[5] Charles H. Roth, Jr. Digital Systems Design Using VHDL, PWS
Publishing Company, Bostan, 1998
4-Aug-19 CRC 22
Queries..?
4-Aug-19 CRC 23
Thank you
4-Aug-19 CRC 24