Method and device for verifying memory access controller of chip, equipment and medium
By generating a random address function that generates constraints in the memory access controller verification, the address stamping problem is solved, the verification efficiency and effectiveness are improved, and more comprehensive chip verification is achieved.
Patent Information
- Application Number
- CN202410998985.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-12
AI Technical Summary
Existing technologies, when verifying the memory access controller of a chip, struggle to avoid address slippage while ensuring verification efficiency, and cannot achieve comprehensive verification.
By generating constraints for the random address generation function, memory access stimuli for already occupied addresses are avoided. The target address is generated using the constraints, ensuring the accuracy of the verification results of the memory access controller.
Without affecting the randomness of memory access incentives, address trampling is avoided, memory access efficiency and verification results are improved, and more comprehensive chip verification is achieved.
Smart Images

Figure CN118940685A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of chip verification technology, and specifically to a method, device, electronic device, computer-readable storage medium and computer program product for verifying a memory access controller of a chip. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] In order to adapt to the development of artificial intelligence technology, the scale and process of chips used to execute artificial intelligence-based algorithms have been further improved. Therefore, it is necessary to apply more accurate and efficient chip verification technology to verify the chip design, especially to verify the chip's memory controller, so that the chip's memory controller can meet the requirements of artificial intelligence algorithms for memory access performance.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for verifying a memory access controller of a chip.
[0006] According to one aspect of the present disclosure, a method for verifying a memory access controller of a chip is provided, comprising: determining at least one occupied address in a target memory to be accessed; determining a constraint condition for a random address generation function based on the at least one occupied address, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address; generating a first target address by executing the random address generation function based on the constraint condition; and determining a first verification result for the memory access controller by accessing the first target address of the target memory using the memory access controller.
[0007] According to another aspect of the present disclosure, a device for verifying a memory access controller of a chip is provided, comprising: a first determination unit, configured to determine at least one occupied address in a target memory to be accessed; a second determination unit, configured to determine a constraint condition for a random address generation function based on the at least one occupied address, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address; a generation unit, configured to generate a first target address by executing the random address generation function based on the constraint condition; and a verification unit, configured to determine a first verification result for the memory access controller by accessing the first target address of the target memory using the memory access controller.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for verifying the memory access controller of the chip.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the above-mentioned method for verifying a memory access controller of a chip.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement the above-mentioned method for verifying a memory access controller of a chip when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, the verification efficiency of the memory access controller of a chip can be improved to achieve more comprehensive functional verification.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;
[0015] Figure 2 A flow chart of a method for verifying a memory access controller of a chip according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 3 A schematic diagram showing a flow chart of a memory access process according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 4 A schematic diagram showing a flow chart of a memory access process according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 5 A structural block diagram of a device for verifying a memory access controller of a chip according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0021] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0022] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0023] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0025] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of a method for verifying a memory access controller of a chip.
[0026] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0027] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0028] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send a verification request. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0029] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use various communication protocols.
[0030] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0031] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0032] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0033] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0034] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0035] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0036] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different categories of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0037] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0038] With the continuous development of deep learning algorithms, the demand for hardware computing power and hardware performance has become increasingly huge, especially the high requirements for memory access bandwidth. When designing chips for implementing deep learning algorithms, it is necessary to customize the corresponding memory access controller to support various memory access behaviors of various memory access entities (such as different computing chips or processing cores).
[0039] In actual application scenarios, the memory access controller may have multiple memory access modes, or may correspond to different parameters under the same memory access mode. At the same time, the target memory for memory access may include a large amount of accessible address space. It is understandable that the cost of traversing all memory access functions of the memory access controller is high, and it is difficult to achieve complete verification. Therefore, it is usually necessary to randomly generate memory access stimuli (specifically, it may include configuration information of the memory access mode, target address information of the memory access, etc.) so that the memory access controller can perform memory access operations based on this, and determine the verification result of the memory access controller based on the execution result of the memory access operation. It should be understood that when verifying the memory access controller, the more memory access modes and / or memory access target addresses that are verified, that is, the higher the randomness of the memory access stimuli, the more comprehensive and reliable the verification result obtained.
[0040] In the related art, in order to improve the verification effect, a memory access target address is randomly generated, and then a memory access stimulus is obtained based on the random address to verify the memory access controller. However, the randomly generated target address is prone to address trampling, that is, multiple memory accesses to the same address occur. To avoid address trampling, the randomness of the memory access stimulus can be reduced (for example, mutually isolated address intervals can be allocated to multiple memory access entities in advance), but this method will affect the verification efficiency and cannot achieve comprehensive verification.
[0041] Based on this, the present disclosure provides a verification method for a memory access controller, which generates constraints for a random address generation function (i.e., a random excitation generator) based on the occupied address information to constrain the random generation result of the memory access target address, avoid memory access excitation for the occupied address, and avoid address trampling without affecting the randomness of the memory access excitation, thereby improving memory access efficiency.
[0042] Figure 2 FIG. 2 shows a flow chart of a method 200 for verifying a memory access controller of a chip according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0043] Step S201, determining at least one occupied address in the target memory to be accessed;
[0044] Step S202: determining a constraint condition for a random address generation function based on the at least one occupied address, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address;
[0045] Step S203, generating a first target address by executing the random address generation function based on the constraint condition; and
[0046] Step S204: Determine a first verification result for the memory access controller by using the memory access controller to access the first target address of the target memory.
[0047] By applying the above method 200, the occupied address information in the target memory can be used to generate constraints for the random address generation function (random excitation generator) to constrain the random generation result of the memory access target address to avoid the first target address overlapping with the occupied address. By using constraints to prohibit memory access excitation for occupied addresses during the random excitation generation process, the address trampling phenomenon can be avoided without affecting the randomness of the memory access excitation, thereby improving the memory access efficiency, and more comprehensive verification can be achieved by improving the randomness of the memory access excitation, thereby improving the verification effect.
[0048] In some examples, the occupied address and the first target address may be byte addresses, thereby enabling more accurate address isolation based on fine-grained address information.
[0049] In some examples, the chip to be verified may be various types of chips, in particular data processing chips, such as chips for executing deep learning algorithms, voice processing chips, image processing chips, etc., and the chip to be verified may include one or more processing cores. The target memory may be the chip's internal memory or an external memory. When the chip to be verified includes multiple processing cores, that is, the target memory has multiple memory access entities, by applying the above method 200, it is possible to more easily and effectively ensure that no memory access address trampling occurs between multiple memory access entities.
[0050] In some examples, the first target address of the target memory accessed by the memory access controller in step S204 can be implemented in a software or hardware manner. For example, hardware description languages such as Verilog, VHDL (Veri-High-Speed Integrate Circuit Hardware Description Language, ultra-high-speed integrated circuit hardware description language) can be used in a software environment to design and configure the chip circuit, and after compiling and generating chip circuit netlist information that can be used for simulation, the simulation verification of the chip circuit is performed based on this. In some examples, the RTL (Register Transfer Level) code of the chip circuit to be verified can be obtained in the software environment to describe the data flow of the chip circuit, thereby realizing the RTL simulation for the chip. In some examples, other languages (such as C language) can also be used to write and generate the corresponding code of the hardware description language, thereby obtaining the chip circuit netlist information that can be used for simulation. For another example, the corresponding hardware circuit can also be implemented according to the hardware description language or circuit netlist information, and the hardware circuit can be verified.
[0051] In the above example, when the software environment is used for simulation verification, the memory access stimulus is generated by applying steps S201 to S203 provided by the present disclosure, thereby reducing the amount of calculation of the simplified simulator and facilitating the solution of the verification result.
[0052] According to some embodiments, the at least one occupied address is stored in an occupied address queue. By using a queue to manage occupied address information, the data structure can be simplified, and a simpler and more efficient memory access controller verification can be achieved.
[0053] In some examples, occupied address information may be managed based on other forms. For example, other data structures may be used to store at least one occupied address, which is not limited in the present disclosure.
[0054] According to some embodiments, method 200 further includes: updating the constraint condition, wherein, according to the updated constraint condition, the random address generation result does not include the at least one occupied address and the first target address; generating a second target address by executing the random address generation function based on the updated constraint condition; and determining a second verification result for the memory access controller by using the memory access controller to access the second target address of the target memory. Thus, the occupied address information can be maintained in real time during the memory access request generation process to ensure the correctness of the new memory access stimulus.
[0055] According to some embodiments, the generating the second target address by executing the random address generation function based on the updated constraint condition includes: in response to determining that the interval between the current moment and the moment of generating the first target address satisfies a preset condition, generating the second target address by executing the random address generation function based on the updated constraint condition. By applying the above means, it is possible to generate memory access requests based on a certain time interval condition, avoid memory access requests being too dense, make it easier to maintain occupied address information, and reduce the difficulty of solving the random address generation function.
[0056] According to some embodiments, the preset condition includes: the interval between the current moment and the moment when the first target address is generated is greater than a randomly determined threshold. Thus, the generation frequency of memory access requests can be controlled based on random delay conditions, and verification efficiency can be improved by improving randomness.
[0057] In some examples, the delay condition for generating a memory access request may be set in other ways, for example, a fixed threshold may be set to control the time interval between adjacent memory access requests, which is not limited in the present disclosure.
[0058] According to some embodiments, the generating the second target address by executing the random address generation function based on the updated constraint condition includes: in response to receiving the access success information for the first target address returned by the memory access controller, generating the second target address by executing the random address generation function based on the updated constraint condition. Thus, the next memory access request can be generated after the previous memory access request is successfully accessed, the generation frequency of memory access requests can be controlled, the memory access requests can be avoided from being too dense, and the occupied address information can be maintained more easily.
[0059] In some examples, the access success information may be handshake information of a memory access flag, such as handshake information of a valid flag and / or a ready flag, to more accurately indicate the success status of the memory access request.
[0060] According to some embodiments, method 200 further includes: writing the first target address into the occupied address queue after generating the first target address; and in response to receiving access end information for the first target address returned by the memory access controller, removing the first target address from the occupied address queue. Thus, the occupied address can be removed from the occupied address queue after the access ends (i.e., the occupation of the target address in the target memory ends), and the first-in-first-out feature of the queue is used to more efficiently manage the occupied address information, avoid the address queue from being too long, and reduce the difficulty of solving the constraint condition.
[0061] According to some embodiments, method 200 further includes: in response to receiving access end information for the first target address returned by the memory access controller, recording the first target address as a historical access address; in response to determining that a preset trigger condition is satisfied, determining a third target address based on the historical access address; and determining a third verification result for the memory access controller by using the memory access controller to access the third target address of the target memory. By recording the historical access address information, it is possible to facilitate the subsequent verification steps of repeated accesses, fully meeting the needs of actual application scenarios.
[0062] In some examples, historical access address information may be stored in a historical access address queue to simplify the data structure and achieve efficient data access.
[0063] Figure 3 The flowchart of the memory access process according to the exemplary embodiment of the present disclosure is shown. In this example, the memory access process of the target memory with multiple memory access subjects can be verified, and then multiple processes can be set to correspond to the data processing flow of the multiple memory access subjects. In this example, the memory access requests of multiple memory access subjects can be sent collectively using the same function to avoid congestion and trampling. Figure 3 As shown, the memory access operation of each process may include the following steps:
[0064] Step S31, controlling random delay.
[0065] Step S32: Generate a first target address by executing a random address generation function based on the constraint condition. In this example, an occupied address queue may be used to manage the currently occupied address information in the target memory, and then the constraint condition may be generated based on the occupied address queue.
[0066] Step S33: write the first target address into the occupied address queue.
[0067] Step S34: drive the memory access request including the first target address to the memory access bus. When the memory access request is driven to the memory access bus, the process can determine whether to continue to execute step S31 by monitoring the access success information of the memory access request (such as the handshake information of the memory access flag bit).
[0068] Step S35: In response to monitoring the access end information of the memory access request, the first target address is moved out of the occupied address queue.
[0069] Figure 4A flow chart of a memory access process according to an exemplary embodiment of the present disclosure is shown. In this example, the memory access controller is verified under the UVM (Universal Verification Methodology) framework. Figure 4 The interactive process of the verification framework and the actuator for stimulating the memory access controller to perform the memory access operation is shown. Figure 4 As shown, the interaction process includes:
[0070] Step S41: Controlling the random delay of memory access requests in the verification framework.
[0071] Step S42: Generate a first target address by executing a random address generation function based on the constraint condition. As mentioned above, the constraint condition is generated based on the current occupied address information.
[0072] Step S43: record the first target address.
[0073] Step S44: driving the memory access request including the first target address to the memory access bus, so that the actuator can execute the following steps S45-S46:
[0074] Step S45: monitor the access success information of the memory access request and return it to the verification framework.
[0075] Step S46: monitor the access end information of the memory access request and return it to the verification framework.
[0076] When the verification framework receives the access success information, it can continue to execute steps S41 to S44 in the next verification round.
[0077] When the verification framework receives the access end information, step S47 is executed to reclaim the first target address from the occupied address information.
[0078] It can be understood that the above-mentioned step S47 of the current round and steps S41 to S44 of the next round can be executed in parallel to improve verification efficiency.
[0079] According to one aspect of the present disclosure, a device for verifying a memory access controller of a chip is also provided. Figure 5 FIG. 5 shows a structural block diagram of an apparatus 500 for verifying a memory access controller of a chip according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the device 500 includes:
[0080] A first determining unit 501 is configured to determine at least one occupied address in a target memory to be accessed;
[0081] A second determining unit 502 is configured to determine a constraint condition for a random address generation function based on the at least one occupied address, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address;
[0082] A generating unit 503 is configured to generate a first target address by executing the random address generating function based on the constraint condition; and
[0083] The verification unit 504 is configured to determine a first verification result for the memory access controller by accessing the first target address of the target memory using the memory access controller.
[0084] According to some embodiments, the at least one occupied address is stored in an occupied address queue.
[0085] According to some embodiments, the device 500 also includes: an updating unit configured to update the constraint condition, wherein, according to the updated constraint condition, the random address generation result does not include the at least one occupied address and the first target address, the generation unit 503 is also configured to generate a second target address by executing the random address generation function based on the updated constraint condition, and the verification unit 503 is also configured to determine a second verification result for the memory access controller by utilizing the memory access controller to access the second target address of the target memory.
[0086] According to some embodiments, the generation unit 503 is configured to: in response to determining that the interval between the current moment and the generation moment of the first target address satisfies a preset condition, generate a second target address by executing the random address generation function based on the updated constraint condition.
[0087] According to some embodiments, the preset condition includes: an interval between the current moment and the moment when the first target address is generated is greater than a randomly determined threshold.
[0088] According to some embodiments, the generating unit 503 is configured to: in response to receiving access success information for the first target address returned by the memory access controller, generate a second target address by executing the random address generating function based on the updated constraint condition.
[0089] According to some embodiments, the device 500 also includes: a write unit, configured to write the first target address into the occupied address queue after generating the first target address; and a remove unit, configured to move the first target address out of the occupied address queue in response to receiving access end information for the first target address returned by the memory access controller.
[0090] According to some embodiments, the device 500 also includes: a recording unit, configured to record the first target address as a historical access address in response to receiving access end information for the first target address returned by the memory access controller; and a third determination unit, configured to determine a third target address based on the historical access address in response to determining that a preset trigger condition is satisfied, and the verification unit 504 is also configured to determine a third verification result for the memory access controller by utilizing the memory access controller to access the third target address of the target memory.
[0091] It should be understood that Figure 5 The operations of the various units of the device 500 for verifying the memory controller of a chip shown in FIG. 5 can be compared with Figure 2 The steps in the method 200 for verifying the memory access controller of a chip described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 500 and the various units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0092] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for verifying the memory access controller of the chip.
[0093] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned method for verifying the memory access controller of a chip.
[0094] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the above-mentioned method for verifying a memory access controller of a chip when executed by a processor.
[0095] refer to Figure 6, a block diagram of an electronic device 600 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0096] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0097] Multiple components in the device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 can be any type of device that can input information to the device 600. The input unit 606 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 607 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 can include but is not limited to a disk, an optical disk. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0098] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a method for verifying a memory access controller of a chip. For example, in some embodiments, the method for verifying a memory access controller of a chip may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method for verifying the memory access controller of the chip described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the method for verifying the memory access controller of the chip in any other appropriate manner (for example, by means of firmware).
[0099] Various implementations 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 chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).
[0103] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0104] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0106] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A method for verifying a memory access controller of a chip, the method comprising: determining at least one occupied address in a target memory to be accessed; Based on the at least one occupied address, determining a constraint condition for a random address generation function, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address; Generate a first target address by executing the random address generation function based on the constraint condition; and By accessing the first target address of the target memory using the memory access controller, a first verification result for the memory access controller is determined.
2. The method of claim 1, wherein: The at least one occupied address is stored in an occupied address queue.
3. The method according to claim 1 or 2, further comprising: updating the constraint condition, wherein, according to the updated constraint condition, the random address generation result does not include the at least one occupied address and the first target address; Generate a second target address by executing the random address generation function based on the updated constraint condition; and By accessing the second target address of the target memory using the memory access controller, a second verification result for the memory access controller is determined.
4. The method of claim 3, wherein: Generating the second target address by executing the random address generation function based on the updated constraint condition comprises: In response to determining that the interval between the current time and the time when the first target address is generated satisfies a preset condition, a second target address is generated by executing the random address generation function based on the updated constraint condition.
5. The method of claim 4, wherein: The preset conditions include: The interval between the current time and the time when the first target address is generated is greater than a randomly determined threshold.
6. The method according to any one of claims 3 to 5, wherein: Generating the second target address by executing the random address generation function based on the updated constraint condition comprises: In response to receiving access success information for the first target address returned by the memory access controller, a second target address is generated by executing the random address generation function based on the updated constraint condition.
7. The method according to any one of claims 2 to 6, further comprising: After generating the first target address, writing the first target address into the occupied address queue; as well as In response to receiving access completion information for the first target address returned by the memory access controller, the first target address is moved out of the occupied address queue.
8. The method according to any one of claims 1 to 7, further comprising: In response to receiving access end information for the first target address returned by the memory access controller, recording the first target address as a historical access address; In response to determining that a preset trigger condition is satisfied, determining a third target address based on the historical access address; as well as By accessing the third target address of the target memory using the memory access controller, a third verification result for the memory access controller is determined.
9. A device for verifying a memory access controller of a chip, the device comprising: A first determining unit, configured to determine at least one occupied address in a target memory to be accessed; A second determining unit is configured to determine a constraint condition for a random address generation function based on the at least one occupied address, wherein, according to the constraint condition, a random address generation result of the random address generation function does not include the at least one occupied address; a generating unit configured to generate a first target address by executing the random address generating function based on the constraint condition; and The verification unit is configured to determine a first verification result for the memory access controller by accessing the first target address of the target memory using the memory access controller.
10. The device of claim 9, wherein: The at least one occupied address is stored in an occupied address queue.
11. The device according to claim 9 or 10, further comprising: an updating unit configured to update the constraint condition, wherein, according to the updated constraint condition, the random address generation result does not include the at least one occupied address and the first target address, The generating unit is further configured to generate a second target address by executing the random address generating function based on the updated constraint condition. The verification unit is further configured to determine a second verification result for the memory access controller by accessing the second target address of the target memory using the memory access controller.
12. The device of claim 11, wherein: The generating unit is configured to: In response to determining that the interval between the current time and the time when the first target address is generated satisfies a preset condition, a second target address is generated by executing the random address generation function based on the updated constraint condition.
13. The device of claim 12, wherein: The preset conditions include: The interval between the current time and the time when the first target address is generated is greater than a randomly determined threshold.
14. The device according to any one of claims 11 to 13, wherein: The generating unit is configured to: In response to receiving access success information for the first target address returned by the memory access controller, a second target address is generated by executing the random address generation function based on the updated constraint condition.
15. The apparatus according to any one of claims 10 to 14, further comprising: a writing unit, configured to write the first target address into the occupied address queue after generating the first target address; as well as The removal unit is configured to remove the first target address from the occupied address queue in response to receiving access completion information for the first target address returned by the memory access controller.
16. The apparatus according to any one of claims 9 to 15, further comprising: a recording unit configured to, in response to receiving access end information for the first target address returned by the memory access controller, record the first target address as a historical access address; as well as A third determining unit is configured to determine a third target address based on the historical access address in response to determining that a preset trigger condition is satisfied, The verification unit is further configured to determine a third verification result for the memory access controller by accessing the third target address of the target memory using the memory access controller.
17. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-8.
19. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
