CN110286909B - Statistical method and device for resource use data of Simulink model - Google Patents

Statistical method and device for resource use data of Simulink model Download PDF

Info

Publication number
CN110286909B
CN110286909B CN201910582489.0A CN201910582489A CN110286909B CN 110286909 B CN110286909 B CN 110286909B CN 201910582489 A CN201910582489 A CN 201910582489A CN 110286909 B CN110286909 B CN 110286909B
Authority
CN
China
Prior art keywords
resource
simulink
application layer
resource usage
segment
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.)
Active
Application number
CN201910582489.0A
Other languages
Chinese (zh)
Other versions
CN110286909A (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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power Co Ltd
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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN201910582489.0A priority Critical patent/CN110286909B/en
Publication of CN110286909A publication Critical patent/CN110286909A/en
Application granted granted Critical
Publication of CN110286909B publication Critical patent/CN110286909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a statistical method and a device for Simulink model resource usage data, which are characterized in that exclusive resource segments are divided for Simulink application layer model codes, compiling environments are modified according to resource segment information, so that the application layer model codes are converted into executable programs, resource usage statistical files are generated, automatic statistics of resource usage data of various segments of a Simulink application layer is realized, and the resource usage data of various segments of the Simulink application layer are the actual resource occupation data of the Simulink model generation codes in a chip due to the combination of the Simulink application layer and an actual application scene.

Description

Statistical method and device for resource use data of Simulink model
Technical Field
The invention relates to the technical field of data processing, in particular to a statistical method and device for resource use data of a Simulink model.
Background
Simulink is a visual simulation tool in MATLAB, is a block diagram design environment based on MATLAB, is a software package for realizing dynamic system modeling, simulation and analysis, and is widely applied to modeling and simulation of linear systems, nonlinear systems, digital control and digital signal processing.
In practical application, the memory resources of the embedded chip are usually tense, and the resource use condition of the Simulink model code needs to be concerned at any time in the project development process. In many cases, it is desirable to know the resource occupancy of the model code as accurately as possible.
In the automatic code generation function of the model, the Simulink only provides a static resource statistic function of the model code, but because the static resource statistic is adopted and an application scene of an actual chip and a compiler is separated, data is only used for reference, and the resource use condition of the Simulink model code is not accurately reflected.
Disclosure of Invention
In view of this, the invention provides a statistical method and device for Simulink model resource usage data, so as to realize accurate statistics on the Simulink model resource usage data.
In order to achieve the above purpose, the invention provides the following specific technical scheme:
a statistical method of resource usage data of a Simulink model comprises the following steps:
dividing dedicated resource segments for Simulink application layer model codes;
modifying the compiling environment according to the resource segmentation information;
in the modified compiling environment, converting the application layer model code after the resource segmentation into an executable program and a resource use statistical file;
and reading the resource usage statistical file to acquire resource usage data of the Simulink application layer.
Optionally, the dividing dedicated resource segment for the Simulink application layer model code includes:
according to actual requirements, the Simulink application layer model code is divided into exclusive resource segments by using a # pragma instruction in the C language.
Optionally, the modifying the compiling environment according to the resource segmentation information includes:
adding position demand information and occupied resource calculation logic of each segment in a link file according to resource segment information;
the compiling options of the compiler are configured so that the currently used compiling options are consistent with the compiling options used in the final actual project.
Optionally, the converting the application layer model code after the resource segmentation into an executable program and a resource usage statistics file includes:
calling a compiler, and converting the application layer model code after the resource segmentation into an executable program according to the link file;
and generating a resource usage statistical file according to the position demand information and the occupied resource calculation logic of each segment in the link file, wherein the resource usage statistical file comprises the resource usage data of each segment.
A statistical apparatus of Simulink model resource usage data, comprising:
the resource segmentation unit is used for dividing exclusive resource segments for Simulink application layer model codes;
the compiling environment modification unit is used for modifying the compiling environment according to the resource segmentation information;
the compiling unit is used for converting the application layer model codes after the resource segmentation into executable programs and resource use statistical files in the modified compiling environment;
and the data reading unit is used for reading the resource usage statistical file and acquiring the resource usage data of the Simulink application layer.
Optionally, the resource segmenting unit is specifically configured to divide the Simulink application layer model code into dedicated resource segments by using a # pragma instruction in the C language according to actual requirements.
Optionally, the compiling environment modifying unit is specifically configured to add, according to the resource segmentation information, the position requirement information and occupied resource calculation logic of each segment in the link file, and configure the compiling options of the compiler, so that the currently used compiling options are consistent with the compiling options used in the final actual project.
Optionally, the compiling unit is specifically configured to invoke a compiler, convert the application layer model code after the resource segmentation into an executable program according to the link file, and generate a resource usage statistics file according to the location requirement information and the occupied resource calculation logic of each segment in the link file, where the resource usage statistics file includes resource usage data of each segment.
Compared with the prior art, the invention has the following beneficial effects:
the invention discloses a statistical method of resource usage data of a Simulink model, which is characterized in that dedicated resource segments are divided for Simulink application layer model codes, compiling environments are modified according to resource segment information, so that the application layer model codes are converted into executable programs, and meanwhile, resource usage statistical files are generated, so that the automatic statistics of the resource usage data of various segments of the Simulink application layer is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a statistical method for Simulink model resource usage data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of resource segmentation disclosed in the embodiment of the present invention;
FIG. 3 is a schematic diagram of a resource segmentation code according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a modification of a link file according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a resource usage statistics file according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a statistical apparatus for Simulink model resource usage data according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment discloses a statistical method for resource usage data of a Simulink model, which improves a method for automatically generating codes and compiling the codes into executable programs of the Simulink model in the prior art, and realizes automatic statistics of the resource usage data of a Simulink application layer.
Referring to fig. 1, the statistical method for resource usage data of a Simulink model disclosed in this embodiment includes the following steps:
s101: dividing exclusive resource segments for Simulink application layer model codes;
firstly, the Simulink model is controlled to automatically generate codes, wherein the Simulink model is controlled to automatically generate the codes through a preset m script, and the m script is a script language carried by MATLAB.
And then, dividing the Simulink application layer model code into exclusive resource segments according to actual conditions, wherein the segments can cover all codes generated by the Simulink application layer model through an automatic code generation function.
For the convenience of technical solution description, it is assumed that the application layer code is planned by segmentation according to the actual situation, that is, it is assumed that the model code in the actual project only includes the segmentation as shown in fig. 2.
The Simulink application layer model code is divided into a program section (AppCode) of a program area, a variable data section (AppData) with an initial value when the data area is defined and variable data sections (AppSs) without the initial value when the data area is defined.
In order to ensure the accuracy of the statistics of the resource occupation of the Simulink model code, the segmentation is only used in the Simulink model code, and only the segmentation can be used in the Simulink model code.
Specifically, the Simulink application layer model code is divided into a program segment, a variable data segment with an initial value when being defined and a variable data segment without the initial value when being defined by using a # pragma instruction in the C language.
Taking a section information format supported by a certain compiler and one model code file modelname.c as an example, section information (1) and section information (2) shown in fig. 3 are respectively added in the code. The format of the segmentation information supported by different compilers may be different, and is not particularly limited herein.
The DATA area of the Simulink application layer model code is divided into variable DATA sections (AppData) with initial values when defined and variable DATA sections (Apbps) without initial values when defined by "# pragma section DATA". AppData ". Apbps" far-absolute ".
The program area of the Simulink application layer model CODE is divided into program segments (AppCode) by "# pragma section CODE". AppCode "standard".
S102: modifying the compiling environment according to the resource segmentation information;
specifically, the position demand information and occupied resource calculation logic of each segment are added in the link file according to the resource segment information, and the compiling option of the compiler is configured, so that the currently used compiling option is consistent with the compiling option used in the final actual project.
The link file is a file required by the compiler to execute the link operation, and tells the compiler how to store each segment in the memory, for example, which segment is put first and then which segment is put.
Adding program segments, variable data segments with initial values during definition, position demand information of variable segments without initial values during definition and occupied resource calculation logic in a link file, wherein the address information comprises a starting address and an ending address, the occupied resource calculation logic of the data segments is the difference value between the ending address and the starting address of the calculated data segments, and the difference value is the size of resources occupied by data segment codes.
Referring to fig. 4, the modification of the link file will be described by taking the format of the link file supported by a certain compiler as an example.
\\ APPCODE _ START represents the starting address of the Simulink application layer model code segment placement, wherein "." represents the current address in the link file and "\\ APPCODE _ START =." represents assigning the current address to the variable _ APPCODE _ START, and the same is not repeated here.
AppCodeFlash represents the code segment of the Simulink application layer model.
\\ APPCODE _ END represents the END address of the Simulink application layer model's code segment placement.
_ APPCODE _ SIZE represents the SIZE of the resource occupied by the code segment of the Simulink application layer model.
\\ APPDATA _ START represents the starting address of the placement of the variable data segment in the Simulink application layer model that defines the time-to-START value.
AppData represents the variable data segment with initial values defined in the Simulink application layer model.
\\ APPDATA _ END represents the END address of the variable data segment placement in the Simulink application layer model that defines the time-to-start value.
_ APPDATA _ SIZE represents the resource SIZE occupied by a variable data segment with an initial value when defined in the Simulink application layer.
_ BSS _ START represents the starting address of the placement of the variable data segment without an initial value when defined in the Simulink application layer model.
AppBss represent variable data segments without initial values as defined in the Simulink application layer model.
_ BSS _ END represents the END address of the variable data segment placement without an initial value when defined in the Simulink application layer model.
_ APPBSS _ SIZE represents the resource SIZE occupied by a variable data segment without an initial value when defined in the Simulink application layer model.
S103: in the modified compiling environment, converting the application layer model codes after the resource segmentation into executable programs and resource use statistical files;
a compiler converts a C code automatically generated by a Simulink model into an executable program, and generally two main processes of compiling and linking are needed; the compiling process is responsible for generating the code o, and the linking process is to generate all the o links mentioned above into an executable program which can be written to the control chip according to the link file.
And putting the application layer model codes after the resource segmentation into a modified compiling environment through a script, and ensuring that the application layer model codes after the resource segmentation are normally called and compiled in a program to generate an executable program.
And generating a resource usage statistical file according to the position demand information and the occupied resource calculation logic of each segment in the link file, wherein the resource usage statistical file comprises the resource usage data of each segment.
Specifically, a resource usage statistics file obtained after compiling by a certain compiler is taken as an example, where resource usage data of each segment is schematically shown in fig. 5.
__APPCODE_SIZE 00000028
__APPDATA_SIZE 00000000
__APPBSS_SIZE 00000004
Wherein "00000028" is the size of the resource occupied by the program segment.
"00000000" is the resource size occupied by the variable data segment with the initial value defined.
"00000004" is the resource size occupied by a variable data segment without an initial value when defined.
S104: and reading the resource usage statistical file to acquire resource usage data of the Simulink application layer.
The values of "\\u APPCODE _ SIZE", "\_ APPDATA _ SIZE", "\u appbs _ SIZE" and "\\u appbs _ SIZE" in the resource usage statistics file, the values of "_ APPCODE _ SIZE", "\_ APPDATA _ SIZE", and "\u appbs _ SIZE", that is, the results of the actual resource occupation data in the chip of the program segment (APPCODE) in the Simulink application layer model code, the variable data segment (APPDATA) with an initial value defined, and the variable data segment (appbs) without an initial value defined, are read by the script.
It can be seen that, in the statistical method for resource usage data of a Simulink model disclosed in this embodiment, dedicated resource segments are divided for Simulink application layer model codes, and a compiling environment is modified according to resource segment information, so that the application layer model codes are converted into an executable program, and meanwhile, a resource usage statistical file is generated, thereby realizing automatic statistics of resource usage data of various segments of the Simulink application layer.
Based on the statistical method for Simulink model resource usage data disclosed in the foregoing embodiments, this embodiment correspondingly discloses a statistical apparatus for Simulink model resource usage data, please refer to fig. 6, and the apparatus includes:
a resource segmentation unit 601, configured to divide dedicated resource segments for Simulink application layer model codes;
a compiling environment modification unit 602, configured to modify a compiling environment according to the resource segmentation information;
a compiling unit 603, configured to convert, in the modified compiling environment, the application layer model code after resource segmentation into an executable program and a resource usage statistics file;
a data reading unit 604, configured to read the resource usage statistics file, and obtain resource usage data of the Simulink application layer.
Optionally, the resource segmenting unit 601 is specifically configured to divide the Simulink application layer model code into dedicated resource segments according to actual requirements by using a # pragma instruction in the C language.
Optionally, the compiling environment modifying unit 602 is specifically configured to add, according to the resource segmentation information, the position requirement information and occupied resource calculation logic of each segment in the link file, and configure the compiling options of the compiler, so that the currently used compiling options are consistent with the compiling options used in the final actual project.
Optionally, the compiling unit 603 is specifically configured to invoke a compiler, convert the application layer model code after the resource segmentation into an executable program according to the link file, and generate a resource usage statistics file according to the location requirement information and the occupied resource calculation logic of each segment in the link file, where the resource usage statistics file includes resource usage data of each segment.
The device for counting resource usage data of the Simulink model disclosed in this embodiment divides dedicated resource segments for the Simulink application layer model code, and modifies the compiling environment according to the resource segment information, so that the application layer model code is converted into an executable program, and simultaneously, a resource usage statistical file is generated, thereby realizing automatic counting of resource usage data of various segments of the Simulink application layer.
The statistical device of the Simulink model resource usage data comprises a processor and a memory, wherein the resource segmentation unit, the compiling environment modification unit, the compiling unit, the data reading unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more kernels can be set, and the statistical efficiency of resource use data of the Simulink model is improved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements a statistical method for resource usage data of the Simulink model.
The embodiment of the invention provides a processor, which is used for running a program, wherein the statistical method of the resource use data of the Simulink model is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
dividing exclusive resource segments for Simulink application layer model codes;
modifying the compiling environment according to the resource segmentation information;
in the modified compiling environment, converting the application layer model codes after the resource segmentation into executable programs and resource use statistical files;
and reading the resource usage statistical file to acquire resource usage data of the Simulink application layer.
Further, the dividing of dedicated resource segments for Simulink application layer model code includes:
according to actual requirements, the Simulink application layer model code is divided into exclusive resource segments by using a # pragma instruction in C language.
Further, the modifying the compiling environment according to the resource segmentation information includes:
adding position demand information and occupied resource calculation logic of each segment in a link file according to resource segment information;
the compiling options of the compiler are configured so that the currently used compiling options are consistent with the compiling options used in the final actual project.
Further, the converting the application layer model code after the resource segmentation into an executable program and a resource usage statistic file includes:
calling a compiler, and converting the application layer model code after the resource segmentation into an executable program according to the link file;
and generating a resource usage statistical file according to the position demand information and the occupied resource calculation logic of each segment in the link file, wherein the resource usage statistical file comprises the resource usage data of each segment.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
dividing dedicated resource segments for Simulink application layer model codes;
modifying the compiling environment according to the resource segmentation information;
in the modified compiling environment, converting the application layer model code after the resource segmentation into an executable program and a resource use statistical file;
and reading the resource usage statistical file to acquire resource usage data of the Simulink application layer.
Further, the partitioning of dedicated resource segments for Simulink application layer model codes includes:
according to actual requirements, the Simulink application layer model code is divided into exclusive resource segments by using a # pragma instruction in C language.
Further, the modifying the compiling environment according to the resource segmentation information includes:
adding position demand information and occupied resource calculation logic of each segment in a link file according to resource segment information;
the compiling options of the compiler are configured so that the currently used compiling options are consistent with the compiling options used in the final actual project.
Further, the converting the application layer model code after the resource segmentation into an executable program and a resource usage statistic file includes:
calling a compiler, and converting the application layer model code after the resource segmentation into an executable program according to the link file;
and generating a resource usage statistical file according to the position demand information and the occupied resource calculation logic of each segment in the link file, wherein the resource usage statistical file comprises the resource usage data of each segment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (4)

1. A statistical method for resource usage data of a Simulink model is characterized by comprising the following steps:
dividing exclusive resource segments for Simulink application layer model codes;
modifying the compiling environment according to the resource segmentation information, comprising: adding position demand information and occupied resource calculation logic of each segment in a link file according to resource segment information; configuring the compiling options of a compiler to make the currently used compiling options consistent with the compiling options used in the final actual project;
in the modified compiling environment, the application layer model code after the resource segmentation is converted into an executable program and a resource usage statistical file, and the method comprises the following steps: calling a compiler, and converting the application layer model code after the resource segmentation into an executable program according to the link file; generating a resource usage statistical file according to the position demand information and occupied resource calculation logic of each segment in the link file, wherein the resource usage statistical file comprises resource usage data of each segment;
and reading the resource usage statistical file to acquire resource usage data of the Simulink application layer.
2. The method of claim 1, wherein partitioning the dedicated resource segments for Simulink application layer model code comprises:
according to actual requirements, the Simulink application layer model code is divided into exclusive resource segments by using a # pragma instruction in the C language.
3. A statistical apparatus of resource usage data of Simulink model, comprising:
the resource segmentation unit is used for dividing exclusive resource segments for Simulink application layer model codes;
the compiling environment modifying unit is specifically used for adding the position demand information and the occupied resource computing logic of each segment in the link file according to the resource segmentation information, and configuring the compiling options of the compiler so that the currently used compiling options are consistent with the compiling options used in the final actual project;
the compiling unit is specifically used for calling a compiler, converting the application layer model codes after the resource segmentation into executable programs and resource usage statistical files according to the link files, and generating resource usage statistical files according to the position demand information and occupied resource calculation logic of each segment in the link files, wherein the resource usage statistical files comprise resource usage data of each segment;
and the data reading unit is used for reading the resource usage statistical file and acquiring the resource usage data of the Simulink application layer.
4. The apparatus according to claim 3, wherein the resource segmentation unit is specifically configured to partition the Simulink application layer model code into dedicated resource segments according to actual requirements using the # pragma instruction in the C language.
CN201910582489.0A 2019-06-29 2019-06-29 Statistical method and device for resource use data of Simulink model Active CN110286909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910582489.0A CN110286909B (en) 2019-06-29 2019-06-29 Statistical method and device for resource use data of Simulink model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910582489.0A CN110286909B (en) 2019-06-29 2019-06-29 Statistical method and device for resource use data of Simulink model

Publications (2)

Publication Number Publication Date
CN110286909A CN110286909A (en) 2019-09-27
CN110286909B true CN110286909B (en) 2023-01-24

Family

ID=68021418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910582489.0A Active CN110286909B (en) 2019-06-29 2019-06-29 Statistical method and device for resource use data of Simulink model

Country Status (1)

Country Link
CN (1) CN110286909B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391709A (en) * 2014-12-12 2015-03-04 北京润科通用技术有限公司 File generation method and device
CN104573503A (en) * 2015-02-11 2015-04-29 中国农业银行股份有限公司 Method and device for detecting memory access overflow
CN107368292A (en) * 2017-03-29 2017-11-21 阿里巴巴集团控股有限公司 A kind of resource Compilation Method and device
CN109002290A (en) * 2018-10-15 2018-12-14 昆明理工鼎擎科技股份有限公司 Integrated ECU embedded target code generator and automatic generation method
CN109597683A (en) * 2018-08-23 2019-04-09 北京字节跳动网络技术有限公司 EMS memory management process, device, equipment and storage medium
CN109739858A (en) * 2018-12-29 2019-05-10 华立科技股份有限公司 Data classification storage method, device and electronic equipment based on ANSI C12.19

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005078243A (en) * 2003-08-29 2005-03-24 Denso Corp Microcomputer resource consumption estimating program, microcomputer resource consumption estimating device, and program generating method
US20140040858A1 (en) * 2011-04-20 2014-02-06 Freescale Semiconductor, Inc. Method and apparatus for generating resource efficient computer program code
CN105094973A (en) * 2015-07-31 2015-11-25 上海卫星工程研究所 ADA program partition running supporting system based on sensitive instruction substitution
GB2552474A (en) * 2016-07-21 2018-01-31 Sony Interactive Entertainment Inc Program compiler, linker and method
CN108153922A (en) * 2016-12-05 2018-06-12 北京仿真中心 A kind of memory planing method of distributed emulation real-time network
CN106980499A (en) * 2017-02-16 2017-07-25 陕西法士特齿轮有限责任公司 A kind of integrated approach that upper layer logic and bottom code are realized based on MATLAB/Simulink
DE102018003142A1 (en) * 2017-12-13 2019-06-13 The Mathworks, Inc. Automatic setting of multitasking configurations for a code checking system
CN108279976B (en) * 2017-12-26 2021-11-19 努比亚技术有限公司 Compiling resource scheduling method, computer and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391709A (en) * 2014-12-12 2015-03-04 北京润科通用技术有限公司 File generation method and device
CN104573503A (en) * 2015-02-11 2015-04-29 中国农业银行股份有限公司 Method and device for detecting memory access overflow
CN107368292A (en) * 2017-03-29 2017-11-21 阿里巴巴集团控股有限公司 A kind of resource Compilation Method and device
CN109597683A (en) * 2018-08-23 2019-04-09 北京字节跳动网络技术有限公司 EMS memory management process, device, equipment and storage medium
CN109002290A (en) * 2018-10-15 2018-12-14 昆明理工鼎擎科技股份有限公司 Integrated ECU embedded target code generator and automatic generation method
CN109739858A (en) * 2018-12-29 2019-05-10 华立科技股份有限公司 Data classification storage method, device and electronic equipment based on ANSI C12.19

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
《基于嵌入式系统的高压共轨控制软件研究》;王俊席;《中国博士学位论文全文数据库工程科技Ⅱ辑》;20100615;全文 *
从MATLAB到嵌入式C代码的实现;Houman Zarrinkoub;《电子设计应用》;20081001(第10期);全文 *
基于连续存储的DRFM干扰Simulink建模与仿真;汤建龙等;《系统仿真学报》;20130308(第03期);全文 *
通用一体化仿真平台软件的设计与实现;崔怀林等;《系统仿真学报》;20040320(第03期);全文 *

Also Published As

Publication number Publication date
CN110286909A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
CN110955431B (en) Processing method and device of compiling environment
CN110968357B (en) Method and device for packaging maven item, storage medium and processor
CN107832059B (en) Code static analysis method and device based on Makefile
CN111399840A (en) Module development method and device
CN107391529B (en) Method and device for realizing Object Relation Mapping (ORM)
CN116467061A (en) Task execution method and device, storage medium and electronic equipment
CN109271180B (en) Data processing method and device
CN110286909B (en) Statistical method and device for resource use data of Simulink model
CN112230930A (en) Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium
CN103631585A (en) Method and system for developing application program
CN107291439B (en) Target incremental data construction method and device
CN114115850A (en) Code generation method and device
CN111367512B (en) Method and device for creating Android library module dependency relationship in application development
CN114153738A (en) Test method and device for CAM software processing function, storage medium and processor
CN110969461B (en) Method and device for processing public number information, storage medium and processor
CN112579248A (en) Data generation method and device
CN111596977B (en) PLM system business object execution system and execution method
CN112698813B (en) System development method, device, computer readable storage medium and processor
US9841975B2 (en) Method and apparatus for performing register allocation
CN112329102B (en) Method and device for generating structural floor slab model in building design software
CN110968709B (en) Data transmission method and related system
CN115509645A (en) Function calling method and device
CN107479899B (en) File processing method and device, storage medium and processor
CN114116485A (en) Automatic test method and device for CAD software, storage medium and processor
CN115794325A (en) Cross-module function scheduling method and device

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
GR01 Patent grant