Software and hardware joint simulation platform for processor chip architecture verification

Through the combined software and hardware simulation platform, efficient verification of the processor chip architecture is achieved, and the problem of gap between software simulation and hardware simulation in traditional development processes is solved, R&D efficiency and simulation speed are improved, and the needs of rapid iteration are met.

CN119047401AActive Publication Date: 2024-11-29FUDAN UNIVERSITY

Patent Information

Application Number
CN202411172433.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-29
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

In the development process of traditional processor chip architecture, the gap between software simulation and hardware simulation results in a long verification cycle and large overhead, making it difficult to meet the needs of rapid iteration.

Method used

A combined software and hardware simulation platform is proposed to simulate the processor chip architecture through sensorless communication between software emulator and hardware FPGA, so as to realize high performance, high flexibility and strong compatibility between software and hardware, and adopt optimistic Synchronization mechanism and batch request method simplify chip design development and verification processes.

Benefits of technology

It significantly improves the efficiency of chip architecture research and development, reduces the impact of incoordinated simulation speed, provides comprehensive architecture exploration capabilities and real hardware performance verification, and overcomes the problem of insufficient simulation speed of traditional platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047401A_ABST
    Figure CN119047401A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of integrated circuits, and particularly relates to a software and hardware joint simulation platform for processor chip architecture verification. The software and hardware joint simulation platform is an architecture crossing hardware and software; the software part comprises a scheduling module, a submitting module, an acquisition module, an execution task table and four annular lockless queues; the hardware part comprises a data packet preprocessing module, a signal conversion module and two queues. The simulation platform adopts a parallel simulation form of a software simulator and a hardware FPGA, simplifies a traditional development process, and allows a hardware core module to directly co-simulate with a processor chip of software simulation. The software simulation processor chip can directly provide a real test environment and rapid simulation capability for a hardware core, and the integration efficiency of a newly researched and developed hardware core module or a hardware core module needing iteration in an existing large-scale processor chip is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of integrated circuit design, and in particular relates to a software-hardware joint simulation platform for processor chip architecture verification. Background Art

[0002] With the rapid development and increasing richness of upper-level application load types, processor chips, as the foundation for supporting the computing power requirements of application loads, also need to update their chip architecture in a timely manner to match the requirements of upper-level application loads. Simulation and verification of advanced architecture design solutions is an important boost to the rapid iteration and update of processor chip architecture. The traditional processor chip architecture development process covers several processes such as electronic-level system software simulation and hardware simulation. Specifically, engineers first establish software models on the electronic-level system software simulation platform for verification and architecture exploration, then implement the model in hardware and use test stimuli for verification, and finally embed the hardware model into the hardware-based processor chip architecture verification platform for debugging. Among them, the electronic-level system software simulation simulator provides a higher level of modeling, which is suitable for the early stages of architecture exploration, but its simulation results may differ from the real hardware simulation, such as pipeline details and resource competition. The main purpose of hardware simulation is to ensure the feasibility and reliability of the architecture. This process has a long cycle and a huge verification overhead. In this process, if the verification results do not meet expectations, it is necessary to return to the previous stage to modify the design. Therefore, there is an urgent need to optimize the traditional processor chip architecture development and verification process, break through the barriers between software simulation and hardware simulation, and integrate and simplify the various stages of chip architecture development and verification to meet the actual needs of rapidly iterating processor chip architecture. Summary of the invention

[0003] The purpose of the present invention is to provide a high-performance, high-flexibility, and strong-compatibility software-hardware joint simulation platform for processor chip architecture verification.

[0004] The software-hardware joint simulation platform (referred to as the simulation platform) for processor chip architecture verification proposed in the present invention can be directly applied to the design, development and verification process of high-performance processor architecture, simplify the design, development and verification process of the chip, and improve the research and development efficiency of the chip architecture. The basic implementation method of the software-hardware joint simulation platform of the present invention is that the software simulator simulates a complete processor chip, and the hardware FPGA simulates a newly developed or to-be-evaluated core module; the simulation platform is responsible for the senseless communication between the software simulator and the hardware FPGA, and is responsible for forwarding the access request of the processor chip simulated on the software simulator to the core module to the core module running on the FPGA, and also feeds back the request or response generated by the core module to the processor chip; each core module has a corresponding virtual module in the software simulator, and the simulated processor chip will interact with the virtual module normally, and when the virtual module receives the request, it will be submitted to the simulation platform proposed in the present invention. Therefore, the software-hardware joint simulation platform proposed in the present invention is an architecture spanning hardware and software, and the software part of the architecture includes a scheduling module, a submission module, a collection module, an execution task table and 4 circular lock-free queues, and the hardware part includes a data packet preprocessing module, a signal conversion module and 2 circular lock-free queues; wherein:

[0005] The execution task table records detailed information of requests received by the simulation platform;

[0006] The scheduling module is responsible for receiving access requests from the software simulator to the core module, applying for corresponding entries in the execution task table according to the type of request, and configuring the submission module and the acquisition module to start the response work. For requests that do not require a response, the scheduling module only needs to configure the submission module to execute the transfer of the request to the hardware FPGA. For requests that require a response, the scheduling module needs to configure the submission module and the acquisition module at the same time. Among them, there are two options for the configuration of the acquisition module, one is the polling mode, that is, when the submission module passes the request, the acquisition module needs to continuously send requests to the hardware FPGA to query the hardware execution results; the other mode is the interrupt mode, that is, when the hardware FPGA is executed, it will notify the acquisition module, and the acquisition module will initiate an active request to ask for the execution result. The scheduling module interacts with the submission module and the acquisition module through two circular lock-free queues respectively.

[0007] The submission module is responsible for modifying the requests prepared by the scheduling module into data packets that meet the communication protocol standards for transmission. When modifying the data packets, the submission module supports merging several requests for one transmission communication to offset a large amount of communication costs. Specifically, when the submission module finds that there are more than one request waiting to be transmitted in the circular lock-free queue before executing the next submission, the submission module can merge several requests and add an additional data packet header to these requests to indicate the number and type of requests merged in the current data packet.

[0008] The acquisition module is responsible for obtaining the execution results of the hardware core module from the hardware FPGA. When the scheduling module informs the acquisition module that it needs to track the response to a request, the acquisition module will start to operate. The acquisition module supports two modes, namely polling mode and interrupt mode, which correspond to the way the acquisition module obtains the hardware execution results. The polling mode requires the acquisition module to continuously initiate requests to obtain the execution request results in order to finally obtain the data, and the interrupt result is responsible for informing the acquisition module by the hardware to retrieve the hardware execution results. The two modes are suitable for different scenarios, among which the polling mode is suitable for application scenarios that are sensitive to simulation time, and the interrupt mode is suitable for scenarios with high tolerance for simulation time.

[0009] The data packet preprocessing module is responsible for receiving, reorganizing, parsing, collecting, segmenting and sending data packets. Due to the bandwidth limitation of the communication protocol, the communication between the software emulator and the hardware emulator may be split into several data packets for transmission. The data packet preprocessing module is responsible for receiving the disassembled data packets. After collecting all the data packets, the preprocessing module will sort and reorganize the data packets. After restoring to the original data packet, the header needs to be decoded, and the request in the data packet is split according to the header information. Each independent request split out will be sent to the queue to notify the signal conversion module to do the next stage of processing. The data packet preprocessing module is also responsible for sending the data packet. The results of the hardware core module execution will be sent to the data packet preprocessing module one after another, and the module will collect and organize these execution results. Depending on the configuration of the acquisition module, the data packet preprocessing module will perform different behaviors. When the acquisition module is in polling mode, the data packet preprocessing module will wait until the acquisition module initiates the next polling request, package the currently collected core module execution results, and modify the data packet header before sending it. When the acquisition module is in interrupt mode, the data packet preprocessing module immediately notifies the acquisition module to retrieve the hardware execution result after collecting the execution result of the core module.

[0010] The signal conversion module is responsible for parsing the request from the software simulator, configuring the input signal of the core hardware module, collecting the output signal of the core hardware module, and assembling it into a response that is recognizable by the software simulator. When assembling the response, certain hardware execution information will be added, such as the number of execution clock cycles of the core module. The signal conversion module is one of the cores of the software and hardware joint simulation platform proposed in the present invention with extremely high compatibility. Any core module that requires hardware simulation is decoupled from the software and hardware joint simulation platform proposed in the present invention through the signal conversion module. The signal conversion module obtains requests and sends responses from two queues connected to the data packet preprocessing module respectively.

[0011] In the present invention, the responsibility of the software side architecture is to modify the software simulator's request to the module into a data packet that complies with the communication protocol and send it to the hardware FPGA. The framework on the software side consists of an execution task table, 4 circular lock-free queues and a scheduling module, a submission module, and a collection module. The execution task table records the detailed information of the request received by the platform, and the scheduling module is responsible for the analysis, modification and parsing of the software simulator request. The submission module is responsible for sending the request assembled by the scheduling module to the hardware FPGA. Similarly, the acquisition module is also responsible for obtaining information that needs to interact with the processor chip from the hardware FPGA. When the software simulator initiates a request to the hardware core module, normal simulation can continue. The subsequent process is handed over to the hardware and software joint simulation platform proposed by the present invention. The platform first applies for a table entry from the execution task table to execute the filling request, and then inserts the table entry sequence number into the task queue. Next, the scheduling module accesses the execution task table from the task queue according to the table entry sequence number taken out, and analyzes the characteristics of the request. For example, the reasoning request of the artificial intelligence engine needs to carry the information required for reasoning, and also needs to retrieve the reasoning result from the RTL module. Next, after assembling the request and inserting it into the pre-submission queue, the scheduling module will also configure the collection module to initiate a request to obtain a response. After retrieving the response, the collection module will fill the result into the corresponding table entry in the execution task table and insert the table entry sequence number into the post-collection queue. The scheduling module will then modify the ready table entry into a response that meets the software simulator standard and insert it into the result until a certain delay, when the software simulator will take the response.

[0012] In the present invention, the hardware side structure is implemented by hardware and is connected to the core hardware model and then deployed together on the FPGA. The simulation platform first parses the data packet received by the FPGA. Since the data bit width of the software simulator's request or response to the hardware core module may be greater than the upper limit of the bit width supported by the communication protocol, it is also necessary to collect several data packets with the help of a data packet preprocessing module and then reorganize them, and parse them into the initial request or response initiated by the software simulator and insert them into the task queue. Each table item of this queue is composed of a task header and a load. The former is the necessary information to maintain the operation of the software and hardware joint simulation platform, such as the table item sequence number of the execution task table of the software side architecture of the request or response, and the latter is the real request or response. The signal conversion module of the hardware side framework is directly connected to the hardware core module. It receives tasks from the task queue and configures the input of the hardware core module according to the information of the task load, and records the time when the hardware core module responds and the output of the hardware core module at the same time, and then inserts them into the result queue after assembling them into data packets. The data preprocessing module will split the data packet into several packets and pass them to the software side of the joint simulation platform according to the configuration of the communication protocol.

[0013] In the present invention, the optimistic synchronization mechanism adopted by the simulation platform is used to solve the problem of large difference in simulation speed between software simulator and hardware simulator; when the software simulator initiates a request to the core hardware module, the software simulator will wait in place until the joint simulation platform obtains the response and the number of clock cycles executed from the hardware core module, and then the software simulator will schedule an event after X clock cycles, which simulates the behavior of the hardware core module to respond. At the same time, when receiving a request from a software simulator, the joint simulation platform will schedule an event after Y clock cycles, and the Y clock cycle is an estimate of the shortest execution time of the hardware core module, which means that the software simulator can continue to simulate Y clock cycles without risk after initiating the request. If the software and hardware joint simulation platform can send back the response of the hardware core module within the time of the software simulator simulating these Y clock cycles, then the software simulator can simulate without stopping. Otherwise, the software simulator will wait in place after Y clock cycles until the response is obtained. After receiving the response, the software simulator rearranges the event to occur after (XY) cycles, thereby formally accepting the response. For hardware core modules that can actively initiate requests, the hardware-software joint simulation platform will continuously inquire about the hardware core module's request status. When the hardware core module initiates a request to the processor chip, it will optimistically continue to execute the expected number of clock cycles. At this time, the software simulator will receive two time information. It needs to process the hardware core module's request at the first time point, and the second time point is the estimate of the next active request initiated by the hardware core model in the worst case. This means that the software simulator can continue to simulate to the second time point after sending the response back to the hardware core module.

[0014] In the present invention, the submission module of the software-hardware joint simulation platform adopts a batch request method, which allows the submission module to merge several requests for one communication to offset a large amount of communication costs. In the scenario of an artificial intelligence reasoning engine, the processor chip may initiate frequent reasoning requests to the engine, and some requests may be congested within the framework. When the submission module initiates a communication request, it will merge several requests into one package according to the number of batches allowed by the platform, and add a header to indicate the batch information of the package. The hardware-side architecture of the software-hardware joint simulation platform will first combine several scattered data packets into a complete package, and then parse several requests from the package according to the information in the header and insert them into the task queue one after another.

[0015] In the present invention, the software and hardware joint simulation platform adopts a data flow fusion method. This method removes the header information of several tasks with consecutive addresses initiated by the processor chip and merges them into one package and fills in the header information uniformly. This package will still arrive at the hardware side of the framework in the form of several data packets. Unlike the control flow type scenario, which requires waiting for all packet fragments to be collected, in the data flow type scenario, the corresponding task header information can be directly modified for the arrived data and then inserted into the task queue.

[0016] Furthermore, in a certain access of the software simulator to the hardware core module, the processing flow of the software and hardware joint simulation platform is as follows:

[0017] (1) Scheduling process: After the software simulator inserts a request into the task queue, the scheduling module obtains the request details from the queue and distributes them to the pre-submission queue according to the request type.

[0018] (2) Submission process: After the submission module obtains the request from the pre-submission queue, it modifies it into a data packet that complies with the communication protocol standard and sends it to the hardware FPGA.

[0019] (3) Packet parsing process: After the packet preprocessing module in the hardware FPGA receives the data packets, it parses them into original requests and inserts them into the queue leading to the signal conversion module.

[0020] (4) Signal conversion process: The signal conversion module configures the input signal of the core module according to the information in the request.

[0021] (5) Core module execution: After receiving the input stimulus, the core module executes according to the established logic and sets the corresponding output signal.

[0022] (6) Signal conversion process: The signal conversion module monitors the output signal of the core module. After obtaining the output signal, it attaches information such as the number of execution clock cycles, assembles it into a response that can be recognized by the software simulator, and sends it to the queue leading to the data preprocessing module.

[0023] (7) Data packet segmentation process: After receiving the response, the data packet preprocessing module notifies the acquisition module through an interrupt to obtain the hardware execution result and divides the data packet into several packets that meet the bandwidth requirements of the communication protocol.

[0024] (8) Collection process: After the collection module obtains the data packet, it parses the corresponding information from the data packet according to the header of the data packet and sends it to the post-collection queue.

[0025] (9) Scheduling process. The presence of a response in the post-collection queue triggers the operation of the scheduling module, which is responsible for passing the data packet to the result queue accessible to the software simulator.

[0026] (10) Get response. The software simulator gets the hardware execution result from the result queue.

[0027] Compared with the prior art, the beneficial technical effects of the present invention are embodied in:

[0028] (1) The present invention integrates the software simulator and the hardware FPGA at the same time, and uses the optimistic synchronization mechanism to give full play to the advantages of both while avoiding the impact of the simulation speed incoordination on the overall simulation effect and speed.

[0029] (2) The present invention provides comprehensive architecture exploration capabilities for architecture simulation of processor chips, supports software simulator modeling, provides high-degree-of-freedom parameter configuration capabilities to support fast iterative simulation, and the FPGA platform provides real hardware performance to make the architecture exploration results more convincing.

[0030] (3) The present invention uses hardware FPGA as the simulation platform for the hardware core module, making full use of the existing natural ecological advantages of the FPGA platform. Any module that can be deployed on the FPGA platform can be directly simulated under the joint simulation platform proposed by the present invention. The joint simulation platform also takes advantage of the high speed of FPGA to overcome the serious problem of insufficient simulation speed of the current joint platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is an overview of the hardware-software co-simulation platform used for processor chip architecture verification.

[0032] Figure 2 This is the software side architecture diagram of the hardware-software joint simulation platform.

[0033] Figure 3 This is the hardware side architecture diagram of the software-hardware joint simulation platform.

[0034] Figure 4 This is a schematic diagram of the optimistic synchronization mechanism.

[0035] Figure 5 Request schematics for batch processing.

[0036] Figure 6 This is the schematic diagram of data stream fusion. DETAILED DESCRIPTION

[0037] The hardware and software co-simulation platform for processor chip architecture verification proposed in this invention has an overall structure as shown in Figure 1As shown. The joint simulation platform divides the processor chip architecture into two parts, one part is some core modules in the processor architecture that need to be focused on, these core modules may be modules that need to be iteratively upgraded, or modules that need to be newly integrated into the processor chip architecture, and the other part is the remaining processor chip architecture. Under the joint simulation platform, the core modules that need to be focused on are deployed on the hardware FPGA for simulation, focusing on their hardware feasibility and performance, while the remaining processor chip architectures are deployed on the software simulator for simulation. The core of the joint simulation platform is to provide high-performance communication interconnection between the software simulator and the hardware FPGA, responsible for forwarding the access request of the processor chip architecture simulated on the software simulator to the core module to the core module running on the FPGA, and also feeding back the request or response generated by the core module to the processor chip architecture. Each core module has a corresponding virtual module in the software simulator, and the simulated processor chip architecture will interact with the virtual module normally. When the virtual module receives the request, it will submit it to the framework proposed by the present invention.

[0038] Assumptions Figure 1The hardware model to be evaluated shown in is an artificial intelligence reasoning engine. The processor chip needs to frequently access the engine, pass the reasoning information required for reasoning to the engine, and obtain the reasoning result information from the engine. The acquisition module is configured in polling mode in this scenario. The collaborative working mode between the modules in the hardware-software joint simulation platform is as follows: after the software simulator inserts the request into the task queue, the scheduling module obtains the request details from the queue and distributes them to the pre-submission queue according to the request type. After the submission module obtains the request from the pre-submission queue, it modifies it into a data packet that meets the communication protocol standard and sends it to the hardware FPGA. After the data packet preprocessing module in the hardware FPGA collects the data packet, it parses it into the original request and inserts it into the queue leading to the signal conversion module. Data packet parsing process. After the data packet preprocessing module in the hardware FPGA collects the data packet, it parses it into the original request and inserts it into the queue leading to the signal conversion module. The signal conversion module configures the input signal of the core module according to the information in the request. After receiving the input stimulus, the core module executes according to the established logic and sets the corresponding output signal. The signal conversion module monitors the output signal of the core module. After obtaining the output signal, it attaches information such as the number of execution clock cycles, assembles it into a response that can be recognized by the software simulator, and sends it to the queue leading to the data preprocessing module. After receiving the response, the data packet preprocessing module notifies the acquisition module through an interrupt to obtain the hardware execution result, and divides the data packet into several packets that meet the bandwidth requirements of the communication protocol. After the acquisition module obtains the data packet, it parses the response from the data packet according to the header of the data packet and sends it to the post-acquisition queue. The existence of a response in the post-acquisition queue will trigger the operation of the scheduling module, which is responsible for passing the data packet to the result queue accessible to the software simulator. The software simulator obtains the hardware execution result from the result queue.

[0039] The software architecture details of the hardware-software joint simulation platform proposed in the present invention are as follows: Figure 2As shown. The responsibility of the software part is to modify the software simulator's request to the module into a data packet that complies with the communication protocol and sends it to the hardware FPGA. The framework on the software side consists of an execution task table, 4 circular lock-free queues and 3 module loads. The execution task table records the detailed information of the request received by the platform, and the scheduling module is responsible for the analysis, modification and parsing of the software simulator request. The submission module is responsible for sending the request assembled by the scheduling module to the hardware FPGA. Similarly, the acquisition module is also responsible for obtaining the information that needs to interact with the processor chip from the hardware FPGA. When the software simulator initiates a request to the hardware core module, normal simulation can continue. The subsequent process is handed over to the hardware and software joint simulation platform proposed by the present invention. The platform first applies for a table entry from the execution task table to execute the filling request, and then inserts the table entry sequence number into the task queue. Next, the scheduling module accesses the execution task table from the task queue according to the table entry sequence number taken out, and analyzes the characteristics of the request. For example, the reasoning request of the artificial intelligence engine needs to carry the information required for reasoning, and also needs to retrieve the reasoning result from the RTL module. Next, after assembling the request and inserting it into the pre-submission queue, the scheduling module will also configure the collection module to initiate a request to obtain a response. After retrieving the response, the collection module will fill the result into the corresponding table entry in the execution task table and insert the table entry sequence number into the post-collection queue. The scheduling module will then modify the ready table entry into a response that meets the software simulator standard and insert it into the result until a certain delay, when the software simulator will take the response.

[0040] The hardware side architecture details of the software and hardware joint simulation platform proposed in the present invention are as follows: Figure 3 As shown in the figure. The hardware side structure is implemented by hardware and connected to the core hardware model before being deployed on the FPGA. The software-hardware joint simulation platform first parses the data packet received by the FPGA. Since the data bit width of the software simulator's request or response to the hardware core module may be greater than the upper limit of the bit width supported by the communication protocol, it is also necessary to use the data packet preprocessing module to collect several data packets and reassemble them, and parse them into the initial request or response initiated by the software simulator and insert them into the task queue. Each table entry in this queue consists of a task header and a payload. The former is the necessary information to maintain the operation of the software-hardware joint simulation platform, such as the table entry number of the execution task table of the request or response in the software side architecture, and the latter is the real request or response. The signal conversion module of the hardware side framework is directly connected to the hardware core module. It receives tasks from the task queue and configures the input of the hardware core module according to the information of the task load. At the same time, it records the time when the hardware core module responds and the output of the hardware core module, assembles them into data packets, and then inserts them into the result queue. The data preprocessing module will split the data packet into several packets according to the configuration of the communication protocol and pass them to the software side of the joint simulation platform.

[0041] The optimistic synchronization mechanism principle adopted by the hardware and software joint simulation platform proposed in the present invention is as follows Figure 4 As shown. When receiving a request from a software simulator, the co-simulation platform will schedule an event after Y clock cycles. Y clock cycles is an estimate of the shortest execution time of the hardware core module, which means that the software simulator can continue to simulate Y clock cycles without risk after initiating the request. If the hardware-software co-simulation platform can send back the response of the hardware core module within the Y clock cycles simulated by the software simulator, then the software simulator can simulate without stopping. Otherwise, the software simulator will wait in place after Y clock cycles until it gets a response. After receiving the response, the software simulator will reschedule the event to occur after (XY) cycles, thereby formally accepting the response. For hardware core modules that can actively initiate requests, the hardware-software co-simulation platform will continuously inquire about the request status of the hardware core module. When the hardware core module initiates a request to the processor chip, it will optimistically continue to execute the expected number of clock cycles. At this time, the software simulator will receive two time information. It needs to process the request of the hardware core module at the first time point. The second time point is the estimate of the next active request initiated by the hardware core model in the worst case. This means that the software simulator can continue to simulate to the second time point after sending the response back to the hardware core module.

[0042] The submission module of the hardware and software joint simulation platform proposed by the present invention adopts a batch request method, such as Figure 5 . This method allows the submission module to merge several requests for one communication, which can offset a large amount of communication costs. In the scenario of an artificial intelligence inference engine, the processor chip may initiate frequent inference requests to the engine, and some requests may be congested within the framework. When the submission module initiates a communication request, it will merge several requests into one package according to the number of batches allowed by the platform, and add a header to indicate the batch information of the package. The hardware-side architecture of the hardware-software joint simulation platform will first combine several scattered data packets into a complete package, and then parse several requests from the package according to the header information and insert them into the task queue one after another.

[0043] The hardware-software joint simulation platform proposed in the present invention also adopts a data flow fusion method for the hardware core module of the data flow interaction scenario, such as Figure 6 As shown in the figure. This method removes the header information of several tasks with consecutive addresses initiated by the processor chip and merges them into one packet and fills in the header information uniformly. This packet will still arrive at the hardware side of the framework in the form of several data packets. Unlike the control flow scenario, which requires waiting for all packet fragments to be collected, in the data flow scenario, the corresponding task header information can be directly modified for the arriving data and then inserted into the task queue.

Claims

1. A hardware and software co-simulation platform for processor chip architecture verification, characterized in that: The software simulator simulates a complete processor chip, and the hardware FPGA simulates a newly developed or to-be-evaluated core module. The simulation platform is responsible for the seamless communication between the software simulator and the hardware FPGA, and forwards the access request of the processor chip simulated on the software simulator to the core module running on the FPGA, and also feeds back the request or response generated by the core module to the processor chip. Each core module has a corresponding virtual module in the software simulator. The simulated processor chip interacts with the virtual module. When the virtual module receives a request, it submits it to the processor chip framework. That is, the simulation platform is an architecture that spans hardware and software. Its software part includes a scheduling module, a submission module, a collection module, an execution task table, and four circular lock-free queues. The hardware part includes a data packet preprocessing module, a signal conversion module, and two queues. Among them: The execution task table is used to record detailed information of the request received by the simulation platform; The scheduling module is responsible for receiving access requests from the software simulator to the core module, applying for corresponding table items in the execution task table according to the type of request, and configuring the submission module and the acquisition module to start the response work; for requests that do not require response, the scheduling module only configures the submission module to execute the transmission of the request to the hardware FPGA, and for requests that require response, the scheduling module configures the submission module and the acquisition module at the same time; wherein, there are two options for the configuration of the acquisition module, one is the polling mode, that is, when the submission module transmits the request, the acquisition module continuously sends requests to the hardware FPGA to query the hardware execution result; the other mode is the interrupt mode, that is, when the hardware FPGA is executed and the acquisition module is notified, the acquisition module will actively initiate a request for the execution result; the scheduling module interacts with the submission module and the acquisition module respectively through two circular lock-free queues; The submission module is responsible for modifying the requests prepared by the scheduling module into data packets that meet the communication protocol standards for transmission; when modifying the data packets, the submission module supports merging several requests for one transmission communication to offset a large amount of communication costs; specifically, when the submission module finds that there are more than one request waiting to be transmitted in the circular lock-free queue before executing the next submission, the submission module merges several requests and adds an additional data packet header to these requests to indicate the number and type of requests merged in the current data packet; The acquisition module is responsible for obtaining the execution results of the hardware core module from the hardware FPGA; when the scheduling module informs the acquisition module that it needs to track the response to a request, the acquisition module starts to operate; the acquisition module supports two modes, namely polling mode and interrupt mode, corresponding to the way the acquisition module obtains the hardware execution results; in the polling mode, the acquisition module continuously initiates requests to obtain the execution request results in order to finally obtain the data, and the interrupt result is responsible for informing the acquisition module to retrieve the hardware execution results by the hardware; the two modes are suitable for different scenarios, among which the polling mode is suitable for application scenarios that are sensitive to simulation time, and the interrupt mode is suitable for scenarios with high tolerance for simulation time; The data packet preprocessing module is responsible for receiving, reorganizing, parsing, collecting, segmenting and sending data packets; due to the bandwidth limitation of the communication protocol, the communication between the software emulator and the hardware emulator is split into several data packets for transmission; the data packet preprocessing module is responsible for receiving the disassembled data packets, and after collecting all the data packets, the preprocessing module sorts and reorganizes the data packets; after restoring to the original data packet, the header is decoded, and the request in the data packet is split according to the header information, and each independent request split is sent to the queue to notify the signal conversion module to do the next stage of processing; the data packet preprocessing module is also responsible for sending the data packet, and the results of the hardware core module execution are successively sent to the data packet preprocessing module, and the module collects and organizes these execution results; according to the configuration of the acquisition module, the data packet preprocessing module performs different behaviors; when the acquisition module is in polling mode, the data packet preprocessing module waits until the acquisition module initiates the next polling request, packages the currently collected core module execution results, and modifies the data packet header and sends it; when the acquisition module is in interrupt mode, the data packet preprocessing module immediately notifies the acquisition module to retrieve the hardware execution results after collecting the execution results of the core module; The signal conversion module is responsible for parsing the request from the software simulator, configuring the input signal of the core hardware module, collecting the output signal of the core hardware module, and assembling it into a response that is recognizable by the software simulator. When assembling the response, certain hardware execution information is also attached, including the number of execution clock cycles of the core module; the signal conversion module obtains requests and sends responses from two queues connected to the data packet preprocessing module respectively.

2. The software and hardware joint simulation platform according to claim 1, characterized in that: The responsibility of the software-side architecture is to modify the submitted request of the software simulator into a data packet that complies with the communication protocol and send it to the hardware FPGA; the scheduling module is responsible for analyzing, modifying and parsing the request of the software simulator; the submission module is responsible for sending the request assembled by the scheduling module to the hardware FPGA; the acquisition module is responsible for obtaining the information needed to interact with the processor chip from the hardware FPGA; when the software simulator initiates a request to the hardware core module, it continues the normal simulation; the subsequent process is handed over to the simulation platform, which first applies for an entry in the execution task table to execute the filling request, and then inserts the entry number into the task queue; then, the scheduling module accesses the execution task table from the task queue according to the retrieved entry number and analyzes the characteristics of the request; then, after assembling the request and inserting it into the pre-submission queue, the scheduling module also configures the acquisition module to initiate a request to obtain a response; after retrieving the response, the acquisition module fills the result into the entry corresponding to the execution task table and inserts the entry number into the post-acquisition queue; The scheduling module then modifies the ready table entry into a response that meets the software simulator standard and inserts it into the result until the software simulator takes the response after a certain delay.

3. The software and hardware joint simulation platform according to claim 2, characterized in that: The hardware side structure is connected with the core hardware model and deployed together on the FPGA; the simulation platform first parses the data packet received by the FPGA; since the data bit width of the software simulator's request or response to the hardware core module may be greater than the upper limit of the bit width supported by the communication protocol, the data packet preprocessing module collects several data packets and reassembles them, and parses them into the initial request or response initiated by the software simulator and inserts them into the task queue; Each table entry in this queue is composed of a task header and a load. The former is the necessary information to maintain the operation of the simulation platform, including the table entry number of the execution task table of the request or response in the software-side architecture, and the latter is the actual request or response. The signal conversion module of the hardware-side framework is directly connected to the hardware core module. It receives tasks from the task queue and configures the input of the hardware core module according to the information of the task load. At the same time, it records the time when the hardware core module responds and the output of the hardware core module, assembles them into data packets, and then inserts them into the result queue. The data preprocessing module splits the data packet into several packets according to the configuration of the communication protocol and transmits them to the software side of the joint simulation platform.

4. The software and hardware joint simulation platform according to claim 3, characterized in that: The optimistic synchronization mechanism is used to solve the problem of large simulation speed difference between software simulator and hardware simulator. Specifically, when the software simulator initiates a request to the core hardware module, the software simulator waits in place until the joint simulation platform obtains a response and the number of executed clock cycles X from the hardware core module, and then the software simulator schedules an event after X clock cycles, which simulates the behavior of the hardware core module responding. At the same time, when the joint simulation platform receives a request from a software simulator, it schedules an event after Y clock cycles. The Y clock cycle is a response to the hardware core module. The shortest execution time of the hardware core module is estimated, which means that the software simulator can continue to simulate Y clock cycles without risk after initiating a request; if the simulation platform sends back the response of the hardware core module within the Y clock cycles simulated by the software simulator, the software simulator will simulate without stopping; otherwise, the software simulator will wait in place after Y clock cycles until it gets a response; after receiving the response, the software simulator will reschedule the event to occur after (XY) cycles, thereby formally accepting the response; for the hardware core module that can actively initiate a request, the simulation platform will continuously inquire about the request status of the hardware core module; When the hardware core module initiates a request to the processor chip, it optimistically continues to execute the expected number of clock cycles; at this time, the software simulator receives two time information. It processes the request of the hardware core module at the first time point, and the second time point is the estimate of the next active request initiated by the hardware core model in the worst case. This means that the software simulator can continue to simulate to the second time point after sending the response back to the hardware core module.

5. The software and hardware joint simulation platform according to claim 4, characterized in that: The submission module adopts a batch request method, that is, it allows the submission module to merge several requests for one communication to offset a large amount of communication costs; specifically, when the submission module initiates a communication request, it merges several requests into one package according to the number of batches allowed by the platform, and adds a header to indicate the batch information of the package; the hardware-side architecture of the software-hardware joint simulation platform first combines several scattered data packets into a complete package, and then parses several requests from the package according to the header information and inserts them into the task queue one after another.

6. The software and hardware joint simulation platform according to claim 4, characterized in that: The data stream fusion method is adopted, specifically, the header information of several consecutive address tasks initiated by the processor chip is removed and merged into one packet, and the header information is filled in uniformly; this packet will still arrive at the hardware side in the form of several data packets.

7. The software-hardware joint simulation platform according to any one of claims 1 to 6, characterized in that: When a software simulator accesses a hardware core module, the processing flow of the simulation platform is as follows: (1) After the software simulator inserts the request into the task queue, the scheduling module obtains the request details from the queue and distributes them to the pre-submission queue according to the request type; (2) After the submission module obtains the request from the pre-submission queue, it modifies it into a data packet that complies with the communication protocol standard and sends it to the hardware FPGA; (3) After the data packet preprocessing module in the hardware FPGA receives the data packet, it parses it into the original request and inserts it into the queue leading to the signal conversion module; (4) The signal conversion module configures the input signal of the core module according to the information in the request; (5) After receiving the input stimulus, the core module executes according to the established logic and sets the corresponding output signal; (6) The signal conversion module monitors the output signal of the core module. After obtaining the output signal, it attaches the execution clock cycle number information, assembles it into a response that can be recognized by the software simulator, and sends it to the queue leading to the data preprocessing module; (7) After receiving the response, the data packet preprocessing module notifies the acquisition module through an interrupt to obtain the hardware execution result, and divides the data packet into several packets that meet the bandwidth requirements of the communication protocol; (8) After the acquisition module obtains the data packet, it parses the corresponding information from the data packet according to the header of the data packet and sends it to the post-acquisition queue; (9) The presence of a response triggering scheduling module in the post-collection queue is responsible for delivering the data packet to a result queue accessible to the software simulator; (10) The software simulator obtains the hardware execution results from the result queue.

Citation Information

Patent Citations

  • Reprogrammable security for controlling piracy and enabling interactive content

    CN101364415A

  • Software and hardware joint simulation system, method, device and equipment and storage medium

    CN114880977A

  • Network protocol security test system

    CN116418567A

  • System and method for mixing circuit simulation based on framework

    KR101629725B1

Cited By

  • Method and system for fast and accurate co-simulation of coprocessor

    CN119249989A

  • Simulation method and simulation device for simulating integrated circuit chip

    CN120508373A

  • Simulation method and simulation device for simulating integrated circuit chip

    CN120508373B