Chip instruction access verification method and device, electronic equipment and storage medium

By matching the grouping of target execution modules and thread groups with the address space constraint strategy in the chip instruction memory access verification, strategies adapted to different verification scenarios are generated, which solves the problem of poor adaptability of verification scenarios in the existing technology and achieves high efficiency and flexibility. verification process.

CN118761364APending Publication Date: 2024-10-11SHANGHAI BIREN TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410473500.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-18
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing chip instruction memory access verification methods cannot adapt to different verification scenarios, have poor completeness and flexibility, and low verification efficiency.

Method used

By determining verification scenarios, memory access instructions and thread groups based on the target execution module, grouping and matching according to address space constraint strategies, and generating address space constraint strategies adapted to different verification scenarios, achieving fine-grained control and flexible verification.

Benefits of technology

It improves the completeness and flexibility of chip instruction memory access verification, improves verification efficiency, can adapt to multiple verification scenarios and reuse address space constraint strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761364A_ABST
    Figure CN118761364A_ABST
Patent Text Reader

Abstract

The invention provides a chip instruction memory access verification method and device, electronic equipment and a storage medium, and relates to the technical field of integrated circuits, and the method comprises the following steps: determining a verification scene, a memory access instruction and a plurality of thread groups corresponding to the memory access instruction based on a target execution module; determining an address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the tested chip; determining an address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group; and based on the address space constraint strategy of the memory access instruction, performing memory access verification on the memory of the tested chip. According to the method and the device provided by the invention, the completeness, the flexibility and the verification efficiency of chip instruction memory access verification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of integrated circuit technology, and in particular to a chip instruction memory access verification method, device, electronic device and storage medium. Background Art

[0002] Chip instruction memory access verification is a key task in the chip design process, which aims to verify the correctness and consistency between the chip's instruction set architecture and its memory access logic. By performing chip instruction memory access verification, the correct interaction between the chip's instruction set architecture and memory access logic can be ensured, thereby improving the functional correctness and stability of the chip.

[0003] When performing instruction memory access verification on a chip, the related technology usually adopts a method of writing directed test cases. This method cannot adapt to the verification requirements of different verification scenarios, has poor completeness and flexibility, and has low verification efficiency.

[0004] Therefore, how to improve the completeness and flexibility of chip instruction memory access verification and improve verification efficiency has become a technical problem that needs to be urgently solved in the industry. Summary of the invention

[0005] The present application provides a chip instruction memory access verification method, device, electronic device and storage medium, which are used to solve the technical problem of how to improve the completeness and flexibility of chip instruction memory access verification and improve verification efficiency.

[0006] The present application provides a chip instruction memory access verification method, comprising:

[0007] Determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module;

[0008] Determine the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the chip under test;

[0009] Determining the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group;

[0010] Based on the address space constraint strategy of the memory access instruction, memory access verification is performed on the memory of the chip under test.

[0011] In some embodiments, the determining of the verification scenario, the memory access instruction, and the plurality of thread groups corresponding to the memory access instruction based on the target execution module includes:

[0012] Determine multiple verification scenarios based on the target execution module; determine multiple verification scenarios corresponding to the memory access instruction;

[0013] The threads corresponding to the memory access instructions are grouped based on the multiple verification scenarios to obtain multiple thread groups.

[0014] In some embodiments, grouping threads corresponding to the memory access instructions based on the multiple verification scenarios to obtain multiple thread groups includes:

[0015] Grouping the threads corresponding to the memory access instructions based on a preset grouping method to obtain a plurality of thread groups;

[0016] The preset grouping method includes at least one of grouping all threads into the same group, grouping based on the number size of each thread, grouping based on the parity of the number of each thread, and custom grouping.

[0017] In some embodiments, determining the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the chip under test includes:

[0018] Matching each target execution module with execution module applicable information corresponding to each address space constraint strategy in the constraint strategy pool, and determining the address space constraint strategy of each target execution module in the chip under test based on the matching result;

[0019] The constraint policy pool includes a plurality of address space constraint policies and applicable execution module information corresponding to each address space constraint policy.

[0020] In some embodiments, determining the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group includes:

[0021] In the case where the memory access instructions come from different test hosts, the address space constraint policy of each test host is determined based on the address space constraint policy of each memory access instruction.

[0022] In some embodiments, the verification scenarios corresponding to the memory access instructions include:

[0023] The memory access addresses of one or more threads fall on the same cache line and have the same memory block identifier;

[0024] The memory access addresses of one or more threads fall on the same cache line and have different memory block identifiers;

[0025] The memory access addresses of one or more threads fall into different cache lines and have the same memory block identifier;

[0026] The memory access addresses of one or more threads fall into different cache lines and have different memory block identifiers.

[0027] The present application provides a chip instruction memory access verification device, comprising:

[0028] A group determination unit, configured to determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module;

[0029] A group policy determination unit, configured to determine an address space constraint policy for each thread group based on an address space constraint policy applicable to each target execution module in the chip under test;

[0030] An instruction strategy determining unit, configured to determine the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group;

[0031] A memory access verification unit is used to perform memory access verification on the memory of the chip under test based on the address space constraint strategy of the memory access instruction.

[0032] The present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the chip instruction memory access verification method is implemented when the processor executes the program.

[0033] The present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the chip instruction memory access verification method when executed by a processor.

[0034] The present application provides a computer program product, including a computer program, which implements the chip instruction memory access verification method when executed by a processor.

[0035] The chip instruction memory access verification method, device, electronic device and storage medium provided in the present application determine the verification scenario, memory access instruction, and multiple thread groups corresponding to the memory access instruction according to the target execution module; determine the address space constraint strategy of each thread group according to the address space constraint strategy applicable to each target execution module in the tested chip; determine the address space constraint strategy of the memory access instruction according to the address space constraint strategy of each thread group; perform memory access verification on the memory of the tested chip according to the address space constraint strategy of the memory access instruction; since the address space constraint strategy of the memory access instruction is determined according to the corresponding verification scenario, it can adapt to the verification requirements of different verification scenarios, thereby improving the completeness of the chip instruction memory access verification; since the address space constraint strategy of the memory access instruction is finally obtained by selecting and combining the address space constraint strategy applicable to each target execution module, fine-grained control can be implemented for the memory access verification of the memory access instruction, and test cases of different verification scenarios can be flexibly implemented. The address space constraint strategy applicable to each target execution module can be reused, thereby improving the flexibility and verification efficiency of the chip instruction memory access verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 This is one of the flowcharts of the chip instruction memory access verification method provided by this application;

[0039] Figure 2 is a schematic diagram of the constraint strategy hierarchy provided by this application;

[0040] Figure 3 It is a schematic diagram of memory access instruction thread grouping provided by the present application;

[0041] Figure 4 is a schematic diagram of the thread group constraint strategy configuration provided by this application;

[0042] Figure 5 This is the second flowchart of the chip instruction memory access verification method provided by this application;

[0043] Figure 6 It is a schematic diagram of chip instruction memory access verification provided by this application;

[0044] Figure 7 It is a structural diagram of a chip instruction memory access verification device provided by the present application;

[0045] Figure 8 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0047] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0048] When designing a chip, the instruction set architecture of the chip is usually defined according to the requirements of the target application, including the supported instruction set, register organization, memory mapping, etc. At the same time, the chip's memory access logic is also implemented, including the memory interface, data path, etc. Chip instruction memory access verification is to verify the correct interaction between these two parts.

[0049] Specifically, chip instruction memory access verification verifies whether the chip's memory access logic correctly implements the memory access operations defined by the instruction set architecture. This includes verifying the correctness of the memory interface, the correct connection of the data path, the correctness of data reading and writing, etc. A series of test cases will be written to cover various situations of memory read and write operations to ensure that the chip can correctly access the memory.

[0050] The test cases in related technologies are usually fixed, that is, targeted test cases are written for specific verification scenarios. This method cannot effectively cover most verification scenarios, lacks randomness, and has poor completeness and flexibility. In addition, the relevant verification constraint strategies cannot be reused. For multiple modules in a chip, if there are repeated verification strategies, the test cases need to be rewritten, which reduces the verification efficiency.

[0051] In order to solve the shortcomings of related technologies, Figure 1 This is one of the flow charts of the chip instruction memory access verification method provided by this application, such as Figure 1 As shown, the method includes step 110 , step 120 , step 130 and step 140 .

[0052] Step 110: Determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module.

[0053] Specifically, the execution subject of the chip instruction memory access verification method provided in the embodiment of the present application is a chip instruction memory access verification device. The device can be implemented by software, such as a chip instruction memory access verification program; it can also be a device that executes the chip instruction memory access verification method, such as a mobile terminal, a tablet computer, a desktop computer or a server.

[0054] Memory access instructions refer to instructions for accessing the memory of a chip, such as write instructions and read instructions. The test host (master) can be connected to the chip under test (Design Under Test, DUT) through a test interface, send specific memory access instructions to the chip under test, access the chip's memory, and implement instruction memory access verification. The chip's memory can be implemented using static random access memory (SRAM).

[0055] Verification scenarios refer to situations or circumstances in which chip instruction memory access verification is performed. Verification scenarios can be pre-designed or determined based on actual needs. Each verification scenario tests the performance of the chip under different conditions to ensure that it meets the expected requirements. These verification scenarios can cover a variety of functions and use cases to fully verify whether the chip's memory access logic correctly implements the memory access operations defined by the instruction set architecture.

[0056] A thread is an execution unit within a program. A program can execute multiple threads at the same time, each thread can run independently, and can perform the same task at the same time. In an embodiment of the present application, the chip under test may include a graphics processing unit (GPU) and other parallel processors. SIMT (Single Instruction, Multiple Threads) is a parallel computing model commonly used in graphics processors and other parallel processors. The advantage of SIMT is that it can use a large number of threads to execute tasks in parallel, thereby speeding up the computing process. This parallel computing model has been widely used in graphics processing, scientific computing, machine learning and other fields.

[0057] In SIMT, one instruction can correspond to 32 or 64 threads, which are divided into multiple thread groups. These thread groups execute the same instruction at the same time, but each thread can process different data, which enables SIMT to efficiently execute a large number of similar tasks in parallel.

[0058] Thread groups are usually mapped to execution modules in the chip under test so as to execute multiple threads simultaneously. The chip under test includes multiple execution modules, wherein the execution module of the thread group corresponding to a certain memory access instruction can be considered as the target execution module of the multiple thread groups corresponding to the memory access instruction in the chip under test.

[0059] Before performing chip instruction memory access verification, the target execution module to be verified can be determined first, and the corresponding memory access instruction and verification scenario can be determined according to the target execution module. The threads corresponding to the memory access instruction are grouped to obtain multiple thread groups.

[0060] For example, the target execution modules that need to be verified in the chip are the memory (SRAM) access control module and the cache line control module, and the corresponding verification scenarios and memory access instructions can be determined based on these two target execution modules.

[0061] Step 120 : Determine the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the chip under test.

[0062] Specifically, the address space constraint policy refers to a policy used to manage and restrict thread access to the memory address space, which is usually used to ensure that threads can correctly access and use memory during execution and will not cross the boundary or cause adverse effects on the system. Address space constraint policies usually include memory address space allocation, access permission control, address mapping, address translation, merging control between threads, and address conflict control between threads. These address space constraint policies can be used alone or in combination to ensure the security, stability, and correctness of chip memory access, and can be adjusted and optimized according to system requirements and verification scenarios.

[0063] The address space constraint strategy applicable to each target execution module in the chip under test may be determined first, and the address space constraint strategy of each thread group may be determined according to the thread group specifically run by each target execution module.

[0064] Step 130 : Determine the address space constraint strategy for memory access instructions based on the address space constraint strategy of each thread group.

[0065] Specifically, the address space constraint policy of the memory access instruction is obtained after sorting out the multiple thread groups corresponding to the memory access instruction and the address space constraint policy of each thread group.

[0066] Step 140: Based on the address space constraint strategy of the memory access instruction, perform memory access verification on the memory of the chip under test.

[0067] Specifically, after determining the address space constraint strategy of the memory access instruction, the memory of the chip under test can be verified for memory access, for example, whether the chip's memory access logic correctly implements the memory access operation defined by the memory access instruction, including verifying the correctness of the memory interface, the correct connection of the data path, the correctness of data reading and writing, etc. The security, stability and correctness of the chip memory access can be determined based on the memory access verification results.

[0068] The chip instruction memory access verification method provided in the embodiment of the present application determines the verification scenario, memory access instructions, and multiple thread groups corresponding to the memory access instructions according to the target execution module; determines the address space constraint strategy of each thread group according to the address space constraint strategy applicable to each target execution module in the tested chip; determines the address space constraint strategy of the memory access instruction according to the address space constraint strategy of each thread group; performs memory access verification on the memory of the tested chip according to the address space constraint strategy of the memory access instruction; since the address space constraint strategy of the memory access instruction is determined according to the corresponding verification scenario, it can adapt to the verification requirements of different verification scenarios, thereby improving the completeness of the chip instruction memory access verification; since the address space constraint strategy of the memory access instruction is finally obtained by selecting and combining the address space constraint strategy applicable to each target execution module, fine-grained control can be implemented for the memory access verification of the memory access instruction, and test cases of different verification scenarios can be flexibly implemented. The address space constraint strategy applicable to each target execution module can be reused, thereby improving the flexibility and verification efficiency of the chip instruction memory access verification.

[0069] It should be noted that each implementation method of the present application can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.

[0070] In some embodiments, determining a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module includes:

[0071] Determine multiple verification scenarios based on the target execution module;

[0072] Threads corresponding to memory access instructions are grouped based on multiple verification scenarios to obtain multiple thread groups.

[0073] Specifically, there may be multiple verification scenarios corresponding to the target execution module. When performing memory access verification on the chip under test, the corresponding multiple verification scenarios may be determined in advance.

[0074] The threads corresponding to the memory access instructions are grouped according to the verification requirements of each verification scenario to obtain multiple thread groups. For example, the memory access instruction sent by the test host is a read instruction, which is executed by 32 threads. According to the verification requirements of the verification scenario, the 32 threads corresponding to the memory access instruction can be divided into 4 groups, each with 8 threads.

[0075] The chip instruction memory access verification method provided in the embodiment of the present application determines the verification scenario according to the target execution module, and groups the threads corresponding to the memory access instructions according to multiple verification scenarios. It can adapt to the verification requirements of different verification scenarios and improve the completeness of the chip instruction memory access verification.

[0076] In some embodiments, threads corresponding to memory access instructions are grouped based on multiple verification scenarios to obtain multiple thread groups, including:

[0077] The threads corresponding to the memory access instructions are grouped based on a preset grouping method to obtain a plurality of thread groups;

[0078] The preset grouping method includes at least one of grouping all threads into the same group, grouping based on the number size of each thread, grouping based on the parity of the number of each thread, and custom grouping.

[0079] Specifically, when grouping threads corresponding to memory access instructions, different preset grouping methods may be used to provide richer verification scenarios.

[0080] In an embodiment of the present application, the preset grouping method includes grouping all threads into the same group, grouping based on the number size of each thread, grouping based on the parity of the number of each thread, and custom grouping.

[0081] Classifying all threads into the same group means classifying all threads corresponding to memory access instructions into one thread group.

[0082] Grouping based on the number size of each thread means grouping all threads according to the number size of each thread. Threads with larger numbers can be grouped into one group, and threads with smaller numbers can be grouped into another group, for example, threads numbered 17 to 32 can be grouped into one group, and threads numbered 1 to 6 can be grouped into another group.

[0083] Grouping based on the parity of the numbers of each thread means grouping all threads according to whether the numbers of each thread are odd (odd) or even (even), for example, dividing threads with odd numbers into one group and dividing threads with even numbers into another group.

[0084] Custom grouping refers to grouping based on user settings. For example, you can group threads randomly based on their numbers.

[0085] The chip instruction memory access verification method provided in the embodiment of the present application adopts a variety of different preset grouping methods to group the threads corresponding to the memory access instructions to obtain multiple thread groups, which can provide richer verification scenarios and improve the completeness and flexibility of the chip instruction memory access verification.

[0086] In some embodiments, based on the address space constraint policies applicable to each target execution module in the chip under test, determining the address space constraint policies of each thread group includes:

[0087] Matching each target execution module with the execution module applicable information corresponding to each address space constraint strategy in the constraint strategy pool, and determining the address space constraint strategy of each target execution module in the chip under test based on the matching result;

[0088] The constraint policy pool includes multiple address space constraint policies and applicable execution module information corresponding to each address space constraint policy.

[0089] Specifically, for each execution module in the chip under test, an independent address space constraint policy can be determined according to its functional characteristics. These address space constraint policies applicable to the execution modules can be called primary policies. A constraint policy pool can be constructed to store multiple address space constraint policies and execution module applicable information corresponding to each address space constraint policy. The execution module applicable information refers to the relevant information of the execution module to which the address space constraint policy can be applied, for example, it may include the number of execution modules, the functions of the execution modules, etc.

[0090] Each target execution module is matched with the execution module applicable information corresponding to each address space constraint policy in the constraint policy pool. If the matching result is a match, the matched address space constraint policy can be determined as the address space constraint policy of the target execution module in the chip under test.

[0091] The chip instruction memory access verification method provided in the embodiment of the present application stores multiple address space constraint strategies and execution module applicability information corresponding to each address space constraint strategy through a constraint strategy pool. The address space constraint strategies applicable to each target execution module can be reused, thereby improving the flexibility and verification efficiency of chip instruction memory access verification.

[0092] In some embodiments, based on the address space constraint policies of each thread group, determining the address space constraint policy of the memory access instruction includes:

[0093] In the case where the memory access instructions come from different test hosts, the address space constraint policy of each test host is determined based on the address space constraint policy of each memory access instruction.

[0094] Specifically, there may be a situation where multiple test hosts perform memory access verification on the chip under test, and the address space constraint strategy of each test host can be determined according to the address space constraint strategy of each memory access instruction.

[0095] Figure 2 is a schematic diagram of the constraint strategy hierarchy provided by this application, such as Figure 2As shown, the constraint policy hierarchy is used to perform memory access verification on the chip under test, and mainly includes the address space constraint policy of the host layer (master layer policy), the address space constraint policy of the instruction layer (instruction layer policy), the address space constraint policy of the thread group layer (group layer policy) and the constraint policy pool (constraint policy pool).

[0096] For the master layer policy, the following address space constraints apply:

[0097] According to the design of the chip under test (DUT), there are usually multiple test hosts (masters) that issue SIMT memory access instructions. This layer is for address constraints on memory access instructions between multiple test hosts. Considering the specific design of the chip under test, the memory access addresses of each test host need to be distinguished during verification, and the addresses between the test hosts need to be constrained to not overlap. For example, the address space constraint policy of the host layer may include the master address range policy, etc.

[0098] For the instruction layer address space constraint policy (instruction layer policy):

[0099] This layer constrains the memory access instructions issued by the master, including the grouping of threads (lanes) and the address constraints of specific instructions. The address space constraint policy of the instruction layer can include the instruction lane split policy and the instruction address range policy.

[0100] Figure 3 is a schematic diagram of memory access instruction thread grouping provided by this application, such as Figure 3 As shown, each SIMT memory access instruction contains 32 threads (lanes), and the solid arrows represent threads. In order to verify the complex scenario combination between the threads of the instruction, they are grouped to obtain multiple thread groups (lane groups). There are fine-grained control scenarios for each group, and through the combination of different verification scenarios, one instruction can cover one or more verification scenarios, which is greatly beneficial to quickly build complex scenarios and ensure the completeness of the verification scenarios.

[0101] For the address space constraint policy of the thread group layer (group layer policy):

[0102] SIMT instructions can be divided into multiple lane groups, and each lane group can have its own constraint strategy combination. Figure 4 is a schematic diagram of the thread group constraint strategy configuration provided by this application, such as Figure 4 As shown, the address space constraint policy (lane group0policy) of thread group 0 can select the address space constraint policy 0 (primary policy 0) and the address space constraint policy 1 (primary policy 1) of the execution module in the tested chip; the address space constraint policy (lane group 1policy) of thread group 1 can select the address space constraint policy n (primary policy n) of the execution module in the tested chip, where n is a natural number; the address space constraint policy (lane group 2policy) of thread group 2 can select the address space constraint policy 1 (primary policy 1) and the address space constraint policy 2 (primary policy 2) of the execution module in the tested chip.

[0103] The principles of thread group constraint policy configuration usually include: a thread group (lane group) can have one or more execution module address space constraint policies (primary policy); the address space constraint policies of execution modules are independent and cannot be divided, such as constraints falling on the same cache line; these constraint policies can be reused and combined to constrain different thread groups; the policy acting on a thread group will constrain the addresses of all lanes in the group, such as constraining all threads (lanes) in the group to be in the same cache line.

[0104] In addition, the following constraints need to be met between thread groups (lane groups): the memory access address ranges between thread groups (lane groups) are generally different; the thread numbers (lane ID numbers) between thread groups (lane groups) are not repeated.

[0105] For the constraint policy pool:

[0106] The constraint policy pool is a set of basic constraint policies related to each execution module. Most address space constraint policies (primary policies) can be shared by multiple execution modules. They are independent of each other and cannot be split. The constraints required for related verification scenarios can be selected from the constraint policy pool.

[0107] The chip instruction memory access verification method provided in the embodiment of the present application determines the address space constraint strategy of each test host through the address space constraint strategy of each memory access instruction, so that there is no overlap in the addresses between the test hosts, thereby improving the flexibility and verification efficiency of the chip instruction memory access verification.

[0108] In some embodiments, the verification scenarios corresponding to the memory access instruction include:

[0109] The memory access addresses of one or more threads fall on the same cache line and have the same memory block identifier;

[0110] The memory access addresses of one or more threads fall on the same cache line and have different memory block identifiers;

[0111] The memory access addresses of one or more threads fall into different cache lines and have the same memory block identifier;

[0112] The memory access addresses of one or more threads fall into different cache lines and have different memory block identifiers.

[0113] Specifically, a cache line is the smallest storage unit in the chip cache, which temporarily stores frequently accessed data in the main memory. When the processor accesses the main memory, it loads the data from the main memory into the cache to increase the data access speed. In order to fully utilize the performance advantages of the cache, a continuous main memory address range is usually mapped to a cache line in the cache. The size of a cache line is usually fixed.

[0114] The chip memory uses static random-access memory (SRAM). The memory is divided into multiple independent blocks. Each memory block has its own address range and independent read and write ports. The memory block identifier (Bank ID) is a unique identifier used to identify different memory blocks. Through the memory block identifier, the processor can specify access to a specific memory block, thereby achieving parallel access to multiple memory blocks to improve the access bandwidth and performance of the memory.

[0115] By effectively utilizing cache lines and accessing different memory blocks in parallel, the memory access performance and bandwidth of the chip can be improved. Therefore, in the embodiment of the present application, four verification scenarios for SIMT instructions to write shared memory can be constructed for the execution module responsible for thread merging, namely: the memory access addresses of one or more threads fall on the same cache line and the memory block identifiers are the same; the memory access addresses of one or more threads fall on the same cache line and the memory block identifiers are different; the memory access addresses of one or more threads fall on different cache lines and the memory block identifiers are the same; the memory access addresses of one or more threads fall on different cache lines and the memory block identifiers are different.

[0116] In the above four verification scenarios, multiple threads can be grouped. By grouping threads (lanes), multiple test cases can be obtained. For example, 32 lanes are grouped into one group, and the group is constrained to one strategy; 32 lanes are divided into two groups, and the two groups can have the same strategy as above, or they can choose different strategies at will; 32 lanes are divided into three groups, and the three groups can have the same strategy, or they can choose different strategies at will.

[0117] Take accelerating access to static random access memory (SRAM) as an example. The address of an SRAM corresponds to 128B (bit), which corresponds to 32 banks (memory blocks), that is, each bank corresponds to 4B. If several lanes fall within the address of this 128B, and the bank ID (memory block identifier) ​​is different, that is, they fall on different 4B addresses in 128B, they can be merged and written to the SRAM at one time, thereby speeding up the writing of the SRAM, without having to write to the SRAM once for each lane. If they fall on different 128B addresses, the bank IDs do not overlap, and similarly different columns can also be merged and written to the SRAM at one time. Two lanes with overlapping bank IDs cannot be written to the SRAM at one time, and must be written twice.

[0118] For another example, if the request passes through a cache line, the cache line control module will merge several lanes with the same address in a cache line, that is, multiple lanes falling on the same 128B. At this time, the merged lanes can be sent out as a request to continue accessing the main memory.

[0119] The chip instruction memory access verification method provided in the embodiment of the present application constructs a verification scenario by using the difference between the memory access addresses of one or more threads falling on the cache line and the memory block identifier, thereby improving the completeness of the chip instruction memory access verification.

[0120] Figure 5 This is the second flow chart of the chip instruction memory access verification method provided by this application, such as Figure 5 As shown, the method is applied to select an address space constraint strategy during memory access verification of a chip under test, and includes:

[0121] Step 510: Select a verification scenario;

[0122] Step 520: Select a specific memory access instruction, such as a write instruction, which is a SIMT instruction;

[0123] Step 530: Determine the thread (lane) grouping constraint for the memory access instruction, as well as other related constraints, such as whether the addresses between the thread groups (lane groups) are continuous;

[0124] Step 540: determine the execution module corresponding to the thread group, and select the address space constraint policy (primary policy) for selection, configuration and combination.

[0125] Figure 6 This is a schematic diagram of chip instruction memory access verification provided by this application, such as Figure 6 As shown, SIMT memory access instructions are write instructions or read instructions. It has 32 lanes, each lane executes the same instruction, but the memory access address of each lane may be different. For example, all 32 lanes perform read operations, but the address read by each lane may be different.

[0126] The chip under test (DUT) contains several modules. In the memory access path, each module has different functions. They are responsible for processing related functions of 32 lanes. For example, module 0 processes the merging operations between lanes of instructions for accessing shared memory, which is conducive to improving bandwidth.

[0127] The chip instruction memory access verification method provided in the embodiment of the present application is conducive to the management of instruction memory access at different granularities, and can flexibly implement test cases in rich scenarios for the functional characteristics of different modules in the design, thereby ensuring the completeness of verification and improving verification efficiency.

[0128] The device provided in the embodiment of the present application is described below. The device described below and the method described above can be referenced to each other.

[0129] Figure 7 is a schematic diagram of the structure of the chip instruction memory access verification device provided by the present application, such as Figure 7 As shown, the device comprises:

[0130] A group determination unit 710, configured to determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module;

[0131] A group policy determination unit 720 is used to determine the address space constraint policy of each thread group based on the address space constraint policy applicable to each target execution module in the chip under test;

[0132] An instruction strategy determining unit 730, configured to determine an address space constraint strategy for memory access instructions based on the address space constraint strategy of each thread group;

[0133] The memory access verification unit 740 is used to perform memory access verification on the memory of the chip under test based on the address space constraint strategy of the memory access instruction.

[0134] The chip instruction memory access verification device provided in the embodiment of the present application determines the verification scenario, memory access instructions, and multiple thread groups corresponding to the memory access instructions according to the target execution module; determines the address space constraint strategy of each thread group according to the address space constraint strategy applicable to each target execution module in the tested chip; determines the address space constraint strategy of the memory access instruction according to the address space constraint strategy of each thread group; performs memory access verification on the memory of the tested chip according to the address space constraint strategy of the memory access instruction; since the address space constraint strategy of the memory access instruction is determined according to the corresponding verification scenario, it can adapt to the verification requirements of different verification scenarios, thereby improving the completeness of the chip instruction memory access verification; since the address space constraint strategy of the memory access instruction is finally obtained by selecting and combining the address space constraint strategy applicable to each target execution module, fine-grained control can be implemented for the memory access verification of the memory access instruction, and test cases of different verification scenarios can be flexibly implemented. The address space constraint strategy applicable to each target execution module can be reused, thereby improving the flexibility and verification efficiency of the chip instruction memory access verification.

[0135] In some embodiments, the group determination unit is configured to:

[0136] Determine multiple verification scenarios based on the target execution module;

[0137] Threads corresponding to memory access instructions are grouped based on multiple verification scenarios to obtain multiple thread groups.

[0138] In some embodiments, the group determination unit is configured to:

[0139] The threads corresponding to the memory access instructions are grouped based on a preset grouping method to obtain a plurality of thread groups;

[0140] The preset grouping method includes at least one of grouping all threads into the same group, grouping based on the number size of each thread, grouping based on the parity of the number of each thread, and custom grouping.

[0141] In some embodiments, the group policy determination unit is configured to:

[0142] Matching each target execution module with the execution module applicable information corresponding to each address space constraint strategy in the constraint strategy pool, and determining the address space constraint strategy of each target execution module in the chip under test based on the matching result;

[0143] The constraint policy pool includes multiple address space constraint policies and applicable execution module information corresponding to each address space constraint policy.

[0144] In some embodiments, the instruction strategy determination unit is configured to:

[0145] In the case where the memory access instructions come from different test hosts, the address space constraint policy of each test host is determined based on the address space constraint policy of each memory access instruction.

[0146] In some embodiments, the verification scenarios corresponding to the memory access instruction include:

[0147] The memory access addresses of one or more threads fall on the same cache line and have the same memory block identifier;

[0148] The memory access addresses of one or more threads fall on the same cache line and have different memory block identifiers;

[0149] The memory access addresses of one or more threads fall into different cache lines and have the same memory block identifier;

[0150] The memory access addresses of one or more threads fall into different cache lines and have different memory block identifiers.

[0151] Figure 8 is a schematic diagram of the structure of the electronic device provided by this application, such as Figure 8 As shown, the electronic device may include: a processor (Processor) 810, a communication interface (Communications Interface) 820, a memory (Memory) 830 and a communication bus (Communications Bus) 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic command in the memory 830 to execute the method described in the above embodiment, for example:

[0152] Determine verification scenarios, memory access instructions, and multiple thread groups corresponding to the memory access instructions based on the target execution module; determine the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the tested chip; determine the address space constraint strategy of the memory access instructions based on the address space constraint strategy of each thread group; perform memory access verification on the memory of the tested chip based on the address space constraint strategy of the memory access instructions.

[0153] In addition, the logic commands in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several commands to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0154] The processor in the electronic device provided in the embodiment of the present application can call the logic instructions in the memory to implement the above method. Its specific implementation method is consistent with the implementation method of the aforementioned method and can achieve the same beneficial effects, which will not be repeated here.

[0155] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.

[0156] Its specific implementation is consistent with the aforementioned method implementation and can achieve the same beneficial effects, so it will not be repeated here.

[0157] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0158] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A chip instruction memory access verification method, characterized in that: include: Determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module; Determine the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the chip under test; Determining the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group; Based on the address space constraint strategy of the memory access instruction, memory access verification is performed on the memory of the chip under test.

2. The chip instruction memory access verification method according to claim 1, characterized in that: The determining of the verification scenario, the memory access instruction, and the plurality of thread groups corresponding to the memory access instruction based on the target execution module includes: Determining a plurality of verification scenarios based on the target execution module; The threads corresponding to the memory access instructions are grouped based on the multiple verification scenarios to obtain multiple thread groups.

3. The chip instruction memory access verification method according to claim 2, characterized in that: The grouping of threads corresponding to the memory access instructions based on the multiple verification scenarios to obtain multiple thread groups includes: Grouping the threads corresponding to the memory access instructions based on a preset grouping method to obtain a plurality of thread groups; The preset grouping method includes at least one of grouping all threads into the same group, grouping based on the number size of each thread, grouping based on the parity of the number of each thread, and custom grouping.

4. The chip instruction memory access verification method according to claim 1, characterized in that: The determining the address space constraint strategy of each thread group based on the address space constraint strategy applicable to each target execution module in the chip under test includes: Matching each target execution module with execution module applicable information corresponding to each address space constraint strategy in the constraint strategy pool, and determining the address space constraint strategy of each target execution module in the chip under test based on the matching result; The constraint policy pool includes a plurality of address space constraint policies and applicable execution module information corresponding to each address space constraint policy.

5. The chip instruction memory access verification method according to claim 1, characterized in that: The determining the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group includes: In the case where the memory access instructions come from different test hosts, the address space constraint policy of each test host is determined based on the address space constraint policy of each memory access instruction.

6. The chip instruction memory access verification method according to any one of claims 1 to 5, characterized in that: The verification scenarios corresponding to the memory access instructions include: The memory access addresses of one or more threads fall on the same cache line and have the same memory block identifier; The memory access addresses of one or more threads fall on the same cache line and have different memory block identifiers; The memory access addresses of one or more threads fall into different cache lines and have the same memory block identifier; The memory access addresses of one or more threads fall into different cache lines and have different memory block identifiers.

7. A chip instruction memory access verification device, characterized in that: include: A group determination unit, configured to determine a verification scenario, a memory access instruction, and a plurality of thread groups corresponding to the memory access instruction based on a target execution module; A group policy determination unit, configured to determine an address space constraint policy for each thread group based on an address space constraint policy applicable to each target execution module in the chip under test; An instruction strategy determining unit, configured to determine the address space constraint strategy of the memory access instruction based on the address space constraint strategy of each thread group; A memory access verification unit is used to perform memory access verification on the memory of the chip under test based on the address space constraint strategy of the memory access instruction.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the chip instruction memory access verification method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the chip instruction memory access verification method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the chip instruction memory access verification method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Data output method and device, storage medium and electronic device

    CN118939601A

  • Test excitation generation method and device, equipment, storage medium and product

    CN121070718A

  • Chip access verification method and device, medium and program product

    CN121364977A

  • A chip access verification method, device, medium and program product

    CN121364977B