System-on-chip simulation model communication system and method and computer equipment

By designing an adapter to match the abstract level and communication mode of the communication interface, and using an intermediate processor to convert information, the problem of low communication efficiency between models of different abstract levels in the prior art is solved, and the development efficiency of system-on-chip hybrid simulation is improved and communication accuracy.

CN119025299APending Publication Date: 2024-11-26SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215227.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, when using SystemC and Python for hybrid system-on-chip simulation, since the generated model has different abstract levels, it is necessary to generate communication interfaces separately for different abstract levels, resulting in low development efficiency.

Method used

A system-on-chip simulation model communication system is designed. Through the dual communication interface design of the adapter, the communication mode and abstract level of the first communication interface are set to be consistent with the first model, and the communication mode and abstract level of the second communication interface are set to Consistent with the second model, the intermediate processor is used to convert communication information to realize communication between models of different abstract hierarchies.

Benefits of technology

It improves the development efficiency of hybrid simulation of system-on-chip, avoids designing different communication interfaces for different abstraction hierarchies, enhances the flexibility of adapter and the efficiency of communication protocol conversion, and ensures the correctness of data transmission and the accuracy of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025299A_ABST
    Figure CN119025299A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of modeling and simulation, and discloses a system-on-chip simulation model communication system and method and computer device.The system comprises a first model obtained through a first language, a second model obtained through a second language and an adapter, and the adapter is connected with the first model and the second model; the adapter comprises a first communication interface, a second communication interface and an intermediate processor; the communication mode and the abstraction level of the first communication interface are consistent with the communication mode and the abstraction level of the first model; the communication mode and the abstraction level of the second communication interface are consistent with the communication mode and the abstraction level of the second model; the first communication interface receives communication information sent by the first model, and sends the communication information to the intermediate processor, so as to carry out communication information conversion processing on the communication information, obtain to-be-sent communication information matched with the second model, and send the to-be-sent communication information to the second communication interface; and the second communication interface sends the communication information to the second model. The development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of modeling and simulation, and in particular to a system-on-chip simulation model communication system, method and computer equipment. Background Art

[0002] Under the increasingly complex system on chip (SOC) design and strict time-to-market pressure, the Electronic System Level (ESL) design methodology came into being. It allows design at a high level of abstraction and accelerates the collaborative development process of software and hardware. It is now a widely used system on chip design method.

[0003] Among related technologies, SystemC, as a system-level design language based on C++, supports modeling at different levels of abstraction, greatly facilitating all aspects from system architecture to hardware / software co-simulation. In particular, its support for transaction-level modeling has further promoted the application of SystemC in electronic system-level design modeling, effectively shortening the design cycle and reducing risks.

[0004] As the complexity of the SoC structure increases, a hybrid simulation method for SoCs has emerged, combining the advantages of Python in describing complex functions with the advantages of SystemC in describing hardware behavior.

[0005] However, when using SystemC and Python to perform hybrid simulation of the system on chip, the generated SystemC model and Python model include different abstraction levels, and the communication interfaces corresponding to different abstraction levels are different. In the related technology, corresponding communication interfaces are generated separately for different abstraction levels of the model, which leads to low development efficiency. Summary of the invention

[0006] In view of this, the present invention provides a system-on-chip simulation model communication system, method and computer device to solve the problem in the related art that corresponding communication interfaces are generated separately for different abstract levels of the model, resulting in low development efficiency.

[0007] In a first aspect, the present invention provides a system-on-chip simulation model communication system, the system comprising: a first model obtained by modeling the system-on-chip using a first language, a second model obtained by modeling the system-on-chip using a second language, and an adapter, wherein the adapter is used to connect the first model and the second model for communication, and the adapter comprises a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor;

[0008] The first communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the first model;

[0009] The second communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the second model;

[0010] The first communication interface is used to receive communication information to be sent from the first model to the second model, and send the communication information to the intermediate processor;

[0011] The intermediate processor is used to perform communication information conversion processing on the communication information, obtain the communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface;

[0012] The second communication interface is used to receive the communication information to be sent, and send the communication information to be sent to the second model.

[0013] The system-on-chip simulation model communication system provided in this embodiment, through the dual communication interface design of the adapter, sets the communication mode and abstraction level of the first communication interface to be consistent with the communication mode and abstraction level of the first model, and sets the communication mode and abstraction level of the second communication interface to be consistent with the communication mode and abstraction level of the second model, thereby realizing the use of the first communication interface to receive communication information sent by the first model, using the intermediate processor to perform communication information conversion processing on the communication information to obtain communication information to be sent that matches the second model, and using the second communication interface to send the communication information to the second model, thereby realizing the use of the adapter to realize communication between the first model at different abstraction levels and the second model at different abstraction levels, without the need to design different communication interfaces for the first model at different abstraction levels and the second model at different abstraction levels, thereby improving the development efficiency of the hybrid simulation of the system-on-chip.

[0014] In an optional embodiment, the first communication interface includes a first abstraction level controller, and the second communication interface includes a second abstraction level controller;

[0015] The first communication interface is specifically used for:

[0016] In response to the first parameter input operation, obtaining a first parameter corresponding to the first communication mode of the first model connected thereto;

[0017] Based on the first parameter, setting the communication mode of the first communication interface to be consistent with the first communication mode of the first model;

[0018] The first abstraction level controller is used to:

[0019] In response to a second parameter input operation, obtaining a second parameter corresponding to a first abstract level of a first model connected to the first communication interface;

[0020] Based on the second parameter, setting the abstraction level of the first communication interface to be consistent with the first abstraction level of the first model;

[0021] The second communication interface is specifically used for:

[0022] In response to the third parameter input operation, obtaining a third parameter corresponding to the second communication mode of the second model connected thereto;

[0023] Based on the third parameter, setting the communication mode of the second communication interface to be consistent with the second communication mode of the second model;

[0024] The second abstraction level controller is used to:

[0025] In response to a fourth parameter input operation, obtaining a fourth parameter corresponding to a second abstract level of a second model connected to the second communication interface;

[0026] Based on the fourth parameter, the abstraction level of the second communication interface is set to be consistent with the second abstraction level of the second model.

[0027] The system-on-chip simulation model communication system provided in this embodiment sets the communication mode of the communication interface to be consistent with the communication mode of the model based on parameters through the communication interface, and sets the abstract level of the communication interface to be consistent with the abstract level of the model based on parameters through the abstract level controller in the communication interface, so that the adapter can dynamically adjust its communication mode and abstract level according to the communication mode and abstract level of the connected model. The adapter is highly flexible and can be used for communication between different models, thereby improving the development efficiency of hybrid simulation of the system-on-chip.

[0028] In an optional embodiment, the intermediate processor includes a communication protocol processor and a data converter;

[0029] The communication protocol processor is used for:

[0030] receiving the communication information, converting the communication information into target communication information conforming to a target communication protocol format, and sending the target communication information to a data converter, wherein the target communication protocol format is a communication protocol format corresponding to the abstract level of the second model;

[0031] The data converter is used to:

[0032] The target communication information is received, and based on a preset mapping rule and a preset mapping function, the target communication information is converted into communication information to be sent having a data structure conforming to the second model, and the communication information to be sent is sent to the second communication interface.

[0033] The system-on-chip simulation model communication system provided in this embodiment converts the communication information received from the first model into the target communication protocol format through the communication protocol processor, ensuring that different models can communicate smoothly even if the communication protocols are different, thereby reducing communication barriers caused by incompatible communication protocols.

[0034] The target communication information is further mapped to the communication information to be sent having a data structure conforming to the second model through the data converter according to the preset mapping rule and the preset mapping function, thereby ensuring the correctness of data transmission.

[0035] In an optional implementation, the communication protocol processor is specifically used to:

[0036] Based on the abstract level of the first model, converting the communication information into standard communication information in a standard communication protocol format;

[0037] Based on the abstraction level of the second model, the standard communication information is converted into the target communication information.

[0038] The system-on-chip simulation model communication system provided in this embodiment determines a standard communication protocol format as a bridge for communication between models at different abstraction levels, reduces the complexity of conversion between communication protocols of models at different abstraction levels, and improves the efficiency of communication protocol conversion.

[0039] In an optional implementation, the data converter is specifically used for:

[0040] Based on the data structure of the target communication information, the preset mapping function is used to filter out a target mapping rule from the preset mapping rules;

[0041] Based on the target mapping rule, the target communication information is converted into communication information to be sent.

[0042] The system-on-chip simulation model communication system provided in this embodiment utilizes a preset mapping function to screen out a target mapping rule from preset mapping rules based on the data structure of the target communication information, and converts the target communication information into communication information to be sent according to the target mapping rule, thereby ensuring the accuracy of data conversion and reducing errors caused by manually configured mapping.

[0043] In an optional implementation, the intermediate processor further includes a synchronization controller, the synchronization controller includes a clock control module, and the clock control module is used to:

[0044] Controlling the clock model of the first model to be consistent with a preset clock model;

[0045] The clock model of the second model is controlled to be consistent with the preset clock model.

[0046] The system-on-chip simulation model communication system provided in this embodiment ensures the unification of time references of different models by controlling the clock model of the first model to be consistent with the preset clock model, and controlling the clock model of the second model to be consistent with the preset clock model, thereby ensuring the accuracy of communication between the first model and the second model.

[0047] In an optional implementation, the synchronization controller further includes a clock monitoring module, and the clock monitoring module is used to:

[0048] Acquire first timestamp information of the first model connected to the adapter and second timestamp information of the second model;

[0049] Comparing the first timestamp information with the second timestamp information to obtain a comparison result;

[0050] When the comparison result indicates that the first timestamp information is inconsistent with the second timestamp information, a log record is made and an alarm is issued.

[0051] The system-on-chip simulation model communication system provided in this embodiment can detect time synchronization deviations in real time by continuously acquiring and comparing timestamp information of the first model and the second model, and thus promptly detect time asynchrony problems between the first model and the second model, and then promptly take measures to correct them, thereby improving the communication accuracy between the first model and the second model and enhancing the overall reliability of the system.

[0052] In a second aspect, the present invention provides a system-on-chip simulation model communication method, which is applied to the adapter described in the first aspect or any corresponding embodiment thereof, wherein the adapter is used to connect a first model and a second model for communication, and the adapter includes a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor, and the method includes:

[0053] receiving, by means of a first communication interface, communication information to be sent from the first model to the second model, and sending the communication information to the intermediate processor;

[0054] Using the intermediate processor to perform communication information conversion processing on the communication information, obtain communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface;

[0055] Using the second communication interface to receive the communication information to be sent, and sending the communication information to be sent to the second model;

[0056] The communication mode and abstraction level of the first communication interface are consistent with those of the first model, and the communication mode and abstraction level of the second communication interface are consistent with those of the second model.

[0057] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the on-chip system simulation model communication method of the above-mentioned second aspect by executing the computer instructions.

[0058] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the on-chip system simulation model communication method of the second aspect.

[0059] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the system-on-chip simulation model communication method of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 is a schematic diagram of the structure of a system-on-chip simulation model communication system according to an embodiment of the present invention;

[0062] Figure 2 is a structural schematic diagram of another system-on-chip simulation model communication system according to an embodiment of the present invention;

[0063] Figure 3 is a schematic diagram of adaptation of a first communication interface at a different abstraction level and a second communication interface at a different abstraction level implemented by an adapter according to an embodiment of the present invention;

[0064] Figure 4is a schematic diagram of the adaptation of a first communication interface of different communication modes and a second communication interface of different communication modes implemented by an adapter according to an embodiment of the present invention;

[0065] Figure 5 It is a schematic diagram of communication protocol conversion between a SystemC transaction level model and a Python cycle precision level model through a standard communication protocol according to an embodiment of the present invention;

[0066] Figure 6 is a schematic diagram of communication protocol conversion between a SystemC cycle accurate level model and a Python cycle accurate level model through a standard communication protocol according to an embodiment of the present invention;

[0067] Figure 7 is a flow chart of a system-on-chip simulation model communication method according to an embodiment of the present invention;

[0068] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0070] Under the increasingly complex system-on-chip design and strict time-to-market pressure, hardware design and software design are facing severe challenges, and electronic system-level design methodology has emerged. Electronic system-level design allows design at a high level of abstraction, and can be applied to performance models, functional models, system design, etc., to accelerate the collaborative development process of hardware and software, so that the design process can enter the software design stage as early as possible, perform hardware design at a higher level, and realize hardware / software collaborative design. Electronic system-level design method is now widely used system-on-chip design method.

[0071] In the related technology, SystemC is a system-level design language based on C++, that is, a language for system design based on C++ language, which supports modeling at different levels of abstraction. It can establish functional models and system architecture models, and can also describe the specific implementation of software and hardware. It is widely used in system modeling, architecture development, transaction level modeling (TLM) and hardware / software co-simulation and other aspects.

[0072] System-on-chip modeling is a core function of SystemC. In order to better support transaction-level modeling, it is equipped with a special TLM2.0 library, which further promotes the application of SystemC in electronic system-level design modeling. In the architecture design stage, designers build system-on-chip models based on the SystemC language, without having to rely on the specific details of the register transfer level. By analyzing the system model and verifying the hardware parameters through simulation tests at a higher level of abstraction, engineers can discover potential problems in the early stages of design, reduce design risks, and shorten the system-on-chip design cycle.

[0073] Python is a high-level programming language with the advantages of simplicity, ease, flexibility and rich ecosystem. It is widely used in test case generation, data processing and result analysis in on-chip system modeling.

[0074] As the complexity of the system-on-chip structure increases, the requirements for hardware modeling languages ​​are also getting higher and higher. Due to the advantages of the Python language, it plays an increasingly important role in the realization of hardware modeling algorithms and complex functions. Combining the advantages of the SystemC language in describing hardware behavior characteristics and the advantages of the Python language in describing complex functions, a hybrid simulation method for the system-on-chip has emerged, which has the advantages of efficient prototyping and rapid algorithm iteration.

[0075] One problem that needs to be faced when using SystemC and Python languages ​​to perform hybrid simulation of on-chip systems is how to achieve communication between the SystemC model simulated using the SystemC language and the Python model simulated using the Python language.

[0076] In the related technology, the Python / C application programming interface (Application Programming Interface, referred to as: API) is used to separately develop a communication interface with the Python model and a communication interface with the SystemC model, and to develop and implement communication between the communication interface with the Python model and the communication interface with the SystemC model, thereby implementing communication between the SystemC model and the Python model.

[0077] However, since both the Python model and the SystemC model include different levels of abstraction, the communication interface of the hardware model is implemented differently at different levels of abstraction, and the models generated based on different computer languages ​​have different implementation methods due to their different syntax and data types. The method of using the Python / C application programming interface to separately generate corresponding communication interfaces for different levels of abstraction of the model has poor flexibility and versatility, resulting in low efficiency in the hybrid simulation development of the on-chip system.

[0078] An embodiment of the present invention provides a system-on-chip simulation model communication system. Through the dual communication interface design of an adapter, the communication mode and abstraction level of the first communication interface are set to be consistent with the communication mode and abstraction level of the first model, and the communication mode and abstraction level of the second communication interface are set to be consistent with the communication mode and abstraction level of the second model. It is realized that the communication information sent by the first model is received by the first communication interface, and the communication information is converted and processed by the intermediate processor to obtain the communication information to be sent that matches the second model. The communication information to be sent is sent to the second model by the second communication interface, thereby realizing that the first model with different abstraction levels and the second model with different abstraction levels can be realized by using the adapter to achieve the effect of improving the development efficiency of the hybrid simulation of the system-on-chip.

[0079] According to an embodiment of the present invention, a system on chip simulation model communication system is provided. Figure 1 is a schematic diagram of the structure of a system-on-chip simulation model communication system according to an embodiment of the present invention. Figure 1 As shown, the system-on-chip simulation model communication system includes: a first model 10 obtained by modeling the system-on-chip using a first language, a second model 11 obtained by modeling the system-on-chip using a second language, and an adapter 12, wherein the adapter 12 is used to connect the first model 10 and the second model 11 for communication.

[0080] The embodiment of the present invention is described by taking the example that the first language may be SystemC language, the second language may be Python language, the first model may be a SystemC model, and the second model may be a Python model.

[0081] Of course, the first language may be Python, the second language may be SystemC, the first model may be a Python model, and the second model may be a SystemC model.

[0082] It can be understood that, based on the advantages of using the first language for system-on-chip simulation modeling and the advantages of using the second language for system-on-chip simulation modeling, the system-on-chip is simulated and modeled to obtain the first model and the second model.

[0083] The adapter 12 includes a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor.

[0084] The first communication interface connected to the first model is an SC communication interface connected to the SystemC model. The second communication interface connected to the second model is a PY communication interface connected to the Python model.

[0085] It should be noted that the SC communication interface provides the connection and communication functions between the adapter and the SystemC model, and the PY communication interface provides the connection and communication functions between the adapter and the Python model.

[0086] The first communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the first model.

[0087] The SystemC model includes two types of communication modes, one is port communication and the other is direct call communication.

[0088] SystemC models can be SystemC transaction-level models, SystemC behavioral-level models, SystemC cycle-accurate-level models, etc., depending on the level of abstraction.

[0089] In order to enable the adapter to communicate with multiple SystemC models, the first communication interface sets its own communication mode to be consistent with the communication mode of the first model, and sets its own abstraction level to be consistent with the abstraction level of the first model, so that the SystemC model can connect and communicate with the adapter.

[0090] It can be understood that when the SystemC model is a SystemC transaction-level model, the SC communication interface is a transaction-level interface. When the SystemC model is a SystemC behavioral-level model, the SC communication interface is a behavioral-level interface. When the SystemC model is a SystemC cycle-accurate model, the SC communication interface is a cycle-accurate interface.

[0091] That is to say, the SC communication interface also has three levels of abstraction, corresponding to the abstraction levels of the SystemC model, namely, transaction-level interface, behavioral-level interface, and cycle-accurate-level interface.

[0092] The second communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the second model.

[0093] Among them, the Python model includes two types of communication methods, one type is port communication, and the other type is direct call communication, that is, function call communication.

[0094] The Python model can be a Python function-level model, a Python cycle-accurate level model, a Python register output level model, etc., depending on the level of abstraction.

[0095] In order to enable the adapter to communicate with multiple Python models, the second communication interface sets its own communication mode to be consistent with the communication mode of the second model, and sets its own abstract level to be consistent with the abstract level of the second model, so that the Python model can connect and communicate with the adapter.

[0096] It can be understood that when the Python model is a Python function level model, the PY communication interface is a function level interface. When the Python model is a Python cycle accurate level model, the PY communication interface is a cycle accurate level interface. When the Python model is a Python register output level model, the PY communication interface is a register output level interface.

[0097] That is to say, the PY communication interface also has three levels of abstraction, corresponding to the abstraction level of the Python model, namely, function-level interface, cycle-accurate level interface, and register output level interface.

[0098] The first communication interface is used to receive communication information to be sent from the first model to the second model, and send the communication information to the intermediate processor.

[0099] When the first communication interface of the adapter can communicate with the first model connected to the adapter, and the second communication interface of the adapter can communicate with the second model connected to the adapter, the first communication interface responds to the communication request initiated by the first model, receives the communication information to be sent by the first model to the second model, and sends the communication information to the intermediate processor.

[0100] The intermediate processor is used to perform communication information conversion processing on the communication information, obtain the communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface.

[0101] It can be understood that the communication information to be sent that matches the second model is communication information that can be identified by the second model.

[0102] The second communication interface is used to receive the communication information to be sent, and send the communication information to be sent to the second model.

[0103] Among them, the second communication interface is used to receive the communication information to be sent, and send the communication information to be sent to the second model, thereby realizing the communication between the first model and the second model, that is, the communication between the models obtained by on-chip system simulation modeling in different languages.

[0104] It can be understood that the second communication interface can also be used to receive communication information to be sent by the second model to the first model, and send the communication information to the intermediate processor.

[0105] The intermediate processor is used to perform communication information conversion processing on the communication information, obtain the communication information to be sent that matches the first model, and send the communication information to be sent to the first communication interface.

[0106] The first communication interface is used to receive communication information to be sent, and send the communication information to be sent to the first model, thereby realizing communication between the first model and the second model.

[0107] The system-on-chip simulation model communication system provided in this embodiment, through the dual communication interface design of the adapter, sets the communication mode and abstraction level of the first communication interface to be consistent with the communication mode and abstraction level of the first model, and sets the communication mode and abstraction level of the second communication interface to be consistent with the communication mode and abstraction level of the second model, thereby realizing the use of the first communication interface to receive communication information sent by the first model, using the intermediate processor to perform communication information conversion processing on the communication information to obtain communication information to be sent that matches the second model, and using the second communication interface to send the communication information to the second model, thereby realizing the use of the adapter to realize communication between the first model at different abstraction levels and the second model at different abstraction levels, without the need to design different communication interfaces for the first model at different abstraction levels and the second model at different abstraction levels, thereby improving the development efficiency of the hybrid simulation of the system-on-chip.

[0108] In addition, the adapter of the system-on-chip simulation model communication system provided in this embodiment can adapt to SystemC models and Python models at various abstraction levels, realize communication between SystemC models and Python models at various abstraction levels, and has a wide range of adaptation scenarios.

[0109] Moreover, the adapter can adapt to SystemC models and Python models of various communication modes, making the application more flexible.

[0110] According to an embodiment of the present invention, a system on chip simulation model communication system is provided. Figure 2 is a schematic diagram of the structure of a system-on-chip simulation model communication system according to an embodiment of the present invention. Figure 2As shown, the system-on-chip simulation model communication system includes: a first model 20 obtained by modeling the system-on-chip using a first language, a second model 21 obtained by modeling the system-on-chip using a second language, and an adapter 22, wherein the adapter 22 is used to connect the first model 20 and the second model 21 for communication. The adapter 22 includes a first communication interface 220 connected to the first model, a second communication interface 221 connected to the second model, and an intermediate processor 222.

[0111] The first communication interface 220 is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the first model.

[0112] The first communication interface 220 includes a first abstraction level controller 2200 .

[0113] The first communication interface 220 is specifically used for:

[0114] In response to the first parameter input operation, a first parameter corresponding to the first communication mode of the first model connected thereto is obtained.

[0115] Based on the first parameter, the communication mode of the first communication interface is set to be consistent with the first communication mode of the first model.

[0116] The user inputs the first parameter corresponding to the first communication mode of the first model into the first communication interface according to the first communication mode of the first model.

[0117] The first communication interface obtains a first parameter corresponding to a first communication mode of a first model connected thereto, and based on the first parameter, sets its own communication mode to be consistent with the first communication mode of the first model.

[0118] That is to say, according to the different communication methods of the SystemC model, when the SC communication interface is instantiated, parameters are used to define the communication method of the SC communication interface. The SC communication interface receives the parameters and implements the internal logic of the communication interface to ensure that the communication method of the SC communication interface is consistent with the communication method of the SystemC model.

[0119] It should be noted that when the first communication mode is port communication, based on the interface and channel provided by the TLM2.0 standard library, ports such as socket / sc_signal / sc_in / sc_out (SystemC standard data type, sc_signal is the signal channel, sc_in / sc_out are basic input / output ports) are defined in the SC communication interface and bound to the corresponding ports in the SystemC model to achieve consistency between the communication mode of the SC communication interface and the communication mode of the SystemC model.

[0120] Generally, when the hierarchical relationship between the SystemC model and the Python model is independent modules, the communication mode of the SystemC model and the communication mode of the Python model can be port communication.

[0121] In the case where the first communication mode is direct call communication, the communication mode of the SC communication interface is consistent with the communication mode of the SystemC model based on methods such as function call, shared variables, handshake signals, and intra-module channels. For example, an interface function is defined in the SC communication interface, and the scope of the function is the adapter and the SystemC model. The interface function is called in the SystemC model, and the data to be transmitted is passed to the adapter as a function parameter to complete the communication between the SystemC model and the adapter, that is, the communication mode of the SC communication interface is consistent with the communication mode of the SystemC model.

[0122] Generally speaking, when there is an inclusion relationship between the SystemC model and the Python model or they are different sub-modules within the same module (same level), the communication method of the SystemC model and the communication method of the Python model can be direct call communication.

[0123] The first abstraction level controller 2200 is used to:

[0124] In response to the second parameter input operation, a second parameter corresponding to the first abstract level of the first model connected to the first communication interface is obtained.

[0125] Based on the second parameter, the abstraction level of the first communication interface is set to be consistent with the first abstraction level of the first model.

[0126] The user inputs the second parameter corresponding to the first abstraction level of the first model into the first abstraction level controller according to the first abstraction level of the first model.

[0127] The first abstraction level controller obtains a second parameter corresponding to the first abstraction level of the first model connected to the first communication interface, and based on the second parameter, sets its own abstraction level to be consistent with the first abstraction level of the first model.

[0128] That is to say, according to the different abstraction levels of the SystemC model, when the SC communication interface is instantiated, parameters are used to define the abstraction level of the SC communication interface. The SC communication interface receives the parameters and implements the internal logic of the communication interface to achieve consistency between the abstraction level of the SC communication interface and the abstraction level of the SystemC model.

[0129] It can be understood that the first abstraction level controller ensures the consistency of the abstraction level of the SC communication interface and the connected SystemC model.

[0130] The second communication interface 221 is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the second model.

[0131] The second communication interface 221 includes a second abstraction level controller 2210 .

[0132] The second communication interface is specifically used for:

[0133] In response to the third parameter input operation, a third parameter corresponding to the second communication mode of the second model connected thereto is obtained.

[0134] Based on the third parameter, the communication mode of the second communication interface is set to be consistent with the second communication mode of the second model.

[0135] The user inputs the third parameter corresponding to the second communication mode of the second model into the second communication interface according to the second communication mode of the second model.

[0136] The second communication interface obtains a third parameter corresponding to the second communication mode of the second model connected thereto, and based on the third parameter, sets its own communication mode to be consistent with the second communication mode of the second model.

[0137] That is to say, according to the different communication methods of the Python model, when the PY communication interface is instantiated, parameters are used to define the communication method of the PY communication interface. The PY communication interface receives the parameters and implements the internal logic of the communication interface to ensure that the communication method of the PY communication interface is consistent with that of the Python model.

[0138] It should be noted that, when the second communication mode is port communication, the port types encapsulated based on the Python model include three types of port definitions: function level, clock level (i.e., cycle-accurate level), and register output level, to achieve the connection and communication between the Python model and the adapter, that is, to achieve the communication mode of the PY communication interface consistent with the communication mode of the Python model. For example, define InPut and OutPut ports in the Python model (InPut: standard input port based on Python, OutPut: standard output port based on Python), define OutPut port and Input port in the adapter, bind the two groups of ports one by one, and achieve communication between the adapter and the Python model.

[0139] When the second communication mode is direct call communication, i.e., function call communication, the connection and communication between the Python model and the adapter is realized by directly communicating through the function call method or indirectly communicating through the function call method by changing the parameter values ​​of the internal variables, signals, channels, etc. of the Python model. For example, a function interface is defined in the Python model file, and the adapter imports the interface function. When a communication transaction occurs, the adapter calls the interface function and passes the data to be transmitted as a function parameter into the Python model to complete the communication between the adapter and the Python model, that is, the communication mode of the SC communication interface is consistent with the communication mode of the SystemC model.

[0140] The second abstraction level controller 2210 is used to:

[0141] In response to a fourth parameter input operation, a fourth parameter corresponding to a second abstract level of a second model connected to the second communication interface is acquired.

[0142] Based on the fourth parameter, the abstraction level of the second communication interface is set to be consistent with the second abstraction level of the second model.

[0143] The user inputs a fourth parameter corresponding to the second abstraction level of the second model into the second abstraction level controller according to the second abstraction level of the second model.

[0144] The second abstraction level controller obtains a fourth parameter corresponding to the second abstraction level of the second model connected to the second communication interface, and based on the fourth parameter, sets its own abstraction level to be consistent with the second abstraction level of the second model.

[0145] That is to say, according to the different abstract levels of the Python model, when the PY communication interface is instantiated, parameters are used to define the abstract level of the PY communication interface. The PY communication interface receives the parameters and implements the internal logic of the communication interface to achieve consistency between the abstract level of the PY communication interface and the abstract level of the Python model.

[0146] It can be understood that the second abstraction level controller ensures the consistency of the abstraction level of the PY communication interface and the connected Python model.

[0147] Figure 3 FIG. 1 is a schematic diagram of the adaptation of a first communication interface at a different abstraction level and a second communication interface at a different abstraction level implemented by an adapter according to an embodiment of the present invention. Figure 3As shown, the adapter of the embodiment of the present invention can realize the communication between SystemC models of different abstraction levels and Python models of different abstraction levels, that is, realize the adaptation between SystemC models of different abstraction levels and Python models of different abstraction levels. The abstraction level controller defines the abstraction level of the communication interface, configures the abstraction level of the communication interface when the adapter is instantiated, and sets the abstraction level of the communication interface to be consistent with the abstraction level of the model connected to it.

[0148] like Figure 3 As shown, the adapter is used to adapt the SystemC transaction level model to the Python function level model, that is, the abstract level of the SC communication interface is defined as the SC transaction level interface, and the abstract level of the PY communication interface is defined as the PY function level interface.

[0149] The adapter is used to adapt the SystemC transaction-level model to the Python cycle-accurate model, that is, the abstract level of the SC communication interface is defined as the SC transaction-level interface, and the abstract level of the PY communication interface is defined as the PY cycle-accurate interface.

[0150] The adapter is used to adapt the SystemC transaction-level model to the Python register output-level model, that is, the abstract level of the SC communication interface is defined as the SC transaction-level interface, and the abstract level of the PY communication interface is defined as the PY register output-level interface.

[0151] The adapter is used to adapt the SystemC behavior level model to the Python function level model, that is, the abstract level of the SC communication interface is defined as the SC behavior level interface, and the abstract level of the PY communication interface is defined as the PY function level interface.

[0152] The adapter is used to adapt the SystemC behavioral level model to the Python cycle-accurate level model, that is, the abstract level of the SC communication interface is defined as the SC behavioral level interface, and the abstract level of the PY communication interface is defined as the PY cycle-accurate level interface.

[0153] The adapter is used to adapt the SystemC behavior level model to the Python register output level model, that is, the abstract level of the SC communication interface is defined as the SC behavior level interface, and the abstract level of the PY communication interface is defined as the PY register output level interface.

[0154] The adapter is used to adapt the SystemC cycle-accurate level model to the Python function-level model, that is, the abstract level of the SC communication interface is defined as the SC cycle-accurate level interface, and the abstract level of the PY communication interface is defined as the PY function-level interface.

[0155] The adapter is used to adapt the SystemC cycle accurate level model to the Python cycle accurate level model, that is, the abstract level of the SC communication interface is defined as the SC cycle accurate level interface, and the abstract level of the PY communication interface is defined as the PY cycle accurate level interface.

[0156] The adapter is used to adapt the SystemC cycle-accurate level model to the Python register output level model, that is, the abstract level of the SC communication interface is defined as the cycle-accurate level interface, and the abstract level of the PY communication interface is defined as the PY register output level interface.

[0157] Figure 4 FIG. 1 is a schematic diagram of the adaptation of a first communication interface with different communication modes and a second communication interface with different communication modes implemented by an adapter according to an embodiment of the present invention. Figure 4 As shown, the adapter according to the embodiment of the present invention can realize the communication between SystemC models with different communication modes and Python models with different communication modes, that is, realize the adaptation between SystemC models with different communication modes and Python models with different communication modes.

[0158] like Figure 4 As shown, the adapter is used to realize the adaptation of the communication mode of the SystemC model as port communication and the communication mode of the Python model as port communication, that is, according to the communication mode of the SystemC model, the communication mode of the SC communication interface is defined as port communication, namely SC port communication, and according to the communication mode of the Python model, the communication mode of the PY communication interface is defined as port communication, namely PY port communication.

[0159] An adapter is used to implement the adaptation of the communication mode of the SystemC model as port communication and the communication mode of the Python model as direct call communication. That is, according to the communication mode of the SystemC model, the communication mode of the SC communication interface is defined as port communication, namely SC port communication; according to the communication mode of the Python model, the communication mode of the PY communication interface is defined as direct call communication, namely PY direct call communication.

[0160] An adapter is used to adapt the communication mode of the SystemC model as direct call communication and the communication mode of the Python model as port communication. That is, according to the communication mode of the SystemC model, the communication mode of the SC communication interface is defined as direct call communication, namely SC direct call communication; according to the communication mode of the Python model, the communication mode of the PY communication interface is defined as port communication, namely PY port communication.

[0161] An adapter is used to implement the adaptation of the communication mode of the SystemC model as direct call communication and the communication mode of the Python model as direct call communication. That is, according to the communication mode of the SystemC model, the communication mode of the SC communication interface is defined as direct call communication, namely SC direct call communication; according to the communication mode of the Python model, the communication mode of the PY communication interface is defined as direct call communication, namely PY direct call communication.

[0162] The first communication interface 220 is used to receive communication information to be sent from the first model to the second model, and send the communication information to the intermediate processor.

[0163] The intermediate processor 222 is used to perform communication information conversion processing on the communication information, obtain the communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface.

[0164] The second communication interface 221 is used to receive communication information to be sent, and send the communication information to be sent to the second model.

[0165] The system-on-chip simulation model communication system provided in this embodiment sets the communication mode of the communication interface to be consistent with the communication mode of the model based on parameters through the communication interface, and sets the abstract level of the communication interface to be consistent with the abstract level of the model based on parameters through the abstract level controller in the communication interface, so that the adapter can dynamically adjust its communication mode and abstract level according to the communication mode and abstract level of the connected model. The adapter is highly flexible and can be used for communication between different models, thereby improving the development efficiency of hybrid simulation of the system-on-chip.

[0166] In some optional embodiments, the intermediate processor 222 also includes a communication protocol processor 2220 and a data converter 2221 .

[0167] The communication protocol processor 2220 is used to:

[0168] Communication information is received, the communication information is converted into target communication information conforming to a target communication protocol format, and the target communication information is sent to a data converter, wherein the target communication protocol format is a communication protocol format corresponding to the abstract level of the second model.

[0169] Among them, the communication protocol processor provides protocol processing and conversion functions. The communication protocol processor includes a parser and a generator, which are used to parse the received communication information and generate target communication information that conforms to the target communication protocol format, thereby completing the translation of the communication information.

[0170] The communication protocol processor performs protocol conversion on communication information at different abstraction levels to ensure correct communication between models at different abstraction levels.

[0171] Data converter 2221 is used for:

[0172] Receive target communication information, convert the target communication information into communication information to be sent having a data structure conforming to the second model based on a preset mapping rule and a preset mapping function, and send the communication information to be sent to the second communication interface.

[0173] Among them, the data converter 2221 provides the function of converting the data type and data format of the communication information transmitted between the SystemC model and the Python model. The data converter contains a set of mapping rules and mapping functions for the data in the hybrid simulation platform, namely, preset mapping rules and preset mapping functions. When communicating or interacting between the SystemC model and the Python model, the conversion of the data type and data format of the communication information is completed according to this set of mapping relationships, namely, the preset mapping rules and preset mapping functions, to ensure the correctness of data transmission.

[0174] For example, the data structure converter contains the mapping relationship between SC_char* and Py_str, the mapping relationship between SC_double and Py_float, and the mapping relationship between SC_std::vector <char>The mapping relationship between SC_std::set and Py_OrderedDict data structures, etc. (char*, double, vector <char>, set are SystemC basic data types; str, float, List, OrderedDict are Python basic data types).

[0175] The system-on-chip simulation model communication system provided in this embodiment converts the communication information received from the first model into the target communication protocol format through the communication protocol processor, ensuring that different models can communicate smoothly even if the communication protocols are different, thereby reducing communication barriers caused by incompatible communication protocols.

[0176] The target communication information is further mapped to the communication information to be sent having a data structure conforming to the second model through the data converter according to the preset mapping rule and the preset mapping function, thereby ensuring the correctness of data transmission.

[0177] In some optional implementations, the communication protocol processor 2220 is specifically configured to:

[0178] Based on the abstraction level of the first model, the communication information is converted into standard communication information in a standard communication protocol format.

[0179] Based on the abstraction level of the second model, the standard communication information is converted into the target communication information.

[0180] The communication protocol processor internally contains the standard communication protocol format and the mapping relationship between the communication protocols corresponding to different abstraction levels and the standard communication protocol.

[0181] The communication protocol processor parses the received communication information, translates communication information such as signals and commands, and generates target communication information to complete the translation of communication information.

[0182] Among them, the standard communication protocol member fields of the standard communication protocol format may be as shown in Table 1.

[0183] Table 1

[0184] Cmd_Type Target_Addr Src_Addr Src_ID Length Phase Data Response_Field Valid_field Extension

[0185] As shown in Table 1, the standard communication protocol member fields include Cmd_Type, Target_Addr, Target_ID, Src_Addr, Src_ID, Length, Phase, Data, Response_Field, Valid_field, Extension and other fields. Among them, the Cmd_Type field describes the command type of the data packet, the Target_Addr field describes the target address, the Src_Addr field describes the source address of the data packet, the Src_ID field describes the source module encoding of the data packet, the Length field describes the data length of the data packet, the Phase field describes the transmission phase of the data packet, the Data field describes the data actually transmitted by the data packet, the Response_Field field describes the transmission result of the data packet, the Valid Field describes the effective length of the data transmitted in the data packet, and the Extension field provides a custom field for transmission, which can be extended by the user. Among them, the data packet is the communication information.

[0186] Figure 5 Schematic diagram of communication protocol conversion between SystemC transaction level model and Python cycle precision level model through standard communication protocol according to an embodiment of the present invention. Figure 5 As shown, the SC_TL protocol member is the communication protocol member corresponding to the SystemC transaction level model, and the PY_CL protocol member is the communication protocol member corresponding to the Python cycle accurate level model. When the first model is the SystemC transaction level model and the second model is the Python cycle accurate level model, the communication protocol processor is as follows Figure 5 The correspondence between the SC_TL protocol members and the standard protocol members and the correspondence between the PY_CL protocol members and the standard protocol members shown complete the translation of communication information into target communication information.

[0187] It should be noted that there are two types of protocol member conversion processes in communication protocol conversion. One is the protocol member with mapping fields, such as Figure 5 m_address-Target_Addr-addrs in the protocol member conversion, such protocol member conversion can be mapped one by one. One is the protocol member without mapping fields, such as *-Src_Addr-src. In such protocol member conversion, no mapping is required, and the target protocol member field can be configured as the default initial value.

[0188] Figure 6 Schematic diagram of communication protocol conversion between SystemC cycle-accurate model and Python cycle-accurate model through standard communication protocol according to an embodiment of the present invention. Figure 6 As shown, the SC_CL protocol member is the communication protocol member corresponding to the SystemC cycle-accurate model, and the PY_CL protocol member is the communication protocol member corresponding to the Python cycle-accurate model. When the first model is a SystemC cycle-accurate model and the second model is a Python cycle-accurate model, the communication protocol processor is as follows: Figure 6 The correspondence between the SC_CL protocol members and the standard protocol members and the correspondence between the PY_CL protocol members and the standard protocol members shown complete the translation of communication information into target communication information.

[0189] The system-on-chip simulation model communication system provided in this embodiment determines a standard communication protocol format as a bridge for communication between models at different abstraction levels, reduces the complexity of conversion between communication protocols of models at different abstraction levels, and improves the efficiency of communication protocol conversion.

[0190] In some optional implementations, the data converter 2221 is specifically used for:

[0191] Based on the data structure of the target communication information, a target mapping rule is screened out from the preset mapping rules using a preset mapping function.

[0192] Based on the target mapping rule, the target communication information is converted into the communication information to be sent.

[0193] The preset mapping function and the preset mapping rule are set by the technicians. The preset mapping rule defines the corresponding relationship in the data structure conversion, defines the mapping relationship between the source data structure and the target data structure, and defines the default value in the data structure.

[0194] The preset mapping function is the specific implementation of the data structure conversion process, such as input and output definition, search mapping rules, error handling, and return results.

[0195] After receiving the target communication information, the data structure of the target communication information is input into a preset mapping function to filter out a target mapping rule from the preset mapping rules, and the target communication information is converted into communication information to be sent according to the target mapping rule.

[0196] It can be understood that the conversion of communication information from the data structure of the SystemC language to the data structure of the Python language is achieved through the preset mapping function and the preset mapping rule.

[0197] The system-on-chip simulation model communication system provided in this embodiment utilizes a preset mapping function to screen out a target mapping rule from preset mapping rules based on the data structure of the target communication information, and converts the target communication information into communication information to be sent according to the target mapping rule, thereby ensuring the accuracy of data conversion and reducing errors caused by manually configured mapping.

[0198] In some optional implementations, the intermediate processor 222 further includes a synchronization controller 2222, and the synchronization controller includes a clock control module, and the clock control module is used to:

[0199] The clock model of the first model is controlled to be consistent with the preset clock model.

[0200] The clock model of the second model is controlled to be consistent with the preset clock model.

[0201] The synchronization controller provides the management function of timing synchronization between the SystemC model and the Python model. The clock control module is used to manage the constraints of the clock signal relationship between different models, match models with different time precision, ensure the consistency of the clock and timing relationship between models, and ensure that the events in the modules occur according to the expected timing.

[0202] For example, when the clock clk_sc (clock model based on SystemC) and timing of the SystemC model are consistent with the clock clk_py (clock model based on Python) and timing of the Python model, the clock control module of the adapter defines the clock clk0 (clock model of the adapter) and binds clk0 to clk_sc and clk_py respectively to achieve clock and timing synchronization between different models.

[0203] The clock model of the adapter is a preset clock model, and the parameter elements of the preset clock model include period, duty cycle, resolution, initial logic value, time unit, etc. A preset clock model is defined based on these parameter elements, and the preset clock model is customized by the user. The user can use the default clock parameters or modify these parameter values ​​to define his own clock model.

[0204] By controlling the clock model of the SystemC model and the clock model of the Python model to be consistent with the preset clock model, the clock and timing synchronization of the SystemC model and the Python model is ensured, thereby ensuring the correctness of data transmission.

[0205] It can be understood that in the hybrid simulation process, the SystemC model / Python model initiates a communication request, the SC communication interface / PY communication interface receives the communication information, which is translated into a communication protocol that can be processed by the target communication interface through the communication protocol processor, and the data type and data format of SystemC / Python are converted into the data type and data format of Python / SystemC through the data converter. The synchronization controller ensures that the timing of the adapter sending communication information to the target communication interface is consistent with expectations, and the adapter forwards the communication information to the target module through the PY communication interface / SC communication interface to complete the communication between the hybrid simulation models.

[0206] The system-on-chip simulation model communication system provided in this embodiment ensures the unification of time references of different models by controlling the clock model of the first model to be consistent with the preset clock model, and controlling the clock model of the second model to be consistent with the preset clock model, thereby ensuring the accuracy of communication between the first model and the second model.

[0207] In some optional implementations, the synchronization controller 2222 further includes a clock monitoring module, which is used to:

[0208] Get the first timestamp information of the first model and the second timestamp information of the second model connected to the adapter.

[0209] The first timestamp information is compared with the second timestamp information to obtain a comparison result.

[0210] When the comparison result indicates that the first timestamp information is inconsistent with the second timestamp information, a log record is made and an alarm is issued.

[0211] The clock monitoring module monitors the clock synchronization by continuously acquiring the first timestamp information of the first model and the second timestamp information of the second model connected to the adapter.

[0212] The comparison result is that the first timestamp information is inconsistent with the second timestamp information, and it is determined that the clock and timing of the first model are inconsistent with the clock and timing of the second model, and the clock and timing information of the first model and the clock and timing information of the second model are printed in the simulation log, and a warning message is marked. That is, the clock and timing information of the first model and the clock and timing information of the second model are logged and an alarm is issued.

[0213] The system-on-chip simulation model communication system provided in this embodiment can detect time synchronization deviations in real time by continuously acquiring and comparing timestamp information of the first model and the second model, and thus promptly detect time asynchrony problems between the first model and the second model, and then promptly take measures to correct them, thereby improving the communication accuracy between the first model and the second model and enhancing the overall reliability of the system.

[0214] In some optional implementations, the adapter further includes a performance analysis module. The performance analysis module is used to obtain performance data generated when the first model communicates with the second model.

[0215] A performance evaluation result of the adapter is determined based on the performance data.

[0216] The performance data includes a communication delay when the first model communicates with the second model.

[0217] The performance analysis module is used to determine the communication delay based on the communication start time and the communication end time of the first model communicating with the second model.

[0218] When the communication delay exceeds a preset delay threshold, it is determined that the performance evaluation result of the adapter is that a performance bottleneck exists.

[0219] When the communication delay does not exceed the preset delay threshold, it is determined that the performance evaluation result of the adapter is high performance.

[0220] It should be noted that the preset delay threshold is set by a technician. When the performance evaluation result of the adapter shows that there is a performance bottleneck, an alarm message can be sent to the technician so that the technician can optimize and improve the adapter to improve the performance of the adapter.

[0221] The system-on-chip simulation model communication system provided in this embodiment monitors the performance of the interaction between the SystemC model and the Python model through the performance analysis module. By obtaining performance data, especially communication delay, the performance of the adapter can be evaluated, which helps to promptly discover the performance bottleneck of the adapter, prompting technical personnel to optimize and improve the adapter, and improve the performance and reliability of the adapter.

[0222] According to an embodiment of the present invention, an embodiment of a system-on-chip simulation model communication method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0223] In this embodiment, a system-on-chip simulation model communication method is provided, which can be used for an adapter shown in any of the above embodiments, the adapter is used to connect a first model and a second model for communication, the adapter includes a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor. Figure 7 is a flow chart of a system-on-chip simulation model communication method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0224] Step S70: using the first communication interface to receive communication information to be sent from the first model to the second model, and sending the communication information to the intermediate processor.

[0225] Step S71: Use the intermediate processor to perform communication information conversion processing on the communication information to obtain the communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface.

[0226] Step S72: Utilize the second communication interface to receive the communication information to be sent, and send the communication information to be sent to the second model.

[0227] The communication mode and abstraction level of the first communication interface are consistent with those of the first model, and the communication mode and abstraction level of the second communication interface are consistent with those of the second model.

[0228] The further description of each step of the system-on-chip simulation model communication method in this embodiment is the same as that of the above corresponding embodiment, and will not be repeated here.

[0229] The system-on-chip simulation model communication method provided in this embodiment, through the dual communication interface design of the adapter, sets the communication mode and abstraction level of the first communication interface to be consistent with the communication mode and abstraction level of the first model, and sets the communication mode and abstraction level of the second communication interface to be consistent with the communication mode and abstraction level of the second model, thereby realizing the use of the first communication interface to receive communication information sent by the first model, using the intermediate processor to perform communication information conversion processing on the communication information to obtain communication information to be sent that matches the second model, and using the second communication interface to send the communication information to the second model, thereby realizing the use of the adapter to realize communication between the first model at different abstraction levels and the second model at different abstraction levels, without the need to design different communication interfaces for the first model at different abstraction levels and the second model at different abstraction levels, thereby improving the development efficiency of the hybrid simulation of the system-on-chip.

[0230] The embodiment of the present invention also provides a computer device, see Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 80, memory 81, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 80 is taken as an example.

[0231] The processor 80 may be a central processing unit, a network processor or a combination thereof. The processor 80 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0232] The memory 81 stores instructions executable by at least one processor 80 so as to enable at least one processor 80 to implement the method shown in the above embodiment.

[0233] The memory 81 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 81 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 81 may optionally include a memory remotely arranged relative to the processor 80, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0234] The memory 81 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 81 may also include a combination of the above types of memory.

[0235] The computer device further comprises a communication interface 82 for the computer device to communicate with other devices or a communication network.

[0236] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0237] A part of the present invention 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 the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the 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 may be any available computer-readable storage medium or communication medium accessible to the computer.

[0238] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.< / char> < / char>

Claims

1. A system-on-chip simulation model communication system, characterized in that: The system comprises: a first model obtained by modeling the system on chip using a first language, a second model obtained by modeling the system on chip using a second language, and an adapter, wherein the adapter is used to connect the first model and the second model for communication, and the adapter comprises a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor; The first communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the first model; The second communication interface is used to set its own communication mode and abstraction level to be consistent with the communication mode and abstraction level of the second model; The first communication interface is used to receive communication information to be sent from the first model to the second model, and send the communication information to the intermediate processor; The intermediate processor is used to perform communication information conversion processing on the communication information, obtain the communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface; The second communication interface is used to receive the communication information to be sent, and send the communication information to be sent to the second model.

2. The system according to claim 1, characterized in that The first communication interface includes a first level of abstraction controller, and the second communication interface includes a second level of abstraction controller; The first communication interface is specifically used for: In response to the first parameter input operation, obtaining a first parameter corresponding to the first communication mode of the first model connected thereto; Based on the first parameter, setting the communication mode of the first communication interface to be consistent with the first communication mode of the first model; The first abstraction level controller is used to: In response to a second parameter input operation, obtaining a second parameter corresponding to a first abstract level of a first model connected to the first communication interface; Based on the second parameter, setting the abstraction level of the first communication interface to be consistent with the first abstraction level of the first model; The second communication interface is specifically used for: In response to the third parameter input operation, obtaining a third parameter corresponding to the second communication mode of the second model connected thereto; Based on the third parameter, setting the communication mode of the second communication interface to be consistent with the second communication mode of the second model; The second abstraction level controller is used to: In response to a fourth parameter input operation, obtaining a fourth parameter corresponding to a second abstract level of a second model connected to the second communication interface; Based on the fourth parameter, the abstraction level of the second communication interface is set to be consistent with the second abstraction level of the second model.

3. The system according to claim 1, characterized in that The intermediate processor includes a communication protocol processor and a data converter; The communication protocol processor is used for: receiving the communication information, converting the communication information into target communication information conforming to a target communication protocol format, and sending the target communication information to a data converter, wherein the target communication protocol format is a communication protocol format corresponding to the abstract level of the second model; The data converter is used to: The target communication information is received, and based on a preset mapping rule and a preset mapping function, the target communication information is converted into communication information to be sent having a data structure conforming to the second model, and the communication information to be sent is sent to the second communication interface.

4. The system according to claim 3, characterized in that The communication protocol processor is specifically used for: Based on the abstract level of the first model, converting the communication information into standard communication information in a standard communication protocol format; Based on the abstraction level of the second model, the standard communication information is converted into the target communication information.

5. The system according to claim 3, characterized in that The data converter is specifically used for: Based on the data structure of the target communication information, the preset mapping function is used to filter out a target mapping rule from the preset mapping rules; Based on the target mapping rule, the target communication information is converted into communication information to be sent.

6. The system according to claim 1, characterized in that The intermediate processor further includes a synchronization controller, wherein the synchronization controller includes a clock control module, and the clock control module is used to: Controlling the clock model of the first model to be consistent with a preset clock model; The clock model of the second model is controlled to be consistent with the preset clock model.

7. The system according to claim 6, characterized in that The synchronization controller further includes a clock monitoring module, which is used to: Acquire first timestamp information of the first model connected to the adapter and second timestamp information of the second model; Comparing the first timestamp information with the second timestamp information to obtain a comparison result; When the comparison result indicates that the first timestamp information is inconsistent with the second timestamp information, a log record is made and an alarm is issued.

8. A system-on-chip simulation model communication method, characterized in that: An adapter applied to any one of claims 1 to 7, the adapter being used to connect a first model and a second model for communication, the adapter comprising a first communication interface connected to the first model, a second communication interface connected to the second model, and an intermediate processor, the method comprising: receiving, by means of a first communication interface, communication information to be sent from the first model to the second model, and sending the communication information to the intermediate processor; Using the intermediate processor to perform communication information conversion processing on the communication information, obtain communication information to be sent that matches the second model, and send the communication information to be sent to the second communication interface; Using the second communication interface to receive the communication information to be sent, and sending the communication information to be sent to the second model; The communication mode and abstraction level of the first communication interface are consistent with those of the first model, and the communication mode and abstraction level of the second communication interface are consistent with those of the second model.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the on-chip system simulation model communication method according to claim 8 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the system-on-chip simulation model communication method according to claim 8.