Performance simulation model construction method and device and performance simulation method
By generating configuration information tables and automatically generating code framework tables, the problem of low efficiency in creating performance simulation models in the existing technology is solved, and the performance simulation model of the system on chip is quickly constructed and evaluated, which improves development efficiency.
Patent Information
- Application Number
- CN202411067018.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art is inefficient in the creation of system-on-chip (SoC) performance simulation models, requiring manual code editing, resulting in a long development cycle and excessive redundant code that cannot be quickly modeled and evaluated.
By obtaining the on-chip performance simulation requirements input by the user, generating simulation scenario information, execution step sequence information, access port information and startup condition information, building a configuration information table for the performance simulation model, and automatically generating standard development code using preset code generation tools , forming a code framework table for performance simulation models.
It improves the efficiency of creating performance simulation models, reduces redundant code, and realizes the rapid construction and evaluation of performance simulation models, shortens the development cycle.
Smart Images

Figure CN119088365A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a performance simulation model construction method, device, electronic equipment and performance simulation method. Background Art
[0002] Currently, in the development process of System on Chip (SoC), in order to ensure that the designed SoC performance can meet user requirements, in-depth system-level simulation will be performed before the register transfer level circuit (transaction level modeling, RTL) design of the SoC to confirm whether the designed architecture is appropriate, whether the bus can meet the throughput and real-time requirements, and whether the memory is wasted.
[0003] In the related art, a manual code editing method is usually adopted to create a performance simulation model of the SoC by analyzing the performance simulation requirements of the SoC, which reduces the efficiency of creating the performance simulation model. Summary of the invention
[0004] The present application provides a performance simulation model construction method, device and performance simulation method to solve the defects of related technologies such as reducing the efficiency of creating performance simulation models.
[0005] The first aspect of the present application provides a method for constructing a performance simulation model, comprising:
[0006] Obtaining system-on-chip performance simulation requirements input by users;
[0007] Generate a configuration information table of a performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements;
[0008] Generate a code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table;
[0009] Based on a preset code generation tool, the standard development code of the performance simulation model is automatically generated according to the code framework table to complete the construction of the performance simulation model.
[0010] In an optional implementation, generating the code framework table of the performance simulation model according to the interface configuration information of each access port represented by the configuration information table and the target configuration information of each simulation process includes:
[0011] For any target simulation scenario represented by the simulation scenario information, determine the interface configuration relationship between each simulation step and the access port according to the execution step sequence information, access port information and start condition information in the target simulation scenario represented by the configuration information table;
[0012] Determine the interface configuration information of each access port according to the execution order of each simulation step represented by the execution step sequence information in the target simulation scenario and the interface configuration relationship between each simulation step and the access port;
[0013] According to the coupling relationship between each simulation step in the target simulation scenario, the simulation steps are divided into serial simulation steps and parallel simulation steps;
[0014] Treat each of the serial simulation steps as an independent simulation process, and combine multiple parallel simulation steps as an independent simulation process;
[0015] Determine the target configuration information of each simulation process according to the corresponding relationship between each simulation process and each simulation step, the interface configuration relationship between each simulation step and the access port, and the interface configuration information of each access port;
[0016] Determining a code framework table of the performance simulation model in the target simulation scenario according to the interface configuration information of each access port and the target configuration information of each simulation process;
[0017] The interface configuration information of the access port at least includes event triggering information of the access port response interface, and the target configuration information of the simulation process at least includes event sensitive information and port call information of the simulation process.
[0018] In an optional implementation, determining the interface configuration relationship between each simulation step and the access port according to the execution step sequence information, access port information and startup condition information in the target simulation scenario represented by the configuration information table includes:
[0019] Determine the execution order of each simulation step in the target simulation scenario according to the execution step sequence information in the target simulation scenario represented by the configuration information table;
[0020] Determine the calling order of each access port according to the execution order of each simulation step and the access port to be called by each simulation step represented by the access port information;
[0021] Determining event triggering information of an access port response interface according to the startup condition information;
[0022] According to the execution order of each simulation step, the calling order of each access port and the event triggering information of the access port response interface, the interface configuration relationship between each simulation step and the access port is determined.
[0023] In an optional implementation, the determining of the target configuration information of each simulation process according to the corresponding relationship between each simulation process and each simulation step, the interface configuration relationship between each simulation step and the access port, and the interface configuration information of each access port includes:
[0024] Determining the internal function of each simulation process and the event sensitive information of each simulation process according to the corresponding relationship between each simulation process and each simulation step;
[0025] Determining the port call information of each simulation process according to the interface configuration relationship between each simulation step and the access port;
[0026] The target configuration information of each simulation process is determined according to the internal function, event sensitive information and port call information of each simulation process.
[0027] In an optional embodiment, the method further includes:
[0028] Obtaining the target interval time of each simulation step;
[0029] Determining the event triggering delay time of the access port response interface according to the target interval time of each simulation step and the access port to be called in each simulation step;
[0030] The event triggering information of the access port response interface includes the event triggering delay time.
[0031] In an optional implementation, after completing the construction of the performance simulation model, the method further includes:
[0032] Get new performance simulation requirements input by users;
[0033] Generate model extension code according to the newly added performance simulation requirements;
[0034] Based on the model extension code, the performance simulation model is optimized to extend the simulation scenario of the performance simulation model.
[0035] A second aspect of the present application provides a performance simulation model construction device, comprising:
[0036] An acquisition module, used for acquiring system-on-chip performance simulation requirements input by a user;
[0037] A first generating module is used to generate a configuration information table of a performance simulation model according to simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements;
[0038] A second generating module, for generating a code framework table of the performance simulation model according to the interface configuration information of each access port represented by the configuration information table and the target configuration information of each simulation process;
[0039] A construction module is used to automatically generate the standard development code of the performance simulation model based on a preset code generation tool and according to the code framework table to complete the construction of the performance simulation model.
[0040] A third aspect of the present application provides a performance simulation method, comprising:
[0041] Obtain a simulation scenario of the system-on-chip under test;
[0042] Generating a performance simulation instruction of the system-on-chip to be tested according to the scenario to be simulated;
[0043] The performance simulation instruction is input into a performance simulation model constructed by the method described in the first aspect and various possible designs of the first aspect, so as to perform performance simulation of the system-on-chip to be tested in the scenario to be simulated based on the performance simulation model, and obtain a performance simulation result of the system-on-chip to be tested.
[0044] A fourth aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0045] The memory stores computer-executable instructions;
[0046] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method described in the first aspect and various possible designs of the first aspect or the method described in the third aspect and various possible designs of the third aspect.
[0047] The fifth aspect of the present application provides a computer-readable storage medium, which stores computer execution instructions. When a processor executes the computer execution instructions, it implements the method described in the first aspect and various possible designs of the first aspect or the method described in the third aspect and various possible designs of the third aspect.
[0048] The sixth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect or the method described in the third aspect and various possible designs of the third aspect.
[0049] The technical solution of this application has the following advantages:
[0050] The present application provides a method, device and performance simulation method for constructing a performance simulation model, and the method includes: obtaining the system-on-chip performance simulation requirements input by the user; generating a configuration information table of the performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements; generating a code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table; based on a preset code generation tool, automatically generating the standard development code of the performance simulation model according to the code framework table to complete the construction of the performance simulation model. The method provided by the above scheme obtains the code framework table by performing a series of analysis and processing on the system-on-chip performance simulation requirements input by the user, and finally automatically generates the standard development code of the performance simulation model based on the code framework table, thereby improving the efficiency of creating the performance simulation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0052] Figure 1 A schematic diagram of the structure of a performance simulation model construction system based on an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a flow chart of a method for constructing a performance simulation model provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of a process for obtaining system-on-chip performance simulation requirements provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of the structure of a performance simulation model building device provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of the structure of an exemplary performance simulation model building device provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of a flow chart of a method for constructing a performance simulation model provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0059] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0062] In the related technologies, the difficulty of SoC design stems from its complexity. The complexity gave rise to SystemC and electronic system level design (ESL) methodology. Transaction processing level modeling is the key to electronic system level design. For complex SoC, in-depth system level simulation is required before RTL design to confirm whether the designed architecture is appropriate, whether the bus can meet the throughput and real-time requirements, and whether the memory is wasted. In order to shorten the design cycle of SoC key IP and assist the design process, and at the same time to shorten the gap between system architecture design and hardware RTL circuit implementation, a modeling methodology is required to describe the function and architecture of the entire circuit system without falling into the complicated signal timing and gate circuit of the hardware circuit. Therefore, ESL (Electronic System Level) electronic system level design came into being. The ESL design methodology is used to describe the system at an appropriate level of abstraction, construct a virtual hardware prototype platform, explore the hardware architecture and develop software programs, and realize rapid system modeling and simulation analysis. The core of ESL is TLM, namely the transaction level modeling (TLM) method.
[0063] As the computational complexity of future communication terminals and devices increases, the demand for integrated scale of real-time complex system chips will grow rapidly. Dozens or hundreds of processing units may be integrated on a chip, and multi-core-based signal processing platforms have become the development trend of software radio. In such an integrated system, designing a reliable, high-speed, low-power, high-performance intra-chip communication system has become a challenge and opportunity for the development of System on Chip (SoC). The key performance indicators of storage chips include response delay, throughput, maximum number of concurrent connections, system reliability, etc. It is a crucial technology to quickly and accurately build performance models and quantitatively evaluate and analyze the performance indicators of the architecture design.
[0064] In the process of building performance models, the most widely used method is to build transaction-level models. The abstract level of the transaction level is higher than the RTL level. It can quickly establish the executable specifications of the hardware and quickly create a system model based on the initial functional specifications of the system. By adding timing details, the performance of the system can be evaluated and the structure of the system can be explored. Transaction-level modeling is faster and simulation is more efficient. How to quickly and accurately build a TLM model or component (some core functional blocks in the entire module) based on user needs is an urgent problem to be solved.
[0065] Traditional development methods take user needs as input, and gradually carry out forward development processes such as demand analysis, model scheme design, model coding, and code debugging. The development cycle is long and the efficiency is low. Especially when the model includes multiple functional modules and each functional module has a certain execution rule between each step during the specific implementation, the traditional method will edit a large amount of redundant code, and it will not be possible to achieve rapid modeling and evaluation.
[0066] In response to the above problems, the embodiments of the present application provide a method, device and performance simulation method for constructing a performance simulation model, and the method for constructing a performance simulation model includes: obtaining the system-on-chip performance simulation requirements input by the user; generating a configuration information table of the performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements; generating a code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table; based on a preset code generation tool, automatically generating the standard development code of the performance simulation model according to the code framework table to complete the construction of the performance simulation model. The method provided by the above scheme obtains the code framework table by performing a series of analysis and processing on the system-on-chip performance simulation requirements input by the user, and finally automatically generates the standard development code of the performance simulation model based on the code framework table, thereby improving the efficiency of creating the performance simulation model.
[0067] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0068] First, the structure of the performance simulation model construction system based on this application is described:
[0069] The performance simulation model construction method, device and performance simulation method provided in the embodiments of the present application are suitable for quickly constructing a performance simulation model of a chip such as SoC. Figure 1 As shown, it is a structural schematic diagram of the performance simulation model construction system based on the embodiment of the present application, which mainly includes a data acquisition device and a performance simulation model construction device, and the performance simulation model construction device is provided with a performance simulation model construction device. The data acquisition device is used to collect the system-on-chip performance simulation requirements input by the user, and send the collected system-on-chip performance simulation requirements to the performance simulation model construction device. The performance simulation model construction device is based on the performance simulation model construction device and quickly builds a corresponding performance simulation model according to the system-on-chip performance simulation requirements.
[0070] The embodiment of the present application provides a performance simulation model construction method for quickly constructing a performance simulation model of a chip such as SoC. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used to quickly construct a performance simulation model of a chip such as SoC.
[0071] like Figure 2 FIG. 1 is a flow chart of a method for constructing a performance simulation model provided in an embodiment of the present application, the method comprising:
[0072] Step 201 : obtaining a system-on-chip performance simulation requirement input by a user.
[0073] Among them, Figure 3 As shown, it is a schematic diagram of the process of obtaining the on-chip system performance simulation requirements provided in an embodiment of the present application. The user sequentially inputs the execution step sequence to be automatically generated in the model component, the starting conditions of each step, the expected time interval between every two steps, and the corresponding port for external communication of each step.
[0074] Step 202 , generating a configuration information table of a performance simulation model according to simulation scenario information, execution step sequence information, access port information and start condition information represented by the system-on-chip performance simulation requirements.
[0075] The system-on-chip performance simulation requirements include simulation scenario information, execution step sequence information, access port information and start condition information, and may also include the target interval time of each simulation step.
[0076] Specifically, after obtaining the system-on-chip performance simulation requirements input by the user, data analysis is first performed on the system-on-chip performance simulation requirements, and then the system performance simulation requirements after data analysis are written into a preset configuration information table template to obtain a configuration information table of the performance simulation model.
[0077] Exemplarily, the present application embodiment provides the following exemplary configuration information table:
[0078]
[0079] Among them, the simulation scenario specifically refers to the scenario of the system on chip in actual application, such as the system on chip SoC chip as an accelerator card, etc. The external module can be the host end, external disk, data processing device and on-chip cache, etc. The data processing device can be devices such as CPU and GPU. The done flag is the completion flag, and the ack flag is the response flag. The response flag is the response status returned by the bus after the module sends the request to the bus; the completion flag is the response status received from the target end after the module sends the request to the target end module. The request can cross multiple buses on the transmission path.
[0080] Step 203: Generate a code framework table of the performance simulation model according to the interface configuration information of each access port represented by the configuration information table and the target configuration information of each simulation process.
[0081] Specifically, by analyzing the configuration information table, according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the analysis result, a framework table of the TLM model components is generated, that is, a code framework table of the performance simulation model is obtained.
[0082] Step 204 , based on a preset code generation tool and according to the code framework table, automatically generates a standard development code of the performance simulation model to complete the construction of the performance simulation model.
[0083] Specifically, the script (preset code generation tool) can implement the process of translating and corresponding the input framework table of the TLM model component and the standard SystemC code, and finally output the standard SystemC code of the executable TLM component to complete the construction of the performance simulation model.
[0084] On the basis of the above embodiments, since the configuration information table includes a wide variety of contents and it is impossible to intuitively see the rules between the steps, in order to achieve a more comprehensive and reasonable data analysis of the configuration table, so as to improve the accuracy and conciseness of the subsequently generated code framework table, and to lay a foundation for further improving the efficiency of model building, as an implementable method, on the basis of the above embodiments, in one embodiment, according to the interface configuration information of each access port represented by the configuration information table and the target configuration information of each simulation process, a code framework table of a performance simulation model is generated, including:
[0085] Step 2031, for any target simulation scenario represented by the simulation scenario information, determine the interface configuration relationship between each simulation step and the access port according to the execution step sequence information, access port information and start condition information in the target simulation scenario represented by the configuration information table;
[0086] Step 2032, determining the interface configuration information of each access port according to the execution order of each simulation step represented by the execution step sequence information in the target simulation scenario and the interface configuration relationship between each simulation step and the access port;
[0087] Step 2033, dividing the simulation steps into serial simulation steps and parallel simulation steps according to the coupling relationship between each simulation step in the target simulation scenario;
[0088] Step 2034, treating each serial simulation step as an independent simulation process, and combining multiple parallel simulation steps as an independent simulation process;
[0089] Step 2035, determining target configuration information of each simulation process according to the corresponding relationship between each simulation process and each simulation step, the interface configuration relationship between each simulation step and the access port, and the interface configuration information of each access port;
[0090] Step 2036, determining a code framework table of the performance simulation model in a target simulation scenario according to the interface configuration information of each access port and the target configuration information of each simulation process.
[0091] The interface configuration information of the access port at least includes event triggering information of the access port response interface, and the target configuration information of the simulation process at least includes event sensitive information and port calling information of the simulation process.
[0092] It should be noted that the access port is a physical port, and the access port supports multiple interfaces, each of which corresponds to a different communication protocol, such as the response interface of the receiving (slave) port, which is entered when a request arrives at the receiving port; the response interface of the sending (master) port, which is entered when the sending port requests to send a response message after a period of time; the call interface of the sending (master) port, which is entered when the sending port has a sending request. The interface configuration relationship between each simulation step and the access port is which interface configuration is used by each access step when using the access port.
[0093] The present application embodiment provides the following exemplary code framework table:
[0094]
[0095] Specifically, in one embodiment, the execution order of each simulation step in the target simulation scenario can be determined based on the execution step sequence information in the target simulation scenario represented by the configuration information table; the calling order of each access port can be determined based on the execution order of each simulation step and the access port to be called by each simulation step represented by the access port information; the event triggering information of the access port response interface can be determined based on the startup condition information; the interface configuration relationship between each simulation step and the access port can be determined based on the execution order of each simulation step, the calling order of each access port and the event triggering information of the access port response interface.
[0096] Specifically, in one embodiment, the target interval time of each simulation step can also be obtained in response to the user's simulation requirements; based on the target interval time of each simulation step and the access port to be called for each simulation step, the event triggering delay time of the access port response interface is determined.
[0097] The event triggering information of the access port response interface includes the event triggering delay time.
[0098] The interface configuration relationship can be specifically expressed by encapsulating the interface registered by the port:
[0099] slave port 0--registered response interface--trigger event a in scenario 1, trigger event a' in scenario 2;
[0100] master port0--register the response interface, define the sending interface--trigger event b in the response interface;
[0101] master port1--register the response interface, define the sending interface--trigger event c in the response interface;
[0102] master port2--registers the response interface, defines the sending interface--triggering event d in the response interface;
[0103] master port3--registers the response interface, defines the sending interface--triggering event e in the response interface.
[0104] The execution of each simulation step is triggered by a triggering event, that is, when a simulation step needs to be executed, the corresponding event is triggered first, so as to further trigger the corresponding simulation step based on the currently triggered event.
[0105] Specifically, in one embodiment, the internal function of each simulation process and the event-sensitive information of each simulation process can be determined based on the corresponding relationship between each simulation process and each simulation step; the port call information of each simulation process can be determined based on the interface configuration relationship between each simulation step and the access port; and the target configuration information of each simulation process can be determined based on the internal function, event-sensitive information and port call information of each simulation process.
[0106] Specifically, each level of pipeline corresponds to a SystemC process (simulation process). The steps that can be completed in the same level of pipeline (i.e., the steps that can be executed in the same process) refer to several consecutive steps and the relationship between these steps is that the previous step returns a response mark after the previous step is executed. The steps that must be completed in different levels of pipeline (i.e., the steps that must be executed in different processes) refer to two consecutive steps and the relationship between these two steps is the relationship of the previous step returning a completion mark; or several consecutive steps, and the relationship between each two steps is the relationship of the previous step returning a completion mark, or the combination of conditions for the completion of the previous steps and at least one of these conditions returns a completion mark. Since two consecutive steps that affect each other only in an ack relationship can be implemented in the same level of pipeline, they correspond to one process; two consecutive steps that affect each other only in a done relationship cannot be implemented in the same level of pipeline, and they correspond to multiple processes respectively.
[0107] Analysis scenarios: Under scenario 1, the steps that can be implemented in the same level of pipeline are step 2 and step 3; under scenario 1, there are 3-level pipelines: step 1, step 2 and step 3, step 4; corresponding to 3 processes; under scenario 2, there are 2-level pipelines: step 1, step 2; corresponding to 2 processes; further comparison of the contents of the steps shows that the processing of step 1 is consistent and the processes can be merged; that is, each serial simulation step is treated as an independent simulation process, and multiple parallel simulation steps are combined as an independent simulation process.
[0108] Therefore, a total of 4 simulation processes are required within the TLM component described in the above configuration information table, which are defined as follows:
[0109] Process 1: Read data struct aa from external module A;
[0110] Process 2: write data struct bb to external module B, write data struct cc to external module C;
[0111] Process 3: Write data struct dd to external module D;
[0112] Process 4: Read data struct ee from external module E;
[0113] Further, the triggering conditions of each process are analyzed. In the response interface of the receiving port or the response interface of the sending port, the corresponding event will be triggered. When the event is triggered, delay information can be added, that is, starting from the current moment, the event is triggered after a delay of a period of time; the triggering condition of the process is the occurrence of a certain event, or the occurrence of several events at the same time, or the occurrence of several events in a certain logical combination. The ack flag and done flag after each step is completed are implemented as events;
[0114] According to the description in the configuration table, the corresponding relationship of process-sensitive events is as follows:
[0115] Process 1: reads data struct aa from external module A; -- sensitive to event a;
[0116] Process 2: writes data struct bb to external module B, and writes data struct cc to external module C; -- sensitive to event b;
[0117] Process 3: Write data struct dd to external module D; -- sensitive to event c && event d;
[0118] Process 4: Read data struct ee from external module E; -- sensitive to event a'.
[0119] Furthermore, we analyze the interface methods called when each process is executed:
[0120] Process 1: read data struct aa from external module A; -- call master port 0 internally to send interface;
[0121] Process 2: writes data struct bb to external module B, writes data struct cc to external module C; -- calls master port 1 and 2 internally to send interfaces;
[0122] Process 3: write data struct dd to external module D; -- call master port 3 internally to send interface;
[0123] Process 4: Read data struct ee from external module E; --Internally call master port 4 to send interface.
[0124] Furthermore, after obtaining the code framework table of the performance simulation model, the specific code translation process includes: event definition, port definition, receiving port registration corresponding interface, sending port registration corresponding interface, sending port definition sending interface, process definition and registration, process trigger condition definition (i.e. process sensitivity table definition) and process implementation, etc. The specific translation content is as follows.
[0125] (1) Event Definition
[0126] Define the event type as sc_event event name;
[0127] sc_event event_a, event_a';
[0128] sc_event event_b;
[0129] sc_event event_c;
[0130] sc_event event_d;
[0131] (2) Port definition
[0132] Send port definition: simple_initiator_socket master_port0,master_port1,master_port2,master_port3,
[0133] Receiving port definition: simple_target_socket slave_port0;
[0134] (3) Interface method definition
[0135] Receive port registration response interface:
[0136] slave_port.register_nb_transport_fw(..module,slave_port_response_func);
[0137] Send port registration response interface:
[0138] master_port0.register_nb_transport_bw(..module,master_port_0_response_func);
[0139] master_port1.register_nb_transport_bw(..module,master_port_1_response_func);
[0140] master_port2.register_nb_transport_bw(..module,master_port_2_response_func);
[0141] master_port3.register_nb_transport_bw(..module,master_port_3_response_func);
[0142] The send port defines the send interface:
[0143]
[0144] In slave_port_response_func(), trigger events are implemented. In scenario 1, event a is triggered with a delay of t1, and in scenario 2, event a' is triggered with a delay of t1'.
[0145] The code is as follows:
[0146]
[0147]
[0148] (4) Process definition and registration
[0149] Taking process 1 as an example, the function is to read data struct aa from external module A, and the definition and registration are as follows:
[0150] SC_THREAD(read_data_from_module_a_thread)
[0151] (5) Definition of process trigger conditions, that is, definition of the process sensitivity table:
[0152] Take process 1 as an example.
[0153] SC_THREAD(read_data_from_module_a_thread)
[0154] sensitive< <event_a;
[0155] (6) Process implementation code
[0156] Take process 1 as an example.
[0157]
[0158] Furthermore, in one embodiment, after completing the construction of the performance simulation model, it is also possible to obtain new performance simulation requirements input by the user; generate model extension code based on the new performance simulation requirements; and optimize the performance simulation model based on the model extension code to expand the simulation scenario of the performance simulation model.
[0159] It should be noted that the performance simulation model constructed in the embodiment of the present application is determined by performing specific data read and write operations in various simulation scenarios, and determining the performance simulation results of the system-on-chip to be tested according to indicators such as throughput, response latency, read and write speed, and IOPS characterized by the read and write operation results. However, due to the variety of application scenarios of the system-on-chip, in order to enable the constructed performance simulation model to be applicable to more scenarios, the method provided in the embodiment of the present application also implements the expansion of the model simulation scenario.
[0160] The specific method for generating the model extension code may refer to the automatic generation of the model code in any target simulation scenario provided in the above embodiments, which will not be described in detail here.
[0161] Furthermore, in one embodiment, after completing the construction of the performance simulation model, in order to ensure that the generated performance simulation model can run stably for a long time, a code security check can be performed on the performance simulation model. Specific code security check methods include syntax and semantic checks, code specification checks, unit tests, and integration tests.
[0162] Specifically, for syntax and semantics checking, a suitable programming language compiler or interpreter can be used to perform syntax checking on the generated code to ensure that the code complies with the grammatical rules of the language. At the same time, semantic checking is performed to ensure that the logic and semantics of the code are reasonable and there are no obvious errors or inconsistencies. For code specification checking, a set of code specifications can be formulated and the generated code can be checked using corresponding tools to ensure that the code complies with the specification requirements. This includes aspects such as the format, naming specifications, and comment specifications of the code, which helps to improve the readability and maintainability of the code. For unit testing, unit test cases can be written to test each functional module in the model separately. Through testing, it can be verified whether the function of the code is correct and whether it meets the expected behavior. Unit testing can help discover problems such as logical errors, boundary conditions, and exception handling in the code. For integration testing, integration testing can be performed on the basis of unit testing, combining various functional modules together for testing to verify whether the interaction and collaboration between them are normal. Integration testing can discover interface problems between modules and system performance problems after integration.
[0163] The performance simulation model construction method provided by the embodiment of the present application obtains the system-on-chip performance simulation requirements input by the user; generates the configuration information table of the performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements; generates the code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table; based on the preset code generation tool, automatically generates the standard development code of the performance simulation model according to the code framework table to complete the construction of the performance simulation model. The method provided by the above scheme obtains the code framework table by performing a series of analysis and processing on the system-on-chip performance simulation requirements input by the user, and finally automatically generates the standard development code of the performance simulation model based on the code framework table, thereby improving the creation efficiency of the performance simulation model. Moreover, since the analysis process and the code generation process are all automated, the accuracy of the code is also well guaranteed. Moreover, it can support the generation of different step execution sequences in different system scenarios, and the application is relatively flexible and scalable, and it supports adding new scenario input information on the basis of the existing model framework, and executing the automated process.
[0164] An embodiment of the present application provides a performance simulation model construction device for executing the performance simulation model construction method provided in the above embodiment.
[0165] like Figure 4 , which is a schematic diagram of the structure of a performance simulation model construction device provided in an embodiment of the present application. The performance simulation model construction device 40 comprises: an acquisition module 401 , a first generation module 402 , a second generation module 403 and a construction module 404 .
[0166] Among them, the acquisition module is used to obtain the on-chip system performance simulation requirements input by the user; the first generation module is used to generate a configuration information table of the performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the on-chip system performance simulation requirements; the second generation module is used to generate a code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table; the construction module is used to automatically generate the standard development code of the performance simulation model according to the code framework table based on a preset code generation tool to complete the construction of the performance simulation model.
[0167] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Figure 5 As shown, it is a schematic diagram of the structure of an exemplary performance simulation model building device provided in an embodiment of the present application, such as Figure 5 The device shown includes an execution step information input module, an execution sequence analysis module and a SystemC code generation module, such as Figure 5 The device shown is as follows Figure 4 An exemplary implementation of the device shown is shown, and the implementation principles of the two are the same and will not be described in detail.
[0168] Regarding the performance simulation model building device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0169] The performance simulation model construction device provided in the embodiment of the present application is used to execute the performance simulation model construction method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0170] The embodiment of the present application provides a performance simulation method for simulating the performance of a chip such as SoC. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used to perform performance simulation on a chip such as SoC.
[0171] like Figure 6 FIG. 1 is a flow chart of a method for constructing a performance simulation model provided in an embodiment of the present application, the method comprising:
[0172] Step 601, obtaining a simulation scenario of the system on chip to be tested;
[0173] Step 602, generating a performance simulation instruction of the system-on-chip to be tested according to the scenario to be simulated;
[0174] Step 603 , inputting the performance simulation instruction into the performance simulation model, so as to perform performance simulation of the system on chip to be tested in the simulation scenario based on the performance simulation model, and obtain the performance simulation result of the system on chip to be tested.
[0175] Regarding the performance simulation method in this embodiment, the specific implementation of each step has been described in detail in the embodiment of the performance simulation model construction method, and will not be elaborated here.
[0176] The performance simulation device provided in the embodiment of the present application is used to execute the application method of the performance simulation model provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0177] An embodiment of the present application provides an electronic device for executing the performance simulation model construction method provided in the above embodiment.
[0178] like Figure 7FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 70 includes: at least one processor 71 and a memory 72 .
[0179] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method provided in the above embodiment.
[0180] The electronic device provided in the embodiment of the present application is used to execute the method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0181] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method provided in any of the above embodiments is implemented.
[0182] The storage medium containing computer executable instructions provided in the embodiments of the present application can be used to store computer executable instructions of the methods provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0183] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method provided in the aforementioned embodiment.
[0184] The embodiments of the present application provide a computer program product that can be used to execute computer instructions of the methods provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0185] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0186] 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.
[0187] 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 hardware plus software functional units.
[0188] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0189] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0190] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional modules is used as examples for illustration, and the specific working process of the above-described device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for constructing a performance simulation model, It is characterized in that include: Obtaining system-on-chip performance simulation requirements input by users; Generate a configuration information table of a performance simulation model according to the simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements; Generate a code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table; Based on a preset code generation tool, the standard development code of the performance simulation model is automatically generated according to the code framework table to complete the construction of the performance simulation model.
2. The method according to claim 1, It is characterized in that The step of generating the code framework table of the performance simulation model according to the interface configuration information of each access port and the target configuration information of each simulation process represented by the configuration information table includes: For any target simulation scenario represented by the simulation scenario information, determine the interface configuration relationship between each simulation step and the access port according to the execution step sequence information, access port information and start condition information in the target simulation scenario represented by the configuration information table; Determine the interface configuration information of each access port according to the execution order of each simulation step represented by the execution step sequence information in the target simulation scenario and the interface configuration relationship between each simulation step and the access port; According to the coupling relationship between each simulation step in the target simulation scenario, the simulation steps are divided into serial simulation steps and parallel simulation steps; Treat each of the serial simulation steps as an independent simulation process, and combine multiple parallel simulation steps as an independent simulation process; Determine the target configuration information of each simulation process according to the corresponding relationship between each simulation process and each simulation step, the interface configuration relationship between each simulation step and the access port, and the interface configuration information of each access port; Determining a code framework table of the performance simulation model in the target simulation scenario according to the interface configuration information of each access port and the target configuration information of each simulation process; The interface configuration information of the access port at least includes event triggering information of the access port response interface, and the target configuration information of the simulation process at least includes event sensitive information and port call information of the simulation process.
3. The method according to claim 2, It is characterized in that Determining the interface configuration relationship between each simulation step and the access port according to the execution step sequence information, access port information and start condition information in the target simulation scenario represented by the configuration information table includes: Determine the execution order of each simulation step in the target simulation scenario according to the execution step sequence information in the target simulation scenario represented by the configuration information table; Determine the calling order of each access port according to the execution order of each simulation step and the access port to be called by each simulation step represented by the access port information; Determining event triggering information of an access port response interface according to the startup condition information; According to the execution order of each simulation step, the calling order of each access port and the event triggering information of the access port response interface, the interface configuration relationship between each simulation step and the access port is determined.
4. The method according to claim 2, It is characterized in that Determining the target configuration information of each simulation process according to the corresponding relationship between each simulation process and each simulation step, the interface configuration relationship between each simulation step and the access port, and the interface configuration information of each access port includes: Determining the internal function of each simulation process and the event sensitive information of each simulation process according to the corresponding relationship between each simulation process and each simulation step; Determining the port call information of each simulation process according to the interface configuration relationship between each simulation step and the access port; The target configuration information of each simulation process is determined according to the internal function, event sensitive information and port call information of each simulation process.
5. The method according to claim 3, It is characterized in that The method further comprises: Obtaining the target interval time of each simulation step; Determining the event triggering delay time of the access port response interface according to the target interval time of each simulation step and the access port to be called in each simulation step; The event triggering information of the access port response interface includes the event triggering delay time.
6. The method according to claim 1, It is characterized in that After completing the construction of the performance simulation model, the method further includes: Get new performance simulation requirements input by users; Generate model extension code according to the newly added performance simulation requirements; Based on the model extension code, the performance simulation model is optimized to extend the simulation scenario of the performance simulation model.
7. A performance simulation model construction device, It is characterized in that include: An acquisition module, used for acquiring system-on-chip performance simulation requirements input by a user; A first generating module is used to generate a configuration information table of a performance simulation model according to simulation scenario information, execution step sequence information, access port information and startup condition information represented by the system-on-chip performance simulation requirements; A second generating module, for generating a code framework table of the performance simulation model according to the interface configuration information of each access port represented by the configuration information table and the target configuration information of each simulation process; A construction module is used to automatically generate the standard development code of the performance simulation model based on a preset code generation tool and according to the code framework table to complete the construction of the performance simulation model.
8. A performance simulation method, It is characterized in that include: Obtain the simulation scenario of the system on chip under test; Generating a performance simulation instruction of the system-on-chip to be tested according to the scenario to be simulated; The performance simulation instruction is input into a performance simulation model constructed by the performance simulation model construction method as described in any one of claims 1 to 6, so as to perform performance simulation of the system-on-chip to be tested in the scenario to be simulated based on the performance simulation model, and obtain a performance simulation result of the system-on-chip to be tested.
9. An electronic device, It is characterized in that include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the performance simulation model construction method according to any one of claims 1 to 6 or the performance simulation method according to claim 8.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the method according to any one of claims 1 to 6 or the performance simulation method according to claim 8 is implemented.
Citation Information
Cited By
Simulation model component generation method and device, equipment and storage medium
CN119989642A
