First-in-first-out queue verification system, method, device and cluster
Through the universal verification methodology platform and simulation agent of the FIFO queue verification system, the problem of FIFO queue verification accuracy is solved, ensuring the correctness of queue behavior and data consistency, and avoiding serious problems caused by queue errors. .
Patent Information
- Application Number
- CN202410923974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing FIFO queue verification technology is difficult to accurately verify the accuracy of the queue, resulting in possible serious problems.
Provides a first-in-first-out queue verification system, including a universal verification methodology platform and a design to be tested. It responds to read operations and write operations through simulation agents and comparison modules to verify whether the behavior of the first-in-first-out queue is consistent, including queue depth, Simulation verification of indicators such as queue bit width and queue type.
It achieves accurate verification of the first-in-first-out queue, ensures data consistency and correctness of queue behavior, and avoids serious problems caused by queue errors.
Smart Images

Figure CN118467277B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a first-in-first-out queue verification system, method, device and cluster. Background Art
[0002] A First In First Out (FIFO) queue is a basic data structure that processes elements in the order they enter the queue. In this queue, the first element to enter the queue will be the first to be removed. This data structure is similar to waiting in a queue in real life, where the first person in line will be served first. Before using a FIFO queue, its accuracy must be verified. Once a FIFO queue has problems, it will cause very serious problems. Summary of the invention
[0003] In a first aspect, a first-in-first-out queue verification system is provided, including a general verification methodology platform and a design to be tested, wherein the general verification methodology platform includes a simulation agent and a comparison module;
[0004] The design under test is used to provide hardware logic for a first-in, first-out queue;
[0005] The design under test is used to receive a first read operation and a first write operation, and respond to the first read operation and the first write operation through the first-in-first-out queue to generate first read data and first write data, wherein the first read operation is used to read data in a first storage address in the first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue;
[0006] The simulation agent is used to receive the first read operation and the first write operation, and to generate second read data and second write data in response to the first read operation and the first write operation by simulating the behavior of the first-in-first-out queue;
[0007] The comparison module is used to determine whether verification is passed based on whether the first read data and the first write data, the second read data and the second write data, and whether the first read data and the second read data are all equal when the first storage address and the second storage address are equal.
[0008] In some possible designs, when the first storage address and the second storage address are not equal, whether verification passes is determined based on whether the first read data and the second read data, and whether the first write data and the second write data are equal.
[0009] In some possible designs, the simulation agent is used to obtain indicators of the first-in-first-out queue, and simulate the behavior of the first-in-first-out queue based on the indicators, wherein the indicators include one or more of queue depth, queue width, and queue type.
[0010] In some possible designs, when the design to be tested includes multiple first-in-first-out queues, the simulation agent simulates the behavior of each first-in-first-out queue according to the respective indicators of the multiple first-in-first-out queues, thereby verifying the multiple first-in-first-out queues separately.
[0011] In some possible designs, the design under test is used to receive a prohibition read operation and a continuous write operation, and respond to the prohibition read operation and the continuous write operation through the first-in-first-out queue to generate a first verification response;
[0012] The simulation agent is used to receive a prohibition of reading operation and a continuous writing operation, and respond to the prohibition of reading operation and the continuous writing operation by simulating the behavior of the first-in-first-out queue to generate a second verification response;
[0013] The comparison module is used to compare the first verification response and the second verification response, and determine that the verification is successful when the first verification response and the second verification response are the same; and determine that the verification is unsuccessful when the first verification response and the second verification response are different.
[0014] In some possible designs, the design under test is used to receive a continuous write operation, respond to the continuous write operation through the first-in-first-out queue, and generate a first write verification response;
[0015] The simulation agent is used to receive the continuous write operation, and respond to the continuous write operation by simulating the behavior of the first-in-first-out queue to generate a second write verification response;
[0016] The comparison module is used to compare the first write verification response and the second write verification response, and determine that the verification is passed when the first write verification response and the second write verification response are the same; if the first write verification response and the second write verification response are different, determine that the verification is failed.
[0017] In some possible designs, the design under test is used to receive a continuous read operation, respond to the continuous read operation through the first-in-first-out queue, and generate a first read verification response;
[0018] The simulation agent is used to receive a continuous read operation, and respond to the continuous read operation by simulating the behavior of the first-in-first-out queue to generate a second read verification response;
[0019] The comparison module is used to compare the first read verification response and the second read verification response, and determine that the verification is passed when the first read verification response and the second read verification response are the same; if the first read verification response and the second read verification response are different, determine that the verification is failed.
[0020] In a second aspect, a verification method is provided, which is applied to a first-in-first-out queue verification system, wherein the first-in-first-out queue verification system includes a general verification methodology platform and a design to be tested, wherein the general verification methodology platform includes a simulation agent and a comparison module, and the design to be tested is used to provide hardware logic of a first-in-first-out queue; the method includes:
[0021] Sending a first read operation and a first write operation to the design under test, and receiving first read data and first write data generated by the design under test in response to the first read operation and the first write operation through the first-in-first-out queue, wherein the first read operation is used to read data in a first storage address in the first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue;
[0022] Receiving the first read operation and the first write operation through the simulation agent, simulating the behavior of the first-in-first-out queue, and generating second read data and second write data in response to the first read operation and the first write operation;
[0023] When the first storage address and the second storage address are equal, the comparison module determines whether verification is passed based on whether the first read data and the first write data, the second read data and the second write data, and the first read data and the second read data are all equal.
[0024] According to a third aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the processor, they are used to implement the method described in the second aspect.
[0025] In a fourth aspect, a computing device cluster is provided, comprising at least one computing device, wherein the computing device comprises a processor and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the processor, they are used to implement the method described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0027] Figure 1 It is a structural diagram of a first-in-first-out queue verification system provided by the present application;
[0028] Figure 2 It is a more specific structural diagram of a first-in-first-out queue verification system provided by the present application;
[0029] Figure 3 It is a flowchart of a first-in-first-out queue verification method provided by the present application;
[0030] Figure 4 It is a structural schematic diagram of a computing device provided by this application. DETAILED DESCRIPTION
[0031] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0032] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a first-in-first-out queue verification system provided by this application. Figure 1 As shown, the FIFO queue verification system of the present application includes: a Universal Verification Methodology (UVM) platform and a Device Under Test (DUT).
[0033] The Universal Verification Methodology Platform is a verification methodology based on System Verilog. It was developed by the Accellera organization to provide a standardized framework and method for the verification process of chip design. UVM provides a series of classes and components that can help verification engineers build a reusable, scalable and easy-to-maintain verification environment.
[0034] The general verification methodology platform 110 can be set in a computing device, a computing device cluster or a terminal device, wherein the computing device includes a bare metal server (BMS), a virtual machine, a container or an edge computing device. BMS refers to a general physical server, such as an ARM server or an X86 server; a virtual machine refers to a complete computer system with complete hardware system functions and running in a completely isolated environment simulated by software. All work that can be done in a physical computer can be done in a virtual machine. When creating a virtual machine in a computing device, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent basic input / output system (BIOS), hard disk and operating system, and can operate the virtual machine like a physical machine; a container is a virtualization software that can merge an application and all its dependencies into a software package that is not limited by the underlying host operating system, so there is no need to build a complex environment, simplifying the process from application development to deployment; an edge computing device refers to a device that is closer to the data source and end user, with low latency and high bandwidth characteristics, such as smart routing, edge servers, etc. The computing device cluster may include multiple computing devices as described above, such as a data center, which is not specifically limited in this application.
[0035] The design to be tested 120 refers to the design unit to be tested, that is, the hardware design to be verified during the verification process. During the verification process, the DUT is usually one or more hardware modules, which are part of the chip design. The design to be tested can be a hardware module designed using a data processing unit (DPU), a field programmable gate array (FPGA) and an application-specific integrated circuit (ASIC). The design to be tested is used to provide the hardware logic of the first-in-first-out queue, so the design to be tested 120 can include one or more first-in-first-out queues. Among them, the first-in-first-out queues in the design to be tested 120 can be the same or different. Here, the same refers to the indicators of the first-in-first-out queue, for example, the queue depth, queue bit width, queue type, etc. are the same, and the different refers to the indicators of the first-in-first-out queue, for example, at least one of the queue depth, queue bit width, queue type, etc. is different. The queue depth is the maximum number of elements that can be stored. The queue bit width is the bit width of the element currently stored in the queue. The queue type is whether the queue is a synchronous queue or an asynchronous queue. A synchronous queue means that tasks are executed in a strict order, that is, a task must wait for the previous task to complete before it can start executing. In this queue, all tasks are in the same queue and cannot be queued. When processing a task, other tasks must wait until the current task is completed. An asynchronous queue allows tasks to be executed concurrently, and a new task can be started without waiting for the previous task to complete. In an asynchronous queue, tasks are usually divided into synchronous tasks and asynchronous tasks. Synchronous tasks are executed sequentially in the main thread, while asynchronous tasks are placed in a separate task queue. When the main thread is idle, asynchronous tasks will be taken out and executed in sequence.
[0036] The following will explain the FIFO queue verification system in more detail. Figure 2 As shown, Figure 2 This is a more specific structural diagram of a first-in-first-out queue verification system provided by this application. Figure 2 As shown, in this embodiment, the universal verification methodology platform 110 includes a stimulus module 111 , a simulation agent 113 and a comparison module 115 .
[0037] The excitation module 111 is used to generate a first read operation and a first write operation, wherein the first read operation is used to read data in a first storage address in a first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue.
[0038] The design to be tested 120 is used to receive a first read operation and a first write operation, and respond to the first read operation and the first write operation through a first-in-first-out queue to generate first read data and first write data. If the first read operation and the first write operation are performed on the same storage address in the first-in-first-out queue, then the A data is first written to the storage address through the first write operation, and then the A data in the storage address is read through the first read operation, so the first read operation and the first write operation should read the same data; if the first read operation and the first write operation are not performed on the same storage address in the first-in-first-out queue, then the A data is first written to the first storage address through the first write operation, and then the B data is read from the second storage address through the first read operation, so the first read operation and the first write operation should read different data.
[0039] The simulation agent 113 is used to receive the first read operation and the first write operation, and to generate the second read data and the second write data in response to the first read operation and the first write operation by simulating the behavior of the first-in-first-out queue. Similarly, if the first read operation and the first write operation are performed on the same storage address in the first-in-first-out queue, then the A data is first written to the storage address through the first write operation, and then the A data in the storage address is read through the first read operation, so the first read operation and the first write operation should read the same data; if the first read operation and the first write operation are not performed on the same storage address in the first-in-first-out queue, then the A data is first written to the first storage address through the first write operation, and then the B data is read from the second storage address through the first read operation, so the first read operation and the first write operation should read different data.
[0040] The comparison module 115 is used to determine whether the verification is passed based on whether the first read data and the first write data, the second read data and the second write data, and the first read data and the second read data are all equal when the first storage address and the second storage address are equal. In the case where the first storage address and the second storage address are not equal, it is determined whether the verification is passed based on whether the first read data and the second read data, the first write data and the second write data are all equal. If the first storage address and the second storage address are equal, then, no matter in the first-in-first-out queue simulated in the design to be tested or in the universal verification methodology platform, the written data and the read data are the same, that is, the first read data, the first write data, the second read data and the second write data are all the same. If the first storage address and the second storage address are not equal, then, only the first read data and the first write data, the second read data and the second write data need to be equal.
[0041] In addition to the above verification, you can also choose to verify the FIFO queue in one or more of the following ways:
[0042] (1) When the FIFO queue prohibits read operations and continuous write operations, overflow will occur.
[0043] The excitation module 111 is also used to generate a read-forbidden operation and a continuous write operation. The read-forbidden operation is used to block the read exit of the first-in-first-out queue. The continuous write operation is used to always perform a write operation to the first-in-first-out queue.
[0044] The design under test 120 is used to receive the prohibition of reading operation and the continuous writing operation, respond to the prohibition of reading operation and the continuous writing operation through a first-in-first-out queue, and generate a first verification response.
[0045] The simulation agent 113 is used to receive the prohibition of reading operation and the continuous writing operation, and respond to the prohibition of reading operation and the continuous writing operation by simulating the behavior of the first-in-first-out queue to generate a second verification response;
[0046] The comparison module 115 is used to compare the first verification response and the second verification response, and determine that the verification is successful if the first verification response and the second verification response are the same; and determine that the verification is unsuccessful if the first verification response and the second verification response are different.
[0047] When reading of the FIFO queue is prohibited and writing to the FIFO queue is continued, the FIFO queue will overflow. If both the FIFO queue in the design under test and the FIFO queue simulated in the simulation agent overflow, then it can be determined that the verification has passed.
[0048] (2) If the FIFO queue continues to write, overflow will occur.
[0049] The excitation module 111 is also used to generate a continuous write operation.
[0050] The design under test 120 is used to receive continuous write operations, respond to the continuous write operations through a first-in-first-out queue, and generate a first write verification response.
[0051] The simulation agent 113 is used to receive the continuous write operation, and respond to the continuous write operation by simulating the behavior of the first-in-first-out queue, thereby generating a second write verification response.
[0052] The comparison module 115 is used to compare the first write verification response and the second write verification response. If the first write verification response and the second write verification response are the same, it is determined that the verification is passed; if the first write verification response and the second write verification response are different, it is determined that the verification is failed.
[0053] In the case of continuous write operations to the FIFO queue, the FIFO queue will overflow. If both the FIFO queue in the design under test and the FIFO queue simulated in the simulation agent overflow, then it can be determined that the verification has passed.
[0054] (3) If the FIFO queue continues to read, overflow will occur.
[0055] The stimulus module 111 is also used to generate a continuous read operation.
[0056] The design under test 120 is used to receive a continuous read operation, respond to the continuous read operation through a first-in-first-out queue, and generate a first read verification response.
[0057] The simulation agent 113 is used to receive the continuous read operation, and respond to the continuous read operation by simulating the behavior of the first-in-first-out queue, thereby generating a second read verification response.
[0058] The comparison module 115 is used to compare the first read verification response and the second read verification response, and determine that the verification is passed if the first read verification response and the second read verification response are the same; if the first read verification response and the second read verification response are different, determine that the verification is failed.
[0059] In the case of continuous read operations on the FIFO queue, the FIFO queue will overflow. If both the FIFO queue in the design under test and the FIFO queue simulated in the simulation agent overflow, then it can be determined that the verification has passed.
[0060] Since the design to be tested 120 may include multiple first-in-first-out queues, the indicators of different first-in-first-out queues may be different. Therefore, the behavior of each first-in-first-out queue can be simulated by a simulation agent according to the indicators of each of the multiple first-in-first-out queues, so as to verify the multiple first-in-first-out queues respectively. When verifying, the first-in-first-out queues can be simulated one by one, or multiple first-in-first-out queues can be simulated in parallel.
[0061] (4) When a first-in-first-out queue is used for write and read operations, empty, almost empty, full, and almost full will be generated.
[0062] The excitation module 111 is also used to generate a second write operation and a second read operation. The second write operation and the second read operation respectively perform a write operation or a read operation on the first-in-first-out queue. When performing a write operation or a read operation, if the front and rear pointers point to the same position, or when the front pointer is an initial value and no element is added, the first-in-first-out queue is considered to be empty. The number of elements in the first-in-first-out queue is very small, close to an empty state. For example, in a queue with a large capacity, if it contains only a few elements, the queue is "almost empty". The first-in-first-out queue has reached its maximum capacity and no new elements can be added. For example, in a queue of fixed size, when the rear pointer points to the last available position, the first-in-first-out queue is considered to be full. In the implementation of a circular queue, when the rear pointer follows the front pointer (considering the case of a cycle), the first-in-first-out queue is considered to be full. The number of elements in the first-in-first-out queue is very close to its maximum capacity, but has not yet reached a full state. For example, in a queue with 100 positions, if there are already 95 or more elements, we can say that this FIFO queue is "almost full".
[0063] The design under test 120 is used to receive the second write operation and the second read operation, respond to the continuous read operation through a first-in-first-out queue, and generate a first read-write verification response.
[0064] The simulation agent 113 is used to receive the second write operation and the second read operation, and respond to the second write operation and the second read operation by simulating the behavior of the first-in-first-out queue to generate a second read-write verification response.
[0065] The comparison module 115 is used to compare the first read-write verification response and the second read-write verification response. If the first read-write verification response and the second read-write verification response are the same, it is determined that the verification is passed; if the first read-write verification response and the second read-write verification response are different, it is determined that the verification is failed.
[0066] See also Figure 3 , Figure 3 This is a flowchart of a first-in-first-out queue verification method provided by this application. Figure 3 As shown, the first-in-first-out queue verification method of the present application includes:
[0067] S101: Sending a first read operation and a first write operation to a design under test, and receiving first read data and first write data generated by the design under test in response to the first read operation and the first write operation through a first-in-first-out queue.
[0068] The first read operation is used to read data in a first storage address in the first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue.
[0069] S102: receiving a first read operation and a first write operation through a simulation agent, simulating the behavior of a first-in-first-out queue, and generating second read data and second write data in response to the first read operation and the first write operation.
[0070] S103: Determine whether verification is passed by a comparison module based on whether the first read data and the first write data, the second read data and the second write data, and the first read data and the second read data are all equal when the first storage address and the second storage address are equal.
[0071] In addition, a prohibition of read operations and continuous write operations can be sent to the design under test, a first verification response generated by a first-in-first-out queue based on the prohibition of read operations and continuous write operations can be received, the prohibition of read operations and continuous write operations can be received through a simulation agent, and the behavior of the first-in-first-out queue can be simulated to respond to the prohibition of read operations and continuous write operations to generate a second verification response; the first verification response and the second verification response can be compared through a comparison module, and if the first verification response and the second verification response are the same, it is determined that the verification is passed; if the first verification response and the second verification response are different, it is determined that the verification is failed.
[0072] It is also possible to send continuous write operations to the design under test, and receive a first-in-first-out queue to generate a first write verification response based on the continuous write operations; receive continuous write operations through a simulation agent, and respond to the continuous write operations by simulating the behavior of the first-in-first-out queue to generate a second write verification response; and use a comparison module to compare the first write verification response and the second write verification response, and determine that the verification is passed if the first write verification response and the second write verification response are the same; and determine that the verification is failed if the first write verification response and the second write verification response are different.
[0073] It is also possible to send a continuous read operation to the design under test, respond to the continuous read operation through a first-in-first-out queue, and generate a first read verification response; receive the continuous read operation through a simulation agent, simulate the behavior of the first-in-first-out queue, and thus respond to the continuous read operation to generate a second read verification response; use a comparison module to compare the first read verification response and the second read verification response, and determine that the verification is passed if the first read verification response and the second read verification response are the same; and determine that the verification is failed if the first read verification response and the second read verification response are different.
[0074] See also Figure 4 , Figure 44 is a schematic diagram of a computing device provided by the present application. The computing device 400 includes: one or more processing units 410 , a communication interface 420 and a memory 430 .
[0075] The processing unit 410, the communication interface 420 and the memory 430 are interconnected via a bus 440. Optionally, the computing device 400 may also include an input / output interface 450, which is connected to an input / output device for receiving parameters set by a user, etc. The computing device 400 can be used to implement part or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processing unit 410 can also be used to implement part or all of the operation steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 400 can refer to the specific details in the above-mentioned embodiment, such as the processing unit 410 is used to perform part or all of the steps in the above-mentioned method embodiment or part or all of the operations in the above-mentioned method embodiment. For another example, in the embodiment of the present application, the computing device 400 can be used to implement part or all of the functions of one or more components in the above-mentioned device embodiment, and the communication interface 420 can be specifically used for the communication functions necessary to implement the functions of these devices and components, and the processing unit 410 can be specifically used for the processing functions necessary to implement the functions of these devices and components, etc.
[0076] Figure 4 The computing device 400 may include one or more processing units 410, and the multiple processing units 410 may provide processing capabilities in a coordinated manner in a parallel connection manner, a serial connection manner, a serial-parallel connection manner, or any connection manner, or the multiple processing units 410 may constitute a processor sequence or a processor array, or the multiple processing units 410 may be divided into a main processor and an auxiliary processor, or the multiple processing units 410 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 4 The computing device 400 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 400 may include Figure 4 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.
[0077] The processing unit 410 may have a variety of specific implementation forms. For example, the processing unit 410 may include a central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU), etc., and the embodiment of the present application does not specifically limit it. The processing unit 410 may also be a single-core processor or a multi-core processor. The processing unit 410 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processing unit 410 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP). The communication interface 420 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.
[0078] The memory 430 may be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 430 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). The memory 430 may also be used to store program codes and data, so that the processing unit 410 calls the program codes stored in the memory 430 to execute some or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 4 Show more or fewer components, or have different component configurations.
[0079] The bus 440 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 440 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0080] The present application also provides a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.
[0081] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0082] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
Claims
1. A first-in-first-out queue verification system, characterized in that: It includes a universal verification methodology platform and a design to be tested, wherein the universal verification methodology platform includes a simulation agent and a comparison module; The design under test is used to provide hardware logic for a first-in, first-out queue; The design under test is used to receive a first read operation and a first write operation, and respond to the first read operation and the first write operation through the first-in-first-out queue to generate first read data and first write data, wherein the first read operation is used to read data in a first storage address in the first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue; The simulation agent is used to receive the first read operation and the first write operation, and generate second read data and second write data in response to the first read operation and the first write operation by simulating the behavior of the first-in-first-out queue; The comparison module is used to determine whether verification is passed based on whether the first read data and the first write data, the second read data and the second write data, and whether the first read data and the second read data are all equal when the first storage address and the second storage address are equal; The design under test is used to receive a read-forbidden operation and a continuous write operation, and respond to the read-forbidden operation and the continuous write operation through the first-in-first-out queue to generate a first verification response; The simulation agent is used to receive a prohibition of reading operation and a continuous writing operation, and respond to the prohibition of reading operation and the continuous writing operation by simulating the behavior of the first-in-first-out queue to generate a second verification response; The comparison module is used to compare the first verification response and the second verification response, and determine that the verification is passed when the first verification response and the second verification response are the same; and determine that the verification is failed when the first verification response and the second verification response are different; The design under test is used to receive a continuous write operation, respond to the continuous write operation through the first-in-first-out queue, and generate a first write verification response; The simulation agent is used to receive the continuous write operation, and respond to the continuous write operation by simulating the behavior of the first-in-first-out queue to generate a second write verification response; The comparison module is used to compare the first write verification response with the second write verification response, and determine that the verification is passed when the first write verification response and the second write verification response are the same; and determine that the verification is failed when the first write verification response and the second write verification response are different; The design under test is used to receive a continuous read operation, respond to the continuous read operation through the first-in-first-out queue, and generate a first read verification response; The simulation agent is used to receive a continuous read operation, and respond to the continuous read operation by simulating the behavior of the first-in-first-out queue to generate a second read verification response; The comparison module is used to compare the first read verification response and the second read verification response, and determine that the verification is passed when the first read verification response and the second read verification response are the same; if the first read verification response and the second read verification response are different, determine that the verification is failed.
2. The system according to claim 1, characterized in that In the case that the first storage address and the second storage address are not equal, whether verification is passed is determined based on whether the first read data and the second read data, and the first write data and the second write data are all equal.
3. The system according to claim 1, characterized in that The simulation agent is used to obtain the index of the first-in-first-out queue and simulate the behavior of the first-in-first-out queue based on the index, wherein the index includes one or more of queue depth, queue width, and queue type.
4. The system according to claim 3, characterized in that In the case where the design to be tested includes multiple FIFO queues, the simulation agent simulates the behavior of each FIFO queue according to the respective indicators of the multiple FIFO queues, thereby verifying the multiple FIFO queues respectively.
5. A verification method, characterized in that: Applied to a first-in-first-out queue verification system, the first-in-first-out queue verification system includes a universal verification methodology platform and a design to be tested, the universal verification methodology platform includes a simulation agent and a comparison module, and the design to be tested is used to provide hardware logic of a first-in-first-out queue; the method includes: Sending a first read operation and a first write operation to the design under test, and receiving first read data and first write data generated by the design under test responding to the first read operation and the first write operation through the first-in-first-out queue, wherein the first read operation is used to read data in a first storage address in the first-in-first-out queue, and the first write operation is used to write data to a second storage address in the first-in-first-out queue; Receiving the first read operation and the first write operation through the simulation agent, simulating the behavior of the first-in-first-out queue, and generating second read data and second write data in response to the first read operation and the first write operation; Determining whether verification is passed by the comparison module based on whether the first read data and the first write data, the second read data and the second write data, and the first read data and the second read data are all equal when the first storage address and the second storage address are equal; Receiving a read-forbidden operation and a continuous write operation through the design under test, responding to the read-forbidden operation and the continuous write operation through the first-in-first-out queue, and generating a first verification response; Receiving a read-forbidden operation and a continuous write operation through the simulation agent, and responding to the read-forbidden operation and the continuous write operation by simulating the behavior of the first-in-first-out queue to generate a second verification response; The first verification response and the second verification response are compared by the comparison module, and when the first verification response and the second verification response are the same, the verification is determined to be successful; when the first verification response and the second verification response are different, the verification is determined to be unsuccessful; Receiving a continuous write operation through the design under test, responding to the continuous write operation through the first-in-first-out queue, and generating a first write verification response; Receiving a continuous write operation through the simulation agent, and responding to the continuous write operation by simulating the behavior of the first-in-first-out queue to generate a second write verification response; The first write verification response and the second write verification response are compared by the comparison module, and when the first write verification response and the second write verification response are the same, it is determined that the verification is passed; when the first write verification response and the second write verification response are different, it is determined that the verification is failed; Receiving a continuous read operation through the design under test, responding to the continuous read operation through the first-in-first-out queue, and generating a first read verification response; Receiving a continuous read operation through the simulation agent, and responding to the continuous read operation by simulating the behavior of the first-in-first-out queue to generate a second read verification response; The first read verification response and the second read verification response are compared by the comparison module. If the first read verification response and the second read verification response are the same, it is determined that the verification is passed; if the first read verification response and the second read verification response are different, it is determined that the verification is failed.
6. A computing device, characterized in that The system comprises a processor and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the processor, they are used to implement the method according to claim 5.
7. A computing device cluster, characterized in that: The method comprises at least one computing device, wherein the computing device comprises a processor and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the processor, the instructions are used to implement the method according to claim 5.
