A verification platform and verification method of SPI interface storage unit controller based on UVM

By designing a verification platform for UVM-based spi interface storage unit controller, the problems of insufficient verification complexity and reusability in the prior art are solved, and efficient and flexible verification capabilities are achieved.

CN114239478BActive Publication Date: 2025-02-11TIH MICROELECTRONIC TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111527046.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-02-11
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively verify complex spi interface memory cell controllers, especially when facing different modes and technology updates, verification work efficiency and poor reusability.

Method used

Design a verification platform for UVM-based spi interface storage unit controller, which realizes single-line, four-wire and eight-wire mode verification through the combination of constraint modules, proxy modules and reference models, and supports bus replacement, update and mixed use. .

Benefits of technology

It realizes efficient verification of the spi interface storage unit controller, improves the work efficiency and reusability of verification, and can flexibly respond to the needs of technology updates and different modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239478B_ABST
    Figure CN114239478B_ABST
Patent Text Reader

Abstract

A verification platform for a SPI interface storage unit controller based on UVM is divided into different verification stimuli according to single-line, four-line and eight-line modes and different AHB, AXI buses and command and XIP access modes, which can realize the calling of different working modes and the use of mixed modes; when the SPI interface storage unit controller has a design update, faster and better transplantation and reuse can also be realized. The present invention adopts independently encapsulated amba axi write channel proxy module, amba axi read channel proxy module and amba ahb proxy module, so that it can be widely used in other module verification platforms with such protocols, reduce debugging workload, save development cycle, and also can flexibly and conveniently realize the replacement of the current verification platform bus interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a verification platform and a verification method of a SPI interface storage unit controller based on UVM, belonging to the technical field of security chips. Background Art

[0002] As chip scale increases and data transmission rate requirements increase, the transmission rate requirements for externally mounted storage units are also increasing. In order to increase the data transmission rate between the storage unit and the chip system, it is necessary to update the iterative operation mode so that it can be used in different working scenarios.

[0003] When the chip system communicates with the external storage unit, it usually uses the internal controller to directly convert the on-chip signal into a signal output that conforms to the external storage protocol. Currently, the commonly used storage units with SPI interfaces, such as SPI flash and PSRAM, basically support single-line, four-line and eight-line modes; the eight-line mode is considered a relatively advanced module. In order to improve the transmission rate between the on-chip system and the storage unit, the corresponding controller needs to add new functional units to support different command parsing and transmission modes. At the same time, based on different transmission mode selections, there are also different commands, different signal timings and the highest frequency requirements that can be supported, which will cause the functions of the internal controller to become complicated and diversified. At the same time, the combination of commands and modes that need to be covered in the verification of the controller is also relatively large, and a large number of verification cases need to be constructed. However, the traditional verification adopts an overall verification method, which cannot better perform differentiated verification for various modes. When facing the addition of new functions, the portability and reusability are poor.

[0004] In summary, in response to the chip system's demand for increased data transmission rates of external storage units, the on-chip controller needs to be more compatible with external storage unit protocols. This leads to increasingly complex controller functions and an increased verification workload. At the same time, once new technical standards are updated in the later stage, verification will also require iterations of new functions.

[0005] Therefore, the development of a verification platform for a SPI interface storage unit controller (hereinafter referred to as the verified module) proposes a method for performing single verification according to different modes, so as to achieve high reusability in the face of technology updates and improve the efficiency of verification, which has become a technical content of concern in this technical field. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention discloses a verification platform for a SPI interface storage unit controller based on UVM.

[0007] The invention also discloses a verification method for the verification platform. Summary of the invention:

[0009] The present invention is divided into different verification stimuli according to the single-wire, four-wire and eight-wire modes and the different AHB, AXI buses and command and Xip access modes, which can realize the calling of different working modes and the use of mixed modes; when the SPI interface storage unit controller has a design update, it can also achieve faster and better transplantation and reuse.

[0010] The detailed technical scheme of the present invention is as follows:

[0011] A verification platform for a SPI interface storage unit controller based on UVM, characterized in that it comprises: a constraint module, an agent module and a reference model; the agent module is respectively connected to the reference model and the verified module, and is connected to a flash module and a psram module through the verified module;

[0012] The agent module adopts independent amba axi write channel agent module, amba axi read channel agent module and amba ahb agent module. This design adopts independent axi_write_agent, axi_read_agent and ahb_agent encapsulation, so that it can more flexibly realize the replacement, update and mixed use of the bus;

[0013] The constraint module is used to construct an operation function according to the single-line, four-line and eight-line modes, i.e., constraint construction. The constraint construction divides the functional verification of the verified module (interface storage unit controller) in advance to realize the divided mode communication of the external storage unit, and can perform directional single mode communication or mixed mode switching communication;

[0014] The constraint module is also used to select the command port (slave end interface of ahb) or xip (Direct Address Mapped Read) operation (salve end interface of axi) for communication, which can quickly realize the transplantation of specific functions and better realize multiplexing when replacing the bus or updating the controller function.

[0015] Preferably, according to the present invention, the constraint module includes a constraint module for axi signals and a constraint module for ahb signals;

[0016] The amba axi write channel proxy module is used to send write control signals and write data in accordance with the axi protocol; the amba axi read channel proxy module is used to send read control signals and receive read data in accordance with the axi protocol; the ambaahb proxy module is used to send read and write control signals and receive and send read and write data in accordance with the ahb protocol;

[0017] The reference model is used to simulate the data transmission between the verified module (interface storage unit controller) and the flash and psram, by building corresponding memories for different communication peripherals, recording corresponding read and write data, and realizing the comparison between the simulated transmission data and the actual transmission data with the external device;

[0018] The constraint module for axi signals is connected to the amba axi write channel proxy module and the amba axi read channel proxy module respectively; the constraint module for ahb signals is connected to the amba ahb proxy module.

[0019] A verification method for the above verification platform, characterized by comprising:

[0020] 1) Establish amba axi write channel proxy module, amba axi read channel proxy module and amba ahb proxy module: according to the corresponding AMBA bus protocol timing requirements, generate corresponding write control signals, write data, read control signals, and output them to the verified module according to the constraints of the constraint module to realize the configuration and reading and writing of the verified module;

[0021] 2) The constraint module performs configuration constraints and functional constraints

[0022] In the constraint module, configuration constraints for AHB and AXI are constructed respectively, including different burst (batch transmission type), len (transmission length), size (data bit width), addr (address), data_cnt (total amount of data transmitted); by calling the configuration constraints, different types of functional constraints are constructed, including the constraint function of erasing flash, the constraint function of writing flash, the constraint function of reading flash, the constraint function of configuring the internal mode of falsh, the write enable constraint function and the constraint function of reading the internal state of flash; the functional constraints are combined in different ways according to the types of single-line, four-line single-edge data sampling, four-line double-edge data sampling, eight-line single-edge data sampling and eight-line double-edge data sampling; according to the two communication operations of command and xip, an indefinite number of input control signals are reserved in combination with each functional function to configure the starting address, data volume, transmission frequency, external storage unit type (flash or psram), external chip select signal, transmission dummy_cycle, current mode selection command and corresponding special timing requirements of the transmission;

[0023] 3) Method of calling functional constraint function

[0024] 3-1) If ahb is currently used as the bus carried by the controller, the constraint function in the constraint module of the ahb signal is called;

[0025] When using the command port mode, configure the total amount of data to be read and written; when using the xip operation mode, there is no need to configure the total amount of data to be read and written;

[0026] The call constraint function implements the signal constraint through the amba ahb proxy module, generates a signal that complies with the ahb timing and outputs it to the verified module, which is converted into a signal that complies with the external storage unit type protocol by the verified module, communicates with the external storage unit type, and implements the configuration, erasure, or reading and writing of the external storage unit type;

[0027] The amba ahb proxy module simultaneously outputs a signal to transmit to the reference model, and the reference model records the control information and writes data according to the received signal;

[0028] The data read from the external storage unit via the verified module is transmitted to the reference model through the amba ahb proxy module. The reference model compares the data at the corresponding address of the memory with the received data based on the recorded control information to verify the correctness of the behavior of the verified module.

[0029] 3-2) If axi is currently used as the bus carried by the controller, the functional function in the constraint module of the axi signal is called. The operation principle of the steps is the same as step 3-1);

[0030] 3-3) If another type of bus is currently needed, you only need to add the configuration class function of the new bus. When the same function name is used, the above functional function can be reused without having to be built again.

[0031] Preferably, according to the present invention, the verification method performed by the verification platform also includes a mode switching method for realizing mode switching between single-wire, four-wire and eight-wire by using functional functions; and also for mode switching between command port and xip operation.

[0032] Preferably, according to the present invention, the verification method of the verification platform further comprises: realizing that the external storage unit supports multiple modes by calling a function;

[0033] It also includes: when the external storage unit updates the technology and mode, a new functional function is generated by calling the configuration class function to iterate the new function.

[0034] The technical advantages of the present invention are:

[0035] 1. The present invention adopts independently encapsulated amba axi write channel proxy module, amba axi read channel proxy module and amba ahb proxy module, so that it can be widely used in other module verification platforms with this protocol, reducing debugging workload, saving development cycle, and also can flexibly and conveniently realize the replacement of the current verification platform bus interface.

[0036] 2. The present invention adopts independent configuration constraints, which increases the possibility of randomness and makes function calls more convenient and clear.

[0037] 3. The present invention encapsulates independent functional constraint functions according to different modes and commands of external storage units, with clear functions, flexible calling, and strong reusability, portability and iterativeness. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic diagram of the verification platform of the present invention;

[0039] exist Figure 1 middle,

[0040] AXI: Advanced eXtensible Interface, advanced extensible interface;

[0041] AHB: Advanced High Performance Bus, advanced high performance peripheral bus;

[0042] SPI:Serial Peripheral Interface;

[0043] axi_operate: a constraint module for axi signals, used to generate constraints on axi signals and build operation functions according to single-line, four-line and eight-line modes;

[0044] ahb_operate: AHB signal constraint module, used to generate constraints on AHB signals and build operation functions according to single-wire, four-wire and eight-wire modes;

[0045] axi_write_agent: amba axi write channel agent module, sending write control signals and write data that conform to the axi protocol;

[0046] axi_read_agent: amba axi read channel agent module, sends read control signals and receives read data in accordance with the axi protocol;

[0047] ahb_agent: amba ahb agent module, sends read and write control signals and receives and sends read and write data in accordance with the ahb protocol;

[0048] reference: reference model, build memory for different peripherals, record control information and read and write data, and compare the controller's read and write flash and psram data;

[0049] spi_mem_ctrl: verified module, spi interface storage unit controller;

[0050] Flash: Flash module, also known as flash memory, is a non-volatile memory;

[0051] psram: psram module, Pseudo static random access memory pseudo static random access memory. DETAILED DESCRIPTION

[0052] The present invention will be described in detail below with reference to the embodiments and the accompanying drawings, but is not limited thereto.

[0053] like Figure 1 As shown. The functions of axi_operate and ahb_operate are: constrain the signals of ahb and axi according to different working modes and access ports, and build constraint functions of different functions, output to axi_write_agent, axi_read_agent and ahb_agent, and generate signal groups that conform to axi and ahb through these three agents, output to the controller (spi_mem_ctrl) and reference model (reference) that need to be verified, and finally convert and generate signal groups for external test models flash or psram through the controller. The reference model part records some control signals, records write data and compares read data.

[0054] A verification platform for a SPI interface storage unit controller based on UVM, comprising: a constraint module, an agent module and a reference model; the agent module is respectively connected to the reference model and a verified module, and is connected to a flash module and a psram module through the verified module;

[0055] The agent module adopts independent amba axi write channel agent module, amba axi read channel agent module and amba ahb agent module. This design adopts independent axi_write_agent, axi_read_agent and ahb_agent encapsulation, so that it can more flexibly realize the replacement, update and mixed use of the bus;

[0056] The constraint module is used to construct an operation function according to the single-line, four-line and eight-line modes, i.e., constraint construction. The constraint construction divides the functional verification of the verified module (interface storage unit controller) in advance to realize the divided mode communication of the external storage unit, and can perform directional single mode communication or mixed mode switching communication;

[0057] The constraint module is also used to select the command port (slave end interface of ahb) or xip (Direct Address Mapped Read) operation (salve end interface of axi) for communication, which can quickly realize the transplantation of specific functions and better realize multiplexing when replacing the bus or updating the controller function.

[0058] The constraint module includes a constraint module for axi signals and a constraint module for ahb signals;

[0059] The amba axi write channel proxy module is used to send write control signals and write data in accordance with the axi protocol; the amba axi read channel proxy module is used to send read control signals and receive read data in accordance with the axi protocol; the ambaahb proxy module is used to send read and write control signals and receive and send read and write data in accordance with the ahb protocol;

[0060] The reference model is used to simulate the data transmission between the verified module (interface storage unit controller) and the flash and psram, by building corresponding memories for different communication peripherals, recording corresponding read and write data, and realizing the comparison between the simulated transmission data and the actual transmission data with the external device;

[0061] The constraint module for axi signals is connected to the amba axi write channel proxy module and the amba axi read channel proxy module respectively; the constraint module for ahb signals is connected to the amba ahb proxy module.

[0062] Embodiment 2,

[0063] A method for performing verification on the verification platform as described in Embodiment 1, comprising:

[0064] 1) Establish amba axi write channel proxy module, amba axi read channel proxy module and amba ahb proxy module: according to the corresponding AMBA bus protocol timing requirements, generate corresponding write control signals, write data, read control signals, and output them to the verified module according to the constraints of the constraint module to realize the configuration and reading and writing of the verified module;

[0065] 2) The constraint module performs configuration constraints and functional constraints

[0066] In the constraint module, configuration constraints for AHB and AXI are constructed respectively, including different burst (batch transmission type), len (transmission length), size (data bit width), addr (address), data_cnt (total amount of data transmitted); by calling the configuration constraints, different types of functional constraints are constructed, including the constraint function of erasing flash, the constraint function of writing flash, the constraint function of reading flash, the constraint function of configuring the internal mode of falsh, the write enable constraint function and the constraint function of reading the internal state of flash; the functional constraints are combined in different ways according to the types of single-line, four-line single-edge data sampling, four-line double-edge data sampling, eight-line single-edge data sampling and eight-line double-edge data sampling; according to the two communication operations of command and xip, an indefinite number of input control signals are reserved in combination with each functional function to configure the starting address, data volume, transmission frequency, external storage unit type (flash or psram), external chip select signal, transmission dummy_cycle, current mode selection command and corresponding special timing requirements of the transmission;

[0067] In this embodiment, in ahb_operate and axi_operate, different ahb and axi configuration class constraints are constructed respectively, including different burst (batch transmission type), len (transmission length), size (data bit width), addr (address), data_cnt (total amount of data transmitted); by calling the configuration class constraints, different types of functional constraints are constructed: 1) Constraint function for erasing flash, 2) Constraint function for writing flash, 3) Constraint function for reading flash, 4) Constraint function for configuring falsh internal mode, 5) Write enable constraint function, 6) Constraint function for reading flash internal state. The above functional constraint functions are constructed differently according to the types of single-line, four-line single-edge data sampling, four-line double-edge data sampling, eight-line single-edge data sampling, and eight-line double-edge data sampling, and the two communication operations of command and xip are distinguished. Each functional function retains an indefinite number of input control signals, and can flexibly configure the amount of data transmitted, the transmission frequency, the type of external storage unit (flash or psram), the command selected in the current mode, and the corresponding special timing requirements;

[0068] 3) Method of calling functional constraint function

[0069] 3-1) If ahb is currently used as the bus carried by the controller, the constraint function in the constraint module of the ahb signal is called;

[0070] When using the command port mode, configure the total amount of data to be read and written; when using the xip operation mode, there is no need to configure the total amount of data to be read and written;

[0071] By implementing signal constraints in the AMBA AHB proxy module, a signal that complies with the AHB timing is generated and output to the verified module, which is converted into a signal that complies with the external storage unit type protocol by the verified module, and communicates with the external storage unit type to implement configuration, erasure, or reading and writing of the external storage unit type;

[0072] The amba ahb proxy module simultaneously outputs a signal to transmit to the reference model, and the reference model records the control information and writes data according to the received signal;

[0073] The data read from the external storage unit via the verified module is transmitted to the reference model through the amba ahb proxy module. The reference model compares the data at the corresponding address of the memory with the received data based on the recorded control information to verify the correctness of the behavior of the verified module.

[0074] 3-2) If axi is currently used as the bus carried by the controller, the functional function in the constraint module of the axi signal is called. The operation principle of the steps is the same as step 3-1);

[0075] 3-3) If another type of bus is currently needed, you only need to add the configuration class function of the new bus. When the same function name is used, the above functional function can be reused without having to be built again.

[0076] This embodiment takes communication with the flash module as an example:

[0077] If ahb is currently used as the bus for the controller, the functional constraint function constructed in ahb_operate is called. When the command method is used, the total amount of data to be read and written needs to be configured, but the xip method does not require it. By calling the corresponding function, the signal constraints can be implemented in ahb_agent, and the signals that meet the ahb timing are generated and output to the spi_mem_ctrl controller. The controller converts the signals into signals that meet the flash protocol, communicates with the flash, and implements the configuration, erasure, or reading and writing of the flash. ahb_agent will also output signals to the reference model reference, and reference will record the control information and write data according to the received signals. The data read back from the flash through the spi_mem_ctrl controller will be transmitted to reference through ahb_agent. Reference will compare the data at the corresponding address of the memory with the received data based on the recorded control information to verify the correctness of the controller behavior.

[0078] If axi is currently used as the bus carried by the controller, the functional function in axi_operate can be called. The specific operation is similar to step 3-1).

[0079] If another type of bus is needed, you only need to add a configuration function for the new bus and use the same function name. The above functional function can be reused without having to be built again.

[0080] Embodiment 3,

[0081] The verification method of the verification platform as described in Example 2 also includes a mode switching method, which is used to implement mode switching between single-line, four-line and eight-line by using functional functions; and is also used for mode switching between command port and xip operation.

[0082] Embodiment 4,

[0083] The verification method of the verification platform as described in embodiments 2 and 3 further includes: enabling the external storage unit to support multiple modes by calling a function function;

[0084] It also includes: when the external storage unit updates the technology and mode, a new functional function is generated by calling the configuration class function to iterate the new function.

[0085] In this embodiment, if the mounted flash supports limited modes, the function call can be selectively performed; if the flash updates the technology and mode, the configuration type function can also be called to generate a new functional type function to iterate the new function.

Claims

1. A verification platform for a spi interface storage unit controller based on UVM, characterized in that, include: Constraint module, proxy module and reference model; the proxy module is connected to the reference model and the verified module respectively, and is connected to the flash module and the psram module through the verified module; The agent module adopts independent amba axi write channel agent module, amba axi read channel agent module and ambaahb agent module. This design adopts independent axi_write_agent, axi_read_agent and ahb_agent encapsulation; The constraint module is used to construct the operation function according to the single-line, four-line and eight-line modes, that is, constraint construction; The constraint module is also used to select the command port or xip operation for communication; The constraint module includes a constraint module for axi signals and a constraint module for ahb signals; The amba axi write channel proxy module is used to send write control signals and write data in accordance with the axi protocol; the amba axi read channel proxy module is used to send read control signals and receive read data in accordance with the axi protocol; the ambaahb proxy module is used to send read and write control signals and receive read and write data in accordance with the ahb protocol; The reference model is used to simulate the data transmission between the verified module and the flash and psram, by building corresponding memories for different communication peripherals, recording corresponding read and write data, and realizing the comparison between the simulated transmission data and the actual external device transmission data; The constraint module for axi signals is connected to the amba axi write channel proxy module and the amba axi read channel proxy module respectively; the constraint module for ahb signals is connected to the amba ahb proxy module.

2. A method for performing verification according to the verification platform of claim 1, characterized in that: include: 1) Establish amba axi write channel proxy module, amba axi read channel proxy module and amba ahb proxy module: according to the corresponding AMBA bus protocol timing requirements, generate corresponding write control signals, write data, read control signals, and output them to the verified module according to the constraints of the constraint module to realize the configuration and reading and writing of the verified module; 2) The constraint module performs configuration constraints and functional constraints In the constraint module, configuration class constraints for AHB and AXI are constructed respectively; by calling the configuration class constraints, different types of functional constraints are constructed, including the constraint function of erasing flash, the constraint function of writing flash, the constraint function of reading flash, the constraint function of configuring the internal mode of falsh, the write enable constraint function and the constraint function of reading the internal state of flash; the functional constraints are combined in different ways according to the types of single-line, four-line single-edge data sampling, four-line double-edge data sampling, eight-line single-edge data sampling and eight-line double-edge data sampling; according to the two communication operations of command and xip, an indefinite number of input control signals are reserved in combination with each functional function to configure the starting address, data volume, transmission frequency, external storage unit type (flash or psram), external chip select signal, transmission dummy_cycle, current mode selection command and corresponding special timing requirements of the transmission; 3) Method of calling functional constraint function 3-1) If ahb is currently used as the bus, the constraint function in the constraint module for the ahb signal is called; When using the command port mode, configure the total amount of data to be read and written; when using the xip operation mode, there is no need to configure the total amount of data to be read and written; By implementing signal constraints in the AMBA AHB proxy module, a signal that complies with the AHB timing is generated and output to the verified module, which is converted into a signal that complies with the external storage unit type protocol by the verified module, and communicates with the external storage unit type to implement configuration, erasure, or reading and writing of the external storage unit type; The amba ahb proxy module simultaneously outputs a signal to transmit to the reference model, and the reference model records the control information and writes data according to the received signal; The data read from the external storage unit via the verified module is transmitted to the reference model through the amba ahb proxy module. The reference model compares the data at the corresponding address of the memory with the received data based on the recorded control information to verify the correctness of the behavior of the verified module. 3-2) If axi is currently used as the bus, call the functional function in the constraint module of the axi signal. The operation principle of the steps is the same as step 3-1); 3-3) If another type of bus is currently needed, it is only necessary to add the configuration class function of the new bus. When the same function name is used, the above functional function is reused and does not need to be built again.

3. The verification method according to claim 2 also includes a mode switching method, which is used to realize the mode switching between single-line, four-line and eight-line by using functional functions; and is also used for mode switching between command port and xip operation.

4. The verification method according to claim 2 further comprises a mode switching method, further comprising: The external storage unit supports multiple modes by calling a function; It also includes: when the external storage unit updates the technology and mode, a new functional function is generated by calling the configuration class function to iterate the new function.

Citation Information

Patent Citations

  • Reusable SPI (Serial Peripheral Interface) bus protocol module verification environment platform and verification method thereof

    CN106021044A