File generation method and device, electronic equipment and storage medium

文档序号:8224 发布日期:2021-09-17 浏览:58次 中文

1. A file generation method, comprising:

acquiring a general configuration file of a current chip subsystem and information description files aiming at different chip subsystems;

generating a condition constraint set for low power consumption design of the current chip subsystem by analyzing the general configuration file, wherein the condition constraint set is used for indicating the requirements of different low power consumption design stages on a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

and filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

2. The method of claim 1, wherein populating a file template of a power consumption intent file based on the set of conditional constraints and the power consumption policy information, generating the power consumption intent file, comprises:

determining target power consumption strategy information required by low power consumption design of the current chip subsystem from the power consumption strategy information based on the condition constraint set;

and filling a file template of a power consumption intention file based on the condition constraint set and the target power consumption strategy information to generate the power consumption intention file.

3. The method of claim 2, wherein the populating a file template of a power consumption intent file based on the set of conditional constraints and the target power consumption policy information, generating the power consumption intent file, comprises:

determining template contents to be filled from the file template based on the conditional constraint set and the target power consumption strategy information;

filling the template content by using the target power consumption strategy information;

and generating the power consumption intention file based on the filled template content.

4. The method of claim 3, wherein the populating the template content with the target power consumption policy information comprises:

performing target operation processing on the target power consumption strategy information based on the template content to generate processed target power consumption strategy information; the target operation processing comprises at least one of data format conversion, data statistics and data calculation;

and filling the template content by using the processed target power consumption strategy information.

5. The method according to any one of claims 1 to 4, wherein the set of conditional constraints comprises one or more of the following:

global macro variables, design types, tool types, module instantiation mapping relations and power supply lists.

6. The method according to any one of claims 1 to 5, wherein the power consumption policy information comprises one or more of the following information:

the method comprises the following steps of power domain declaration information, power domain integration information, port power domain information, power switch information, power mode information, power isolation strategy information, level shift strategy information, power retention strategy information, increment design information and post-processing information.

7. The method according to any one of claims 1 to 6, wherein the obtaining of the common configuration file of the current chip subsystem and the information description file for different chip subsystems comprises:

acquiring a general configuration file of a current chip subsystem;

and acquiring the information description file from a target storage position corresponding to the access path according to the access path indicated in the general configuration file.

8. The method of any of claims 1 to 7, wherein after generating the power consumption intention file, the method further comprises:

and updating the power consumption intention file in response to the updated information of the user aiming at the power consumption intention file.

9. A file generation apparatus, comprising:

the acquisition module is used for acquiring a general configuration file of the current chip subsystem and information description files aiming at different chip subsystems;

the analysis module is used for generating a condition constraint set for carrying out low-power-consumption design on the current chip subsystem by analyzing the general configuration file, and the condition constraint set is used for indicating the requirements of different low-power-consumption design stages on a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

and the generating module is used for filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the file generation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the file generation method according to one of claims 1 to 8.

Background

With the continuous expansion of chip design scale, the functions of the chip are more and more abundant. In order to meet the practical demands of the chip market, the low power design of the chip is receiving more and more attention. In which, power consumption intention description may be introduced in an early stage of System on chip (SoC) development to support the whole process of development of low power consumption design, verification, synthesis, layout and wiring of a chip.

Generally, in order to describe a low power consumption architecture of an SoC, descriptions of various power domain types, power domain boundaries and power consumption scenes need to be provided for a chip, and then a power consumption intention file can be generated manually by a professional engineer. However, in the above-described manner in which the professional engineer writes the power consumption intention file, a writing error is likely to occur, and the generation efficiency is low.

Disclosure of Invention

In view of the above, the present disclosure provides at least a file generation method, a file generation apparatus, an electronic device, and a storage medium.

In a first aspect, the present disclosure provides a file generation method, including:

acquiring a general configuration file of a current chip subsystem and information description files aiming at different chip subsystems;

generating a condition constraint set for low power consumption design of the current chip subsystem by analyzing the general configuration file, wherein the condition constraint set is used for indicating the requirements of different low power consumption design stages on a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

and filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

In the method, a condition constraint set for low-power consumption design of the current chip subsystem is generated by analyzing the general configuration file, and the condition constraint set is used for indicating the requirements of different low-power consumption design stages on the power consumption intention description file, namely the design requirements of the power consumption intention description file of the current chip subsystem can be determined according to the condition constraint set; the information description file can be analyzed to generate power consumption strategy information for low power consumption design of different chip subsystems; and then, the file template of the power consumption intention file can be filled based on the condition constraint set and the power consumption strategy information, the power consumption intention file can be automatically generated, a professional engineer is not required to compile the power consumption intention file, the generation efficiency of the power consumption intention file is improved, the situation of compiling errors caused when the professional engineer compiles the power consumption intention file can be relieved, and the accuracy of the power consumption intention file is improved.

In one possible embodiment, the populating a file template of a power consumption intention file based on the conditional constraint set and the power consumption policy information to generate the power consumption intention file includes:

determining target power consumption strategy information required by low power consumption design of the current chip subsystem from the power consumption strategy information based on the condition constraint set;

and filling a file template of a power consumption intention file based on the condition constraint set and the target power consumption strategy information to generate the power consumption intention file.

Here, the power consumption policy information may include power consumption policy information required for low power consumption design of different chip subsystems, so that when the low power consumption design of different chip subsystems is performed, the power consumption policy information matched with each chip subsystem may be directly determined from the analyzed power consumption policy information, and the information description file does not need to be analyzed for multiple times, thereby improving file generation efficiency, and simultaneously avoiding resource waste caused when the information description file is analyzed for multiple times, and saving processing resources.

In one possible embodiment, the populating a file template of a power consumption intention file based on the conditional constraint set and the target power consumption policy information to generate the power consumption intention file includes:

determining template contents to be filled from the file template based on the conditional constraint set and the target power consumption strategy information;

filling the template content by using the target power consumption strategy information;

and generating the power consumption intention file based on the filled template content.

In the method, the file template may include a plurality of template contents, and each template content corresponds to different power consumption policy information and/or conditional constraint combination, so that the template content to be filled may be determined from the file template based on the conditional constraint set and the target power consumption policy information; filling template contents by using the target power consumption strategy information; and then, based on the filled template content, a power consumption intention file is generated, the generation process of the power consumption intention file is simple and convenient, and the efficiency is high.

In one possible embodiment, the populating the template content with the target power consumption policy information includes:

performing target operation processing on the target power consumption strategy information based on the template content to generate processed target power consumption strategy information; the target operation processing comprises at least one of data format conversion, data statistics and data calculation;

and filling the template content by using the processed target power consumption strategy information.

In one possible embodiment, the set of conditional constraints includes one or more of the following:

global macro variables, design types, tool types, module instantiation mapping relations and power supply lists.

In one possible embodiment, the power consumption policy information includes one or more of the following information:

the method comprises the following steps of power domain declaration information, power domain integration information, port power domain information, power switch information, power mode information, power isolation strategy information, level shift strategy information, power retention strategy information, increment design information and post-processing information.

In a possible embodiment, the obtaining a common configuration file of a current chip subsystem and an information description file for a different chip subsystem includes:

acquiring a general configuration file of a current chip subsystem;

and acquiring the information description file from a target storage position corresponding to the access path according to the access path indicated in the general configuration file.

Here, by setting the access path corresponding to the information description file in the general configuration file, after the general configuration file is acquired, the information description file can be acquired more quickly according to the access path, transmission of the information description file is not required, and the acquisition process is more convenient.

In one possible embodiment, after generating the power consumption intention file, the method further includes:

and updating the power consumption intention file in response to the updated information of the user aiming at the power consumption intention file.

The power consumption intention file can be updated in response to the updating information of the user aiming at the power consumption intention file after the power consumption intention file is generated, so that the power consumption intention file can be flexibly modified to be suitable for different chip design requirements, and the diversity and the flexibility of file generation are improved.

The following descriptions of the effects of the apparatus, the electronic device, and the like refer to the description of the above method, and are not repeated here.

In a second aspect, the present disclosure provides a file generating apparatus, including:

the acquisition module is used for acquiring a general configuration file of the current chip subsystem and information description files aiming at different chip subsystems;

the analysis module is used for generating a condition constraint set for carrying out low-power-consumption design on the current chip subsystem by analyzing the general configuration file, and the condition constraint set is used for indicating the requirements of different low-power-consumption design stages on a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

and the generating module is used for filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

In a possible implementation manner, the generating module, when populating a file template of a power consumption intention file based on the conditional constraint set and the power consumption policy information to generate the power consumption intention file, is configured to:

determining target power consumption strategy information required by low power consumption design of the current chip subsystem from the power consumption strategy information based on the condition constraint set;

and filling a file template of a power consumption intention file based on the condition constraint set and the target power consumption strategy information to generate the power consumption intention file.

In one possible embodiment, the generating module, when generating the power consumption intention file by populating a file template of the power consumption intention file based on the conditional constraint set and the target power consumption policy information, is configured to:

determining template contents to be filled from the file template based on the conditional constraint set and the target power consumption strategy information;

filling the template content by using the target power consumption strategy information;

and generating the power consumption intention file based on the filled template content.

In one possible implementation, the generating module, when populating the template content with the target power consumption policy information, is configured to:

performing target operation processing on the target power consumption strategy information based on the template content to generate processed target power consumption strategy information; the target operation processing comprises at least one of data format conversion, data statistics and data calculation;

and filling the template content by using the processed target power consumption strategy information.

In one possible embodiment, the set of conditional constraints includes one or more of the following: global macro variables, design types, tool types, module instantiation mapping relations and power supply lists.

In one possible embodiment, the power consumption policy information includes one or more of the following information:

the method comprises the following steps of power domain declaration information, power domain integration information, port power domain information, power switch information, power mode information, power isolation strategy information, level shift strategy information, power retention strategy information, increment design information and post-processing information.

In a possible implementation manner, the obtaining module, when obtaining the common configuration file of the current chip subsystem and the information description file for different chip subsystems, is configured to:

acquiring a general configuration file of a current chip subsystem;

and acquiring the information description file from a target storage position corresponding to the access path according to the access path indicated in the general configuration file.

In one possible embodiment, after generating the power consumption intention file, the apparatus further includes: an update module to:

and updating the power consumption intention file in response to the updated information of the user aiming at the power consumption intention file.

In a third aspect, the present disclosure provides an electronic device comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the file generation method according to the first aspect or any one of the embodiments.

In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the file generation method according to the first aspect or any one of the embodiments.

In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.

Fig. 1 is a schematic flowchart illustrating a file generation method provided by an embodiment of the present disclosure;

fig. 2 is a schematic flowchart illustrating a specific manner of generating a power consumption intention file in a file generation method provided by an embodiment of the present disclosure;

FIG. 3 is a flowchart illustrating a file generation method according to an embodiment of the disclosure;

FIG. 4 is a schematic diagram illustrating an architecture of a file generation apparatus provided in an embodiment of the present disclosure;

fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.

In order to describe the low Power architecture of the SoC, descriptions of various Power domain types, Power domain boundaries, and Power consumption scenes need to be provided for the chip, and then a Power consumption intention file can be manually written by a professional engineer using a Common Power Format (CPF) or a Unified Power Format (UPF). However, in the above-described manner in which the professional engineer writes the power consumption intention file, a writing error is likely to occur, and the generation efficiency is low.

Meanwhile, the SoC is composed of a plurality of chip subsystems, and in the low-power design, each chip subsystem needs to introduce a low-power design, that is, a corresponding power consumption intention file needs to be generated for each chip subsystem. Because the CPF and the UPF have multiple iterative versions, the versions of the power consumption intention files provided by each chip subsystem may be inconsistent, and the difficulty of the overall low power consumption design of the chip is increased.

In the whole chip development process, the power consumption intention files in different design stages have certain differences, and after the corresponding power consumption intention file is generated for each design stage, the problem that the file formats and the design contents of the power consumption intention files in different design stages are inconsistent can occur, so that the difficulty is increased for the overall low-power-consumption design of a subsequent chip.

In order to alleviate the above problem, embodiments of the present disclosure provide a file generation method and apparatus, an electronic device, and a storage medium.

The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

For the convenience of understanding the embodiments of the present disclosure, a document generation method disclosed in the embodiments of the present disclosure will be described in detail first. An execution subject of the file generation method provided by the embodiment of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a Personal Digital Assistant (PDA), a computing device, or a server or other processing device. In some possible implementations, the file generation method may be implemented by a processor calling computer readable instructions stored in a memory.

Referring to fig. 1, a schematic flow diagram of a file generation method provided in the embodiment of the present disclosure is shown, where the method includes S101-S103, where:

s101, acquiring a general configuration file of a current chip subsystem and information description files aiming at different chip subsystems;

s102, generating a condition constraint set for low-power-consumption design of the current chip subsystem by analyzing the general configuration file, wherein the condition constraint set is used for indicating the requirements of different low-power-consumption design stages on power consumption intention description files; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

s103, filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information, and generating the power consumption intention file.

In the method, a condition constraint set for low-power consumption design of the current chip subsystem is generated by analyzing the general configuration file, and the condition constraint set is used for indicating the requirements of different low-power consumption design stages on the power consumption intention description file, namely the design requirements of the power consumption intention description file of the current chip subsystem can be determined according to the condition constraint set; the information description file can be analyzed to generate power consumption strategy information for low power consumption design of different chip subsystems; and then, the file template of the power consumption intention file can be filled based on the condition constraint set and the power consumption strategy information, the power consumption intention file can be automatically generated, a professional engineer is not required to compile the power consumption intention file, the generation efficiency of the power consumption intention file is improved, the situation of compiling errors caused when the professional engineer compiles the power consumption intention file can be relieved, and the accuracy of the power consumption intention file is improved.

S101 to S103 will be specifically described below.

For S101:

the common configuration file may be a file capable of representing a data structure, for example, the common configuration file may be a JSON file. The current design stage of the current chip subsystem, the types of tools which can be used by the current chip subsystem in the current design stage, the types of generated power consumption intention files and the like can be clear through the general configuration file. For each design stage, a corresponding power consumption intention file needs to be designed for each chip subsystem. For example, the following information may be included in the general configuration file: the type of the information description file; the information describes an access path corresponding to the file; the design type is as follows: rtl, netlist, …; tool type: icc, vcs, …; macro variables defined: m1, M2, and the like.

The information description file may be a file having spreadsheet characteristics, for example, the information description file may be a spreadsheet, a database, a comma score file, or the like. The information description file may include all description information required when the power consumption intention file is designed for different chip subsystems in each design stage, so that the information description file can completely describe a low power consumption strategy of the whole SoC system. For example, when the information description file is a spreadsheet, the information description file may include one or more of the following spreadsheets: an integration map page for power consumption intent, a power domain page, a power domain port page, a power mode page, a power isolation page, a level shift page, a power reserve page, and a post-processing page, among others.

The specific contents of the integrated mapping page for power consumption intention are shown in table 1 below:

table 1 integration mapping page

In implementation, the SoC is formed by a plurality of chip subsystems, and each chip subsystem can be divided into a plurality of modules. The integration mapping page shown in table 1 includes a level, an instantiation path, a module name, a module power domain, and a current system power domain. The level may be used to describe a level of a corresponding module, the instantiated path may be instantiated path information corresponding to the module, the module power domain may be used to describe power domain information corresponding to the module, and the current system power domain may be used to describe power domain information corresponding to the current chip subsystem.

The specific contents of the power domain page are shown in table 2 below:

TABLE 2 Power Domain Page

The power domain page shown in table 2 includes power domains, power lines, ground lines, power domain types, parent power domains, control information, shutdown conditions, and switch units of the library.

The specific contents of the power domain port page are shown in table 3 below:

TABLE 3 Power Domain Port Page

The power domain port page of table 3 includes instantiations of modules, power domain 1, power domain 2, power domain 3, …, module ports, etc.; that is, the name of the instance of power domain 1, the name of the instance of power domain 2, etc. included under any module may be determined, and the name of the instance of power domain 1, the name of the instance of power domain 2, etc. included under any module port may be determined.

The details of the power mode page are shown in table 4 below:

TABLE 4 Power mode Page

The power mode page in table 4 includes the corresponding relationship between the power domains and the power modes, for example, the on/off states of each power domain may be determined when the power mode is mode 1; the switching state of each power domain when the power mode is mode 2, etc.

The specific contents of the power isolation page are shown in table 5 below:

TABLE 5 Power isolation Page

The power isolation page in table 5 includes the isolation policy name, the departure power domain, the arrival power domain, the location, the clamp value, the isolation control, the isolated port name, and the isolation unit of the library.

The details of the level-shifted page are shown in table 6 below:

TABLE 6 level Shift Page

The level shift page in table 6 includes a level shift policy name, a departure power domain, an arrival power domain, a location, a level shift type, a port name of a level shift, and a level shift unit of the library.

The details of the power reserve page are shown in table 7 below:

TABLE 7 Power Retention Page

The power reserve page in Table 7 includes elements for the power reserve policy name, the power domain to which power is to be removed, the set of alternate supplies, the registers involved, the control signals for the policy, and the register reserve values for the banks.

The details of the post-treatment pages are shown in table 8 below:

TABLE 8 post-processing pages

The post-processing page of table 8 may include an execution command of the customized tool, a file of processing, and the like.

In an alternative embodiment, obtaining a common configuration file of a current chip subsystem and an information description file for a different chip subsystem includes:

s1011, acquiring a general configuration file of the current chip subsystem;

and S1012, acquiring an information description file from a target storage position corresponding to the access path according to the access path indicated in the general configuration file.

Here, after the general configuration file of the current chip subsystem is acquired, according to the access path indicated in the general configuration file, the information description file may be acquired from the target storage location corresponding to the access path, and the information description file may be stored in the determined dynamic storage, so as to perform the subsequent parsing processing.

Here, by setting the access path corresponding to the information description file in the general configuration file, after the general configuration file is acquired, the information description file can be acquired more quickly according to the access path, transmission of the information description file is not required, and the acquisition process is more convenient.

For S102:

the general configuration file can be analyzed to generate a conditional constraint combination for low power consumption design of the current chip subsystem, wherein the conditional constraint set comprises one or more of the following: global macro variables, design types, tool types, mapping relations of module instantiations, power lists and additional files.

In implementation, the global macro variable may be used to analyze the information description file, for example, a variable corresponding to the macro variable M1 may be set as b in the information description file, and conversely, a corresponding variable is x; further, when finding that the macro variable M1 exists after analyzing the general configuration file, selecting the variable b; in the absence of the macrovariable M1, the variable x is selected. The design type can be used for limiting the output of the design grammar, namely, the template content matched with the design type can be selected from the file template for filling and outputting; the tool type can be used for limiting the output of tool grammar, namely, the template content matched with the tool type can be selected from the file template for filling and outputting.

The mapping relation of module instantiation can be used for solving the situation of instantiation inconsistency among netlists, for example, when different modules are used for power consumption design, names of the same port or the same power domain may be inconsistent, and the mapping relation of module instantiation can solve the problem of instantiation inconsistency. The power supply list may be used to set the operating voltage and range of the power supply. The additional file is used for adding some extra content to the generated power consumption intention file, and the extra content can be content designed by a user according to chip requirements, for example, the additional file can include test content, timing content and the like. Wherein the additional files can be designed according to the needs.

And the information description file can be analyzed to generate power consumption strategy information for low power consumption design of different chip subsystems. The power consumption policy information may include power consumption policy information required by each chip subsystem. Furthermore, when the power consumption intention file corresponding to each chip subsystem is determined, the information description file does not need to be analyzed for many times, resource waste caused by the analysis process of the information description file for many times is avoided, and the file generation efficiency can be improved.

Wherein the power consumption policy information includes one or more of the following information: the method comprises the following steps of power domain declaration information, power domain integration information, port power domain information, power switch information, power mode information, power isolation strategy information, level shift strategy information, power retention strategy information, increment design information and post-processing information.

In implementation, the declaration information of the power domain may include basic information such as the type of the power domain, the switching time of the power domain, and the ground line of the power domain. The integration information of the power domain may include a connection relationship of the power domain, a power connection relationship between the module and the constituent subsystems, and the like. The power domain information of the port includes a power domain corresponding to each port, a power domain type, and the like. The information of the power switch may include the time the switch of the power supply is in an on state, the time in an off state, what power is input to the switch, what power is output, and the like. The information of the power modes may include a corresponding switch state of the power domain in each power mode. The information of the power isolation policy, the information of the level shift policy, and the information of the power retention policy can be seen from tables 5, 6, and 7. The incremental design information may be additional information designed by the user according to the chip requirements, which is specifically shown in table 8. The post-processing information may update the defined information on the generated power consumption intention file after the power consumption intention file is generated.

For S103:

here, a file template corresponding to the power consumption intention file may be set in advance. The power consumption intention file may be in a CPF format, a UPF format, or other description format, among others. For example, when the power consumption intention file is in the CPF format, the file template is a file template in the CPF format. When the power consumption intention file is in a UPF format, the file template is in the UPF format. And then filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

In an alternative embodiment, referring to fig. 2, the populating a file template of the power consumption intention file based on the conditional constraint set and the power consumption policy information to generate the power consumption intention file may include:

s201, determining target power consumption strategy information required by low power consumption design of a current chip subsystem from the power consumption strategy information based on a condition constraint set;

s202, filling a file template of the power consumption intention file based on the condition constraint set and the target power consumption strategy information, and generating the power consumption intention file.

Here, the power consumption policy information may include power consumption policy information required for low power consumption design of different chip subsystems in each design stage, so that when low power consumption design is performed on different chip subsystems in each design stage, power consumption policy information matched with each chip subsystem may be directly determined from the analyzed power consumption policy information, and an information description file does not need to be analyzed for multiple times, thereby improving file generation efficiency, and simultaneously avoiding resource waste caused by analyzing the information description file for multiple times, and saving processing resources.

Because the power consumption policy information includes power consumption policy information required for low power consumption design of each chip subsystem, the target power consumption policy information corresponding to the current chip subsystem needs to be determined from the power consumption policy information according to the condition constraint set. For example, the current design stage corresponding to the current chip subsystem may be determined according to the conditional constraint set, and then the target power consumption policy information required by the current design stage of the current chip subsystem may be selected from the power consumption policy information. And filling a file template based on the condition constraint condition and the target power consumption strategy information to generate a power consumption intention file.

In an alternative embodiment, in S202, based on the conditional constraint set and the target power consumption policy information, populating a file template of the power consumption intention file, and generating the power consumption intention file may include:

s2021, determining template contents to be filled from the file template based on the condition constraint set and the target power consumption strategy information;

s2022, filling template contents by using the target power consumption strategy information;

s2023, generating a power consumption intention file based on the filled template content.

In the method, the file template may include a plurality of template contents, and each template content corresponds to different power consumption policy information and/or conditional constraint combination, so that the template content to be filled may be determined from the file template based on the conditional constraint set and the target power consumption policy information; filling template contents by using the target power consumption strategy information; and then, based on the filled template content, a power consumption intention file is generated, the generation process of the power consumption intention file is simple and convenient, and the efficiency is high.

Here, the file template includes a content set corresponding to each power consumption policy information, and the content set corresponding to each power consumption policy information includes template contents corresponding to different design types, different tool types, or the like. Therefore, the template content matched with the conditional constraint set and the target power consumption strategy information can be selected from the file template to be used as the template content to be filled. For example, the template content one may correspond to the tool type of the icc in the power domain, the template content two may correspond to the tool type of the vcs in the power domain, the template content three may correspond to the tool type of the icc in the power switch, and the template content four may correspond to the tool type of the vcs in the power switch, so that the target power consumption policy information includes the power domain, and when the condition constraint set includes the tool type of the icc, the template content one may be used as the template content to be filled.

In implementation, the target power consumption policy information may be used to fill template contents, for example, module names in the template contents are: xxx, the module name in the target power consumption policy information is: and the module I can be filled into the determined template content to generate the filled template content.

In an alternative embodiment, in S2022, populating the template content with the target power consumption policy information may include:

firstly, performing target operation processing on target power consumption strategy information based on template content to generate processed target power consumption strategy information; the target operation processing comprises at least one of data format conversion, data statistics and data calculation;

and step two, filling template contents by using the processed target power consumption strategy information.

Here, the target power consumption policy information may be subjected to the target operation processing based on the template content, for example, when the template content is xx-xx, the target power consumption policy information may be subjected to data format conversion to be converted into xx-xx format, and the processed target power consumption policy information may be filled into the template content to generate the filled template content. Alternatively, the template content includes: a maximum value; a conventional value; and the minimum value can be subjected to data statistics on the target power consumption strategy information, the maximum value of the voltage, the conventional value of the voltage and the minimum value of the voltage are determined, and the maximum value, the conventional value and the minimum value are filled into the template content to generate the filled template content. Or, data calculation may be performed on the target power consumption policy information according to the template content, for example, input and output of the power domain are determined by calculation, and the template content is filled according to the calculation result.

And finally, generating a power consumption intention file according to the filled template content. For example, the filled template content may be stored in an initialization file to generate a power consumption intention file.

In an alternative embodiment, after generating the power consumption intent file, the method further comprises: and updating the power consumption intention file in response to the updated information of the user aiming at the power consumption intention file.

Here, the user may design corresponding update information for the power consumption intention file, for example, the update information may be information for performing a refinement process on the power consumption intention file, so the power consumption intention file may be updated in response to the update information for the power consumption intention file.

The power consumption intention file can be updated in response to the updating information of the user aiming at the power consumption intention file after the power consumption intention file is generated, so that the power consumption intention file can be flexibly modified to be suitable for different chip design requirements, and the diversity and the flexibility of file generation are improved.

Referring to fig. 3, a general configuration file (i.e., the configuration file in fig. 3) and an information description file (i.e., the spreadsheet in fig. 3) may be obtained, and the general configuration file and the information description file may be parsed by using an edited parsing tool (i.e., the program in fig. 3), so as to obtain a conditional constraint set and power consumption policy information; and filling a file template based on the condition constraint set and the power consumption strategy information to generate a power consumption intention file.

It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.

Based on the same concept, an embodiment of the present disclosure further provides a file generating apparatus, as shown in fig. 4, an architecture diagram of the file generating apparatus provided in the embodiment of the present disclosure includes an obtaining module 401, an analyzing module 402, and a generating module 403, specifically:

an obtaining module 401, configured to obtain a general configuration file of a current chip subsystem and information description files for different chip subsystems;

an analyzing module 402, configured to generate a conditional constraint set for performing low power consumption design on the current chip subsystem by analyzing the general configuration file, where the conditional constraint set is used to indicate requirements of different low power consumption design stages for a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

a generating module 403, configured to fill a file template of the power consumption intention file based on the condition constraint set and the power consumption policy information, and generate the power consumption intention file.

In a possible implementation manner, the generating module 403, when generating the power consumption intention file by populating a file template of the power consumption intention file based on the conditional constraint set and the power consumption policy information, is configured to:

determining target power consumption strategy information required by low power consumption design of the current chip subsystem from the power consumption strategy information based on the condition constraint set;

and filling a file template of a power consumption intention file based on the condition constraint set and the target power consumption strategy information to generate the power consumption intention file.

In a possible implementation manner, the generating module 403, when generating the power consumption intention file by populating a file template of the power consumption intention file based on the conditional constraint set and the target power consumption policy information, is configured to:

determining template contents to be filled from the file template based on the conditional constraint set and the target power consumption strategy information;

filling the template content by using the target power consumption strategy information;

and generating the power consumption intention file based on the filled template content.

In a possible implementation manner, the generating module 403, when populating the template content with the target power consumption policy information, is configured to:

performing target operation processing on the target power consumption strategy information based on the template content to generate processed target power consumption strategy information; the target operation processing comprises at least one of data format conversion, data statistics and data calculation;

and filling the template content by using the processed target power consumption strategy information.

In one possible embodiment, the set of conditional constraints includes one or more of the following: global macro variables, design types, tool types, module instantiation mapping relations and power supply lists.

In one possible embodiment, the power consumption policy information includes one or more of the following information:

the method comprises the following steps of power domain declaration information, power domain integration information, port power domain information, power switch information, power mode information, power isolation strategy information, level shift strategy information, power retention strategy information, increment design information and post-processing information.

In a possible implementation manner, the obtaining module 401, when obtaining the common configuration file of the current chip subsystem and the information description file for different chip subsystems, is configured to:

acquiring a general configuration file of a current chip subsystem;

and acquiring the information description file from a target storage position corresponding to the access path according to the access path indicated in the general configuration file.

In one possible embodiment, after generating the power consumption intention file, the apparatus further includes: an update module 404 configured to:

and updating the power consumption intention file in response to the updated information of the user aiming at the power consumption intention file.

In some embodiments, the functions of the apparatus provided in the embodiments of the present disclosure or the included templates may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, no further description is provided here.

Based on the same technical concept, the embodiment of the disclosure also provides an electronic device. Referring to fig. 5, a schematic structural diagram of an electronic device provided in the embodiment of the present disclosure includes a processor 501, a memory 502, and a bus 503. The memory 502 is used for storing execution instructions and includes a memory 5021 and an external memory 5022; the memory 5021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 501 and data exchanged with an external storage 5022 such as a hard disk, the processor 501 exchanges data with the external storage 5022 through the memory 5021, and when the electronic device 500 operates, the processor 501 communicates with the storage 502 through the bus 503, so that the processor 501 executes the following instructions:

acquiring a general configuration file of a current chip subsystem and information description files aiming at different chip subsystems;

generating a condition constraint set for low power consumption design of the current chip subsystem by analyzing the general configuration file, wherein the condition constraint set is used for indicating the requirements of different low power consumption design stages on a power consumption intention description file; generating power consumption strategy information for low power consumption design of different chip subsystems by analyzing the information description file;

and filling a file template of the power consumption intention file based on the condition constraint set and the power consumption strategy information to generate the power consumption intention file.

In addition, the present disclosure also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the file generation method in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the file generation method in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.

The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

The above are only specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and shall be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于智能分析的芯片设计方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类