Font Size: a A A

Design And Implementation Of SPI Protocol Interface

Posted on:2021-08-06Degree:MasterType:Thesis
Country:ChinaCandidate:M LiuFull Text:PDF
GTID:2518306050468584Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
SPI is the abbreviation of Serial Peripheral Interface.It is a synchronous serial interface technology introduced by Motorola.It is a high-speed,full-duplex,synchronous communication bus.It has the advantages of fewer pins,simple communication,and fast data transmission rate,and is widely used in a large number of devices.The SPI interface is also often used in So C systems.It is a peripheral function type module with a very high frequency.However,in the SPI protocol requirements,there is no specified flow control signal,so it is easy to cause data loss during data transmission.Therefore,it is particularly important to improve the design of the SPI interface.Based on the premise of following the basic protocol and timing of SPI,this paper improves the design,which can increase the reliability of communication between SPI interface and peripheral devices,and reduce the burden on software.This topic originates from enterprise projects,and mainly focuses on the design and verification of the SPI protocol interface.Based on a thorough understanding of the basic timing and working principle of the SPI protocol,I used Verilog HDL language to complete the following functional design: 8-bit / 16-bit frame transmission format selection,programmable data sequence(MSB first or LSB in Front)and programmable CRC check.The SPI interface designed this time supports single-byte and double-byte data frame transmission,which makes this interface have greater flexibility;two programming sequences with big and little-endian modes can be selected,making it suitable for different architectures.The chip has good adaptability;at the same time,a transformable CRC generator polynomial is used to further ensure the correctness of data transmission.The SPI interface designed in this article has the above-mentioned multiple functions.It is verified that the timing is consistent with the design requirements.The various modes can be switched normally,and the data transmission is complete.The design goal is achieved.In order to speed up the design of SPI,this paper chooses UVM verification methodologies as the basis of the design platform,and uses System Verilog language to build a verification platform to verify the above functional points in detail.First,the main architecture of the verification platform is summarized according to the design characteristics of the SPI.Then the components of the platform,such as drivers,monitors, and register models,are designed.Then test cases are constructed and incentives are generated.Finally,the structure of the verification platform is optimized.In this verification platform,two copies of the design under test are instantiated at the top of the environment,acting as master and slave,respectively,to implement the operation of receiving and sending data.The virtual interface is used to complete the synchronization of multiple incentives to enable the verification platform.The configuration of registers and the sending of data packets can be performed at the same time;a constrained randomization test is used,and the function of injecting abnormal stimulus is added to achieve the completeness of the verification process.This article adds code coverage options to the compilation script to complete the coverage test on the verification platform.Coverage statistics: The code coverage of each module reached over 98%,which met the verification requirements.The verification platform designed in this paper uses UVM verification methodologies to some extent to make up for the lack of maintenance and poor reusability of traditional verification platforms.It has certain reference significance for future research on SPI interface verification.Based on an in-depth analysis of the working principle of the SPI interface,this article completes the design of the designated function points according to the requirements of the design document.With the support of Synopsys' VCS software environment,using System Verilog language and UVM methodologies,a structured platform that can be used for SPI interface IP core verification was established.The platform realized the verification of the extracted function points and completed the code Coverage and feature coverage statistics.Through the research on the design and verification of the SPI protocol interface in this subject,the reliability of the SPI interface when communicating with peripheral devices is increased,and it also provides a technical reference for building an efficient SPI interface verification platform in the future.
Keywords/Search Tags:Universal Verification Methodology, Verification Platform, Serial Peripheral Interface, Coverage
PDF Full Text Request
Related items