Parallel interface NOR FLASH interface Agent automatic generation device based on UVM
Through the UVM-based parallel interface NOR FLASH interface Agent automatic generation device, the problems of verification complexity and insufficient coverage in the existing technology are solved, efficient system-level verification is achieved, and verification quality and efficiency are improved.
Patent Information
- Application Number
- CN202410833220.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-01
AI Technical Summary
In the verification process of parallel interface NOR FLASH memory chips, due to the complex timing combination of asynchronous signals, it is difficult for the existing verification platform to achieve system-level coverage, resulting in poor verification quality and complex verification environment writing. There is a lack of systems for NOR FLASH memory chips. level verification platform.
Use UVM-based parallel interface NOR FLASH interface Agent automatic generation device, including parameter parser, interface generator, transaction generator, driver generator, monitor generator, sequencer generator and agent generator to generate code that conforms to UVM specifications. Automatically build the verification environment and simplify the construction of the verification platform.
It shortens the verification platform construction cycle, improves verification quality and efficiency, and ensures system-level verification coverage of NOR FLASH memory chips.
Smart Images

Figure CN118737247A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuit verification, and in particular to a UVM-based parallel interface NOR FLASH interface Agent automatic generation device. Background Art
[0002] The parallel interface is a very common interface form of NOR FLASH memory chip, with independent address bus, data bus and control signal. The parallel interface NOR FLASH has unique advantages in some engineering applications due to its fast access speed.
[0003] In the verification work for parallel interface NOR FLASH memory chips, since the interface signals are all asynchronous, there are many timing combinations between various control signals (such as chip select, read enable, write enable) and address bus signals and data bus signals.
[0004] In order to achieve the purpose of complete verification, the writing of verification environment stimuli becomes extremely complicated; and it is difficult to quantify whether the access timing in the chip specification has been covered in the verification. The overall verification quality cannot be fully guaranteed. There is an urgent need for an automatic generation device for the interface Agent for the parallel interface NOR FLASH.
[0005] Universal Verification Methodology (UVM) is a verification platform development framework based on the SystemVerilog class library. Its reusable components can be used to build a functional verification environment with standardized hierarchical structures and interfaces.
[0006] Some verification platforms in the prior art, such as a UVM-based SPI verification platform and verification method disclosed in Patent No. CN112527723A, a UVM-based SPI interface storage unit controller verification platform and verification method disclosed in Patent No. CN114239478A, and a Nor Flash digital-analog hybrid verification method and device disclosed in Patent No. CN111221692A, are only module-level verification platforms, such as verification platforms only for flash controllers, and are not system-level verification platforms for NORFLASH storage chips. Summary of the invention
[0007] Based on the above problems, the purpose of the present invention is to provide an interface Agent automatic generation device for the parallel interface NOR FLASH, so as to shorten the period of building a verification platform and improve the quality and efficiency of verification.
[0008] The technical solution adopted by the present invention to achieve the purpose of the invention is a parallel interface NOR FLASH interface Agent automatic generation device based on UVM, including a parameter parser, an interface generator, a transaction generator, a driver generator, a monitor generator, a sequencer generator, and an agent generator, wherein:
[0009] The parameter parser is used to parse input parameters;
[0010] The interface generator is used to obtain the parsing result from the parameter parser, and generate an interface code that meets the UVM specification, wherein the interface includes an interface signal of a parallel interface NOR FLASH;
[0011] The transaction generator is used to obtain the parsing result from the parameter parser and generate a transaction code that complies with the UVM specification, wherein the transaction includes parallel interface NOR FLASH read and write timing parameters;
[0012] The driver generator is used to obtain the parsing result from the parameter parser and generate a driver code that complies with the UVM specification, and the driver is used to drive the interface according to the read and write timing parameters in the generated transaction;
[0013] The monitor generator is used to obtain the parsing result from the parameter parser and generate a monitor code that complies with the UVM specification. The monitor is used to collect the signal of the interface and generate a transaction;
[0014] The sequencer generator is used to generate a sequencer code that complies with the UVM specification, and the sequencer is used to send a transaction to the driver;
[0015] The agent generator is used to generate agent code that complies with the UVM specification. The agent includes the generated interface, transaction, driver, monitor and sequencer.
[0016] Furthermore, the input parameters of the parameter parser include the storage capacity of NOR FLASH, the address bus width, the data bus width, the byte / word selection enable, the read operation timing parameters, and the write operation timing parameters.
[0017] Furthermore, the specific workflow of the interface generator is: obtaining the address bus width, data bus width, and byte / word selection enable of the NORFLASH storage chip from the parameter parser, and automatically generating a flash_interface.sv file, wherein the content of the flash_interface.sv file contains the interface signals of the parallel interface NOR FLASH storage chip, and the interface signals include address bus signals, data bus signals, chip select signals, read enable signals, write enable signals, ready / busy status signals, and byte / word selection signals.
[0018] Furthermore, the specific workflow of the transaction generator is as follows:
[0019] First, the storage capacity, address bus width, data bus width, byte / word selection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip are obtained from the parameter parser;
[0020] Then check the legitimacy of the read operation timing parameters and write operation timing parameters obtained from the parameter parser. If the timing parameters are wrong, the transaction generator will automatically report an error and output an error message.
[0021] If the timing parameters are checked correctly, a flash_transaction.sv file is automatically generated. The flash_transaction.sv file is extended from uvm_sequence_item, defines the timing parameters of read and write operations, and defines a constraint block for each timing parameter. The legal value range of the timing parameter is constrained in the constraint block to ensure that the timing parameters can be randomized according to the random mode filled in the parameter parser when randomizing.
[0022] Furthermore, the specific workflow of the driver generator is as follows:
[0023] First, the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip are obtained from the parameter parser;
[0024] Then a flash_driver.sv file is automatically generated. The flash_driver.sv file is extended from uvm_driver and is used to obtain transaction from seq_item_port, determine the operation type of transaction, and call different tasks according to the operation type to realize the driving of interface.
[0025] Furthermore, the different tasks called by the automatically generated driver include a read operation control task and a write operation control task; if the operation type of the transaction is a read operation, the driver calls the read operation control task, obtains the value of the timing parameter related to the read operation from the transaction, drives the relevant signals in the interface according to the value of the timing parameter, and collects the returned read data from the DUT (i.e., the NOR FLASH chip to be verified) at an appropriate time, and updates the read data to the transaction, thereby completing a complete read operation; if the operation type of the transaction is a write operation, the driver calls the write operation control task, obtains the value of the timing parameter related to the write operation from the transaction, drives the relevant signals in the interface according to the value of the timing parameter, thereby completing a complete write operation.
[0026] Furthermore, the specific workflow of the monitor generator is as follows:
[0027] First, the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip are obtained from the parameter parser; then a flash_monitor.sv file is automatically generated. The flash_monitor.sv file is extended from uvm_monitor and is used to collect the levels of all signals from the interface when the DUT is read and written and calculate the values of the timing parameters related to the read and write operations. After the read and write operations are completed, the above information collected is packaged to generate a flash_transaction, and the flash_transaction is written to the uvm_analysis_port of the monitor for use by other components.
[0028] Furthermore, the specific method of the generated monitor collecting signals from the interface is:
[0029] Monitor determines the start and end time of an operation based on the chip select signal of the interface, and determines whether the current operation is a read operation or a write operation based on the read enable signal and write enable signal;
[0030] If the chip select signal and the read enable signal are valid at the same time, it indicates that the current operation is a read operation, and the monitor collects timing parameters related to the read operation from the interface; if the chip select signal and the write enable signal are valid at the same time, it indicates that the current operation is a write operation, and the monitor collects timing parameters related to the write operation from the interface.
[0031] The beneficial effects of the present invention are:
[0032] The present invention is based on the UVM verification platform development framework, can shorten the cycle of building the verification platform, and improve the quality and efficiency of verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] Figure 1 A specific implementation of the parallel interface NOR FLASH interface Agent automatic generation device based on UVM of the present invention is shown, and its specific structure is:
[0036] A parameter parser is responsible for parsing the input parameters of the device from the Excel file provided by the device, including the storage capacity of NOR FLASH, address bus width, data bus width, byte / word selection enable, read operation timing parameters (including the name of the read operation timing parameters and their value range), and write operation timing parameters (including the name of the write operation timing parameters and their value range). The results of the parameter parsing will be passed to other parts of the device.
[0037] An interface generator is responsible for generating interface codes that comply with UVM specifications and contain parallel interface NOR FLASH interface signals. Its specific workflow is to obtain the address bus width, data bus width, byte / word selection enable of the NOR FLASH memory chip from the parameter parser, and automatically generate a flash_interface.sv file. The file contains the interface signals of the parallel interface NOR FLASH memory chip, including: address bus signal, data bus signal, chip select signal, read enable signal, write enable signal, ready / busy status signal, byte / word selection signal.
[0038] Take a 16Mbit parallel port NOR FLASH as an example, its address bus width is 20 and data bus width is 16. The generated interface code is as follows:
[0039]
[0040] Among them, A is the address bus signal, DQ is the data bus signal, WE is the write enable signal, OE is the read enable signal, CE is the chip select signal, BYTE is the byte / word select signal, and RB is the idle / busy status output signal.
[0041] A transaction generator is responsible for generating uvm_transaction code that complies with the UVM specification and contains the parallel interface NOR FLASH read and write timing parameters. Its specific workflow is: (1) Obtain NOR from the parameter parser The storage capacity of the FLASH memory chip, the address bus width, the data bus width, the byte / word selection enable, the read operation timing parameters (including the name of the read operation timing parameters and their value range), and the write operation timing parameters (including the name of the write operation timing parameters and their value range); (2) Check the legality of the read operation timing parameters and the write operation timing parameters obtained from the parameter parser. If the user fills in the wrong timing parameter value due to mistake when filling in the Excel file, the transaction generator will automatically report an error and output the error message to the screen for the user to check; (3) If the timing parameter check in the previous step is correct, a flash_transaction.sv file will be automatically generated. The file is extended from uvm_sequence_item and defines the timing parameters related to the read operation and the write operation. At the same time, a constraint block is defined for each timing parameter. The legal value range of the timing parameter is constrained in the constraint block to ensure that the timing parameter can be randomized according to the random mode filled in the parameter parser when randomizing.
[0042] To illustrate with an example, the following table is an example of filling in some read and write timing parameters in an Excel file, which is divided into read operations and write operations.
[0043]
[0044] The timing of read and write operations is controlled by many subdivided parameters, each of which can be divided into input parameters and output parameters according to its type.
[0045] For an input parameter, the minimum value, maximum value and random mode of the parameter need to be filled in the Excel file. The minimum value / maximum value comes from the design specifications of the DUT (i.e. the NOR FLASH chip to be verified), and the random mode determines which random algorithm is used to generate the specific value of the parameter when simulating and generating transactions. The random mode includes the following five types: average, boundary, minimum value high weight, maximum value high weight, and don't care. The transaction generator will perform a legality check on each parameter obtained by the parameter parser to avoid human errors caused by carelessness when the designer / verifier fills in the Excel file. The legality check will cover the following types: the input parameter has no minimum value / maximum value; the minimum value of the input parameter is greater than the maximum value; the input parameter random mode is wrong (the random mode does not belong to any of the five types of average, boundary, minimum value high weight, maximum value high weight, and don't care); the output parameter fills in the minimum value / maximum value at the same time. Once the above errors occur, the transaction generator will automatically report an error and output the error information to the screen for the user to check.
[0046] The generated flash_transaction.sv code is as follows:
[0047]
[0048] A driver generator is responsible for generating uvm_driver code that complies with the UVM specification and can drive the generated transaction. Its specific workflow is: (1) Obtain the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters (including the name of the read operation timing parameters and their value range), and write operation timing parameters (including the name of the write operation timing parameters and their value range) of the NORFLASH memory chip from the parameter parser; (2) Automatically generate a flash_driver.sv file, which is extended from uvm_driver. Its main function is to obtain the transaction from seq_item_port, determine the operation type of the transaction, and call different tasks according to this operation type to drive the interface.
[0049] The automatically generated driver contains two main tasks: read operation control task and write operation control task.
[0050] If the operation type of the transaction is a read operation, the read operation control task is called to obtain the values of the timing parameters related to the read operation from the transaction, and the relevant signals in the interface are driven according to the values of these timing parameters. The read data returned from the DUT is collected at the appropriate time, and the read data is updated to the transaction, thereby completing a complete read operation. If the operation type of the transaction is a write operation, the write operation control task is called to obtain the values of the timing parameters related to the write operation from the transaction, and the relevant signals in the interface are driven according to the values of these timing parameters, thereby completing a complete write operation.
[0051] The generated flash_driver.sv code is as follows:
[0052]
[0053] A monitor generator is responsible for generating uvm_driver code that complies with the UVM specification and can collect interface signals and generate transactions. Its specific workflow is: (1) Obtain the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters (including the name of the read operation timing parameters and their value range), and write operation timing parameters (including the name of the write operation timing parameters and their value range) of the NOR FLASH storage chip from the parameter parser; (2) Automatically generate a flash_monitor.sv file, which is extended from uvm_monitor. Its main function is to collect the levels of all signals from the interface when reading and writing to the DUT and calculate the values of the timing parameters related to the read and write operations. After the read and write operations are completed, the collected information is packaged to generate a flash_transaction, and this flash_transaction is written to the uvm_analysis_port of the monitor for use by other components.
[0054] When the generated monitor is working, it will determine the start and end time of an operation according to the chip select signal of the interface, and determine whether the current operation is a read operation or a write operation according to the read enable and write enable signals. If the chip select signal and the read enable signal are valid at the same time, it indicates that the current operation is a read operation, and the monitor collects the timing parameters related to the read operation from the interface; if the chip select signal and the write enable signal are valid at the same time, it indicates that the current operation is a write operation, and the monitor collects the timing parameters related to the write operation from the interface.
[0055] A sequencer generator that is responsible for generating uvm_sequencer code that complies with the UVM specification and can send transactions to the driver. The generated file is flash_sequencer.sv.
[0056] An agent generator is responsible for generating agent code that complies with the UVM specification and can integrate the generated interface, transaction, driver, monitor, and sequencer. The automatically generated file is flash_agent.sv. This agent extends from uvm_agent and instantiates, creates entities, and connects ports for the previously generated flash_interface, flash_driver, flash_monitor, and flash_sequencer.
[0057] The above embodiments of the present invention are merely examples for illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes and modifications can be made based on the above description. It is impossible to list all the embodiments here. Any obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A UVM-based parallel interface NOR FLASH interface Agent automatic generation device, characterized in that Including parameter parser, interface generator, transaction generator, driver generator, monitor generator, sequencer generator, agent generator, among which: The parameter parser is used to parse input parameters; The interface generator is used to obtain the parsing result from the parameter parser, and generate an interface code that meets the UVM specification, wherein the interface includes an interface signal of a parallel interface NOR FLASH; The transaction generator is used to obtain the parsing result from the parameter parser and generate a transaction code that complies with the UVM specification, wherein the transaction includes parallel interface NOR FLASH read and write timing parameters; The driver generator is used to obtain the parsing result from the parameter parser and generate a driver code that complies with the UVM specification, and the driver is used to drive the interface according to the read and write timing parameters in the generated transaction; The monitor generator is used to obtain the parsing result from the parameter parser and generate a monitor code that complies with the UVM specification. The monitor is used to collect the signal of the interface and generate a transaction; The sequencer generator is used to generate a sequencer code that complies with the UVM specification, and the sequencer is used to send a transaction to the driver; The agent generator is used to generate agent code that complies with the UVM specification. The agent includes the generated interface, transaction, driver, monitor and sequencer.
2. The UVM-based parallel interface NOR FLASH interface Agent automatic generation device according to claim 1, characterized in that: The input parameters of the parameter parser include the storage capacity of NOR FLASH, address bus bit width, data bus bit width, byte / word selection enable, read operation timing parameters, and write operation timing parameters.
3. The parallel interface NOR FLASH interface Agent automatic generation device based on UVM according to claim 1, characterized in that, The specific workflow of the interface generator is: obtain the address bus bit width, data bus bit width, and byte / word selection enable of the NOR FLASH storage chip from the parameter parser, and automatically generate a flash_interface.sv file, wherein the content of the flash_interface.sv file contains the interface signals of the parallel interface NOR FLASH storage chip, and the interface signals include address bus signals, data bus signals, chip select signals, read enable signals, write enable signals, ready / busy status signals, and byte / word selection signals.
4. The parallel interface NOR FLASH interface Agent automatic generation device based on UVM according to claim 1, characterized in that, The specific workflow of the transaction generator is as follows: First, the storage capacity, address bus width, data bus width, byte / word selection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip are obtained from the parameter parser; Then check the legitimacy of the read operation timing parameters and write operation timing parameters obtained from the parameter parser. If the timing parameters are wrong, the transaction generator will automatically report an error and output an error message. If the timing parameters are checked correctly, a flash_transaction.sv file is automatically generated. The flash_transaction.sv file is extended from uvm_sequence_item, defines the timing parameters of read and write operations, and defines a constraint block for each timing parameter. The legal value range of the timing parameter is constrained in the constraint block.
5. The parallel interface NOR FLASH interface Agent automatic generation device based on UVM according to claim 1, characterized in that, The specific workflow of the driver generator is as follows: First, the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip are obtained from the parameter parser; Then a flash_driver.sv file is automatically generated. The flash_driver.sv file is extended from uvm_driver and is used to obtain transaction from seq_item_port, determine the operation type of transaction, and call different tasks according to the operation type to realize the driving of interface.
6. The UVM-based parallel interface NOR FLASH interface Agent automatic generation device according to claim 5, characterized in that: The different tasks called by the automatically generated driver include a read operation control task and a write operation control task; If the operation type of the transaction is a read operation, the driver calls the read operation control task, obtains the value of the timing parameter related to the read operation from the transaction, drives the relevant signals in the interface according to the value of the timing parameter, and collects the returned read data from the DUT at the appropriate time, and updates the read data to the transaction, thereby completing a complete read operation; If the operation type of the transaction is a write operation, the driver calls the write operation control task, obtains the value of the timing parameter related to the write operation from the transaction, and drives the relevant signals in the interface according to the value of the timing parameter, thereby completing a complete write operation.
7. The UVM-based parallel interface NOR FLASH interface Agent automatic generation device according to claim 1, characterized in that, The specific workflow of the monitor generator is as follows: First, obtain the storage capacity, address bus width, data bus width, byte / word selection enable, write protection enable, read operation timing parameters, and write operation timing parameters of the NOR FLASH storage chip from the parameter parser; Then a flash_monitor.sv file is automatically generated. The flash_monitor.sv file is extended from uvm_monitor and is used to collect the levels of all signals from the interface when reading and writing to the DUT and calculate the values of the timing parameters related to the read and write operations. After the read and write operations are completed, the above information collected is packaged to generate a flash_transaction, and the flash_transaction is written to the uvm_analysis_port of the monitor for use by other components.
8. The UVM-based parallel interface NOR FLASH interface Agent automatic generation device according to claim 7, characterized in that: The specific method of the generated monitor collecting signals from the interface is: Monitor determines the start and end time of an operation based on the chip select signal of the interface, and determines whether the current operation is a read operation or a write operation based on the read enable signal and write enable signal; If the chip select signal and the read enable signal are both valid, it indicates that the current operation is a read operation, and the monitor collects timing parameters related to the read operation from the interface; If the chip select signal and the write enable signal are valid at the same time, it indicates that the current operation is a write operation, and the monitor collects timing parameters related to the write operation from the interface.
