LOW POWER DESIGN OF SPI AND I2C PROTOCOL IN VERILOG HDL
DOI:
https://doi.org/10.55766/sujst7904Keywords:
Clock Gating Technique, I2C, Internal Protocols, SPIAbstract
A method for sharing data between a slave and a master is the SPI (Serial Peripheral Interface). The result of this paper explores a high-speed SPI configuration that utilizes clock gating, drawing inspiration from Motorola’s manual and is implemented in Xilinx’s Virtex 5 FPGA using Verilog 2001. It covers design strategies for managing the SPI bus, including handling multiple slave devices. The document also explores an I2C (Inter-Integrated Circuit) single master with a bidirectional data line, supporting multiple masters and efficient communication between devices. The I2C master can transfer numerous bytes of data, controlled through a start signal and slave address. The design is in Verilog, simulated with Xilinx Vivado, and is parameterized for flexibility. The goal is to provide a deep understanding of SPI and I2C protocols, their applications, and implementation in FPGA devices, along with insights into their design and simulation process.
References
Anand, N., and Joseph, G. (2014). Design and implementation of a high-speed Serial Peripheral Interface. Proceedings of the International Conference on Advances in Electrical Engineering (ICAEE), p. 1-3. https://doi.org/10.1109/ICAEE.2014.6838431
Chen, J., and Huang, S. (2023). Analysis and comparison of UART, SPI, and I2C. Proceedings of the IEEE 2nd International Conference on Electrical Engineering, Big Data and Algorithms (EEBDA), Changchun, China, p. 272-276. https://doi.org/10.1109/EEBDA56825.2023.10090677
Chen, S.L., Chi, C.C., Lin, Y.T., and Wu, H.C. (2020). A novel low-power synchronous preamble data line chip design for oscillator control interface. Electronics, 9:1509. https://doi.org/10.3390/electronics9091509
Chindhu, T. S., and Shanmugasundaram, N. (2018). Clock gating techniques: An overview. Proceedings of the Conference on Emerging Devices and Smart Systems (ICEDSS), p. 217-221. https://doi.org/10.1109/ICEDSS.2018.8544281
Ghuse, M., Jadhav, M., Badole, C., and Pathan, A. (2016). FPGA implementation of I2C and SPI protocols using VHDL. IJSART, 2(1).
Khanna, N., and Mishra, D.K. (2018). Clock gated 16-bit ALU design & implementation on FPGA. Proceedings of the 4th International Conference for Convergence in Technology (I2CT), Mangalore, India, p. 1-5. https://doi.org/10.1109/I2CT42659.2018.9057910
Mehrotra, S., and Charaya, N. (2015). Design and implementation of I2C single master on FPGA using Verilog. Progress in Science and Engineering Research Journal, 3(1):1-5.
Oruganti, D.N., and Yellampalli, S.S. (2014). Design of power efficient SPI interface. Proceedings of the International Conference on Advances in Computing, Communications and Informatics (ICACCI), p. 2602-2606. https://doi.org/10.1109/ICACCI.2014.6968350
Oudjida, A.K., Berrandjia, M.L., Tiar, R., Liacha, A., and Tahraui, K. (2009). FPGA implementation of I2C and SPI protocols: A comparative study. IEEE Conference, p. 1-6. https://doi.org/10.1109/ICECS.2009.5410881
Palnitkar, S. (2003). Verilog HDL: A guide to digital design and synthesis (Vol. 1).
Qiang, J., Jiayi, L., Yuming, H., and Xiaoyang, S. (2020). FPGA implementation of SPI bus communication based on state machine method. Journal of Physics: Conference Series, 1449(1). https://doi.org/10.1088/1742-6596/1449/1/012027
Srivatsava, G.S.R., and Singh, P. (2015). Dynamic power reduction through clock gating technique for low power memory applications. Proceedings of the International Conference on Electrical, Computer, and Communication Technologies (ICECCT), p. 1-6. https://doi.org/10.1109/ICECCT.2015.7226204
Vatte, M. (2021). Power optimization in configurable ALU using blend of techniques. Proceedings of the 2nd International Conference for Emerging Technology (INCET), p. 1-5. https://doi.org/10.1109/INCET51464.2021.9456346
Zidar, J., Aleksi, I., and Matić, T. (2023). Analysis of energy consumption for SPI and I2C communications in ultra-low power embedded systems. Proceedings of the 46th MIPRO ICT and Electronics Convention (MIPRO), Opatija, Croatia, p. 213-217. https://doi.org/10.23919/MIPRO57284.2023.10159889








