CN117892665A - Modeling simulation method, device, medium and equipment based on circuit system level model - Google Patents

Modeling simulation method, device, medium and equipment based on circuit system level model Download PDF

Info

Publication number
CN117892665A
CN117892665A CN202311725533.1A CN202311725533A CN117892665A CN 117892665 A CN117892665 A CN 117892665A CN 202311725533 A CN202311725533 A CN 202311725533A CN 117892665 A CN117892665 A CN 117892665A
Authority
CN
China
Prior art keywords
language
simulation
simulation data
data acquisition
level model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311725533.1A
Other languages
Chinese (zh)
Other versions
CN117892665B (en
Inventor
路卢
马小军
王武奇
丁涛
王迎龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202311725533.1A priority Critical patent/CN117892665B/en
Priority claimed from CN202311725533.1A external-priority patent/CN117892665B/en
Publication of CN117892665A publication Critical patent/CN117892665A/en
Application granted granted Critical
Publication of CN117892665B publication Critical patent/CN117892665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • G06F30/3308Design verification, e.g. functional simulation or model checking using simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a modeling simulation method, a device, a medium and equipment based on a circuit system level model, wherein the method comprises the following steps: receiving simulation data acquisition requirements of a user; determining a first language corresponding to the simulation data acquisition requirement based on the modeling language of the circuit system level model and the simulation data acquisition requirement; converting the first language into a second language conforming to a preset execution rule; executing a second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data; simulation tools in the circuitry-level model are configured to model the circuit based on the acquired information. The method and the device provided by the application improve the acquisition efficiency of the simulation data and the modeling simulation efficiency of the circuit.

Description

Modeling simulation method, device, medium and equipment based on circuit system level model
Technical Field
The application relates to the technical field of simulation, in particular to a modeling simulation method, device, medium and equipment based on a circuit system level model.
Background
Analog integrated circuit modeling and simulation are two important tasks that are indistinguishable and constrained from each other in analog circuit design. The purpose of analog integrated circuit modeling is to support circuit simulation to obtain corresponding circuit performance metrics. In modeling simulation of a traditional analog integrated circuit design, the simulation is usually performed off-line, namely after the circuit system level model is built, the simulation is input into a simulation tool, simulation calculation is performed, required simulation data are extracted, the simulation is not directly combined with the circuit system level model, the circuit system level model is difficult to update and create according to the simulation data, the acquisition efficiency of the simulation data is low, and the modeling efficiency of the model is low.
Therefore, how to combine simulation with a circuit system level model to obtain simulation data, and to improve the obtaining efficiency of the simulation data and the modeling simulation efficiency of the circuit are technical problems to be solved in the industry.
Disclosure of Invention
The application provides a modeling simulation method, device, medium and equipment based on a circuit system level model, which are used for solving the technical problems of how to combine simulation with the circuit system level model to obtain simulation data and improving the obtaining efficiency of the simulation data and the modeling simulation efficiency of a circuit in the prior art.
In a first aspect, the present application provides a modeling simulation method based on a circuitry-level model, including:
receiving simulation data acquisition requirements of a user;
determining a first language corresponding to the simulation data acquisition requirement based on a modeling language of a circuit system level model and the simulation data acquisition requirement;
converting the first language into a second language conforming to a preset execution rule;
executing the second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
and configuring a simulation tool in the circuit system level model based on the acquired information to model a circuit.
In some embodiments, the determining the first language corresponding to the simulated data acquisition requirement based on the modeling language of the circuitry-level model and the simulated data acquisition requirement includes:
generating a data acquisition instruction stream corresponding to the simulation data acquisition requirement based on the simulation data acquisition requirement and the modeling language;
generating an abstract syntax tree corresponding to the data acquisition instruction stream based on each piece of simulation data to be acquired in the data acquisition instruction stream and the acquisition relation among the pieces of simulation data;
constructing a computation flow graph based on each node in the abstract syntax tree, and taking the computation flow graph as the first language.
In some embodiments, after the constructing a computation flow graph based on each node in the abstract syntax tree, the method further comprises:
obtaining the number of the paths and the characteristics of the paths in the computation flow graph;
and sequencing each operation flow in the computation flow graph based on the number of paths and the path characteristics.
In some embodiments, the converting the first language into the second language conforming to the preset execution rule includes:
determining a first language conforming to the preset execution rule as a universal language, generating a first execution instruction corresponding to the universal language, and binding the first execution instruction with the universal language;
determining a first language which does not accord with the preset execution rule as a non-universal language, converting the non-universal language into a second language which accords with the preset execution rule, generating a second execution instruction corresponding to the second language, and binding the second execution instruction with the second language.
In some embodiments, the converting the non-generic language into a second language conforming to the preset execution rule includes:
determining a conversion rule of the non-universal language based on the association relation between the non-universal language and each piece of simulation data to be acquired, the simulation data acquisition requirement corresponding to the non-universal language and the preset execution rule;
and carrying out language conversion on the non-universal language based on the conversion rule to obtain a second language conforming to the preset execution rule.
In some embodiments, the performing language conversion on the non-generic language based on the conversion rule to obtain a second language conforming to the preset execution rule includes:
performing language conversion on the non-universal language based on the conversion rule to obtain an initial second language;
invoking a simulation program to verify the initial second language to obtain initial simulation data;
and taking the initial second language as the second language under the condition that the initial simulation data accords with an expected data range.
In some embodiments, the configuring a simulation tool in the circuitry-level model based on the acquired information includes:
extracting acquisition information in the simulation data acquisition process, wherein the acquisition information comprises interface information used by the simulation tool and a call path of process data;
and defining configuration parameters of the simulation tool based on the acquired information so as to configure the simulation tool.
In a second aspect, the present application provides a modeling simulation apparatus based on a circuitry-level model, including:
the receiving module is used for receiving the simulation data acquisition requirement of the user;
the determining module is used for determining a first language corresponding to the simulation data acquisition requirement based on a modeling language of the circuit system level model and the simulation data acquisition requirement;
the conversion module is used for converting the first language into a second language conforming to a preset execution rule;
the execution module is used for executing the second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
and the configuration module is used for configuring a simulation tool in the circuit system level model based on the acquired information so as to model a circuit.
In a third aspect, the present application provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
In a fourth aspect, the present application provides an electronic device comprising a memory having a computer program stored therein and a processor arranged to implement the above-described method when the program is executed by the computer program.
According to the modeling simulation method, device, medium and equipment based on the circuit system level model, the first language is determined through the modeling language and the simulation data acquisition requirement of the user, and the first language is converted into the second language, so that simulation data are obtained, and the acquisition efficiency of the simulation data is improved; by arranging the simulation tool in the circuit system level model, the simulation tool is configured according to the acquired information of the simulation data, and the circuit is modeled, so that the circuit system level model and the simulation are effectively combined, and the circuit modeling simulation efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the technical solutions of the present application or the prior art, the following description will briefly introduce the drawings used in the embodiments or the description of the prior art, and it is obvious that, in the following description, the drawings are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a modeling simulation method based on a circuit system level model according to an embodiment of the present application;
FIG. 2 is a second flow chart of a modeling simulation method based on a circuit system level model according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a modeling simulation device based on a circuit system level model according to an embodiment of the present application;
FIG. 4 is a second schematic structural diagram of a modeling simulation device based on a circuit system level model according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like herein are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules that are expressly listed or inherent to such process, method, article, or apparatus.
The modeling simulation method based on the circuit system level model is applicable to a terminal, and the terminal can be various electronic devices with a display screen and supporting web browsing, including but not limited to servers, smart phones, tablet computers, laptop portable computers, desktop computers and the like.
Fig. 1 is a schematic flow chart of a modeling simulation method based on a circuit system level model according to an embodiment of the present application, as shown in fig. 1, the method includes steps 110, 120, 130, 140 and 150. The method flow steps are only one possible implementation of the present application.
Step 110, receiving a simulation data acquisition requirement of a user.
Specifically, the execution subject of the modeling simulation method based on the circuit system level model provided in the embodiment of the present application is a modeling simulation device based on the circuit system level model, and the device may be a hardware device independently set in a terminal, or may be a software program running in the terminal. For example, when the terminal is a mobile phone, the modeling simulation device based on the circuit system level model may be embodied as an application program such as modeling simulation software in the mobile phone.
The simulation data acquisition requirement refers to requirements of a user on aspects of simulation data type, range, format, precision, time and the like which are determined according to requirements and need to be acquired in the current scene. The simulation data acquisition requirement can guide a modeling simulation device based on a circuit system level model to complete the acquisition work of simulation data.
The simulation data acquisition requirements are user-supplied. The simulation data acquisition requirements can include the to-be-acquired simulation data, association relations among the simulation data, and the like.
Step 120, determining a first language corresponding to the simulation data acquisition requirement based on the modeling language of the circuit system level model and the simulation data acquisition requirement.
In particular, a circuitry level model is a model used to describe and simulate circuitry. It can provide accurate modeling of the overall behavior and performance of the circuitry and support interactive and dynamic analysis of the various components in the circuitry. The circuitry-level model may describe the input, output, and internal operating mechanisms of the system by using equations, parameterized models, sub-modules, and the like.
The circuit system level model of the embodiment of the application comprises a simulation tool, so that the circuit system level model has a simulation function, a simulation environment can be constructed according to the simulation data acquisition requirement of a user, namely, a specific simulation execution flow is constructed, and therefore simulation data corresponding to the simulation data acquisition requirement is obtained.
The modeling language of the circuitry-level model is a system-level modeling language, which is the language used to describe the simulation system or process. The modeling language of the circuit system level model has built-in capability, and can conveniently embed description, definition and processing of simulation data and simulation instructions.
The first language is an intermediate file built by a modeling language that simulates data acquisition requirements and a circuitry level model. The first language may be a file of a data structure such as a flowchart.
Because the simulation data acquisition requirement is some requirement information, the modeling simulation device is difficult to identify specific requirements, and therefore the first language needs to be determined according to the simulation data acquisition requirement and the modeling language of the circuit system level model, so that the modeling simulation device can more accurately identify the requirement of a user on the simulation data acquisition.
Step 130, converting the first language into a second language conforming to a preset execution rule.
Specifically, the preset execution rules refer to predefined rules and procedures in the process of acquiring simulation data, and the predefined rules and procedures are used for judging whether the current language can directly generate corresponding instructions for execution.
The second language is a file which accords with a preset execution rule and can be directly bound with an execution instruction for execution.
The first language includes a plurality of operation flows, and flows which do not conform to the preset execution rules may exist in the operation flows, so that the part of flows need to be subjected to language conversion to obtain a second language which conforms to the preset execution rules.
For example, the flow description in the first language is simply two judgment logics, but the two judgment logics are difficult to directly execute, and the final judgment can be completed by disassembling the two judgment logics into a plurality of flow steps, so that the two judgment logics need to be converted into a plurality of directly executable steps, and the plurality of directly executable steps are the second languages corresponding to the part of the first languages.
The first language and the second language may both be an intermediate file, and other systems may call the first language and the second language, process them, and apply them in other scenarios.
And 140, executing a second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data.
Specifically, after the second language is obtained, an execution instruction of the second language may be executed, so as to obtain simulation data corresponding to the simulation data obtaining requirement.
The obtaining information is a specific execution step of executing the execution instruction of the second language by using a simulation tool for the current circuit system level model, and the specific execution step comprises the used interface information, the call path of the process data, the call data and the like.
The acquisition information of the simulation data can be acquired in real time in the execution process of the execution instruction, and the acquisition information of the simulation data can also be acquired after the execution is finished.
Step 150, configuring a simulation tool in the circuitry level model based on the acquired information to model the circuit.
In particular, the simulation tool may be configured to model the circuit based on the acquired information.
As a configuration language for the simulation tool, domain-specific language (Domain-Specific Language, DSL) may be used. DSL definition is carried out on the simulation tool according to the acquired information, and the circuit is modeled.
The modeling circuit system level model comprises a configured simulation tool corresponding to the current simulation data acquisition requirement, so that when the simulation data acquisition requirement is received again, the simulation data can be obtained directly through the simulation tool, and the simulation data acquisition requirement does not need to be processed again.
According to the modeling simulation method based on the circuit system level model, the first language is determined through the system level modeling language and the simulation data acquisition requirement of the user, and the first language is converted into the second language, so that simulation data are obtained, and the acquisition efficiency of the simulation data is improved; by arranging the simulation tool in the circuit system level model, the simulation tool is configured according to the acquired information of the simulation data, and the circuit is modeled, so that the circuit system level model and the simulation are effectively combined, and the modeling simulation efficiency of the circuit is improved.
It should be noted that each embodiment of the present application may be freely combined, permuted, or executed separately, and does not need to rely on or rely on a fixed execution sequence.
In some embodiments, step 120 comprises:
generating a data acquisition instruction stream corresponding to the simulation data acquisition demand based on the simulation data acquisition demand and the modeling language;
generating an abstract syntax tree corresponding to the data acquisition instruction stream based on each piece of simulation data to be acquired in the data acquisition instruction stream and the acquisition relation among the pieces of simulation data;
constructing a computation flow graph based on each node in the abstract syntax tree, and taking the computation flow graph as a first language.
After constructing the computation flow graph based on each node in the abstract syntax tree, the method further comprises:
obtaining the number of the channels and the characteristics of the channels in the computation flow graph;
the individual operational flows in the computational flow graph are ordered based on the number of paths and the characteristics of the paths.
Specifically, the data acquisition instruction stream is a data acquisition instruction set generated according to the simulation data acquisition requirement and the modeling language, and the set comprises at least one data acquisition instruction. Because the data acquisition instruction stream is user-provided, it may also be referred to as a user-layer instruction stream.
The data acquisition instruction stream comprises acquisition relations among the simulation data to be acquired, dependency relations among the execution steps and the like.
The simulation data to be acquired is the simulation data which is determined according to the simulation data acquisition requirement and needs to be acquired.
The data acquisition instruction stream may be parsed, and an abstract syntax tree (Abstract Syntax Tree, AST) corresponding to the data acquisition instruction stream may be generated according to the parsing result. Each node on the AST may be each executing step, or may be each simulation data to be acquired.
The computational flow graph is a file that includes a specific execution flow.
The computation flow graph can be constructed according to each node of the AST and the association relation among each node, and the computation flow graph is used as a first language.
The nodes in the computational flow graph may be globally ordered. Each node in the computational flow graph may be a specific operational step.
The operation steps can be converted into logical operators to finish judgment of logical relations, so that the number of paths and the characteristics of the paths in the computation flow graph are obtained. For example, when the determination result is true, it indicates that the logical path is established, that is, the operation path is established, and it indicates that the operation step is a path. The path characteristics may include path paths, path nodes, path execution durations, and the like.
Regardless of whether nesting exists in an AST, the nodes in the computation flow graph can be ordered in a global counting mode according to rows, and unique serial numbers of all variables and operation steps in the computation flow graph can be obtained through the number of paths and the characteristics of the paths in the computation flow graph, so that global ordering is completed.
The subsequent execution steps can be determined according to the sequencing result of each operation flow in the calculation flow chart, wherein part of the operation flows can also set specific operation time according to actual conditions.
According to the modeling simulation method based on the circuit system level model, the first language can be obtained by converting the simulation data acquisition requirement, the more definite operation steps for acquiring the simulation data are obtained, the acquisition of the simulation data is realized, and the acquisition accuracy of the simulation data is improved.
In some embodiments, step 130 comprises:
determining a first language conforming to a preset execution rule as a general language, generating a first execution instruction corresponding to the general language, and binding the first execution instruction with the general language;
determining the first language which does not accord with the preset execution rule as a non-universal language, converting the non-universal language into a second language which accords with the preset execution rule, generating a second execution instruction corresponding to the second language, and binding the second execution instruction with the second language.
Converting the non-universal language into a second language conforming to a preset execution rule, comprising:
determining a conversion rule of the non-universal language based on the association relation between the non-universal language and each piece of simulation data to be obtained, the simulation data obtaining requirement corresponding to the non-universal language and a preset execution rule;
and carrying out language conversion on the non-universal language based on the conversion rule to obtain a second language conforming to the preset execution rule.
Performing language conversion on the non-universal language based on the conversion rule to obtain a second language conforming to the preset execution rule, wherein the language conversion comprises the following steps:
performing language conversion on the non-universal language based on the conversion rule to obtain an initial second language;
calling a simulation program to verify the initial second language to obtain initial simulation data;
and taking the initial second language as the second language under the condition that the initial simulation data accords with the expected data range.
Specifically, because the first language is obtained by performing format conversion and logic conversion on the simulation data acquisition requirements, part of the first language is difficult to directly execute by the modeling simulation apparatus.
Therefore, the embodiment of the application sets the preset execution rule. The preset execution rule is a combination of various rules defined for the operation flow of the first language, and is used for judging whether the current operation flow in the first language is a flow which can be executed by a general modeling simulation device.
If the current operation flow in the first language accords with the preset execution rule, determining the first language part corresponding to the operation flow as a general language, wherein the general language is the current operation flow which accords with the preset execution rule. The method can directly generate the corresponding first execution instruction for the general language, and bind the first execution instruction with the general language so as to execute the current operation flow. The first language conforming to the preset execution rule can be directly used as the second language without conversion.
If the current operation flow in the first language does not accord with the preset execution rule, determining the first language part corresponding to the operation flow as a non-universal language. The non-generic language is the current operation flow which does not conform to the preset execution rules.
For non-universal languages, language conversion is required, i.e. the first language is rewritten to obtain the second language.
The conversion rule of the operation flow corresponding to the current non-universal language can be determined by rewriting the association relation between the template and the current operation flow and the acquired simulation data of each zone, the simulation data acquisition requirement corresponding to the current operation flow, the preset execution rule and the like for the data and the operation flow constraint condition recorded by the operation flow in the AST. And carrying out language conversion on the non-universal language according to the conversion rule to obtain an initial second language.
Simulation tests can be performed on the initial second language to verify whether the initial second language accords with preset execution rules and can be successfully executed. When simulation test is carried out, an external program or some application program interfaces (Application Programming Interface, API) can be appointed by a simulator, a simulation program corresponding to the rewritten second language is executed, initial simulation data are obtained, and if the initial simulation data accord with the expected data range, the initial second language is used as the second language; if not, continuing to execute the language conversion step until a second language meeting the expected data range and meeting the preset execution rule is obtained.
After the second language is obtained, a second execution instruction corresponding to the second language can be generated, and the second execution instruction is bound with the second language.
The new input-output data shape may be specified according to the data structure of the second language. After all the rewrites are completed and the simulation test is completed as needed, all the data that the computational flow graph needs to acquire are ready.
The grammar rules of the second language of the rewritten operation steps may be:
%result\_list<="operation_name"(%input\_list){attribute\_list}∶(input\_type\_list)→(output\_type\_list)
wherein, "operation_name" is the operation operator name of the operation flow; result_list is the calculation result item of operation_name; input_list is the input item of "operation_name"; an operation flow operation attribute list with attribute\list of 'operation_name'; input_type_list is the type and data form flag of the input item of "operation_name"; the output_type_list is the type and data morphology flag of the calculation result item of "operation_name".
In the embodiment of the application, the language conversion step can be repeatedly executed for a plurality of times and gradually added into the record table, so that the finally obtained second language can be bound with the execution instruction and executed.
According to the modeling simulation method based on the circuit system level model, the operation flow which can be directly executed can be obtained by converting the first language into the second language, and the acquisition efficiency of simulation data is improved.
In some embodiments, step 150 comprises:
extracting acquisition information in the process of acquiring simulation data, wherein the acquisition information comprises interface information used by a simulation tool and a call path of process data;
configuration parameters of the simulation tool are defined based on the acquired information to configure the simulation tool.
Specifically, after executing the execution instruction of the second language, each data to be acquired can be obtained, so that simulation data corresponding to the simulation data acquisition requirement can be output to the client. The execution instruction may be executed by a general target system or may be executed by an external system.
Call records of the simulation tool in the process of executing the second language execution instruction can be extracted, wherein the call records comprise interface information used by the simulation tool, call paths of the process data and the like. Obtaining the acquired information according to the call record.
Analyzing and judging the acquired information and simulation data, including analyzing call records, judging paths, defining configuration parameters of the simulation tool according to the acquired information, configuring the simulation tool, updating the configuration records of the simulation tool, and the like. This may be used to maintain an association between simulation tools and simulation data acquisition requirements so that the corresponding simulation tools can be correctly invoked during subsequent execution.
DSL definitions for each simulation tool can be obtained by compiling a circuitry-level model and retrieving information. And outputting DSL definition of the simulation tool to a user, wherein the DSL definition can be used for checking specific acquisition steps of simulation data, interface information used by the simulation tool, call paths of process data and the like. Simulation tools in the circuitry-level model may also be configured by DSL definition.
According to the modeling simulation method based on the circuit system level model, the simulation tool is configured, so that when the simulation data acquisition requirement is received again, the simulation data can be acquired directly according to the simulation tool corresponding to the simulation data acquisition requirement, and the acquisition efficiency of the simulation data is improved.
Fig. 2 is a second flow chart of a modeling simulation method based on a circuit system level model according to an embodiment of the present application, as shown in fig. 2, the method includes:
step 210, obtaining a user layer instruction stream according to the simulation data acquisition requirement of a user, and analyzing the user layer instruction stream to obtain an AST corresponding to the user layer instruction stream;
step 220, analyzing AST, and obtaining a first language according to the AST;
step 230, rewriting the first language to obtain a second language;
step 240, executing the execution instruction of the second language and extracting the call record, and outputting the simulation data and DSL definition of the simulation tool to the user.
According to the modeling simulation method based on the circuit system level model, the association relation between the simulation data to be acquired and the simulation data to be acquired can be obtained according to the simulation data acquisition requirement; the specific acquisition flow operation steps of the simulation data to be acquired can be obtained by rewriting the first language to obtain the second language, so that the acquisition efficiency of the simulation data is improved, the combination of modeling simulation of the circuit is realized, and the modeling simulation efficiency of the circuit is improved.
The modeling simulation device based on the circuit system level model provided in the embodiment of the application is described below, and the modeling simulation device based on the circuit system level model described below and the modeling simulation method based on the circuit system level model described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a modeling simulation apparatus based on a circuit system level model according to an embodiment of the present application, and as shown in fig. 3, the apparatus includes a receiving module 310, a determining module 320, a converting module 330, an executing module 340, and a configuring module 350.
The receiving module is used for receiving the simulation data acquisition requirement of the user;
the determining module is used for determining a first language corresponding to the simulation data acquisition requirement based on the modeling language of the circuit system level model and the simulation data acquisition requirement;
the conversion module is used for converting the first language into a second language conforming to a preset execution rule;
the execution module is used for executing the second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
and the configuration module is used for configuring a simulation tool in the circuit system level model based on the acquired information so as to model the circuit.
Specifically, according to an embodiment of the present application, any of the receiving module, the determining module, the converting module, the executing module, and the configuring module may be combined and implemented in one module, or any of the modules may be split into a plurality of modules.
Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module.
According to embodiments of the present application, at least one of the receiving module, determining module, converting module, executing module, and configuring module may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), programmable Logic Array (PLA), system on a chip, system on a substrate, system on a package, application Specific Integrated Circuit (ASIC), or by hardware or firmware, such as any other reasonable way of integrating or packaging the circuits, or in any one of or a suitable combination of three of software, hardware, and firmware.
Alternatively, at least one of the receiving module, the determining module, the converting module, the executing module and the configuring module may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
According to the modeling simulation device based on the circuit system level model, the first language is determined through the modeling language and the simulation data acquisition requirement of the user, and the first language is converted into the second language, so that simulation data are obtained, and the acquisition efficiency of the simulation data is improved; by arranging the simulation tool in the circuit system level model, the simulation tool is configured according to the acquired information of the simulation data, and the circuit is modeled, so that the circuit system level model and the simulation are effectively combined, and the circuit modeling simulation efficiency is improved.
In some embodiments, the determining module is specifically configured to:
generating a data acquisition instruction stream corresponding to the simulation data acquisition demand based on the simulation data acquisition demand and the system-level modeling language;
generating an abstract syntax tree corresponding to the data acquisition instruction stream based on each piece of simulation data to be acquired in the data acquisition instruction stream and the acquisition relation among the pieces of simulation data;
constructing a computation flow graph based on each node in the abstract syntax tree, and taking the computation flow graph as a first language.
In some embodiments, the determining module includes a sorting sub-module, the sorting sub-module being specifically configured to:
obtaining the number of the channels and the characteristics of the channels in the computation flow graph;
the individual operational flows in the computational flow graph are ordered based on the number of paths and the characteristics of the paths.
In some embodiments, the conversion module is specifically configured to:
determining a first language conforming to a preset execution rule as a general language, generating a first execution instruction corresponding to the general language, and binding the first execution instruction with the general language;
determining the first language which does not accord with the preset execution rule as a non-universal language, converting the non-universal language into a second language which accords with the preset execution rule, generating a second execution instruction corresponding to the second language, and binding the second execution instruction with the second language.
In some embodiments, the conversion module includes a rule submodule, specifically configured to:
determining a conversion rule of the non-universal language based on the association relation between the non-universal language and each piece of simulation data to be obtained, the simulation data obtaining requirement corresponding to the non-universal language and a preset execution rule;
and carrying out language conversion on the non-universal language based on the conversion rule to obtain a second language conforming to the preset execution rule.
In some embodiments, the conversion module further comprises a verification sub-module, the verification sub-module being specifically configured to:
performing language conversion on the non-universal language based on the conversion rule to obtain an initial second language;
calling a simulation program to verify the initial second language to obtain initial simulation data;
and taking the initial second language as the second language under the condition that the initial simulation data accords with the expected data range.
In some embodiments, the configuration module is specifically configured to:
extracting acquisition information in the process of acquiring simulation data, wherein the acquisition information comprises interface information used by a simulation tool and a call path of process data;
configuration parameters of the simulation tool are defined based on the acquired information to configure the simulation tool.
Fig. 4 is a second schematic structural diagram of a modeling simulation apparatus based on a circuit system level model according to an embodiment of the present application, as shown in fig. 4, the apparatus includes an parsing module 410, an analyzing module 420, a rewriting module 430, and a calculating and post-processing module 440.
The analysis module is used for obtaining a user layer instruction stream according to the simulation data acquisition requirement of the user, and analyzing the user layer instruction stream to obtain AST corresponding to the user layer instruction stream.
The analysis module is used for analyzing the AST and obtaining a first language according to the AST.
And the rewriting module is used for rewriting the first language to obtain a second language.
And the calculation and post-processing module is used for executing the execution instruction of the second language, extracting the call record and outputting simulation data and DSL definition of the simulation tool to the user.
It should be noted that, the modeling simulation device based on the circuit system level model provided in the embodiment of the present application can implement all the method steps implemented by the foregoing embodiment of the modeling simulation method based on the circuit system level model, and can achieve the same technical effects, and detailed descriptions of the same parts and beneficial effects as those of the method embodiment in the embodiment are omitted herein.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and as shown in fig. 5, the electronic device may include: processor (Processor) 510, communication interface (Communications Interface) 520, memory (Memory) 530, and communication bus (Communications Bus) 540, wherein Processor 510, communication interface 520, memory 530 complete communication with each other via communication bus 540. Processor 510 may invoke logic commands in memory 530 to perform the method described above, including:
receiving simulation data acquisition requirements of a user;
determining a first language corresponding to the simulation data acquisition requirement based on the modeling language of the circuit system level model and the simulation data acquisition requirement;
converting the first language into a second language conforming to a preset execution rule;
executing a second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
simulation tools in the circuitry-level model are configured to model the circuit based on the acquired information.
In addition, the logic commands in the memory described above may be implemented in the form of software functional modules and stored in a computer readable storage medium when sold or used as a stand alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several commands for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor in the electronic device provided by the embodiment of the present application may call the logic instruction in the memory to implement the above method, and the specific implementation manner of the processor is consistent with the implementation manner of the foregoing method, and may achieve the same beneficial effects, which are not described herein again.
The present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the methods provided by the above embodiments.
The specific embodiment is consistent with the foregoing method embodiment, and the same beneficial effects can be achieved, and will not be described herein.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A modeling simulation method based on a circuitry-level model, comprising:
receiving simulation data acquisition requirements of a user;
determining a first language corresponding to the simulation data acquisition requirement based on a modeling language of a circuit system level model and the simulation data acquisition requirement;
converting the first language into a second language conforming to a preset execution rule;
executing the second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
and configuring a simulation tool in the circuit system level model based on the acquired information to model a circuit.
2. The modeling simulation method based on a circuit system level model according to claim 1, wherein determining a first language corresponding to the simulation data acquisition requirement based on the modeling language of the circuit system level model and the simulation data acquisition requirement comprises:
generating a data acquisition instruction stream corresponding to the simulation data acquisition requirement based on the simulation data acquisition requirement and the modeling language;
generating an abstract syntax tree corresponding to the data acquisition instruction stream based on each piece of simulation data to be acquired in the data acquisition instruction stream and the acquisition relation among the pieces of simulation data;
constructing a computation flow graph based on each node in the abstract syntax tree, and taking the computation flow graph as the first language.
3. The modeling simulation method based on the circuitry-level model according to claim 2, wherein after the constructing a computation flow graph based on each node in the abstract syntax tree, further comprises:
obtaining the number of the paths and the characteristics of the paths in the computation flow graph;
and sequencing each operation flow in the computation flow graph based on the number of paths and the path characteristics.
4. The modeling simulation method based on a circuitry-level model according to claim 1, wherein the converting the first language into a second language conforming to a preset execution rule comprises:
determining a first language conforming to the preset execution rule as a universal language, generating a first execution instruction corresponding to the universal language, and binding the first execution instruction with the universal language;
determining a first language which does not accord with the preset execution rule as a non-universal language, converting the non-universal language into a second language which accords with the preset execution rule, generating a second execution instruction corresponding to the second language, and binding the second execution instruction with the second language.
5. The circuitry-level model-based modeling simulation method of claim 4, wherein the converting the non-generic language into a second language that conforms to the preset execution rules comprises:
determining a conversion rule of the non-universal language based on the association relation between the non-universal language and each piece of simulation data to be acquired, the simulation data acquisition requirement corresponding to the non-universal language and the preset execution rule;
and carrying out language conversion on the non-universal language based on the conversion rule to obtain a second language conforming to the preset execution rule.
6. The modeling simulation method based on the circuitry-level model according to claim 5, wherein the performing the language conversion on the non-generic language based on the conversion rule to obtain a second language conforming to the preset execution rule comprises:
performing language conversion on the non-universal language based on the conversion rule to obtain an initial second language;
invoking a simulation program to verify the initial second language to obtain initial simulation data;
and taking the initial second language as the second language under the condition that the initial simulation data accords with an expected data range.
7. The modeling simulation method based on the circuitry-level model according to claim 1, wherein configuring a simulation tool in the circuitry-level model based on the acquired information comprises:
extracting acquisition information in the simulation data acquisition process, wherein the acquisition information comprises interface information used by the simulation tool and a call path of process data;
and defining configuration parameters of the simulation tool based on the acquired information so as to configure the simulation tool.
8. A modeling simulation apparatus based on a circuitry-level model, comprising:
the receiving module is used for receiving the simulation data acquisition requirement of the user;
the determining module is used for determining a first language corresponding to the simulation data acquisition requirement based on a modeling language of the circuit system level model and the simulation data acquisition requirement;
the conversion module is used for converting the first language into a second language conforming to a preset execution rule;
the execution module is used for executing the second language to obtain simulation data corresponding to the simulation data acquisition requirement and acquisition information of the simulation data;
and the configuration module is used for configuring a simulation tool in the circuit system level model based on the acquired information so as to model a circuit.
9. A non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor implements the modeling simulation method based on a circuitry-level model according to any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the modeling simulation method based on the circuitry-level model of any of claims 1 to 7 by means of the computer program.
CN202311725533.1A 2023-12-14 Modeling simulation method, device, medium and equipment based on circuit system level model Active CN117892665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311725533.1A CN117892665B (en) 2023-12-14 Modeling simulation method, device, medium and equipment based on circuit system level model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311725533.1A CN117892665B (en) 2023-12-14 Modeling simulation method, device, medium and equipment based on circuit system level model

Publications (2)

Publication Number Publication Date
CN117892665A true CN117892665A (en) 2024-04-16
CN117892665B CN117892665B (en) 2024-09-24

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118211547A (en) * 2024-05-20 2024-06-18 山东云海国创云计算装备产业创新中心有限公司 Chip modeling simulation method, product, equipment and medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589736A (en) * 2015-12-21 2016-05-18 西安电子科技大学 Hardware description language simulation acceleration method based on net list segmentation and multithreading paralleling
CN107908830A (en) * 2017-10-26 2018-04-13 北京动力机械研究所 Model conversion method and model conversion system based on FMI standards
US20190227915A1 (en) * 2019-03-29 2019-07-25 Intel Corporation Programmatically generating software test libraries for functional safety
CN113253708A (en) * 2021-06-07 2021-08-13 卡斯柯信号(北京)有限公司 Method and device for automatically generating simulation tool configuration file for signal system test
WO2021258363A1 (en) * 2020-06-24 2021-12-30 华为技术有限公司 Circuit reliability analysis method and apparatus, storage medium, and electronic equipment
CN114416048A (en) * 2021-12-17 2022-04-29 北京机电工程研究所 Method and device for determining operation logic of UML model
WO2022110435A1 (en) * 2020-11-27 2022-06-02 中国电力科学研究院有限公司 Method, system and device for constructing power service simulation environment, and storage medium
CN114638184A (en) * 2022-05-23 2022-06-17 南昌大学 Gate-level circuit simulation method, system, storage medium and equipment
CN114818558A (en) * 2022-04-29 2022-07-29 湖南泛联新安信息科技有限公司 Signal waveform storage method for logic simulation system
CN116108777A (en) * 2022-12-13 2023-05-12 宁夏理工学院 Digital logic circuit simulation system and device based on HDL (hardware description language) of structure description mode
CN116954189A (en) * 2023-04-12 2023-10-27 中国电力科学研究院有限公司 Construction method of modularized and flexibly configured direct-current control protection test system
US20230376662A1 (en) * 2022-05-17 2023-11-23 Xilinx, Inc. Circuit simulation based on an rtl component in combination with behavioral components

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589736A (en) * 2015-12-21 2016-05-18 西安电子科技大学 Hardware description language simulation acceleration method based on net list segmentation and multithreading paralleling
CN107908830A (en) * 2017-10-26 2018-04-13 北京动力机械研究所 Model conversion method and model conversion system based on FMI standards
US20190227915A1 (en) * 2019-03-29 2019-07-25 Intel Corporation Programmatically generating software test libraries for functional safety
WO2021258363A1 (en) * 2020-06-24 2021-12-30 华为技术有限公司 Circuit reliability analysis method and apparatus, storage medium, and electronic equipment
WO2022110435A1 (en) * 2020-11-27 2022-06-02 中国电力科学研究院有限公司 Method, system and device for constructing power service simulation environment, and storage medium
CN113253708A (en) * 2021-06-07 2021-08-13 卡斯柯信号(北京)有限公司 Method and device for automatically generating simulation tool configuration file for signal system test
CN114416048A (en) * 2021-12-17 2022-04-29 北京机电工程研究所 Method and device for determining operation logic of UML model
CN114818558A (en) * 2022-04-29 2022-07-29 湖南泛联新安信息科技有限公司 Signal waveform storage method for logic simulation system
US20230376662A1 (en) * 2022-05-17 2023-11-23 Xilinx, Inc. Circuit simulation based on an rtl component in combination with behavioral components
CN114638184A (en) * 2022-05-23 2022-06-17 南昌大学 Gate-level circuit simulation method, system, storage medium and equipment
CN116108777A (en) * 2022-12-13 2023-05-12 宁夏理工学院 Digital logic circuit simulation system and device based on HDL (hardware description language) of structure description mode
CN116954189A (en) * 2023-04-12 2023-10-27 中国电力科学研究院有限公司 Construction method of modularized and flexibly configured direct-current control protection test system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
康瑛;王莹;张永波;张荣佳;: "CRH3型动车组充电机半实物仿真系统", 机械制造与自动化, no. 05, 20 October 2020 (2020-10-20) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118211547A (en) * 2024-05-20 2024-06-18 山东云海国创云计算装备产业创新中心有限公司 Chip modeling simulation method, product, equipment and medium
CN118211547B (en) * 2024-05-20 2024-08-09 山东云海国创云计算装备产业创新中心有限公司 Chip modeling simulation method, product, equipment and medium

Similar Documents

Publication Publication Date Title
CN110008113B (en) Test method and device and electronic equipment
CN107451663B (en) Algorithm componentization, modeling method and device based on algorithm components and electronic equipment
CN112819153B (en) Model transformation method and device
CN109101415A (en) Interface test method, system, equipment and the storage medium compared based on database
CA2913884A1 (en) Integrated automated test case generation for safety-critical software
JP2007012003A (en) System for providing development environment of feature-oriented software product line
CN111859834B (en) UVM-based verification platform development method, system, terminal and storage medium
CN112560401A (en) Verilog file conversion method, device, storage medium and equipment
CN114003451B (en) Interface testing method, device, system and medium
CN113268243B (en) Memory prediction method and device, storage medium and electronic equipment
CN106202685A (en) A kind of software and hardware cooperating simulation accelerator operation environmental structure method and apparatus
CN111767217A (en) JS unit test case generation method and device
CN107797805B (en) Code packaging method and device and computer readable storage medium
CN115563019A (en) UVM and C combined verification method and system
US9619598B2 (en) Input space reduction for verification test set generation
CN114626330A (en) Simulation method and device for digital-analog hybrid circuit
CN114201397A (en) Interface test modeling method and device, electronic equipment and storage medium
CN111506362B (en) Processing method, device, storage medium and system for configuration form of game
CN110928535B (en) Derived variable deployment method, device, equipment and readable storage medium
CN117892665B (en) Modeling simulation method, device, medium and equipment based on circuit system level model
CN112732237A (en) Method and system for constructing code-free development technology model
CN109299005B (en) Test script generation method and device
CN117892665A (en) Modeling simulation method, device, medium and equipment based on circuit system level model
CN107506299B (en) Code analysis method and terminal equipment
CN110895460A (en) Jenkins-based robot system integration method and device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant