Method for verifying network-on-chip deadlock in system-on-chip and computing equipment
By building a system-level chip verification environment in EDA simulation verification of SoC chips, integrating CPU models and virtual intellectual property modules, designing test cases, and monitoring communication status, the problem of deadlock detection complexity in SoC chips is solved and the simulation speed is improved and integrity, a standardized verification process is implemented.
Patent Information
- Application Number
- CN202410973516.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-26
AI Technical Summary
The prior art faces the problems of deadlock detection and debugging complexity, slow simulation speed, incomplete verification and lack of standardized methods in the EDA simulation verification of SoC chips, especially in on-chip network deadlock detection.
By building a system-level chip verification environment, integrating CPU models, creating virtual intellectual property modules, designing multiple test cases, monitoring communication status, implementing deadlock detection mechanisms, simplifying the debugging process of the on-chip network, and ensuring coverage and verification of deadlock scenarios.
It improves simulation verification speed and integrity, reduces verification complexity and time cost, ensures the reliability and consistency of deadlock verification, and provides a standardized verification process.
Smart Images

Figure CN119026535A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chip development and verification, and in particular to a method and computing device for verifying on-chip network deadlock in a system-level chip based on electronic design automation simulation. Background Art
[0002] In recent years, the design of system-on-chip (SoC) is developing in the direction of high speed, large capacity, small size, light weight and low power consumption. This trend is mainly driven by modern electronic design automation (EDA) design tools, which provide efficient and accurate design methods and verification methods for SoC design. EDA tools can realize the automation of the conversion from circuit system-level design to the final layout, and ensure the correctness of each step of the conversion through verification.
[0003] However, with the increasing complexity of SoC design, especially the popularity of multi-core processor system on chip (MPSoC), the traditional bus interconnection architecture can no longer meet the performance requirements of today's systems. As an emerging on-chip interconnection technology, network-on-chip (NoC) technology has gradually become the preferred interconnection architecture for multi-core communication on chip with its advantages of low latency, high throughput, and good scalability.
[0004] The emergence of NoC has caused SoC design to gradually transition from computing-centric to communication-centric, which has also brought new design challenges, especially regarding communication efficiency and deadlock. Deadlock refers to the situation where multiple modules or nodes (multiple IPs) form a waiting loop while waiting for other modules or nodes to release resources, causing the system to be unable to continue executing. In NoC, deadlock may cause communication blockage and affect the performance of the entire system. Therefore, EDA simulation verification plays an important role in SoC chip NoC deadlock detection. By building accurate simulation models, writing comprehensive test cases, and using EDA tools to perform simulation tests, potential deadlock problems in NoC can be effectively detected, and corresponding optimizations and repairs can be performed. Although the background technology of SoC chip EDA simulation verification NoC deadlock provides many advantages for chip design, it still has some disadvantages.
[0005] With the increasing complexity of SoC design, especially the introduction of NoC, the scale of simulation verification has become extremely large. This leads to slower simulation speed, longer simulation time, and a sharp increase in the demand for computing resources. For large and complex SoC designs, it may become impractical to conduct comprehensive simulation verification, so a compromise between simulation accuracy and simulation speed may need to be made. Due to the complexity of the communication mechanism and resource allocation strategy of NoC, it becomes very difficult to ensure the integrity of simulation verification. Although a large number of test cases can be written to cover various scenarios, there may still be deadlock situations that are not covered or discovered. In addition, for some random or occasional deadlocks, their reproduction and verification may be more difficult. During the simulation verification process, if a deadlock problem occurs, it may be very challenging to debug and diagnose it. Due to the distributed nature of NoC and the asynchronous nature of communication, determining the root cause of the deadlock may involve the analysis of multiple components and communication paths. In addition, the debugging functions provided by EDA tools may not be sufficient to directly locate and solve the deadlock problem, and additional analysis and debugging means are required. At present, there is no unified standard for the method of SoC chip EDA simulation verification NoC deadlock. Different design teams and manufacturers may adopt different verification strategies, tools and processes, which may lead to inconsistency and poor comparability of verification results. The lack of standardized verification methods may make the reliability of verification results questionable. Therefore, although the background technology of SoC chip EDA simulation verification of NoC deadlock provides strong support for chip design, it still faces challenges in simulation speed, verification integrity and other aspects.
[0006] Therefore, a technical solution is needed to ensure the integrity of deadlock verification while improving the simulation verification speed by applying a standardized and simplified verification process. Summary of the invention
[0007] The present application aims to provide a method and computing device for verifying on-chip network deadlock in a system-level chip based on EDA simulation, which ensures the integrity of deadlock verification while improving the simulation verification speed by applying a standardized and simplified verification process.
[0008] According to one aspect of the present application, a method for verifying network-on-chip deadlock in a system-on-chip based on electronic design automation simulation is provided, comprising:
[0009] Build a system-level chip verification environment;
[0010] Integrate a central processing unit (CPU) model into the system-level chip verification environment to build a network on chip (NoC) of the system-level chip;
[0011] Creating a dummy IP module (dummy IP) and applying the dummy IP module to simplify at least one functional module in the on-chip network;
[0012] Debugging the simplified on-chip network so that the system-level chip verification environment implements the read and write operations of the virtual intellectual property module on the on-chip network;
[0013] Design multiple test cases based on the deadlock scenario;
[0014] The test cases described are applied to cover normal communication processes as well as potential deadlock scenarios.
[0015] According to some embodiments, the functional modules include a double data rate synchronous dynamic random access memory module (DDR), an embedded multimedia card module (EMMC), a high-speed serial computer expansion bus standard module (PCIE), and a video codec module (JPEG).
[0016] According to some embodiments, debugging the simplified on-chip network so that the system-level chip verification environment implements the read and write operations of the virtual intellectual property module on the on-chip network includes:
[0017] The data stream flows from an embedded multimedia card module (EMMC), a high-speed serial computer expansion bus standard module (PCIE) or a JPEG codec module to the on-chip network, and the on-chip network transmits the data to a double data rate synchronous dynamic random access memory module (DDR) for storage;
[0018] The central processing unit (CPU) program configures the network controller (Ethernet) to implement data interaction with the on-chip network.
[0019] According to some embodiments, the method further comprises: enabling the network controller (Ethernet) and the virtual intellectual property module of the verification environment to work simultaneously by polling a shared memory.
[0020] According to some embodiments, a variety of test cases are designed according to the deadlock scenario, including:
[0021] Define the specific conditions and triggering methods of the deadlock scenario so as to reproduce and detect the deadlock during the verification process.
[0022] According to some embodiments, detecting deadlock comprises:
[0023] Implementing a deadlock detection mechanism in a verification environment includes: monitoring a communication state and a packet queue length in the network on chip;
[0024] When a deadlock is detected, an appropriate warning or error report is triggered.
[0025] According to some embodiments, the test cases are applied to cover normal communication processes and potential deadlock scenarios, including:
[0026] Using the sequence generator of the verification environment to generate stimulus for the central processing unit drive, including instructions executed by the central processing unit and data access requests;
[0027] Run simulations to observe the interaction between the CPU driver and other components through the on-chip network;
[0028] The simulation results are analyzed, and the simulation data is automatically compared and verified using a scoreboard to check whether the CPU driver is executed as expected and whether the on-chip network is deadlocked.
[0029] According to some embodiments, the method further comprises: configuring the startup procedures of each integrated circuit module through a central processing unit program in the memory space required for initializing the verification environment, for example, applying macro definitions to control the startup of each integrated circuit module.
[0030] According to some embodiments, the test cases are applied to cover normal communication processes and potential deadlock scenarios, including: using a register model to configure registers so that register configuration files are managed and maintained independently of a verification environment.
[0031] According to another aspect of the present application, there is provided a computing device, comprising:
[0032] Processor; and
[0033] A memory storing a computer program, which, when executed by the processor, enables the processor to execute any of the methods described above.
[0034] According to another aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes any of the above methods.
[0035] According to the embodiments of the present application, a relatively complete and simplified on-chip network is constructed in a simulation environment by creating a virtual intellectual property module to replace a complex functional module, so as to facilitate more comprehensive testing and verification of the deadlock problem of the on-chip network NoC, skipping the complex logic operation process inside the functional module, reducing the complexity of the simulation verification, and greatly saving the time cost of the verification work, thereby improving the verification efficiency. By designing a variety of test cases to repeatedly test the on-chip network, the reliable operation of the on-chip network in various scenarios is guaranteed, so that the verification integrity is guaranteed.
[0036] According to some embodiments, the scheme of the present invention configures registers by applying a register model, so that the configuration files of the registers can be managed and maintained independently of the verification environment, and when configuring the same registers in a new verification project or test case, the existing configuration files can be directly reused, thereby reducing duplication of work and improving verification efficiency. It should be understood that the above general description and the detailed description below are only exemplary and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.
[0038] Figure 1 A flow chart of a method for verifying a network-on-chip deadlock in a system-on-chip based on EDA simulation according to an example embodiment is shown.
[0039] Figure 2 A schematic diagram of an on-chip network architecture of a system-level chip based on EDA simulation verification according to an example embodiment is shown.
[0040] Figure 3 A data transmission diagram is shown of a method for verifying a deadlock of an on-chip network in a system-on-chip based on EDA simulation according to an example embodiment.
[0041] Figure 4 A block diagram of a computing device is shown according to an exemplary embodiment. DETAILED DESCRIPTION
[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0043] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0045] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0046] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0047] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0048] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.
[0049] With the increasing complexity of SoC design, especially the popularity of multi-core MPSoC, the traditional bus interconnection architecture can no longer meet the performance requirements of today's systems.
[0050] As an emerging on-chip interconnect technology, NoC technology has gradually become the preferred interconnect architecture for communication between multi-cores on a chip. The emergence of NoC has gradually transformed SoC design from computing-centric to communication-centric, which has also brought new design challenges, especially regarding communication efficiency and deadlock. Deadlock refers to the formation of a waiting cycle when multiple modules or nodes (multiple IPs) are waiting for other modules or nodes to release resources, causing the system to be unable to continue execution.
[0051] In NoC, deadlock may cause communication blockage and affect the performance of the entire system. Background technology of SoC chip EDA simulation verification NoC deadlock Although it provides many advantages for chip design, it still has many disadvantages, such as: simulation speed and scale limitations, verification integrity challenges, debugging and diagnosis complexity, lack of standardized verification methods, etc.
[0052] To this end, the present application proposes a method and computing device for verifying deadlock of network on chip in system-level chip based on EDA simulation, which can ensure the integrity of deadlock verification while improving the speed of simulation verification by applying standardized and simplified verification process. According to the embodiment, by creating a virtual intellectual property module, a relatively complete network on chip is constructed in the simulation environment, and the deadlock problem of NoC is tested and verified more comprehensively, reducing the complexity and time cost of simulation verification, ensuring the integrity of deadlock verification while improving the speed of simulation verification. Through repeated testing with multiple test cases, the integrity of verification is guaranteed.
[0053] Before describing the embodiments of the present application, some terms or concepts involved in the embodiments of the present application are explained.
[0054] EDA stands for Electronic Design Automation, which is a method of designing electronic systems using computer-aided design tools. EDA tools can help engineers efficiently design, simulate, verify, and optimize complex electronic circuits and systems, especially large-scale integrated circuit (VLSI) designs. These tools typically include software for logic design, layout and routing, analog simulation, timing analysis, and verification. Designs are written using hardware description languages such as VHDL or Verilog, and then converted into actual silicon chip layouts by EDA tools.
[0055] SoC is the abbreviation of System on a Chip, which refers to the integration of a complete system on a single integrated circuit chip, including a central processing unit (CPU), a graphics processing unit (GPU), memory (RAM), storage, input / output interfaces, and other necessary electronic components. SoC is designed to optimize performance, power consumption, and cost, and is commonly found in mobile devices, embedded systems, consumer electronics, and many other applications.
[0056] NoC, or Network on Chip, is a structured interconnect technology used for internal communication within SoCs. NoC uses a computer network-like approach to build a network structure through routers and channels, allowing each module within the SoC to exchange data efficiently and with low latency. NoC designs typically support advanced features such as multicast, priority management, and virtual channels to meet the needs of complex systems and improve the overall performance and energy efficiency of the system.
[0057] The exemplary embodiments of the present application are described below in conjunction with the accompanying drawings.
[0058] Figure 1 A flow chart of a method for verifying a network-on-chip deadlock in a system-on-chip based on EDA simulation according to an example embodiment is shown.
[0059] See also Figure 1 According to an example embodiment, a method for verifying a network-on-chip deadlock in a system-on-chip based on EDA simulation includes:
[0060] At S101, a system-on-chip verification environment is constructed.
[0061] According to some embodiments, this stage builds a verification environment according to a universal verification methodology (such as UVM, Universal Verification Methodology). UVM provides a standardized verification framework to help designers define and configure the structure and interactive logic of each component (such as CPU, memory controller, I / O interface, etc.) in the SoC. This step is the basis to ensure the systematicness and maintainability of subsequent verification work.
[0062] According to some embodiments, the verification team specifies the design purpose, expected functions, performance indicators, and external interface specifications of the SoC according to the verification requirements, including detailed specifications of components such as CPU, memory, peripherals, communication interfaces (such as PCIe, USB, Ethernet, etc.) and on-chip networks (NoC). A verification environment is constructed using a general verification methodology such as UVM, including the definition of verification components (such as agents, drivers, monitors, scoreboards, and sequencers) and a verification plan (testplan). UVM supports object-oriented programming, which is convenient for building reusable verification components.
[0063] According to some embodiments, the TLM (Transaction-Level Modeling) communication protocol of UVM is used to define the communication mode between components to efficiently transmit verification data and control information, including the establishment of transaction definitions, interface definitions, and adapters to ensure seamless flow of data in the verification environment.
[0064] According to some embodiments, according to the specific needs of the SoC, configure the parameters of the verification environment, such as clock frequency, transaction frequency, test case complexity, etc., to ensure that the verification covers all design corners and boundary conditions. Develop a detailed verification plan, including functional verification, performance verification, stress testing, corner case analysis, and deadlock detection, etc., to ensure the comprehensiveness of the verification.
[0065] In S103, the CPU model is integrated into the system-on-chip verification environment to construct a network-on-chip of the system-on-chip.
[0066] According to some embodiments, according to the CPU architecture used in the SoC design (such as ARM Cortex series, RISC-V, etc.), a suitable CPU model is selected to ensure that the CPU model is compatible with other components in the verification environment, especially the connection with the memory interface, bus interface and interrupt controller, so that the CPU model can communicate with the remaining SoC components through the standard interface in the verification environment. The CPU model is configured according to the verification requirements, including frequency, cache strategy, power management characteristics, etc., to simulate different working states and scenarios. Test cases for the CPU are included in the verification plan, such as instruction set coverage, exception handling, multi-core synchronization, etc., to ensure comprehensive verification of the CPU functions.
[0067] According to some embodiments, the NoC is designed according to the topology of the SoC, including the number of nodes, routing algorithms (such as XY routing, shortest path, etc.), number of virtual channels, arbitration strategy, etc. The NoC model is implemented using SystemC, UVM or other high-level modeling languages, and the on-chip network should be able to simulate behaviors such as data packet transmission, routing decisions, flow control and congestion management.
[0068] According to some embodiments, the NoC model is integrated into the verification environment to ensure that it is correctly interconnected with the CPU model, memory controller, peripheral interface, etc., including configuring the NoC model to adapt to specific verification scenarios and test cases. The NoC performance indicators such as bandwidth, latency, and deadlock avoidance are verified through simulation, and the behavior under high load and edge conditions is checked to ensure that the NoC design meets the overall performance requirements of the SoC.
[0069] At S105 , a virtual intellectual property module is created and the virtual intellectual property module is applied to simplify at least one functional module in the network on chip.
[0070] According to some embodiments, according to the design plan of SoC, the address mapping and allocation of different components (such as CPU, cache, memory, peripherals, etc.) are clarified to ensure that the virtual intellectual property module can accurately reflect the layout of these entities in the physical or virtual address space. The virtual intellectual property module is designed to generate various read and write access modes, including random access, continuous access, burst transmission, idle cycle, etc., to simulate the data traffic and access characteristics under the real workload of the corresponding functional module. The model code is written using a behavioral description language (such as SystemVerilog, Python or C++, etc.) to implement address generation, data packet construction, access request initiation and response processing logic. The simulated address behavior model is integrated into the NoC verification environment to ensure that the address model can initiate read and write requests to the NoC and receive responses.
[0071] According to some embodiments, a multi-core CPU+NOC SOC system is used to test NOC interlocking, which also includes Ethernet, DDR, EMMC, PCIE, JPEG codec and other IPs as examples. Since the deadlock of the NOC is mainly tested, there is no data interaction between the other IPs, and all of them are interacted through the NOC. DDR, EMMC, PCIE, and JPEG are replaced by dummy IPs to achieve the effect of accelerated simulation.
[0072] At S107, the simplified on-chip network is debugged so that the system-on-chip verification environment implements the read and write operations of the virtual intellectual property module on the on-chip network.
[0073] According to some embodiments, the simulation is run to check whether the NoC can correctly handle various access requests from the virtual intellectual property module, including but not limited to request routing, data packet transmission, flow control, error handling, etc. The simulation results are analyzed to evaluate the performance indicators of the NoC, such as latency, throughput, and bandwidth utilization, to ensure that they meet the design requirements. Special attention is paid to the behavior of the NoC under high load or specific access modes, and scenarios that may cause deadlock or race conditions are found through debugging and analysis, and necessary adjustments and optimizations are made.
[0074] According to some embodiments, based on the simulation result feedback, necessary adjustments are made to the virtual intellectual property module and the NoC model, which may include modifying the address access mode, optimizing the routing algorithm, adjusting the buffer size, etc., until the expected verification goal is achieved, ensuring that the SoC verification environment can accurately simulate the complex and changeable address access behavior, and through the debugging of the NoC model, effectively verify its correctness and performance under various working conditions, laying a solid foundation for subsequent system-level verification and optimization.
[0075] In S109, multiple test cases are designed according to the deadlock scenario.
[0076] According to some embodiments, shared resources in the NoC are identified, such as channel bandwidth, buffers in routers, virtual channels, etc., whose limited nature may be the cause of deadlock. Data flow and control flow are analyzed to determine if there is a potential circular waiting for resources. For example, if node A waits for resources from B, B waits for resources from C, and C waits for resources from A, a deadlock loop is formed. Identify which resources, once allocated, cannot be preempted by other requestors, which is a common cause of deadlock. Check whether the communicating entities request additional resources while keeping the allocated resources, which may cause deadlock.
[0077] According to some embodiments, test cases are designed to trigger and detect the deadlock conditions analyzed above to ensure that the NoC design can properly handle or avoid these situations. For example, maximum bandwidth saturation: design test cases to make certain channels or routers in the NoC reach their bandwidth limits while other communications attempt to access these saturated resources to observe whether deadlock occurs. Construct data flows to simulate three or more nodes forming a closed loop of resource waiting, such as through a carefully designed sequence of data packet sending, to verify the deadlock prevention mechanism of the NoC. Simulate multiple nodes to send a large number of data packet requests at the same time, especially for routers with limited buffer resources, to check whether the system can effectively manage resource allocation and prevent deadlock.
[0078] According to some embodiments, a scenario is designed in which a high-priority task is blocked by waiting for a low-priority task to release resources, and whether the priority scheduling strategy of the NoC can effectively avoid the resulting deadlock. The availability of network resources is dynamically changed during the test (such as closing certain channels) to observe whether the system can adapt to such changes without falling into a deadlock. When implementing these test cases, a simulation environment or hardware prototype should be used for full verification. By monitoring and recording simulation logs, the system behavior is analyzed to verify the performance of the NoC model when encountering potential deadlock scenarios. If a deadlock is found, the cause needs to be further analyzed and the NoC design or its control logic needs to be adjusted until all test cases pass successfully to ensure the robustness of the system.
[0079] At S111, the test cases are applied to cover normal communication processes and potential deadlock scenarios.
[0080] According to some embodiments, in order to fully cover normal communication processes and potential deadlock scenarios, it is necessary to refine the implementation steps and design test cases in a targeted manner, which cover the basic instruction set of the CPU to ensure that each instruction category can be correctly executed under different conditions and convey the necessary information through the NoC. The test cases also cover a variety of data interaction modes, including mixed read and write operations, burst transmission, idle cycle interspersed, etc., to simulate complex data exchange modes in the real world.
[0081] According to some embodiments, memory address boundaries, data volume limits, and edge cases of instruction execution are tested, which are often high-incidence areas for deadlocks. Typical deadlock situations such as circular waiting for resource requests, recursive lock applications not being released, and shared resource competition without a concession strategy are simulated. The UVM sequence generator is adjusted according to the specific needs of the project to ensure that the generated stimulus sequence can reflect the normal working process and can also specifically trigger the deadlock condition.
[0082] According to some embodiments, in a verification environment, an enhanced monitor component is configured to record not only conventional transaction interactions, but also to pay special attention to timestamps of resource allocation and release, lock state changes, etc., to facilitate deadlock analysis.
[0083] According to some embodiments, before verification, it is necessary to optimize the simulation settings of the hardware configuration to ensure that the simulation speed and accuracy are optimally balanced, especially when simulating large-scale or long-running scenarios.
[0084] According to some embodiments, the functional modules include a double data rate synchronous dynamic random access memory module (DDR), an embedded multimedia card module (EMMC), a high-speed serial computer expansion bus standard module (PCIE), and a video codec module (JPEG).
[0085] Figure 2 A schematic diagram of an on-chip network architecture of a system-level chip based on EDA simulation verification according to an example embodiment is shown.
[0086] See also Figure 2According to the example embodiment, the system-level chip verification environment includes: a transaction level model (TLM), a sequencer, a driver, a monitor, and a scoreboard. The figure shows the basic structure of the UVM verification environment, in which the sequencer generates stimuli, the driver sends these stimuli to the DUT, and the monitor listens to the output of the DUT and passes it to the scoreboard. The scoreboard compares the received information with the output of the reference model to verify whether the behavior of the DUT is correct. This structured verification environment design makes verification easier to expand and reuse, and improves the efficiency and quality of verification. Among them, the transaction level model (TLM) is a high-level modeling technology for fast and efficient verification at the system level, allowing designers to abstractly represent data transmission and protocol interaction in the form of transactions, providing different levels of abstraction (for example, from the atomic level to the functional level), so that verification can be performed at an early stage, thereby accelerating the design cycle. The sequencer is responsible for creating test stimuli to trigger various behaviors of the design, including normal operation, boundary conditions and abnormal situations. Through randomization technology, the sequencer can automatically generate a variety of test scenarios, increase the coverage of verification, and ensure comprehensive verification of the design. The drivers interface directly with the design, converting transactions generated by the sequence generator into signals or commands that the design can understand. They are responsible for applying stimuli to the input ports of the design at the appropriate time and managing the interaction process with the design. Monitors observe the output and internal signals of the design, collect data and check whether the behavior of the design is as expected. The scoreboard is used to compare the actual output of the design with the expected results to determine whether the design is executed correctly according to the specifications. The scoreboard can also track verification coverage to ensure that all predetermined test scenarios have been fully verified. These components together build a closed-loop verification environment that verifies all aspects of the SoC through an automated and systematic approach, ensuring that design errors are discovered and corrected before tape-out, reducing design costs and risks.
[0087] According to some embodiments, after integrating the CPU model into the system-on-chip verification environment, it also includes: debugging the system-on-chip verification environment so that the CPU can be stimulated and correctly execute instructions. Confirm the accuracy and completeness of the CPU model, check the correctness of the instruction set architecture (ISA) implementation, exception handling mechanism, interrupt system, memory management and other functions, and configure the CPU model according to the specific needs of the SoC, such as setting the cache size, TLB (Translation Lookaside Buffer) characteristics, etc. Ensure that the interface between the CPU model and other components in the verification environment (such as bus, memory model, peripheral model, etc.) is correct, including verification of signal connection, transaction transmission protocol and timing relationship.
[0088] According to some embodiments, a sequencer is then developed or adjusted to generate complex instruction sequences for the CPU, covering various control flow, data flow, and exception handling situations. This helps verify the behavior of the CPU in different operating modes. A series of test cases are run to verify that the CPU can correctly interpret and execute instructions, process data, and respond to interrupts and exceptions.
[0089] According to some embodiments, the performance of the CPU model under different workloads is analyzed, including clock cycle accuracy, power consumption evaluation, etc. Use debugging tools (such as breakpoints, signal tracking, register viewing, etc.) to locate and fix problems that may occur in the CPU model during execution. This step may require repeated iterations until all known problems are resolved and the verification results meet expectations. Finally, the comprehensiveness of the verification is monitored through the scoreboard and coverage tools to ensure that all instructions, state transitions, exception paths, etc. are fully tested. Parts that do not achieve the expected coverage need to further generate test cases for additional verification.
[0090] According to some embodiments, the CPU model is used to simulate the behavior of an actual CPU, including instruction execution, data access, and communication. Specifically, the CPU model needs to accurately simulate the instruction set architecture (ISA) of the target processor to ensure that the same machine language instruction set can be executed, including arithmetic and logical operations, data transfer, control transfer, and specific system instructions. Simulate how the CPU processes data, including load / store operations, read and write register files, and support for various data types. In addition, it needs to accurately reflect the impact of cache behavior, virtual memory management, and memory hierarchy.
[0091] According to some embodiments, the behavior of the CPU is simulated when encountering instruction errors, system calls, external interrupts, etc., including exception priority sorting, processing flow, and exception return mechanism. For multi-core CPU models, it is also necessary to simulate the communication mechanism between the cores, such as shared cache consistency protocol, memory model, and interlocking mechanism to ensure correctness in a concurrent execution environment. The CPU model is a key tool for verifying the integrity of SoC design, verifying the interaction between software and hardware, and estimating system performance. This not only helps to discover design defects in advance, but also accelerates the software development process because software developers can start development and testing based on the model before hardware implementation.
[0092] Figure 3 A data transmission diagram is shown of a method for verifying a deadlock of an on-chip network in a system-on-chip based on EDA simulation according to an example embodiment.
[0093] See also Figure 3, according to the example embodiment, the figure shows how the NOC acts as a bridge to connect the CPU and Ethernet interface, as well as other peripheral devices such as DDR memory, JPEG encoder and PCI Express interface. In this way, the CPU and Ethernet interface can communicate with these peripheral devices. At the same time, each peripheral device has a corresponding AXI VIP to verify the correctness of their functions. The AXI bus uses a channel-based transmission mechanism, including five channels: write address, write data, write response, read address and read data, to implement data read and write operations 1. This channelized design allows each channel to have its own handshake protocol and not interfere with each other 1. For write operations, the process is roughly as follows: the Master sends the write address to the write address channel, and the Master sends the write data to the write data channel. When the Master completes sending the write data, it will pull up the WLAST signal and wait for the Slave's write response. After receiving the write data, the Slave sends a write response to the Master through the write response channel, indicating that the write operation is completed 2. For the read operation, the process is as follows: the Master sends the read address to the read address channel. When the Slave is ready for data and the Master's RREADY signal is valid, the Slave sends the read data to the read data channel to the Master. Here, the master is our dummy IP and the slave is DDR.
[0094] In AXI VIP (AXI Verification Intellectual Property), Master and Slave represent two different roles and functions, and they each play an important role in AXI bus communication. First, the Master plays the role of initiator and controller in AXI VIP. It is responsible for initiating read and write requests and controlling the start and end of data transmission. The Master starts data transmission by sending information such as address, control signal and data, and receives the response from the Slave to complete the communication. The Master usually has higher control authority and can actively initiate data access and transmission requests. In contrast, the Slave plays the role of a passive responder in AXI VIP. It performs corresponding operations according to the Master's request, such as reading data or writing data, and returns a response to the Master. The Slave receives information such as address, control signal and data from the Master, and performs corresponding operations based on this information. During the communication process, the Slave is usually in a controlled and scheduled state, and performs data transmission according to the Master's instructions. In summary, there are obvious differences in functions and roles between the Master and Slave in AXI VIP. The Master is responsible for initiating requests and controlling data transmission, while the Slave performs operations based on the Master's requests and returns responses. This master-slave relationship ensures orderly communication and efficient data transmission on the AXI bus.
[0095] According to some embodiments, the network on chip includes a communication protocol and a routing mechanism to support data transmission between different components. The network-on-chip (NoC) model connects the data transmission infrastructure of different components (such as CPU, DSP, memory controller, peripherals, etc.) inside the SoC. The NoC model includes: a communication protocol and a routing mechanism. The communication protocol defines the rules and format of data transmission to ensure that the data exchange between different components is orderly and reliable. Common NoC communication protocols may include packet-based protocols, circuit switching or hybrid protocols to adapt to different application scenarios and performance requirements. The routing mechanism determines how the data packet arrives from the sender to the receiver. This includes selection algorithms to determine the best path, such as the shortest path, minimum delay, weight-based routing, etc. The routing mechanism must also consider network congestion management, fault avoidance, and the ability to support multicast and broadcast to improve network efficiency and reliability.
[0096] According to some embodiments, the NoC model also includes: flow control, arbitration and scheduling, virtual channels and service quality, power management and energy consumption optimization, etc. In order to avoid data packet loss or network congestion, the NoC model needs to implement effective flow control strategies, such as credit system, window mechanism or stop-and-wait protocol, to ensure that the sender does not send data too quickly and exceed the processing capacity of the receiver or the network. In the case of shared resources (such as network bandwidth, input and output ports of routers), the NoC model needs to include arbitration logic to determine the access priority between multiple requesters. In order to support different types of traffic (such as real-time data flow, non-real-time data transmission) and ensure quality of service (QoS), the NoC model may implement virtual channel technology to allocate dedicated logical channels for different types of communication to ensure timely transmission of mission-critical data. The NoC model may also integrate technologies such as dynamic voltage and frequency adjustment (DVFS) and power gating to optimize energy efficiency. By accurately simulating these characteristics and mechanisms, the NoC model enables verification engineers to evaluate and optimize the performance, efficiency and reliability of SoC internal communication in the pre-silicon stage, reduce the number of design iterations, and accelerate product time to market.
[0097] According to some embodiments, EMMC, PCIE, etc. do not require register configuration due to the use of dummy IP, and the data interaction between the system-level chip verification environment and the on-chip network is realized after the network controller (Ethernet) completes the initialization configuration. The simplified on-chip network is debugged so that the system-level chip verification environment realizes the read and write operations of the virtual intellectual property module on the on-chip network, including: data flow from the embedded multimedia card module (EMMC), the high-speed serial computer expansion bus standard module (PCIE) or the JPEG codec module flows to the on-chip network, and the on-chip network transfers the data to the double data rate synchronous dynamic random access memory module (DDR) for storage. At the same time, the central processing unit (CPU) program configures the network controller (Ethernet) to realize data interaction with the on-chip network.
[0098] According to some embodiments, in the program code of the CPU, the initialization work required by the SOC subsystem is completed, such as memory allocation, reset release, clock enable, etc., and the register configuration work of the Ethernet is completed.
[0099] According to some embodiments, the method further comprises: ensuring that the network controller (Ethernet) in the CPU program and the virtual intellectual property module of the verification environment work simultaneously by polling the shared memory. In order to ensure that the Ethernet in the CPU program and the Dummy IP of the verification environment can work simultaneously, that is, to perform data interaction with the NOC at the same time, the polling shared memory can be adopted to realize the interaction, that is, to access the same memory at the same time, and to realize the synchronization of the cpu program and the verification environment according to the value update in the memory.
[0100] According to some embodiments, multiple test cases are designed according to the deadlock scenario, including: defining the specific conditions and triggering methods of the deadlock scenario, so as to reproduce and detect the deadlock during the verification process. When analyzing the deadlock scenarios that may occur in the network on chip (NoC) model, it is necessary to consider the basic operating principles of the NoC, including the flow of data packets, resource allocation (such as buffers, paths), and routing decisions. It is also necessary to consider some classic deadlock scenarios and their triggering methods, including: four-way circular waiting deadlock, resource starvation deadlock, priority inversion deadlock, buffer deadlock, etc.
[0101] According to some embodiments, the deadlock detection includes: implementing a deadlock detection mechanism in a verification environment, including: monitoring the communication status and packet queue length in the NoC. Setting monitoring points on each router in the NoC, which are responsible for recording the incoming and outgoing packet information, including source address, destination address, transmission timestamp, etc., as well as the forwarding status of the current router. Configuring queue length counters for the input and output ports of each router to track the number of stored packets in real time. Setting a reasonable threshold, once the queue length reaches or exceeds the threshold, triggering an alarm to check for potential deadlocks.
[0102] According to some embodiments, after the monitoring points are defined, the data structure and algorithm need to be designed to construct a directed graph to represent the communication status of the NoC, where nodes represent routers or endpoints and edges represent data flows. This graph is used for loop detection to determine whether there is a closed loop that constitutes a deadlock. A resource allocation graph is created, where nodes represent processes or communication requests and edges represent resource dependencies. A deadlock detection algorithm (such as depth-first search DFS or topological sorting) is used to detect loops.
[0103] According to some embodiments, a timed task is designed to periodically traverse all monitoring points, collect data packet flow and queue status information, and cooperate with a preset deadlock detection algorithm to determine whether a deadlock occurs. The warning threshold of the queue length is adaptively adjusted according to historical data and current load to improve the accuracy and efficiency of detection.
[0104] According to some embodiments, when a deadlock is detected, a corresponding warning or error report is triggered. When a deadlock sign is detected, a warning is immediately triggered through an interface of the verification environment, including but not limited to logging, email notification, or graphical interface prompt. The effectiveness of the deadlock detection mechanism is continuously verified in a simulation environment, and the robustness of the detection mechanism is ensured by simulating various complex communication modes and load conditions.
[0105] According to some embodiments, the multiple test cases are applied to cover the normal communication process and potential deadlock scenarios, including: using the sequence generator of UVM to generate incentives for CPU drivers, including instructions executed by the CPU and data access requests. Configure the incentive sequence of the CPU through the Sequence and Sequencer of UVM, including the instruction execution sequence, memory access mode, etc., to ensure that the expected NoC activities can be triggered. Utilize the random constraint function of UVM to automatically construct complex interaction patterns to increase the probability of finding deadlocks, while maintaining the diversity and coverage of the test to run simulations and observe the interaction process between the CPU driver and other components through the NoC. Afterwards, run the simulation environment, inject the above sequence, and observe the interaction between the CPU and the NoC and other components. Use the UVM Monitor component to monitor the data flow, queue status, and router behavior in the NoC, and collect key data for subsequent analysis.
[0106] According to some embodiments, the simulation results are analyzed, and the simulation data is automatically compared and verified using a scoreboard to check whether the CPU driver is executed as expected and whether the on-chip network NoC is deadlocked. Develop or use a ready-made scoreboard to compare the actual data obtained in the simulation with the expected results. The scoreboard should be able to identify any instructions or data transmissions that are not executed as planned, as well as abnormal behaviors that occur in the NoC. Pay special attention to the scoreboard's ability to automatically identify deadlock situations, and confirm that when a deadlock scenario is simulated, the system can accurately report the deadlock and does not falsely report normal communication as deadlock. Finally, summarize the simulation results, including test coverage, problems found (especially deadlock situations), and performance indicators, and based on the test results, perform necessary optimizations on the test cases, deadlock detection algorithms, or the NoC design itself, and then retest until a satisfactory verification effect is achieved.
[0107] According to some embodiments, in the memory space required for initialization of the verification environment, the startup program of each IP is configured through the CPU program, for example, the startup of each IP is controlled by applying macro definition. The macro definition can be controlled by different parameters in the compilation options, so as to achieve the control of the startup of different IPs. First, the location of each IP module, startup code, data segment, stack, etc. in the memory is determined in the system design stage to ensure that each component has enough space and will not conflict with each other.
[0108] According to some embodiments, at the beginning of system startup, the entire memory area is cleared or initialized to prevent legacy data from affecting system behavior. A startup program (such as a bootloader) is loaded into a predefined memory area. This is usually loaded by an external ROM or flash memory, or in some cases, directly hard-coded in the hardware. Configure the core registers of the CPU, such as the program counter (PC), status register, interrupt vector table, etc., to prepare it for executing the startup code, and ensure that the CPU cache and memory management unit (MMU) are in the correct initial state to support subsequent memory accesses. The CPU begins to execute the startup program loaded into the memory, and obtains the configuration parameters of each IP module according to a predefined configuration file or script. By accessing the control registers of each IP module, set its operating mode, clock frequency, interrupt enable and other parameters. For some complex IP modules, such as DSP or GPU, additional firmware or microcode may need to be loaded to complete initialization.
[0109] According to some embodiments, after initialization is complete, a series of test routines are executed to verify that all modules work as expected. System status and events are recorded to help identify errors or anomalies in any initialization process. Based on the verification results, it may be necessary to adjust the memory layout, boot program logic, or IP configuration parameters to optimize system performance or resolve discovered problems.
[0110] According to some embodiments, when applying the test case for verification, the test case is applied to cover the normal communication process and potential deadlock scenarios, including: using a register model to configure the register so that the register configuration file is managed and maintained independently of the verification environment. The register configuration file can be managed and maintained independently of the verification environment. Therefore, when it is necessary to configure the same register for a new verification project or test case, the existing configuration file can be reused directly to reduce duplication of work. Process: Complete the register model; prepare a configuration file that contains specific values for configuring the register, such as read and write operations, read and write addresses, and read and write data; the verification environment completes the configuration by parsing the register value from the configuration file and writing it to the corresponding register.
[0111] According to some embodiments, the solution of the present invention uses virtual intellectual property modules to simulate IP modules that may exist in actual hardware but are temporarily unavailable or difficult to integrate. By replacing these modules with dummy IPs, a relatively complete SoC system model can be built in a simulation environment to perform more comprehensive testing and verification of the deadlock problem of the NoC, which helps to reduce the complexity and time cost of simulation verification.
[0112] According to some embodiments, the scheme of the present invention configures registers by using a register model and reading files, so that the configuration files of the registers can be managed and maintained independently of the verification environment. When configuring the same registers for a new verification project or test case, the existing configuration files can be directly reused to reduce duplication of work.
[0113] Figure 4 A block diagram of a computing device according to an example embodiment of the present application is shown.
[0114] like Figure 4 As shown, computing device 30 includes processor 12 and memory 14. Computing device 30 may also include bus 22, network interface 16, and I / O interface 18. Processor 12, memory 14, network interface 16, and I / O interface 18 may communicate with each other via bus 22.
[0115] The processor 12 may include one or more general-purpose CPUs (Central Processing Units, processors), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions. According to some embodiments, the computing device 30 may also include a high-performance graphics card (GPU) 20 for accelerating the processor 12.
[0116] The memory 14 may include a machine system readable medium in the form of a volatile memory, such as a random access memory (RAM), a read-only memory (ROM), and / or a cache memory. The memory 14 is used to store one or more programs including instructions and data. The processor 12 may read the instructions stored in the memory 14 to execute the above-mentioned method according to the embodiment of the present application.
[0117] The computing device 30 may also communicate with one or more networks via the network interface 16. The network interface 16 may be a wireless network interface.
[0118] The bus 22 may include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between components.
[0119] It should be noted that, in the specific implementation process, the computing device 30 may also include other components necessary for normal operation. In addition, those skilled in the art may understand that the above device may only include components necessary for implementing the embodiments of this specification, and need not include all components shown in the figure.
[0120] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.
[0121] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.
[0122] Those skilled in the art can clearly understand that the technical solution of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.
[0123] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0124] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0125] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended clauses.
Claims
1. A method for verifying a deadlock of a network on chip in a system-on-chip, characterized in that: include: Build a system-level chip verification environment; Integrate the central processing unit model into the system-level chip verification environment to build a network on chip of the system-level chip; Creating a virtual intellectual property module and applying the virtual intellectual property module to simplify at least one functional module in the network on chip; Debugging the simplified on-chip network so that the system-level chip verification environment implements the read and write operations of the virtual intellectual property module on the on-chip network; Design multiple test cases based on deadlock scenarios; The various test cases are applied to cover normal communication processes as well as potential deadlock scenarios.
2. The method according to claim 1, characterized in that The functional modules include a double data rate synchronous dynamic random access memory module, an embedded multimedia card module, a high-speed serial computer expansion bus standard module, and a video encoding and decoding module.
3. The method according to claim 2, characterized in that Debugging the simplified on-chip network so that the system-level chip verification environment implements the read and write operations of the virtual intellectual property module on the on-chip network includes: The data stream flows from the embedded multimedia card module, the high-speed serial computer expansion bus standard module or the video codec module to the on-chip network, and the on-chip network transmits the data to the double data rate synchronous dynamic random access memory module for storage; The central processing unit program configures the network controller to implement data interaction with the on-chip network.
4. The method according to claim 3, characterized in that Also includes: The network controller and the virtual intellectual property module of the verification environment work simultaneously by polling the shared memory.
5. The method according to claim 1, characterized in that Design multiple test cases based on the deadlock scenario: Trial examples include: Define the specific conditions and triggering methods of the deadlock scenario so that the deadlock can be reproduced and detected during the verification process.
6. The method according to claim 5, characterized in that The deadlock detection comprises: Implementing a deadlock detection mechanism in a verification environment includes: monitoring a communication state and a packet queue length in the network on chip; When a deadlock is detected, an appropriate warning or error report is triggered.
7. The method according to claim 1, characterized in that Apply the various test cases described to cover normal communication processes as well as potential deadlock scenarios, including: Using the sequence generator of the verification environment to generate stimulus for the central processing unit drive, including instructions executed by the central processing unit and data access requests; Run simulations to observe the interaction between the CPU driver and other components through the on-chip network; The simulation results are analyzed, and the simulation data is automatically compared and verified using a scoreboard to check whether the CPU driver is executed as expected and whether the on-chip network is deadlocked.
8. The method according to claim 7, characterized in that Also includes: In the memory space required for initializing the verification environment, the startup program of each integrated circuit module is configured through the central processing unit program.
9. The method according to claim 1, characterized in that: The various test cases are applied to cover normal communication processes and potential deadlock scenarios, including: using a register model to configure registers so that register configuration files are managed and maintained independently of the verification environment.
10. A computing device, characterized in that: include: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 1 to 9.
Citation Information
Cited By
Network-on-chip test file generation method and device, equipment and storage medium
CN120705069A
SoC performance verification method and device based on dynamic QoS regulation and control, medium and equipment
CN120805842A
A method, apparatus, medium, and device for SoC performance verification based on dynamic QoS regulation.
CN120805842B
Chip verification method and device, equipment, storage medium and program product
CN120951930A
DNOC register configuration method and device and electronic equipment
CN121979573A
