A method, apparatus, device and medium for verifying an atomic access module
By adopting a dynamic sliding address window mechanism and a dual-queue management method for handles, the problem of low verification efficiency of the parallel pipeline atomic access module is solved, accurate verification of burst transmission scenarios is achieved, the universality and reliability of verification are improved, and the chip verification cycle is shortened.
Patent Information
- Application Number
- CN202611287949.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies have low verification efficiency, versatility, and reliability for parallel pipelined atomic access modules, making accurate verification particularly difficult in burst transmission scenarios.
A dynamic sliding address window mechanism and a handle dual-queue management method are adopted. The target address window is determined based on the input stimulus address, burst length and burst size through a reference model. The stimulus queues corresponding to different address windows are processed in parallel. Combined with hash mapping and successive doubling of window size calculation, the system can quickly locate and accurately compare out-of-order output data streams.
It improves the verification efficiency and reliability of parallel pipelined atomic access modules, significantly shortens the chip verification cycle, and simplifies the conversion complexity between ID-preserving and address-preserving.
Smart Images

Figure CN123178176A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of functional verification technology for digital integrated circuits, and in particular to a verification method, apparatus, device, and medium for atomic access modules. Background Technology
[0002] In artificial intelligence (AI) chips, atomic access can be used to achieve synchronization and computation between multiple cores. To improve the processing speed of atomic access, the current technological trend is to design atomic computing modules separately and place them in the cache. These atomic access modules are responsible for scheduling the pipeline, enabling the atomic computing modules to process multiple atomic access requests issued by the atomic access modules in parallel in a pipelined manner. However, atomic operations in the atomic computing modules require that multiple accesses to the same address be executed in order; that is, each subsequent access must wait for the previous access to complete to ensure data atomicity and consistency. This presents a significant challenge to the verification of atomic access modules.
[0003] In existing technologies, verification methods based on atomic instruction modules or general-purpose verification platforms based on the Advanced eXtensible Interface (AXI) bus are commonly used to verify atomic access modules. However, verification methods based on atomic instruction modules are only applicable to atomic operations in single-access scenarios. Their reference models perform address-by-address deduplication based on a flag-based locking or unlocking mechanism, processing at a single address granularity, which cannot handle situations where the address range is not fixed in burst transmission access scenarios. While general-purpose verification platforms based on the AXI bus can generate burst transmission stimuli, their reference models still manage expected values by performing point-by-point deduplication at a single address granularity, lacking a unified management mechanism for the multiple address ranges covered by burst transmissions, resulting in insufficient accuracy in verifying atomic operations in burst transmission scenarios.
[0004] Therefore, how to achieve accurate verification of parallel pipeline atomic access modules, improve the universality and reliability of verification methods, and significantly shorten the chip verification cycle are urgent problems to be solved. Summary of the Invention
[0005] This invention provides a verification method, apparatus, device, and medium for atomic access modules, which can solve the problems of low verification efficiency, versatility, and reliability of parallel pipelined atomic access modules in the prior art.
[0006] According to one aspect of the present invention, a verification method for an atomic access module is provided. This method is applied to a chip verification platform under an Advanced Scalable Interface Bus Protocol (AIPS) environment. The verification platform includes a reference model, and the method includes: Obtain the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; The reference model determines the target address window based on the input stimulus address, burst length, and burst size, and stores the input stimulus in the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel. Hardware calculations are performed on the stimulus queue based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and the target stimulus is determined from the stimulus queue of the target address window. The second calculation result is determined based on the target stimulus according to the reference model. The first calculation result and the second calculation result are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result.
[0007] According to another aspect of the present invention, a verification apparatus for an atomic access module is provided. This apparatus is applied to a chip verification platform under an Advanced Scalable Interface Bus Protocol (AIPS) environment. The verification platform includes a reference model, and the apparatus includes: The data acquisition module is used to acquire the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; The window processing module is used to determine the target address window based on the input stimulus address, burst length, and burst size using the reference model, and to store the input stimulus into the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel. An atomic computation module is used to perform hardware computation on the stimulus queue based on the atomic access module to be verified, obtain a first computation result, determine the corresponding target address window based on the address information in the first computation result, determine the target stimulus from the stimulus queue of the target address window, and determine a second computation result based on the target stimulus according to the reference model. The result verification module is used to numerically compare the first calculation result and the second calculation result, and determine the verification result corresponding to the atomic access module to be verified based on the numerical comparison result.
[0008] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the verification method of the atomic access module according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the verification method of the atomic access module according to any embodiment of the present invention.
[0010] The technical solution of this invention involves obtaining a reference model and input stimuli corresponding to the atomic access module to be verified, and sending the input stimuli to both the atomic access module to be verified and the reference model. The input stimuli include an input stimulus address, burst length, and burst size. The reference model is used to simulate the numerical calculation logic of the atomic access module to be verified. Then, a target address window is determined based on the input stimulus address, burst length, and burst size using the reference model, and the input stimuli are stored in the stimulus queue corresponding to the target address window. The stimulus queues corresponding to different address windows are processed in parallel. Further, hardware calculations are performed on the stimulus queues based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and a target stimulus is determined from the stimulus queue of the target address window. A second calculation result is determined based on the target stimulus using the reference model. Finally, the first and second calculation results are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result. By establishing a dynamic sliding address window mechanism in the reference model, accurate prediction of the address range and dynamic management of the address window under burst transmission access are achieved. Address alignment and a successive doubling of window size calculation method avoid the inefficient implementation of brute force, effectively reducing code size and improving verification efficiency. Hash mapping from address to window number and an in-order pop-out mechanism within the window enable rapid location and accurate comparison of out-of-order output data streams. A dual-queue handle management method simplifies the complexity of the conversion between identity (ID) order preservation and address order preservation, improving simulation verification speed. This solves the problem of low verification efficiency, poor versatility, and poor reliability caused by the conflict between AXI protocol ID order preservation and atomic operation address order preservation when verifying parallel pipelined atomic access modules in existing technologies. It enables accurate verification of parallel pipelined atomic access modules, improves the versatility and reliability of the verification method, and significantly shortens the chip verification cycle.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1This is a flowchart of a verification method for an atomic access module provided according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a verification method for an atomic access module provided according to Embodiment 2 of the present invention; Figure 3 This is a data processing flowchart of a reference model provided according to Embodiment 2 of the present invention; Figure 4 This is a flowchart of an address window calculation process provided in Embodiment 2 of the present invention; Figure 5 This is a schematic diagram of the structure of a verification platform provided in Embodiment 2 of the present invention; Figure 6 This is a schematic diagram of the structure of a verification device for an atomic access module according to Embodiment 3 of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device that implements the verification method of the atomic access module in the embodiments of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1This is a flowchart of a verification method for an atomic access module provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the design of an atomic access module to be verified is to be verified before mass production. This method can be executed by an atomic access module verification device, which can be implemented in hardware and / or software. This atomic access module verification device can be configured in an electronic device containing a chip verification platform. Figure 1 As shown, the method includes: S110. Obtain the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified.
[0017] In this context, the atomic access module to be verified refers to the hardware design that needs to be verified. Typically, the atomic access module to be verified can receive atomic operation requests on the AXI bus, perform integrated read, modify, and write operations, and return the execution result, thus implementing atomic access functionality. The reference model can refer to a software model written in a high-level programming language to simulate the numerical computation logic of the atomic access module to be verified. The input stimulus can refer to the test data sent to the atomic access module to be verified and the reference model. For example, in the AXI bus protocol environment, the input stimulus is an AXI bus transaction that simulates an access request initiated by a master device in a real system, such as a Central Processing Unit (CPU) core or a Direct Memory Access (DMA) controller. Typically, the input stimulus can be generated by test cases written by the verification engineer. The input stimulus address can refer to the starting address carried in the input stimulus, i.e., the starting memory address of this burst transfer access. The burst length can refer to the number of data transfers contained in the burst transfer. The burst size can refer to the number of bytes contained in each data transfer in the burst transfer.
[0018] S120. The target address window is determined based on the input stimulus address, burst length and burst size using the reference model, and the input stimulus is stored in the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel.
[0019] In this context, an address window refers to a logical range set in the reference model for grouping and managing stimuli. Typically, each address window covers a continuous range of addresses, and stimuli falling within the same address window are stored in the corresponding stimulus queue. A target address window refers to the address window to which the stimulus should be allocated, determined by the reference model using a dynamic window calculation algorithm based on the address, burst length, and burst size of the current input stimulus. A stimulus queue refers to a first-in, first-out (FIFO) data structure used to store stimuli allocated to the target address window.
[0020] In an optional implementation, after determining the target address window based on the input stimulus address, burst length, and burst size using the reference model, the method further includes: establishing a hash mapping relationship between the address range and the address window number.
[0021] The address range refers to the continuous address interval covered by the target address window. Typically, the address range can include a continuous address interval from the start boundary address of the window to the end boundary address of the window. The address window number can refer to an index or identifier used to uniquely identify each address window. The hash mapping relationship refers to the key-value pair correspondence established between the address range and the address window number.
[0022] S130. Based on the atomic access module to be verified, perform hardware calculations on the stimulus queue to obtain a first calculation result. Based on the address information in the first calculation result, determine the corresponding target address window and determine the target stimulus from the stimulus queue of the target address window. Based on the reference model, determine the second calculation result according to the target stimulus.
[0023] The calculation result can refer to the output data generated by the atomic access module or reference model after processing the input stimulus. The first calculation result can refer to the actual result output by the atomic access module to be verified after performing hardware calculations based on the input stimulus. Typically, the first calculation result can be obtained by sampling from the output port of the Register-Transfer Level (RTL) through the monitor of the verification platform. Address information can refer to the address field carried in the first calculation result, which identifies the operation address corresponding to the output result. The target stimulus can refer to the input stimulus popped sequentially from the stimulus queue of the target address window, corresponding to the current RTL output result. Typically, the target stimulus is the earliest stimulus to enter the queue and has not yet been compared. The second calculation result can refer to the expected result calculated by the reference model based on the target stimulus. Typically, the reference model performs corresponding atomic operations on its maintained memory model based on the operation type and operands in the target stimulus, outputting the expected value.
[0024] In an optional implementation, determining the corresponding target address window based on the address information in the first calculation result includes: searching for a target address range that matches the address information in the hash mapping relationship according to the address information in the first calculation result, and determining the address window corresponding to the target address range as the target address window.
[0025] The target address range can refer to the range of addresses that contain the address determined by searching through the address information in the first calculation result in the hash mapping relationship.
[0026] Specifically, after the reference model determines the target address window for the current input stimulus using the sliding window algorithm, the verification platform establishes a key-value pair mapping relationship between the address range covered by the target address window and the corresponding address window number, and stores it in a hash table. When the verification process enters the comparison phase, and the verification platform captures the first calculation result output by the atomic access module to be verified, it extracts the address information carried in the result and uses this address as the lookup key to search the hash table for key-value pairs whose address range contains that address. If a match is found, the matched address range is determined as the target address range, and the address window number corresponding to the target address range is read, thereby determining the target address window corresponding to the output result. This achieves efficient and accurate window positioning for out-of-order output results, avoiding the inefficient method of traversing all windows for address matching.
[0027] S140. Compare the first calculation result and the second calculation result numerically, and determine the verification result corresponding to the atomic access module to be verified based on the numerical comparison result.
[0028] The numerical comparison result can refer to the comparison conclusion obtained by the verification platform after comparing the first calculation result with the second calculation result bit by bit or value by value. The verification result can refer to the conclusion finally determined based on the numerical comparison result, which reflects the correctness of the function of the atomic access module to be verified. For example, the verification result can be verification passed or verification failed.
[0029] The technical solution of this invention involves obtaining a reference model and input stimuli corresponding to the atomic access module to be verified, and sending the input stimuli to both the atomic access module to be verified and the reference model. The input stimuli include an input stimulus address, burst length, and burst size. The reference model is used to simulate the numerical calculation logic of the atomic access module to be verified. Then, a target address window is determined based on the input stimulus address, burst length, and burst size using the reference model, and the input stimuli are stored in the stimulus queue corresponding to the target address window. The stimulus queues corresponding to different address windows are processed in parallel. Further, hardware calculations are performed on the stimulus queues based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and a target stimulus is determined from the stimulus queue of the target address window. A second calculation result is determined based on the target stimulus using the reference model. Finally, the first and second calculation results are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result. By establishing a dynamic sliding address window mechanism in the reference model, accurate prediction of the address range and dynamic management of the address window under burst transmission access are achieved. Address alignment and a successive doubling of window size calculation method avoid the inefficient implementation of brute force, effectively reducing code size and improving verification efficiency. Hash mapping from address to window number and an in-order pop-out mechanism within the window enable rapid location and accurate comparison of out-of-order output data streams. A dual-queue handle management method simplifies the complexity of the conversion between identity (ID) order preservation and address order preservation, improving simulation verification speed. This solves the problem of low verification efficiency, poor versatility, and poor reliability caused by the conflict between AXI protocol ID order preservation and atomic operation address order preservation when verifying parallel pipelined atomic access modules in existing technologies. It enables accurate verification of parallel pipelined atomic access modules, improves the versatility and reliability of the verification method, and significantly shortens the chip verification cycle.
[0030] Example 2 Figure 2This is a flowchart of a verification method for an atomic access module provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiment. Specifically, this embodiment refines the step of "determining a target address window based on the input stimulus address, burst length, and burst size using the reference model." Specifically, it may include: calculating the address range covered by the input stimulus based on the burst length and burst size using the reference model; determining a target address window based on the input stimulus address and the address range using the reference model; wherein the target address window includes a target window size and target window start and end boundaries, the target window start and end boundaries are aligned to integer multiples of the target window size, and the end boundary of the target window is greater than or equal to the end address of the address range. Figure 2 As shown, the method includes: S210. Obtain the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified.
[0031] S220. Calculate the address range covered by the input stimulus based on the burst length and burst size using the reference model.
[0032] In an optional implementation, calculating the address range covered by the input stimulus based on the burst length and burst size using the reference model includes: Step a1: Calculate the initial window size corresponding to the input stimulus based on the burst length and burst size using the reference model.
[0033] The initial window size can refer to the initial value of the window calculated by the reference model based on the burst length and burst size of the current input stimulus, used for the first attempt to determine whether it can cover the transmission of that burst. For example, the initial window size can be calculated using the formula: The calculation yielded the result. It can be represented as burst length. This can be represented as the size of the burst. It can be represented as a logarithmic floor function. It can be expressed as the total amount of data transmitted in a burst.
[0034] Step a2: Calculate the address range covered by the input stimulus based on the input stimulus address and the initial window size using the reference model; wherein the address range includes the window start address and the window end address.
[0035] Here, the window start address can refer to the starting boundary address of the candidate window obtained by aligning the input stimulus addresses according to the initial window size. For example, the window start address can be calculated using the formula: The calculation yielded the result. This can be represented as the input stimulus address, >> can be represented as the right shift operator (rounding down), and << can be represented as the left shift operator. The window end address can refer to the end boundary address of the candidate window. For example, the window end address can be determined using the formula: The calculation yielded the result.
[0036] Specifically, when the reference model receives an input stimulus, it first extracts the burst length and burst size parameters of the stimulus, calculates its total number of bytes, and then performs a logarithmic operation, rounding up the total number of bytes, to obtain a power of 2 value as the initial window size. Subsequently, the reference model uses this initial window size as the current window size and performs address alignment calculations on the original address of the input stimulus based on this window size; that is, it clears the low-order bits of the original address to make it an integer multiple of the current window size, thus obtaining the window start address. Further, based on the window start address and the current window size, the window end address is calculated. The window start address and the window end address together constitute the address range of the candidate window. Therefore, by calculating the initial window size based on the burst length and burst size, the window size can be adaptively adjusted according to the actual address range of different burst transmissions, rather than using a fixed window size or exhaustively enumerating all possible sizes. This dynamic initialization mechanism allows the reference model to find the starting point of the window size that matches the current burst transmission with minimal computational overhead, significantly improving the efficiency of window calculation.
[0037] S230. Determine a target address window based on the input stimulus address and the address range using the reference model; wherein the target address window includes a target window size and target window start and end boundaries, the target window start and end boundaries are aligned to an integer multiple of the target window size, and the end boundary of the target window is greater than or equal to the end address of the address range.
[0038] The window size can refer to the byte length of the address range covered by the address window. For example, the window size can be the address span between the start and end boundaries of the window. In embodiments of the present invention, it can be used... This refers to the window size. The target window size can refer to the address window size allocated to the current input stimulus after dynamic calculation. Typically, the target window size is the minimum window size that can cover the stimulus addresses. The window start and end boundaries can refer to the start and end addresses of the address window in the address space. The target window start and end boundaries can refer to the start and end boundary addresses of the address window allocated to the current input stimulus after dynamic calculation. The end address can refer to the end address of the burst transmission address range covered by the input stimulus.
[0039] In an optional implementation, determining the target address window based on the input excitation address and the address range using the reference model includes: Step b1: Align the input stimulus address with the burst size using the reference model to obtain the burst start address.
[0040] Address alignment refers to the bitwise operation performed on the input stimulus address by the reference model, clearing its low burst size bits to make it an integer multiple of the number of bytes in each data entry. The burst start address refers to the burst transmission start address required by the AXI bus protocol, obtained after burst size address alignment of the input stimulus address. For example, it can be calculated using the formula: The burst start address was calculated.
[0041] Step b2: Determine the burst end address based on the burst start address, burst length, and burst size using the reference model, and compare the window end address in the address range with the burst end address to obtain the comparison result.
[0042] The burst end address can refer to the end address of the address range covered by the burst transmission, that is, the address where the last byte of the burst transmission is located. For example, the burst end address can be calculated using the formula: The calculation yields a comparison result, which can refer to the size relationship obtained by comparing the window end address with the burst end address using the reference model. For example, the comparison result could be that the window end address is less than the burst end address, or that the window end address is greater than or equal to the burst end address.
[0043] Step b3: If the comparison result is that the window end address is less than the burst end address, then the initial window size is successively multiplied to obtain the target window size of the target address window, and the window start address and window end address are re-determined according to the target window size and the input excitation address to obtain the target window start and end boundaries of the target address window.
[0044] Here, successive doubling refers to the operation where the reference model successively doubles the size of the current window when the current candidate window cannot completely cover the burst transmission. For example, successive doubling can be represented as: .
[0045] Step b4: If the comparison result is that the window end address is greater than or equal to the burst end address, then the initial window size is taken as the target window size of the target address window, and the window start address and window end address are taken as the target window start and end boundaries of the target address window.
[0046] Specifically, after calculating the initial window size and the corresponding window start and end addresses, the following steps are performed: First, a burst start address alignment operation is executed: the low burst size bits of the input stimulus address are cleared to obtain the aligned burst start address required by the AXI protocol. Then, the burst end address is calculated based on this burst start address, burst length, and burst size. Further, the reference model compares the calculated window end address with the burst end address to determine if the current candidate window can completely cover the burst transmission. If the comparison result shows that the window end address is less than the burst end address, it indicates that the current window size is insufficient and the burst transmission has crossed the window boundary. In this case, a successive doubling operation is performed to double the window size. Then, based on the doubled window size and the original input stimulus address, address alignment is re-performed, the window start and end addresses are recalculated, and compared with the burst end address again. This process is iterated until the window end address is greater than or equal to the burst end address. When the comparison result shows that the window end address is greater than or equal to the burst end address, it indicates that the current window can completely cover the burst transmission, the loop terminates, the current window size is used as the target window size, and the current window start address and end address are used as the start and end boundaries of the target window, combined into the target address window and output. Thus, by aligning the input stimulus address to the burst size to obtain the burst start address, and then calculating the burst end address based on this aligned address, the calculation of the burst transmission address range is ensured to be consistent with the actual behavior of the AXI bus protocol. Furthermore, by comparing the window end address with the burst end address, a simple numerical comparison is used to determine whether the window covers the burst transmission, rather than exhaustively enumerating all possible window sizes. This allows convergence to the optimal solution within a very short number of iterations, fundamentally solving the problem of inefficiency in the exhaustive search method.
[0047] S240. Assign a transaction identifier to the input stimulus based on the historical transaction identifier library; wherein the transaction identifier is used to uniquely identify the input stimulus in the chip verification platform.
[0048] The historical transaction identifier library refers to the global transaction identifier management mechanism maintained within the verification platform. Typically, this library assigns a unique transaction identifier to each input stimulus and records its allocation history and usage status, ensuring the global uniqueness of each transaction identifier during verification. A transaction identifier can be considered an identification code used to uniquely identify each input stimulus within the chip verification platform.
[0049] S250. Store the input stimuli into the stimuli queue corresponding to the target address window in the order in which the input stimuli are received, and store the transaction identifier into the order-keeping queue corresponding to the target address window in the order in which the input stimuli are received.
[0050] The receiving order refers to the chronological order in which input stimuli are received by the reference model. Typically, upon receiving each input stimulus, the reference model processes it, allocates a window, and enqueues it according to the order of arrival. The order-preserving queue refers to a first-in, first-out queue associated with each address window, specifically used to store transaction identifiers.
[0051] Within the same address window, the excitation queue is processed serially according to the order in which the input excitations are received.
[0052] S260. Based on the atomic access module to be verified, perform hardware calculations on the stimulus queue to obtain a first calculation result, and determine the corresponding target address window based on the address information in the first calculation result.
[0053] S270. Determine the target transaction identifier sequentially from the order-preserving queue of the target address window.
[0054] The target transaction identifier can refer to the transaction identifiers that are popped out of the head of the order-keeping queue of the target address window in sequence.
[0055] S280. Based on the target transaction identifier, determine the corresponding target incentive from the incentive queue of the target address window.
[0056] Specifically, when the reference model receives an input stimulus and determines its target address window using the sliding window algorithm, it first assigns a globally unique transaction identifier to the stimulus from the historical transaction identifier library. Then, the reference model performs a dual-queue enqueue operation: the complete data of the stimulus is stored at the tail of the stimulus queue corresponding to the target address window in the receiving order; simultaneously, the transaction identifier of the stimulus is independently stored at the tail of the order-preserving queue corresponding to the target address window in the same receiving order. The stimulus queue and the order-preserving queue share the same enqueue order and maintain a one-to-one correspondence. All stimuli within the same address window are managed serially according to the receiving order, while queues between different address windows can be processed independently in parallel. When the subsequent verification process captures the first calculation result of the RTL output and determines the target address window based on the address information, it performs a target stimulus determination operation: first, a transaction identifier is popped sequentially from the head of the order-preserving queue of the target address window and identified as the target transaction identifier; then, using this target transaction identifier as the lookup key, a search is performed in the stimulus queue of the target address window to find stimulus data with the same transaction identifier and identify it as the target stimulus. Therefore, by storing transaction identifiers in the incentive queue and the order-preserving queue respectively, the complex conversion from ID to address table is fundamentally bypassed. This significantly reduces implementation complexity, code size, and debugging difficulty.
[0057] S290. If the operation type of the target stimulus is an atomic read operation, then the current value corresponding to the address information is read from the memory model maintained by the reference model as the second calculation result.
[0058] An atomic read operation refers to an atomic access operation that reads the current value from a specified address and returns it without modifying the data in memory. The memory model refers to the data structure maintained internally by the reference model to simulate the memory space accessed by the atomic access module to be verified. Typically, the memory model stores the current data value corresponding to each address, indexed by address, and supports read, write, and update operations. The current value refers to the data value currently stored at that address, read from the memory model according to the address information when the reference model performs an atomic operation.
[0059] S2100. If the operation type of the target stimulus is an atomic modification operation, then read the current value corresponding to the address information from the memory model maintained by the reference model, perform a calculation on the current value according to the operation type and the operand of the target stimulus, take the calculation result as the second calculation result, and update the calculation result to the memory model maintained by the reference model.
[0060] An atomic modification operation can refer to an operation that reads the current value from a specified address, performs a calculation on the current value according to the operation type and operands, and writes the result back to the same address. For example, atomic modification operations can include vector addition, vector maximum value, AND, OR, XOR, increment, decrement, minimum value, minimum value count, comparison followed by replacement, replacement, and addition. The calculation result can refer to the result obtained by the reference model after performing a calculation on the current value read from the memory model according to the operation type and operands of the atomic modification operation.
[0061] Specifically, after the reference model determines the target stimulus from the stimulus queue through a dual-queue management mechanism, it extracts the address information, operation type, and operands from the target stimulus and executes different computational branches based on the operation type. If the target stimulus's operation type is an atomic read operation, the reference model directly uses its maintained memory model as the data source, reads the current value corresponding to that address based on the address information in the target stimulus, and outputs this current value as the second computational result without performing any memory update operations. If the target stimulus's operation type is an atomic modify operation, the reference model first reads the current value corresponding to the target address from the memory model; then, it performs corresponding operations on the current value based on the operation type and the operands carried in the target stimulus, outputting the operation result as the second computational result; simultaneously, it updates the corresponding storage location in the memory model with this operation result, ensuring that the data in the memory model remains consistent with the hardware storage state, providing a correct current value basis for subsequent stimulus verification.
[0062] S2110. Compare the first calculation result and the second calculation result numerically, and determine the verification result corresponding to the atomic access module to be verified based on the numerical comparison result.
[0063] In an optional implementation, the numerical comparison of the first calculation result and the second calculation result includes: when the operation type of the target stimulus is an atomic read operation, comparing the read data in the first calculation result with the second calculation result to obtain a numerical comparison result; when the operation type of the target stimulus is an atomic modification operation, comparing the data written to the slave device in the first calculation result with the second calculation result to obtain a numerical comparison result; when the atomic access module to be verified returns a response to the upstream, comparing the returned user bit data in the first calculation result with the second calculation result to obtain a numerical comparison result.
[0064] In this context, "read data" refers to the data value read from the target address and returned to the master device by the atomic access module to be verified after performing an atomic read operation. "Slave device" refers to a passive interface device mounted on the AXI bus that responds to access requests from the master device. "Written data" refers to the data value written to the downstream slave device by the atomic access module to be verified after performing an atomic modification operation. "Upstream" refers to the upstream direction in the AXI bus protocol, i.e., the direction pointing to the master device. "Response" refers to the operation completion notification returned by the atomic access module to the upstream master device after completing the atomic operation. For example, the response may include the operation status, read data, and user-defined extended information. "Returned user bit data" refers to the data carried by user-defined bits in the AXI bus protocol.
[0065] Specifically, after the verification platform completes the calculation of the first and second calculation results, it performs data comparisons under different scenarios based on the operation type of the target stimulus and the current verification stage. If the operation type of the target stimulus is an atomic read operation, the verification platform extracts the read data returned by the read data channel from the first calculation result output by the module to be verified, and compares it with the current value read by the reference model from the memory model, i.e., the second calculation result, to confirm whether the module to be verified has correctly read the data from the target address. If the operation type of the target stimulus is an atomic modification operation, the verification platform compares the data written by the module to be verified to the downstream slave device with the calculation result calculated by the reference model according to the operation type and operands, i.e., the second calculation result, to confirm whether the module to be verified has correctly written the calculation result to the target address. When the atomic access module to be verified returns an operation response to the upstream master device, the verification platform also extracts the returned user bit data from the first calculation result, compares it with the expected user bit data in the reference model, and confirms whether the module to be verified has correctly driven the user-defined extended information when returning the response. The three comparisons described above correspond to three key checkpoints in the verification process: read data verification (verifying the correctness of the read path), write data verification (verifying the correctness of the write path), and return user bit verification (verifying the correctness of the response interface). Any failed comparison allows for quick identification of functional defects in the module to be verified based on the failure scenario. If all comparisons pass, the functional correctness of the atomic access module under that stimulus is verified.
[0066] The technical solution of this invention involves obtaining a reference model and input stimuli corresponding to the atomic access module to be verified, and sending the input stimuli to both the atomic access module to be verified and the reference model. The input stimuli include an input stimulus address, a burst length, and a burst size. The reference model is used to simulate the numerical calculation logic of the atomic access module to be verified. Then, the address range covered by the input stimuli is calculated based on the burst length and burst size using the reference model. A target address window is determined based on the input stimulus address and address range using the reference model. Transaction identifiers are assigned to the input stimuli based on a historical transaction identifier database. The input stimuli are stored in the stimulus queue corresponding to the target address window according to the receiving order, and the transaction identifiers are stored in the order-keeping queue corresponding to the target address window. Further, hardware calculations are performed on the stimulus queue based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result. Target transaction identifiers are determined sequentially from the order-keeping queue of the target address window. Based on the target transaction identifiers, the corresponding target stimuli are determined from the stimulus queue of the target address window. If the target stimulus's operation type is an atomic read operation, the current value corresponding to the address information is read from the memory model maintained by the reference model and used as the second calculation result. If the target stimulus's operation type is an atomic modify operation, the current value corresponding to the address information is read from the memory model maintained by the reference model, and the current value is calculated according to the operation type and the operands of the target stimulus. The calculation result is used as the second calculation result, and the calculation result is updated in the memory model maintained by the reference model. Finally, the first calculation result and the second calculation result are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result. By establishing a dynamic sliding address window mechanism in the reference model, accurate prediction of the address range and dynamic management of the address window under burst transmission access are achieved. Address alignment and a successive doubling of window size calculation method avoid the inefficient implementation of brute force, effectively reducing code size and improving verification efficiency. Hash mapping from address to window number and an in-order pop-out mechanism within the window enable rapid location and accurate comparison of out-of-order output data streams. A dual-queue handle management method simplifies the complexity of the conversion between identity (ID) order preservation and address order preservation, improving simulation verification speed. This solves the problem of low verification efficiency, poor versatility, and poor reliability caused by the conflict between AXI protocol ID order preservation and atomic operation address order preservation when verifying parallel pipelined atomic access modules in existing technologies. It enables accurate verification of parallel pipelined atomic access modules, improves the versatility and reliability of the verification method, and significantly shortens the chip verification cycle.
[0067] Figure 3The diagram illustrates a data processing flowchart of a reference model provided in an embodiment of the present invention. Specifically, the reference model first receives input stimuli and, by parsing the user information in the write address channel, confirms the data type and atomic operation type of the input stimuli. Subsequently, based on the input stimuli address and burst length, the reference model determines the target address window to which the input stimuli belongs using a sliding window calculation algorithm, and allocates the stimuli to the corresponding address window according to its address range. During the storage phase, the reference model saves stimuli with the same handle by address and ID, that is, stimuli within the same address window are saved in the order of receipt to achieve pipelined computation and ensure atomicity, while stimuli between different address windows are processed independently and in parallel. During data processing, the reference model performs pipelined computation on stimuli within the same address window in a first-in-first-out order, and stores the output calculated values in the corresponding stimuli queue in window-preserving order. When an atomic read operation is received, the reference model looks up the corresponding address window by address, pops stimuli from the window queue in sequence, reads the corresponding current value from the memory model, and updates the returned user information of the stimuli in the address-preserving queue with the read data. At the same time, the corresponding stimuli in the ID-preserving queue are also updated synchronously, thus realizing the conversion from address-preserving to ID-preserving. Finally, in the output stage, the reference model processes three verification scenarios respectively: for atomic read operations, it looks up and compares the returned user information in the ID-preserving queue in sequence; for atomic modification operations, it looks up the corresponding address window based on the address and compares the written value of the slave device in window-preserving order; for return value verification, it compares the returned data stored in the reference model with the data returned by the design to be verified to confirm the functional correctness of the design to be verified. The entire data flow, from the reception of input stimuli, window allocation, queue storage, pipeline calculation, conversion of order preservation method to the final data comparison, forms a complete verification closed loop.
[0068] Figure 4The diagram shows a flowchart of an address window calculation process provided by an embodiment of the present invention. Specifically, firstly, the initial window size is calculated: the total number of bytes is calculated based on the burst length and burst size of the input stimulus, and then the logarithm of this number is rounded up to obtain the initial window size. Then, the original starting address of the input stimulus is aligned to the burst size to obtain the burst start address. After initialization, the process enters an infinite loop. In the loop, firstly, the starting address of the candidate window is calculated based on the current window size, that is, the input stimulus address is aligned to an integer multiple of the current window size boundary; then, the ending address of the candidate window is calculated, that is, the starting address plus the current window size minus 1. Next, it is determined whether the ending address of the candidate window is greater than or equal to the ending address of the burst transmission. If this condition is met, it means that the current candidate window has completely covered the entire burst transmission, and the window does not cross the boundary, so the loop is exited, and the current window size is the minimum aligned window. If this condition is not met, it means that the current candidate window cannot cover the entire burst transmission, so the window size is doubled, and the loop is restarted. The starting and ending addresses of the candidate window are recalculated based on the doubled window size, and the coverage judgment is performed again. This loop iterates until it finds the minimum alignment window that can completely cover the burst transmission. After the process is completed, the final minimum alignment window is the target address window for the input stimulus, which is used for the allocation and storage of subsequent stimuli.
[0069] Figure 5 The diagram shows a structural schematic of a verification platform provided in an embodiment of the present invention. Specifically, the verification platform adopts an architecture based on a general verification methodology, mainly including core components such as a reference model, a design to be verified, an AXI master device agent, and an AXI slave device agent. The design to be verified is the atomic access module that needs to be verified. It connects to the AXI master device agent through an upper-level computer interface and to the AXI slave device agent through a lower-level computer interface. The reference model internally includes a window calculation module, used to dynamically calculate the address window based on the address, burst length, and burst size of the input stimulus, and to perform random selection calculations on different windows. The verification platform also includes multiple checking units: a write data checking unit to verify whether the data written by the design to be verified to the downstream slave device is correct during atomic modification operations; a return data checking unit to verify whether the read data returned by the design to be verified to the upstream master device is correct; an end checking unit to verify whether the entire verification process is completed as expected; and a formal checking calculation unit to perform formal verification of the calculation logic of the reference model. The AXI master device agent is responsible for generating and sending input stimuli to the design to be verified and the reference model, and the AXI slave device agent is used to simulate the behavior of the downstream slave device. The entire verification platform achieves comprehensive verification of the correctness of the parallel pipeline atomic access module through the collaborative work of its components.
[0070] Example 3 Figure 6 This is a schematic diagram of a verification device for an atomic access module provided in Embodiment 3 of the present invention. This device is applied to a chip verification platform under an Advanced Scalable Interface Bus Protocol (AIP) environment, and the verification platform includes a reference model. Figure 6 As shown, the device includes: a data acquisition module 310, a window processing module 320, an atomic calculation module 330, and a result verification module 340; The data acquisition module 310 is used to acquire the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes an input stimulus address, a burst length, and a burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; Window processing module 320 is used to determine a target address window based on the input stimulus address, burst length and burst size through the reference model, and store the input stimulus into the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel; The atomic computing module 330 is used to perform hardware calculations on the stimulus queue based on the atomic access module to be verified, obtain a first calculation result, determine the corresponding target address window based on the address information in the first calculation result, determine the target stimulus from the stimulus queue of the target address window, and determine a second calculation result based on the target stimulus according to the reference model. The result verification module 340 is used to numerically compare the first calculation result and the second calculation result, and determine the verification result corresponding to the atomic access module to be verified based on the numerical comparison result.
[0071] The technical solution of this invention involves obtaining a reference model and input stimuli corresponding to the atomic access module to be verified, and sending the input stimuli to both the atomic access module to be verified and the reference model. The input stimuli include an input stimulus address, burst length, and burst size. The reference model is used to simulate the numerical calculation logic of the atomic access module to be verified. Then, a target address window is determined based on the input stimulus address, burst length, and burst size using the reference model, and the input stimuli are stored in the stimulus queue corresponding to the target address window. The stimulus queues corresponding to different address windows are processed in parallel. Further, hardware calculations are performed on the stimulus queues based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and a target stimulus is determined from the stimulus queue of the target address window. A second calculation result is determined based on the target stimulus using the reference model. Finally, the first and second calculation results are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result. By establishing a dynamic sliding address window mechanism in the reference model, accurate prediction of the address range and dynamic management of the address window under burst transmission access are achieved. Address alignment and a successive doubling of window size calculation method avoid the inefficient implementation of brute force, effectively reducing code size and improving verification efficiency. Hash mapping from address to window number and an in-order pop mechanism within the window enable rapid location and accurate comparison of out-of-order output data streams. A dual-queue handle management method simplifies the complexity of the conversion between ID-preserving and address-preserving, improving simulation verification speed. This solves the problem of low verification efficiency, poor versatility, and poor reliability caused by the conflict between AXI protocol ID-preserving and atomic operation address-preserving when verifying parallel pipelined atomic access modules in existing technologies. It enables accurate verification of parallel pipelined atomic access modules, improves the versatility and reliability of the verification method, and significantly shortens the chip verification cycle.
[0072] Optionally, the window processing module 320 can be specifically used to: calculate the address range covered by the input stimulus based on the burst length and burst size using the reference model; determine the target address window based on the input stimulus address and the address range using the reference model; wherein the target address window includes a target window size and target window start and end boundaries, the target window start and end boundaries are aligned to an integer multiple of the target window size, and the end boundary of the target window is greater than or equal to the end address of the address range.
[0073] Optionally, the window processing module 320 can be specifically used to: calculate the initial window size corresponding to the input stimulus based on the burst length and burst size using the reference model; calculate the address range covered by the input stimulus based on the input stimulus address and the initial window size using the reference model; wherein the address range includes the window start address and the window end address.
[0074] Optionally, the window processing module 320 can be specifically used to: align the input stimulus address based on the burst size using the reference model to obtain the burst start address; determine the burst end address using the reference model based on the burst start address, burst length, and burst size, and compare the window end address in the address range with the burst end address to obtain a comparison result; if the comparison result is that the window end address is less than the burst end address, then the initial window size is successively multiplied to obtain the target window size of the target address window, and the window start address and window end address are re-determined according to the target window size and the input stimulus address to obtain the target window start and end boundaries of the target address window; if the comparison result is that the window end address is greater than or equal to the burst end address, then the initial window size is used as the target window size of the target address window, and the window start address and window end address are used as the target window start and end boundaries of the target address window.
[0075] Optionally, the window processing module 320 can be specifically used to: allocate transaction identifiers to the input stimulus based on a historical transaction identifier library; wherein the transaction identifier is used to uniquely identify the input stimulus in the chip verification platform; store the input stimulus in the stimulus queue corresponding to the target address window according to the receiving order of the input stimulus, and store the transaction identifier in the order of receiving the input stimulus in the order-preserving queue corresponding to the target address window; wherein the stimulus queue corresponding to the same address window is processed serially according to the receiving order of the input stimulus; The atomic computing module 330 can be specifically used to: determine the target transaction identifier in order from the order-preserving queue of the target address window; and determine the corresponding target incentive from the incentive queue of the target address window based on the target transaction identifier.
[0076] Optionally, the atomic computation module 330 can be specifically used to: if the operation type of the target stimulus is an atomic read operation, read the current value corresponding to the address information from the memory model maintained by the reference model as a second calculation result; if the operation type of the target stimulus is an atomic modification operation, read the current value corresponding to the address information from the memory model maintained by the reference model, perform calculations on the current value according to the operation type and the operands of the target stimulus, use the calculation result as a second calculation result, and update the calculation result in the memory model maintained by the reference model.
[0077] Optionally, the verification device for the atomic access module may further include: an address mapping module, used to establish a hash mapping relationship between the address range and the address window number after the target address window is determined by the reference model based on the input excitation address, burst length and burst size; The atomic calculation module 330 can be specifically used to: search for the target address range that matches the address information in the hash mapping relationship based on the address information in the first calculation result, and determine the address window corresponding to the target address range as the target address window.
[0078] The verification device for atomic access modules provided in this embodiment of the invention can execute the verification method for atomic access modules provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0079] Example 4 Figure 7 A schematic diagram of an electronic device 410 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0080] like Figure 7As shown, the electronic device 410 includes at least one processor 420 and a memory, such as a read-only memory (ROM) 430 or a random access memory (RAM) 440, communicatively connected to the at least one processor 420. The memory stores computer programs executable by the at least one processor. The processor 420 can perform various appropriate actions and processes based on the computer program stored in the ROM 430 or loaded into the RAM 440 from storage unit 490. The RAM 440 may also store various programs and data required for the operation of the electronic device 410. The processor 420, ROM 430, and RAM 440 are interconnected via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.
[0081] Multiple components in electronic device 410 are connected to I / O interface 460, including: input unit 470, such as keyboard, mouse, etc.; output unit 480, such as various types of monitors, speakers, etc.; storage unit 490, such as disk, optical disk, etc.; and communication unit 4100, such as network card, modem, wireless transceiver, etc. Communication unit 4100 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0082] Processor 420 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 420 performs the various methods and processes described above, such as the verification method for atomic access modules.
[0083] The method includes: Obtain the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; The reference model determines the target address window based on the input stimulus address, burst length, and burst size, and stores the input stimulus in the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel. Hardware calculations are performed on the stimulus queue based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and the target stimulus is determined from the stimulus queue of the target address window. The second calculation result is determined based on the target stimulus according to the reference model. The first calculation result and the second calculation result are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result.
[0084] In some embodiments, the method for verifying the atomic access module may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 490. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 410 via ROM 430 and / or communication unit 4100. When the computer program is loaded into RAM 440 and executed by processor 420, one or more steps of the method for verifying the atomic access module described above may be performed. Alternatively, in other embodiments, processor 420 may be configured to perform the method for verifying the atomic access module by any other suitable means (e.g., by means of firmware).
[0085] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0086] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0087] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0088] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0089] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0090] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0091] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0092] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for verifying atomic access modules, characterized in that, The method is applied to a chip verification platform under an advanced scalable interface bus protocol environment. The verification platform includes a reference model, and the method includes: Obtain the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; The reference model determines the target address window based on the input stimulus address, burst length, and burst size, and stores the input stimulus in the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel. Hardware calculations are performed on the stimulus queue based on the atomic access module to be verified to obtain a first calculation result. The corresponding target address window is determined based on the address information in the first calculation result, and the target stimulus is determined from the stimulus queue of the target address window. The second calculation result is determined based on the target stimulus according to the reference model. The first calculation result and the second calculation result are numerically compared, and the verification result corresponding to the atomic access module to be verified is determined based on the numerical comparison result.
2. The method according to claim 1, characterized in that, The step of determining the target address window based on the input excitation address, burst length, and burst size using the reference model includes: The reference model is used to calculate the address range covered by the input stimulus based on the burst length and burst size; The target address window is determined by the reference model based on the input stimulus address and the address range; wherein the target address window includes a target window size and target window start and end boundaries, the target window start and end boundaries are aligned to an integer multiple of the target window size, and the end boundary of the target window is greater than or equal to the end address of the address range.
3. The method according to claim 2, characterized in that, The step of calculating the address range covered by the input stimulus based on the burst length and burst size using the reference model includes: The reference model calculates the initial window size corresponding to the input stimulus based on the burst length and burst size; The reference model calculates the address range covered by the input stimulus based on the input stimulus address and the initial window size; wherein the address range includes the window start address and the window end address.
4. The method according to claim 3, characterized in that, The step of determining the target address window based on the input excitation address and the address range using the reference model includes: The burst start address is obtained by aligning the input stimulus address with the burst size using the reference model; The reference model is used to determine the burst end address based on the burst start address, burst length, and burst size, and the window end address in the address range is compared with the burst end address to obtain the comparison result. If the comparison result is that the window end address is less than the burst end address, the initial window size is successively multiplied to obtain the target window size of the target address window, and the window start address and window end address are re-determined according to the target window size and the input excitation address to obtain the target window start and end boundaries of the target address window; If the comparison result is that the window end address is greater than or equal to the burst end address, then the initial window size is taken as the target window size of the target address window, and the window start address and window end address are taken as the target window start and end boundaries of the target address window.
5. The method according to claim 1, characterized in that, The step of storing the input stimulus into the stimulus queue corresponding to the target address window includes: A transaction identifier is assigned to the input stimulus based on a historical transaction identifier library; wherein, the transaction identifier is used to uniquely identify the input stimulus in the chip verification platform; The input stimuli are stored in the stimuli queue corresponding to the target address window in the order in which they are received, and the transaction identifier is stored in the order-keeping queue corresponding to the target address window in the order in which they are received. Within the same address window, the excitation queue processes the input excitations serially according to the order in which they are received. Determining the target stimulus from the stimulus queue of the target address window includes: The target transaction identifier is determined sequentially from the ordered queue of the target address window; Based on the target transaction identifier, the corresponding target incentive is determined from the incentive queue of the target address window.
6. The method according to claim 1, characterized in that, The step of determining the second calculation result based on the reference model and the target stimulus includes: If the operation type of the target stimulus is an atomic read operation, then the current value corresponding to the address information is read from the memory model maintained by the reference model and used as the second calculation result; If the operation type of the target stimulus is an atomic modification operation, then the current value corresponding to the address information is read from the memory model maintained by the reference model, the current value is calculated according to the operation type and the operand of the target stimulus, the calculation result is used as the second calculation result, and the calculation result is updated to the memory model maintained by the reference model.
7. The method according to claim 1, characterized in that, After determining the target address window based on the input excitation address, burst length, and burst size using the reference model, the method further includes: Establish a hash mapping relationship between address ranges and address window numbers; The step of determining the corresponding target address window based on the address information in the first calculation result includes: Based on the address information in the first calculation result, the target address range that matches the address information is searched in the hash mapping relationship, and the address window corresponding to the target address range is determined as the target address window.
8. A verification device for an atomic access module, characterized in that, The device is used in a chip verification platform under an advanced scalable interface bus protocol environment. The verification platform includes a reference model, and the device includes: The data acquisition module is used to acquire the reference model and input stimulus corresponding to the atomic access module to be verified, and send the input stimulus to the atomic access module to be verified and the reference model respectively; wherein, the input stimulus includes the input stimulus address, burst length and burst size; the reference model is used to simulate the numerical calculation logic of the atomic access module to be verified; The window processing module is used to determine the target address window based on the input stimulus address, burst length, and burst size using the reference model, and to store the input stimulus into the stimulus queue corresponding to the target address window; wherein, the stimulus queues corresponding to different address windows are processed in parallel. An atomic computation module is used to perform hardware computation on the stimulus queue based on the atomic access module to be verified, obtain a first computation result, determine the corresponding target address window based on the address information in the first computation result, determine the target stimulus from the stimulus queue of the target address window, and determine a second computation result based on the target stimulus according to the reference model. The result verification module is used to numerically compare the first calculation result and the second calculation result, and determine the verification result corresponding to the atomic access module to be verified based on the numerical comparison result.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the verification method of the atomic access module according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the verification method of the atomic access module according to any one of claims 1-7.
