A method and system for verifying a system on chip, a terminal device and a storage medium
By combining virtual hardware simulators and simulation testing platforms, the high cost and long cycle of on-chip system-on-chip hardware and software joint verification are solved, achieving low-cost and efficient simulation verification.
Patent Information
- Application Number
- CN202411077111.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing on-chip system-on-a-chip (SoC) hardware and software co-verification work is costly, time-consuming, and has poor signal observability, making it difficult to perform effectively on FPGAs.
By employing a virtual hardware simulator and simulation testing platform, and constructing a simulated central processing unit, memory, and universal asynchronous transceiver interface to replace real components for simulation verification, the system utilizes an interactive channel to enable request access and signal monitoring, thereby reducing costs and improving efficiency.
This technology enables low-cost on-chip system simulation verification, reduces hardware requirements, improves verification speed and signal observability, and solves the problems of high cost and long cycle time in existing technologies.
Smart Images

Figure CN119003264B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system-on-a-chip (SoC) technology, and in particular to a verification method, system, terminal device, and storage medium for SoC. Background Technology
[0002] In the joint verification of system-on-a-chip (SoC) software and hardware, some module drivers are involved. These drivers are quite complex, leading to high development difficulty, long development cycles, and difficulty in fully covering real-world software and hardware joint operation scenarios. Therefore, the common practice in existing technologies is to port a public version of the driver based on the operating system, and then run the operating system in the hardware accelerator or FPGA prototype for verification.
[0003] This improves verification speed, but has the following drawbacks:
[0004] 1) Hardware accelerators are expensive, and most small chip design companies cannot afford them;
[0005] 2) The observability of signals on FPGA is too poor, and the iteration cycle is too long when the design is large, resulting in uncontrollable stability and making it difficult to find and analyze problems. Summary of the Invention
[0006] In view of this, embodiments of this application provide a verification method, system, terminal device, and storage medium for a system-on-a-chip, which can effectively solve the problems of high cost and long cycle of existing joint software and hardware verification of systems-on-a-chip.
[0007] In a first aspect, embodiments of this application provide a system-on-a-chip (SoC) verification system, comprising: a simulation test platform, a virtual hardware simulator, and an interaction channel; the interaction channel is used for requesting access between the simulation test platform and the virtual hardware simulator; wherein the target SoC to be verified includes a central processing unit, a first memory, a universal asynchronous transceiver interface, and a target verification function module;
[0008] The virtual hardware simulator is used to construct a model to simulate a central processing unit, a memory, and a universal asynchronous transceiver interface, which can be used to replace the real central processing unit, first memory, and universal asynchronous transceiver interface in the target on-chip system.
[0009] The simulation test platform is used to provide a simulation verification environment for the target system-on-a-chip. The simulation test platform includes a function control module, which is used to listen for access requests from the virtual hardware simulator and verify the central processing unit, first memory, general asynchronous transceiver interface, and target verification function module of the target system-on-a-chip through the interaction channel based on the listening results.
[0010] In some embodiments, the target on-chip system further includes a second memory; the interaction channel includes a memory access channel and an interrupt channel;
[0011] The simulation test platform is used to receive memory access commands sent by the simulated central processing unit when accessing a designated object in the target on-chip system through the memory access channel, and to reply information to the virtual hardware simulator; the designated object includes the target verification function module and the second memory;
[0012] The virtual hardware simulator is used to monitor the simulation test platform's access requests to the simulated memory and the simulated universal asynchronous transceiver interface through the memory access channel, and to reply to the simulation test platform after completing the access.
[0013] The simulation test platform is also used to transmit interrupt requests and undo messages to the virtual hardware simulator through the interrupt channel.
[0014] In some embodiments, both the memory access channel and the interrupt channel are established through the TCP ports of the simulation test platform and the virtual hardware simulator.
[0015] In some embodiments, the simulated central processing unit is built based on the C model provided in the virtual hardware simulator and according to the model and configuration of the real central processing unit in the target on-chip system;
[0016] The simulated memory is constructed based on the C model provided in the virtual hardware simulator and according to the address space and size of the actual memory in the target on-chip system;
[0017] The simulated universal asynchronous transceiver interface is based on the C model provided in the virtual hardware simulator and is constructed according to the address space and functional characteristics of the real universal asynchronous transceiver interface in the target on-chip system.
[0018] In some embodiments, the virtual hardware simulator includes a mapping module; the mapping module is used to map the access path to the access path corresponding to the simulated memory and the simulated universal asynchronous transceiver interface when the simulated central processing unit accesses the first memory and the universal asynchronous transceiver interface.
[0019] In some embodiments, the function control module is further configured to change the control of the bus in the target on-chip system from control by the central processing unit in the target on-chip system to control by the simulated central processing unit by modifying the access address, and to disable the operation of the central processing unit, the first memory and the universal asynchronous transceiver interface in the target on-chip system.
[0020] The function control module is further configured to send memory access commands to the virtual hardware simulator when the target on-chip system accesses the memory and universal asynchronous transceiver interface of the target on-chip system.
[0021] In some embodiments, the simulation test platform further includes a format conversion module; the format conversion module is used to convert the received access request from the virtual hardware simulator to the target verification function module into an access format supported by the central processing unit in the target system-on-a-chip.
[0022] Secondly, embodiments of this application provide a system-on-a-chip (SoC) verification method, which is applied to an SoC verification system provided in the first aspect of this application; the method includes: the virtual hardware simulator constructs a simulated central processing unit, a simulated memory, and a simulated universal asynchronous transceiver interface through model construction, to correspondingly replace the real central processing unit, first memory, and universal asynchronous transceiver interface in the target SoC.
[0023] The simulation test platform listens for access requests from the virtual hardware simulator through the function control module, and verifies the central processing unit, first memory, general asynchronous transceiver interface, and target verification function module of the target system-on-a-chip through the interaction channel based on the listening results.
[0024] Secondly, embodiments of this application provide a terminal device, the terminal device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the functions of a system-on-a-chip verification system provided in the first aspect of this application.
[0025] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed on a processor, implements the functions of a verification system for a system-on-a-chip provided according to the first aspect of this application.
[0026] The embodiments of this application have the following beneficial effects:
[0027] This application uses only the virtual hardware simulator and the simulation test platform. In the virtual hardware simulator, simulated CPUs, simulated memory, and simulated Asynchronous Receiver / Transmitter (AART) interfaces are virtualized to be functionally identical to those in the on-chip system. Then, the function control module controls the operation of the virtual hardware simulator and disables the CPU, memory, and AART interfaces in the target on-chip system. Finally, according to business requirements, the simulation test platform and the virtual hardware simulator communicate via the interaction channel, thereby completing the simulation verification of the on-chip system. This application requires no hardware support other than a server, is low-cost, and effectively solves the problems of high cost and long cycle in existing on-chip system hardware-software co-verification work. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This paper shows a structural block diagram of a verification system for a system-on-a-chip according to an embodiment of this application;
[0030] Figure 2 This paper shows another structural block diagram of the verification system of the system-on-chip according to an embodiment of this application;
[0031] Figure 3 A flowchart of a verification method for a system-on-a-chip according to an embodiment of this application is shown.
[0032] Explanation of key component symbols:
[0033] 100 - Simulation test platform; 200 - Virtual hardware simulator; 210 - Simulated CPU; 220 - Simulated Memory; 230 - Simulated UART interface; 300 - Target SoC; 310 - CPU; 320 - First Memory; 330 - UART interface; 340 - Target IP core. Detailed Implementation
[0034] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0035] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0036] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0037] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0038] Explanation of keywords in this application:
[0039] SoC (System on Chip): A system-on-a-chip, also known as a system-on-a-chip.
[0040] qemu (quick emulator): A simulation processor written by Fabrice Bella and distributed under the GPL license;
[0041] IP (Intellectual Property): In integrated circuit design, an IP core refers to a verified, reusable integrated circuit design module with a specific function.
[0042] Memory: storage device.
[0043] UART (Universal Asynchronous Receiver / Transmitter) Interface: This UART interface is a universal serial data bus used for asynchronous communication. In a System-on-a-Chip (SoC), the UART interface can be used for data transmission, debug instructions, and debug information output.
[0044] CPU (Central Processing Unit): The central processing unit.
[0045] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0046] In existing technologies, hardware accelerators are used for the joint verification of system-on-chip (SoC) software and hardware. However, these accelerators are expensive, making them unaffordable for most small chip design companies. Furthermore, signal observability on FPGAs is poor, and the iteration cycle is too long for larger designs, resulting in uncontrollable stability and hindering troubleshooting and analysis. Therefore, this application proposes a verification method, system, terminal device, and storage medium for SoCs, which can effectively solve the problems of high cost, long cycle, and lack of observability in existing SoC software and hardware joint verification processes.
[0047] The following describes the verification system for the system-on-a-chip using some specific embodiments.
[0048] Figure 1 A block diagram of a system-on-chip (SoC) verification system according to an embodiment of this application is shown. Exemplarily, the SoC verification system includes: a simulation test platform 100, a virtual hardware simulator 200, and an interaction channel. The simulation test platform 100 is also referred to as a SoC Testbench platform. The simulation test platform 100 includes a function control module. Preferably, the virtual hardware simulator can be a QEMU simulator.
[0049] The interaction channel is used for request access between the simulation test platform 100 and the virtual hardware simulator 200; wherein, the target system-on-a-chip (target SoC 300) to be verified includes a central processing unit (CPU 310), a first memory (first memory 320), a universal asynchronous transceiver interface (UART interface 330), and a target verification function module (target IP core 340). Specifically, the simulation test platform 100 and the virtual hardware simulator 200 communicate and interact through TCP port listening.
[0050] The virtual hardware simulator 200 is used to construct a model to obtain a simulated central processing unit (simulated CPU 210), a simulated memory (simulated Memory 220), and a simulated universal asynchronous transceiver interface (simulated UART interface 230), which are used to replace the real CPU 310, first memory 320, and UART interface 330 in the target SoC 300.
[0051] The simulation test platform 100 provides a simulation verification environment for the target SoC 300. The simulation test platform 100 includes a function control module, which listens for access requests from the virtual hardware simulator 200 and verifies the CPU 310, first memory 320, UART interface 330, and target IP core 340 of the target SoC 300 through the interaction channel based on the listening results. Specifically, the virtual hardware simulator 200 sends access commands to the simulation test platform 100 according to business requirements. The simulation test platform 100 listens for these access commands and provides response information through the interaction channel, allowing the virtual hardware simulator 200 to determine whether the functions of the CPU 310, first memory 320, UART interface 330, and target IP core 340 in the target SoC 300 are normal. The specific functions of the simulation test platform 100 include generating simulation stimuli (waveforms), applying the stimuli to the module under test and collecting its output response, and comparing the output response with expectations, thereby achieving simulation verification of the module under test. In this embodiment, the module under test includes a simulated CPU 210, a simulated memory 220, a simulated UART interface 230, and a target IP core 340.
[0052] Furthermore, the function control module is specifically used to change the control of the bus in the target SoC 300 from the CPU 310 in the target SoC 300 to the simulated CPU 210 by modifying the access address, and to disable the operation of the CPU 310, the first memory 320, and the UART interface 330 in the target SoC 300. The function control module is also specifically used to send memory access commands to the virtual hardware simulator 200 when the target SoC 300 accesses the memory and UART interface 330 in the target SoC 300. Regarding disabling the operation of the CPU 310, the first memory 320, and the UART interface 330 in the target SoC 300, this can be achieved by directly removing the CPU 310, the first memory 320, and the UART interface 330 in hardware, or by using software control methods; this embodiment does not impose any restrictions.
[0053] In one implementation, to improve the access speed between the simulation test platform 100 and the virtual hardware simulator 200, the interaction channel includes a memory access channel and an interrupt channel, such as... Figure 2 As shown. The target SoC 300 also includes a second memory.
[0054] The simulation test platform 100 is used to receive memory access commands sent by the simulated CPU 210 when accessing a set object in the target SoC 300 through the memory access channel, and to reply information to the virtual hardware simulator 200; the set object includes the target IP core 340 and the second memory.
[0055] Specifically, for the simulation test platform 100, the access channel is used to monitor the access requests from the virtual hardware simulator 200 to the target IP core 340, and the access request information is converted into an access format that meets the requirements of the CPU 310 in the target SoC 300. After the access is completed, the platform replies with a completion message to the virtual hardware simulator 200 through the access channel.
[0056] If all programs run in the SoC's memory, the amount of interactive data is large, and the running speed is slow. To improve simulation speed, this embodiment moves some functions to the simulated memory 220 in the virtual hardware simulator 200, thereby improving simulation speed. That is to say, the first memory 320 in the target SoC 300 in this embodiment refers to a portion of the memory in the target SoC 300, not all of the memory. The target SoC 300 also includes a second memory, which is used to run other programs that do not involve IP core control.
[0057] The virtual hardware simulator 200 is used to monitor the access requests from the simulation test platform 100 to the simulated memory 220 and the simulated UART interface 230 through the memory access channel, and to reply to the simulation test platform 100 after completing the access. Specifically, when the target SoC 300 has access to the first memory 320 and the UART interface 330, the simulation test platform 100 sends a memory access command to the virtual hardware simulator 200 through the memory access channel to request access to the simulated memory 220 and the simulated UART interface 230. After the access is completed, the virtual hardware simulator 200 replies to the simulation test platform 100 through the memory access channel.
[0058] The simulation test platform 100 is also used to transmit interrupt request and cancellation messages to the virtual hardware simulator 200 through the interrupt channel. Specifically, when the interrupt request status of the target IP core 340 in the target SoC 300 changes, the information is sent to the virtual hardware simulator 200 through the interrupt channel. For the virtual hardware simulator 200, the interrupt request and cancellation messages from the simulation test platform 100 are monitored through the interrupt channel, and the relevant interrupt status is notified to the simulated CPU 210.
[0059] Both the memory access channel and the interrupt channel are established through the TCP ports of the simulation test platform 100 and the virtual hardware simulator 200.
[0060] In one implementation, the simulated CPU 210 is constructed based on the C model provided in the virtual hardware simulator 200 and according to the model and configuration of the actual CPU 310 in the target SoC 300. The simulated memory 220 is constructed based on the C model provided in the virtual hardware simulator 200 and according to the address space and size of the actual memory in the target SoC 300. The simulated UART interface 230 is constructed based on the C model provided in the virtual hardware simulator 200 and according to the address space and functional characteristics of the actual UART interface 330 in the target SoC 300. The C model in the simulated UART interface 230 can be a C model provided by the virtual hardware simulator 200 or a custom-developed C model.
[0061] The C model refers to a functional program developed using the C language. Here, it refers to a program developed in C to implement the same functions as the CPU 310, first memory 320, and UART interface 330 in the target SoC 300. C is a high-level language, and its execution speed is faster than Verilog, which is used in existing SoC verification. However, C++ can also be used to develop and implement the simulated CPU 210, simulated memory 220, and simulated UART interface 230; this is not a restriction.
[0062] Furthermore, to improve the simulation verification speed, the virtual hardware simulator 200 includes a mapping module. This mapping module is used to map the access path to the corresponding access path of the simulated memory 220 and simulated UART interface 230 when the simulated CPU 210 accesses the first memory 320 and UART interface 330, so that the program can run quickly in the virtual hardware simulator 200.
[0063] To achieve the aforementioned access format conversion, the simulation test platform 100 in this embodiment further includes a format conversion module. This module converts the received access request from the virtual hardware simulator 200 to the target IP core 340 into an access format supported by the CPU 310 in the target SoC 300. Data transmission between the virtual hardware simulator 200 and the simulation test platform 100 uses packet-based methods, requiring the packet to be converted into a format supported by the address bus.
[0064] Figure 3 A schematic flowchart of a system-on-chip (SoC) verification method according to an embodiment of this application is shown. This SoC verification method is applicable to the SoC verification system of this embodiment. Exemplarily, the SoC verification method includes the following steps:
[0065] S10, the virtual hardware simulator 200 constructs a simulated CPU 210, simulated memory 220, and simulated UART interface 230 through model building, to correspondingly replace the real CPU 310, first memory 320, and UART interface 330 in the target SoC. Specifically, the function control module disables the CPU 310, first memory 320, and UART interface 330 in the target SoC and starts the virtual hardware simulator 200.
[0066] S20, the simulation test platform 100 monitors the virtual hardware simulator 200 through the function control module, and verifies the CPU 310, first memory 320, UART interface 330 and target IP core 340 in the target SoC through the interaction channel according to the monitoring results.
[0067] The simulation test platform 100 provides a simulation verification environment for the target SoC.
[0068] The simulation testing platform 100 monitors the virtual hardware simulator 200 through its function control module, and verifies the target IP core 340 in the target SoC 300 through the interaction channel based on the monitoring results. That is, according to business requirements, the simulation testing platform 100 and the virtual hardware simulator 200 mutually request access through the interaction channel to verify the target IP core 340.
[0069] The interaction channel includes a memory access channel and an interrupt channel. Step S20 includes:
[0070] When the simulated CPU 210 accesses the target IP core 340, the virtual hardware simulator 200 sends the memory access command to the simulation test platform 100 through the memory access channel, and receives the reply information through the memory access channel.
[0071] The virtual hardware simulator 200 monitors the access requests of the simulation test platform 100 to the simulated memory 220 and the simulated UART interface 230 through the memory access channel, and replies to the simulation test platform 100 after completing the access.
[0072] The virtual hardware simulator 200 monitors the interrupt requests and cancellation messages sent by the simulation test platform 100 through the interrupt channel and transmits them to the simulated CPU 210.
[0073] Specifically, for virtual hardware emulator 200:
[0074] When the simulated CPU 210 accesses the first memory 320 and UART interface 330 in the target SoC 300, it directly maps to accessing the simulated memory 220 and simulated UART interface 230. When accessing other address spaces, it sends the memory access command to the simulation test platform 100 through the memory access channel and waits for the memory access to complete. The other address spaces are the address spaces of the target objects, which include the second memory in the SoC and the target IP core.
[0075] The interrupt channel monitors interrupt requests and cancellation messages from the simulation test platform 100 and notifies the simulated CPU 210 of the relevant interrupt status.
[0076] The access channel monitors access requests from the simulation test platform 100 to the simulated memory 220 and the simulated UART interface 230. After the access is completed, a completion message is replied through the access channel.
[0077] For the simulation test platform 100:
[0078] When the SoC needs to access the first Memory 320 and UART interface 330, the memory access command is sent to the virtual hardware simulator 200 through the memory access channel, and the access is waited for to be completed.
[0079] The memory access channel monitors access requests from the virtual hardware simulator 200 to the target IP core 340, converts them into the access format of the CPU 310 in the SoC, and replies with completion information through the memory access channel after the access is completed.
[0080] When the interrupt request status of the target IP core 340 of the simulation test platform 100 changes, the information is sent to the virtual hardware simulator 200 through the interrupt channel.
[0081] In the system-on-chip verification method of this embodiment, when the simulated CPU 210 accesses the first memory 320 and UART interface 330, the access path is mapped to the access path corresponding to the simulated memory 220 and simulated UART interface 230, so as to enable the simulated CPU 210 to access the simulated memory 220 and simulated UART interface 230, thereby realizing that the simulated memory 220 and simulated UART interface 230 replace the corresponding first memory 320 and UART interface 330 in the SOC.
[0082] The method also includes converting the received access request from the virtual hardware simulator 200 to the target IP core 340 into an access format supported by the CPU 310.
[0083] It is understood that the method in this embodiment corresponds to the function of the verification system of the on-chip system in the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.
[0084] The overall approach of this application is to divide the on-chip system verification system into a QEMU side and an SoC Testbench side, with the two sides interacting via TCP port listening. Specifically, the CPU 310, part of the memory, and the UART interface 330 in the SoC are moved to a virtual hardware simulator 200 to replace the corresponding components in the SoC, ensuring that the entire system runs within the virtual hardware simulator 200, thus improving running speed. Access to the SoC is only required when the target IP core 340 needs to be operated. In this way, the execution speed of the CPU 310 is guaranteed, and the ability to operate the actual IP is also ensured, thus guaranteeing the feasibility of this framework. The simulation test platform 100 can observe the status of various signals. Therefore, this application can effectively solve the problems of high cost, long cycle, and lack of observability in existing on-chip system hardware and software co-verification work.
[0085] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the above-described system-on-a-chip verification method or the various modules in the above-described system-on-a-chip verification system.
[0086] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0087] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0088] This application also provides a readable storage medium for storing the computer program used in the aforementioned terminal device.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0090] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0091] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A system for verifying a system-on-chip, the system comprising: include: The system comprises a simulation test platform, a virtual hardware simulator, and an interaction channel; the interaction channel is used for requesting access between the simulation test platform and the virtual hardware simulator; wherein the target on-chip system to be verified includes a central processing unit, a first memory, a universal asynchronous transceiver interface, and a target verification function module; The virtual hardware simulator is used to construct a model to simulate a central processing unit, a memory, and a universal asynchronous transceiver interface, which can be used to replace the real central processing unit, first memory, and universal asynchronous transceiver interface in the target on-chip system. The simulation testing platform is used to provide a simulation verification environment for the target system-on-a-chip. The simulation testing platform includes a function control module, which is used to listen for access requests from the virtual hardware simulator and, based on the listening results, verify the central processing unit, first memory, general asynchronous transceiver interface, and target verification function module of the target system-on-a-chip through the interaction channel. The target on-chip system also includes a second memory; the interaction channel includes a memory access channel and an interrupt channel; The simulation test platform is used to receive memory access commands sent by the simulated central processing unit when accessing a designated object in the target on-chip system through the memory access channel, and to reply information to the virtual hardware simulator; the designated object includes the target verification function module and the second memory; The virtual hardware simulator is used to monitor the simulation test platform's access requests to the simulated memory and the simulated universal asynchronous transceiver interface through the memory access channel, and to reply to the simulation test platform after completing the access. The simulation testing platform is also used to transmit interrupt requests and undo messages to the virtual hardware simulator through the interrupt channel; The function control module is further configured to change the control of the bus in the target on-chip system from the control of the central processing unit in the target on-chip system to the control of the simulated central processing unit by modifying the access address, and to disable the operation of the central processing unit, the first memory and the universal asynchronous transceiver interface in the target on-chip system. The function control module is further configured to send memory access commands to the virtual hardware simulator when the target on-chip system accesses the memory and universal asynchronous transceiver interface of the target on-chip system.
2. The system-on-chip verification system of claim 1, wherein Both the memory access channel and the interrupt channel are established through the TCP ports of the simulation test platform and the virtual hardware simulator.
3. The system-on-chip verification system of claim 1, wherein The simulated central processing unit is built based on the C model provided in the virtual hardware simulator and according to the model and configuration of the real central processing unit in the target on-chip system; The simulated memory is constructed based on the C model provided in the virtual hardware simulator and according to the address space and size of the actual memory in the target on-chip system; The simulated universal asynchronous transceiver interface is based on the C model provided in the virtual hardware simulator and is constructed according to the address space and functional characteristics of the real universal asynchronous transceiver interface in the target on-chip system.
4. The verification system for a system-on-a-chip according to claim 3, characterized in that, The virtual hardware simulator includes a mapping module; the mapping module is used to map the access path to the access path corresponding to the simulated memory and the simulated universal asynchronous transceiver interface when the simulated central processing unit accesses the first memory and the universal asynchronous transceiver interface.
5. The verification system for a system-on-a-chip according to any one of claims 1 to 4, characterized in that, The simulation test platform also includes a format conversion module; the format conversion module is used to convert the received access request from the virtual hardware simulator to the target verification function module into an access format supported by the central processing unit in the target system-on-a-chip.
6. A method for verifying a system-on-a-chip, wherein the method is applied to the verification system for the system-on-a-chip as described in any one of claims 1-5; characterized in that, The method includes: the virtual hardware simulator obtains a simulated central processing unit, a simulated memory, and a simulated universal asynchronous transceiver interface through model construction, so as to replace the real central processing unit, first memory, and universal asynchronous transceiver interface in the target on-chip system. The simulation test platform listens for access requests from the virtual hardware simulator through the function control module, and verifies the central processing unit, first memory, general asynchronous transceiver interface, and target verification function module of the target system-on-a-chip through the interaction channel based on the listening results.
7. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the functions of the verification system of any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the functions of the verification system for the system-on-chip according to any one of claims 1-5.
Citation Information
Patent Citations
IP core simulation system and method based on dual-port SRAM
CN111176926A
SoC hybrid verification method
CN114519316A
