CN105320543A - Software module loading method and apparatus - Google Patents

Software module loading method and apparatus Download PDF

Info

Publication number
CN105320543A
CN105320543A CN201510770304.0A CN201510770304A CN105320543A CN 105320543 A CN105320543 A CN 105320543A CN 201510770304 A CN201510770304 A CN 201510770304A CN 105320543 A CN105320543 A CN 105320543A
Authority
CN
China
Prior art keywords
loaded
loaded section
section
memory
power consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510770304.0A
Other languages
Chinese (zh)
Other versions
CN105320543B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510770304.0A priority Critical patent/CN105320543B/en
Priority to CN201910581177.8A priority patent/CN110413339A/en
Publication of CN105320543A publication Critical patent/CN105320543A/en
Priority to PCT/CN2016/104167 priority patent/WO2017080383A1/en
Application granted granted Critical
Publication of CN105320543B publication Critical patent/CN105320543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Memory System (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention discloses a software module loading method and apparatus. The method comprises: determining a to-be-loaded section of a software module as a first to-be-loaded section or a second to-be-loaded section according to at least one item of the following information: use frequency of the to-be-loaded section, and power consumption of the to-be-loaded section and a memory size occupied by the to-be-loaded section, wherein the first to-be-loaded section is a to-be-loaded section loaded to a first storage area, and the second to-be-loaded section is a to-be-loaded section loaded to a second storage area; and if the to-be-loaded section is the first to-be-loaded section, loading the to-be-loaded section to the first storage area, or if the to-be-loaded section is the second to-be-loaded section, loading the to-be-loaded section to the second storage area. Therefore, according to the software module loading method and apparatus provided by the embodiments of the present invention, performance of a chip and a comprehensive level of power consumption can be improved.

Description

Load the method and apparatus of software module
Technical field
The present invention relates to areas of information technology, and more specifically, relate to a kind of method and apparatus loading software module.
Background technology
In embedded device field, as the sensor hub (SensorHub) of smart mobile phone, the equipment that the memory sources such as wearable device are limited, in order to reduce equipment cost, static RAM (StaticRandomAccessMemory, SRAM) memory headroom is all very little, general all about 8KB to 100KB, in order to support that more function is applied, SOC (system on a chip) (SystemOnChip, SOC) Double Data Rate synchronous DRAM (DoubleDataRateSynchronousDynamicRandomAccessMemory must also be configured on, DDRSDRAM), DDRSDRAM is also referred to as DDR, power consumption when Bootload in chip to SRAM performs and Performance comparision ideal, but the SRAM limited space of chip, be loaded on DDR and perform, the power consumption of chip will increase, and the performance of performance also not as performing on SRAM, therefore, need a kind of method for loading software, when chip sram memory resource-constrained, can improve the performance of chip and the level of aggregation of power consumption.
Summary of the invention
The embodiment of the present invention provides a kind of method and apparatus loading software module, improves the performance of chip and the level of aggregation of power consumption.
First aspect, provide a kind of method loading software module, comprise: according at least one item in following information, determine that to be loaded section in described software module is the frequency of utilization of first to be loaded section or second to be loaded section: described to be loaded section, the power consumption of described to be loaded section and the described to be loaded section of memory size taken, wherein, described first to be loaded section for being loaded into be loaded section of the first memory block, described second to be loaded section for being loaded into be loaded section of the second memory block; If described to be loaded section is described first to be loaded section, be loaded into described first memory block by described to be loaded section, if or described to be loaded section be described second to be loaded section, be loaded into described second memory block by described to be loaded section.
In conjunction with first aspect, in the first implementation of first aspect, described according at least one item in following information, determine that to be loaded section in described software module is the frequency of utilization of first to be loaded section or second to be loaded section: described to be loaded section, the power consumption of described to be loaded section and the described to be loaded section of memory size taken, comprise: if the frequency of utilization of described loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determine that described to be loaded section is described first to be loaded section; If or the frequency of utilization of described to be loaded section is not less than described first frequency of utilization threshold value, or power consumption is not less than described first power consumption threshold value, or the memory size taken is not more than described first memory threshold, determine that described to be loaded section is described second to be loaded section.
In conjunction with first aspect and above-mentioned implementation thereof, in the second implementation of first aspect, if be described first to be loaded section at described to be loaded section, described first memory block is loaded into by described to be loaded section, if or described to be loaded section is described second to be loaded section, before being loaded into described second memory block by described to be loaded section, described method also comprises: to described to be loaded section of configuration section attribute, and described section of attribute is used to indicate described to be loaded section and is described first to be loaded section or described second to be loaded section.
In conjunction with first aspect and above-mentioned implementation thereof, in the third implementation of first aspect, described first memory block is the memory field of dynamic RAM DDR, and described second memory block is the memory field of static RAM SRAM.
In conjunction with first aspect and above-mentioned implementation thereof, in the 4th kind of implementation of first aspect, described to be loaded section be following in one:
Code segment, data segment.
Second aspect, provides a kind of device loading software module, and this device comprises each module of the method performed in first aspect.
The third aspect, provide a kind of device loading software module, the processor that this device comprises storer and is connected with this storer, this storer is for storing instruction, the instruction that this processor stores for performing this storer, when this processor performs the instruction stored in this storer, this processor is specifically for performing the method in first aspect.
Based on technique scheme, the method and apparatus of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in the embodiment of the present invention below, apparently, accompanying drawing described is below only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the indicative flowchart of the method for loading software module according to the embodiment of the present invention.
Fig. 2 is the schematic block diagram of the device of loading software module according to the embodiment of the present invention.
Fig. 3 is the schematic block diagram of the device loading software module according to another embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Subscriber equipment (UE, UserEquipment), also mobile terminal (MobileTerminal) can be referred to as, mobile subscriber equipment etc., can through wireless access network (such as, RAN, RadioAccessNetwork) communicate with one or more core net, subscriber equipment can be mobile terminal, as mobile phone (or being called " honeycomb " phone) and the computing machine with mobile terminal, such as, can be portable, pocket, hand-held, built-in computer or vehicle-mounted mobile device, they and wireless access network exchange language and/or data.
Fig. 1 shows the indicative flowchart of the method 100 of the loading software module according to the embodiment of the present invention, and the method can be performed by the device loading software module, and as shown in Figure 1, the method 100 comprises:
S110, according at least one item in following information, determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section and this to be loaded section of memory size taken, wherein, this first to be loaded section for being loaded into be loaded section of the first memory block, this second to be loaded section for being loaded into be loaded section of the second memory block;
S120, if this to be loaded section is this first to be loaded section, is loaded into this first memory block by this to be loaded section, if or this to be loaded section be this second to be loaded section, be loaded into this second memory block by this to be loaded section.
Specifically, software module to be loaded comprises multiple to be loaded section, alternatively, the plurality of to be loaded section can at least one in following: code segment, data segment, heap, stack or symbolic blocks start (BlockStartedbySymbol, BSS) section, wherein, this BSS is one piece of region of memory of global variable and static variable for depositing no initializtion in program.Namely, the plurality of to be loaded section can be multiple code segment, the combination etc. of multiple data segment or multiple code segment and data segment, to be loaded section that has in these to be loaded section relevant with the initialization of this software module, that is these to be loaded section is only called when software module is initialized, the frequency of utilization of other times is lower, if these to be loaded section to be loaded into the memory field of SRAM, just occupy limited sram memory resource, so other need the memory field being loaded into SRAM to perform to higher to be loaded section of performance requirement time, the problem of sram memory inadequate resource may be run into, thus affect the overall performance of chip.Therefore, under limited sram memory resource, can not support more software application, the utilization ratio that also can be understood as sram memory resource is lower.Now, alternatively, the device of this loading software module can according at least one item in following information, determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section and this to be loaded section of memory size taken, wherein, this first to be loaded section for being loaded into be loaded section of the first memory block, this second to be loaded section for being loaded into be loaded section of the second memory block.Namely the method for the loading software module of the embodiment of the present invention is not that whole software module is all loaded into the first memory block or the second memory block, but can carry out dispersion loading according to the attribute of to be loaded section to multiple to be loaded section in software module.Alternatively, this first memory block can be the memory field of DDR, this second memory block can be the memory field of SRAM, because the memory source of DDR is relatively abundant, alternatively, code segment lower for frequency of utilization or data segment can be loaded into the memory field of DDR according to the device of the loading software module of the embodiment of the present invention, such as, the code segment of being correlated with initialization or data segment can be loaded into the memory field of DDR, code segment higher for frequency of utilization or data segment are loaded into the memory field of SRAM, doing so avoids the memory source that the code segment that is of little use or data segment take valuable SRAM, the conventional code segment that can embody chip performance or data segment is caused to need to run into when performing in the memory field of SRAM the problem of sram memory inadequate resource, thus affect the overall performance of chip.Because sram memory resource-constrained, if load the larger code segment of EMS memory occupation or data segment, other to be loaded section may be caused all because low memory and can not normal load, now, alternatively, code segment larger for committed memory resource or data segment can be loaded into the memory field of DDR by the device of this loading software module, code segment less for committed memory resource or data segment are loaded into the memory field of SRAM, thus can make limited sram memory resource runs more software application.Because software module performs less relative to power consumption when performing in the memory field of DDR in the memory field of SRAM, alternatively, code segment less for power consumption when performing or data segment also can be loaded into the memory field of DDR by the device of this loading software module, code segment larger for power consumption when performing or data segment are loaded into the memory field etc. of SRAM.After determining that to be loaded section is first to be loaded section or second to be loaded section, namely determine that this to be loaded section for after be loaded into which memory block to be loaded section, the device of this loading software module is loaded into corresponding memory block by this to be loaded section, alternatively, if this to be loaded section is first to be loaded section, be loaded into this first memory block by this to be loaded section, if or this to be loaded section be second to be loaded section, be loaded into this second memory block by this to be loaded section.To be loaded section is accordingly performed in corresponding memory block.
Therefore, the method of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption and EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Should understand, this first to be loaded section and second to be loaded section only represents to be loaded section of two classes, and treat the quantity of loaded segment, types etc. are not construed as limiting, such as, this first to be loaded section can for being loaded into all kinds of to be loaded section of the first memory block, this second to be loaded section can for being loaded into all kinds of to be loaded section of the second memory block, will also be understood that, this first memory block and the second memory block only represent two class memory blocks, and the quantity to memory block, type is not construed as limiting, such as, this first memory block can be the memory field of multiple DDR, this second memory block can be the memory field etc. of multiple SRAM.
Alternatively, in embodiments of the present invention, according at least one item in following information, determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section or this to be loaded section of memory size taken, comprising:
If the frequency of utilization of this loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determines that this to be loaded section is first to be loaded section; Or
If this frequency of utilization of to be loaded section is not less than this first frequency of utilization threshold value, or power consumption is not less than this first power consumption threshold value, or when the memory size taken is not more than this first memory threshold, determines that this to be loaded section is second to be loaded section.
Specifically, the device of this loading software module according at least one item in following information, can determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section and this to be loaded section of memory size taken.Alternatively, if the frequency of utilization of this loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, can determine that this to be loaded section for this first to be loaded section; If or this frequency of utilization of to be loaded section is not less than this first frequency of utilization threshold value, or power consumption is not less than this first power consumption threshold value, or the memory size taken is not more than this first memory threshold, can determine that this to be loaded section for this second to be loaded section.Therefore, the device of this loading software module according to the difference of the frequency of utilization of to be loaded section, power consumption or the memory size taken, can be loaded into corresponding memory block by be loaded section of different qualities.Alternatively, this first to be loaded section can for being loaded into be loaded section of the memory field of DDR, this second to be loaded section can for being loaded into be loaded section of the memory field of SRAM, in embodiments of the present invention, low for frequency of utilization to be loaded section can be defined as first to be loaded section by the device of this loading software module, then this to be loaded section is loaded into the memory field of DDR, also large for committed memory to be loaded section can be defined as first to be loaded section, then this to be loaded section is loaded into the memory field of DDR, or be defined as second to be loaded section by large for power consumption when performing to be loaded section, this to be loaded section is loaded into the memory field etc. of SRAM, namely the device of this loading software module can carry out dispersion loading for the characteristic of to be loaded section in this software module to different to be loaded section.Therefore, under the condition that sram memory resource size is identical, the method of the loading software module of the embodiment of the present invention, chip can load more software application, similarly, if chip performance is identical, chip adopts the words according to the method for the loading software module of the embodiment of the present invention, relatively low to the consumption of sram memory resource, therefore, when performance is identical, the method of the loading software module of the embodiment of the present invention can make the sram memory size of the chip of actual needs reduce, sram memory size reduces, thereupon, the cost of chip also reduces, chip design obtains also compacter.Simultaneously, according to the method for the loading software module of the embodiment of the present invention, dispersion can be carried out for the otherness of the power consumption of to be loaded section and load, therefore, when chip performance is identical, the method for the loading software module of the embodiment of the present invention can reduce the overall power of chip.
Should understand, in embodiments of the present invention, this the first frequency of utilization threshold value, the first power consumption threshold value or the first memory threshold are not well-determined, and such as, this first frequency of utilization threshold value can be determined according to concrete business scenario, alternatively, when the business that this chip is supported is higher by the frequency that uses, when the average frequency of utilization of the business also can supported for this chip is higher, it is higher that this first frequency of utilization threshold value can be arranged, on the contrary, what this first frequency of utilization threshold value can be arranged is lower; This first power consumption threshold value can be determined according to the power consumption situation of chip, and alternatively, if this chip support is that the average power consumption of business is higher, what this first power consumption threshold value can be arranged is higher, otherwise what this first power consumption threshold value can be arranged is lower; This first memory threshold can the size of memory source of this DDR and/or this SRAM be determined, such as, this first memory threshold can be determined according to the size of the memory source of this SRAM, if the memory source of this SRAM is larger, what this first memory threshold can be arranged is larger, so that to be loaded section that the supports EMS memory occupation relatively large memory field etc. being loaded into this SRAM, the embodiment of the present invention is not restricted this.
Alternatively, in embodiments of the present invention, by this to be loaded section be loaded into corresponding memory block before, the method 100 can also comprise:
To this to be loaded section of configuration section attribute, this section of attribute is used to indicate this to be loaded section for this first to be loaded section or this second to be loaded section.
Specifically, after determining that this first to be loaded section is first to be loaded section or second to be loaded section, alternatively, the device of this loading software module can give this to be loaded section of configuration section attribute, it is first to be loaded section or second to be loaded section that this section of attribute is used to indicate this to be loaded section, and namely this section of attribute may be used for indicating this to be loaded section to be still loaded into be loaded section of the second memory block for be loaded section of being loaded into the first memory block.Such as, after determining that data segment ddr.data, ddr.init.data, ddr.minor.data and code segment ddr.text, ddr.init.text, ddr.minor.text are first to be loaded section, for this first to be loaded section for being loaded into be loaded section of the memory field of DDR, the device of this loading software module can define the section attribute of code segment or data segment in the following manner.
#defineOS_SEC_DDR_DATAddr.data
#defineOS_SEC_DDR_DATA_INITddr.init.data
#defineOS_SEC_DDR_DATA_MINORddr.minor.data
#defineOS_SEC_DDR_TEXTddr.text
#defineOS_SEC_DDR_TEXT_INITddr.init.text
#defineOS_SEC_DDR_TEXT_MINORddr.minor.text
Wherein, OS_SEC_DDR_DATA, OS_SEC_DDR_DATA_INIT, OS_SEC_DDR_DATA_MINOR, be respectively the section attribute of data segment ddr.data, ddr.init.data, ddr.minor.data, OS_SEC_DDR_TEXT, OS_SEC_DDR_TEXT_INIT, OS_SEC_DDR_TEXT_MINOR are respectively the section attribute of ddr.text, ddr.init.text, ddr.minor.text.Like this, in software module loading procedure, just can determine which memory block to be loaded section of needs are loaded into by analyzing these section attributes of to be loaded section, then the device of this loading software module according to the memory block of this section of attribute instruction, can be loaded into corresponding memory block by this to be loaded section.
Should understand, the memory field that the embodiment of the present invention is DDR with the first memory block, this second memory block is that the memory field of SRAM is introduced and is only used to example, and any restriction should do not formed to the embodiment of the present invention, this first memory block can also be Nor flash memories (NorFlash) etc., this second memory block can also be L2 cache, and three grades of buffer memorys etc., the embodiment of the present invention is not restricted this.
Alternatively, in embodiments of the present invention, this to be loaded section can be following in one:
Code segment, data segment, heap, stack or BSS section.
Therefore, the method of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Fig. 2 shows the schematic block diagram of the device 200 of the loading software module according to the embodiment of the present invention, and as shown in Figure 2, this device 200 comprises:
Determination module 210, for according at least one item in following information, determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section and this to be loaded section of memory size taken, this first to be loaded section for being loaded into be loaded section of the first memory block, this second to be loaded section for being loaded into be loaded section of the second memory block;
Load-on module 220, for determine when this determination module 210 this to be loaded section for this first to be loaded section time, be loaded into this first memory block by this to be loaded section, maybe when this determination module 210 determine this to be loaded section for this second to be loaded section time, be loaded into this second memory block by this to be loaded section.
Therefore, the device of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Alternatively, in embodiments of the present invention, this determination module 210 specifically for:
If the frequency of utilization of this loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determines that this to be loaded section for this first to be loaded section; Or
If this frequency of utilization of to be loaded section is not less than this first frequency of utilization threshold value, or power consumption is not less than this first power consumption threshold value, or when the memory size taken is not more than this first memory threshold, determines that this to be loaded section for this second to be loaded section.
Alternatively, in embodiments of the present invention, this device 200 can also comprise:
Configuration module, for giving this to be loaded section of configuration section attribute, this section of attribute is used to indicate this to be loaded section for this first to be loaded section or this second to be loaded section.
Alternatively, in embodiments of the present invention, this first memory block can be the memory field of DDR, and this second memory block is the memory field of SRAM.
Alternatively, in embodiments of the present invention, this to be loaded section can be following in one: code segment, data segment, heap, stack or BSS section.
Therefore, the device of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
The device of the loading software module in the method 100 of the loading software module according to the embodiment of the present invention is may correspond to according to the device 200 of the loading software module of the embodiment of the present invention, and load the above-mentioned of the modules in the device 200 of software module and other operation and/or function respectively in order to realize the corresponding flow process of each method aforementioned, for simplicity, do not repeat them here.
As shown in Figure 3, the embodiment of the present invention additionally provides a kind of device 300 loading software module, and this device 300 comprises processor 310, storer 320, bus system 330.Wherein, processor 310, storer 320 are connected by bus system 330, and this storer 320 is for storing instruction, and this processor 310 is for performing the instruction of this storer 320 storage.Wherein, this processor 310 is for according at least one item in following information, determine that to be loaded section in this software module is first to be loaded section or second to be loaded section: this frequency of utilization of to be loaded section, this power consumption of to be loaded section and this to be loaded section of memory size taken, this first to be loaded section for being loaded into be loaded section of the first memory block, this second to be loaded section for being loaded into be loaded section of the second memory block; This processor 310 also for when being this first to be loaded section for this to be loaded section, is loaded into this first memory block by this to be loaded section, or when being this second to be loaded section for this to be loaded section, is loaded into this second memory block by this to be loaded section.
Therefore, the device of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Alternatively, in embodiments of the present invention, this storer 320 can also be used for storing software program, this software program is for realizing the method for the loading software module of the embodiment of the present invention, this processor 310 may be used for performing this software program stored in this storer 320, this software program is used for, according to this attribute of to be loaded section, to be loaded section of dispersion in software module to be loaded is loaded into the first memory block or the second memory block, wherein, this first memory block can be the memory field of DDR, and this second memory block can be the memory field of SRAM.
Should understand, in embodiments of the present invention, this processor 310 can be CPU (central processing unit) (CentralProcessingUnit, referred to as " CPU "), this processor 310 can also be other general processors, digital signal processor (DSP), special IC (ASIC), ready-made programmable gate array (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components etc.The processor etc. of general processor can be microprocessor or this processor also can be any routine.
This storer 320 can comprise ROM (read-only memory) and random access memory, and provides instruction and data to processor 310.A part for storer 320 can also comprise nonvolatile RAM.Such as, the information of all right storage device type of storer 320.
This bus system 330, except comprising data bus, can also comprise power bus, control bus and status signal bus in addition etc.But for the purpose of clearly demonstrating, in the drawings various bus is all designated as bus system 330.
In implementation procedure, each step of said method can be completed by the instruction of the integrated logic circuit of the hardware in processor 310 or software form.Step in conjunction with the method disclosed in the embodiment of the present invention can directly be presented as that hardware processor is complete, or hardware in purpose processor and software module combination complete.Software module can be positioned at random access memory, flash memory, ROM (read-only memory), in the storage medium of this area maturations such as programmable read only memory or electrically erasable programmable storer, register.This storage medium is positioned at storer 320, and processor 310 reads the information in storer 320, completes the step of said method in conjunction with its hardware.For avoiding repetition, be not described in detail here.
Alternatively, in embodiments of the present invention, this processor 310 specifically for:
If the frequency of utilization of this loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determines that this to be loaded section for this first to be loaded section; Or
If this frequency of utilization of to be loaded section is not less than this first frequency of utilization threshold value, or power consumption is not less than this first power consumption threshold value, or when the memory size taken is not more than this first memory threshold, determines that this to be loaded section for this second to be loaded section.
Alternatively, in embodiments of the present invention, this process 310 also for:
To this to be loaded section of configuration section attribute, this section of attribute is used to indicate this to be loaded section for this first to be loaded section or this second to be loaded section.
Alternatively, in embodiments of the present invention, this to be loaded section be following in one:
Code segment, data segment, heap, stack or BSS section.
Therefore, the device of the loading software module of the embodiment of the present invention, can determine which memory block is this to be loaded section be loaded into according to the frequency of utilization of to be loaded section in software module, power consumption or EMS memory occupation size, therefore, can realize according to the attribute of to be loaded section loading the dispersion of multiple to be loaded section in software module, thus improve the performance of chip and the level of aggregation of power consumption.
Should be understood that term "and/or" herein, being only a kind of incidence relation describing affiliated partner, can there are three kinds of relations in expression, and such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/" herein, general expression forward-backward correlation is to the relation liking a kind of "or".
Should understand, in various embodiments of the present invention, the size of the sequence number of above-mentioned each process does not also mean that the priority of execution sequence, and the execution sequence of each process should be determined with its function and internal logic, and should not form any restriction to the implementation process of the embodiment of the present invention.
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that disclosed system, apparatus and method can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.
If described function using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (10)

1. load a method for software module, it is characterized in that, comprising:
According at least one item in following information, determine that to be loaded section in described software module is the frequency of utilization of first to be loaded section or second to be loaded section: described to be loaded section, the power consumption of described to be loaded section and the described to be loaded section of memory size taken, wherein, described first to be loaded section for being loaded into be loaded section of the first memory block, described second to be loaded section for being loaded into be loaded section of the second memory block;
If described to be loaded section is described first to be loaded section, be loaded into described first memory block by described to be loaded section, if or described to be loaded section be described second to be loaded section, be loaded into described second memory block by described to be loaded section.
2. method according to claim 1, it is characterized in that, described according at least one item in following information, determine that to be loaded section in described software module is the frequency of utilization of first to be loaded section or second to be loaded section: described to be loaded section, the power consumption of described to be loaded section and the described to be loaded section of memory size taken, and comprising:
If the frequency of utilization of described loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determines that described to be loaded section is described first to be loaded section; Or
If the frequency of utilization of described to be loaded section is not less than described first frequency of utilization threshold value, or power consumption is not less than described first power consumption threshold value, or the memory size taken is not more than described first memory threshold, determines that described to be loaded section is described second to be loaded section.
3. method according to claim 1 and 2, it is characterized in that, if be described first to be loaded section at described to be loaded section, described first memory block is loaded into by described to be loaded section, if or described to be loaded section is described second to be loaded section, before being loaded into described second memory block by described to be loaded section, described method also comprises:
To described to be loaded section of configuration section attribute, described section of attribute is used to indicate described to be loaded section and is described first to be loaded section or described second to be loaded section.
4. according to the method in any one of claims 1 to 3, it is characterized in that, described first memory block is the memory field of Double Data Rate synchronous DRAM DDR, and described second memory block is the memory field of static RAM SRAM.
5. method according to any one of claim 1 to 4, is characterized in that, described to be loaded section be following in one:
Code segment, data segment.
6. load a device for software module, it is characterized in that, comprising:
Determination module, for according at least one item in following information, determine that to be loaded section in described software module is the frequency of utilization of first to be loaded section or second to be loaded section: described to be loaded section, the power consumption of described to be loaded section and the described to be loaded section of memory size taken, wherein, described first to be loaded section for being loaded into be loaded section of the first memory block, described second to be loaded section for being loaded into be loaded section of the second memory block;
Load-on module, for determine when described determination module described to be loaded section for described first to be loaded section time, described first memory block is loaded into by described to be loaded section, or when described determination module determine described to be loaded section for described second to be loaded section time, be loaded into described second memory block by described to be loaded section.
7. device according to claim 6, is characterized in that, described determination module specifically for:
If the frequency of utilization of described loaded segment is less than the first frequency of utilization threshold value, or power consumption is less than the first power consumption threshold value, or the memory size taken is greater than the first memory threshold, determines that described to be loaded section is described first to be loaded section; Or
If the frequency of utilization of described to be loaded section is not less than described first frequency of utilization threshold value, or power consumption is not less than described first power consumption threshold value, or the memory size taken is not more than described first memory threshold, determines that described to be loaded section is described second to be loaded section.
8. the device according to claim 6 or 7, is characterized in that, described device also comprises:
Configuration module, for giving described to be loaded section of configuration section attribute, described section of attribute is used to indicate described to be loaded section and is described first to be loaded section or described second to be loaded section.
9. the device according to any one of claim 6 to 8, is characterized in that, described first memory block is the memory field of dynamic RAM DDR, and described second memory block is the memory field of static RAM SRAM.
10. the device according to any one of claim 6 to 9, is characterized in that, described first to be loaded section be following in one:
Code segment, data segment.
CN201510770304.0A 2015-11-12 2015-11-12 The method and apparatus for loading software module Active CN105320543B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201510770304.0A CN105320543B (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module
CN201910581177.8A CN110413339A (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module
PCT/CN2016/104167 WO2017080383A1 (en) 2015-11-12 2016-11-01 Method and device for loading software module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510770304.0A CN105320543B (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201910581177.8A Division CN110413339A (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module

Publications (2)

Publication Number Publication Date
CN105320543A true CN105320543A (en) 2016-02-10
CN105320543B CN105320543B (en) 2019-06-28

Family

ID=55247968

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910581177.8A Pending CN110413339A (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module
CN201510770304.0A Active CN105320543B (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201910581177.8A Pending CN110413339A (en) 2015-11-12 2015-11-12 The method and apparatus for loading software module

Country Status (2)

Country Link
CN (2) CN110413339A (en)
WO (1) WO2017080383A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080383A1 (en) * 2015-11-12 2017-05-18 华为技术有限公司 Method and device for loading software module

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471675B (en) * 2019-08-21 2023-06-16 山东比特智能科技股份有限公司 Program burning method, system, device and computer readable storage medium
CN111580831A (en) * 2020-05-14 2020-08-25 深圳忆联信息系统有限公司 Method and device for improving code running efficiency, computer equipment and storage medium
CN115718620A (en) * 2022-11-22 2023-02-28 科东(广州)软件科技有限公司 Code program migration method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986286A (en) * 2009-07-28 2011-03-16 联发科技股份有限公司 Embedded system and managing method thereof
CN102999438A (en) * 2011-07-26 2013-03-27 辉达公司 Techniques for balancing accesses to memory having different memory types
CN103376879A (en) * 2012-04-17 2013-10-30 索尼公司 Memory control apparatus, memory control method, information processing apparatus and program
CN104272386A (en) * 2012-04-25 2015-01-07 国际商业机器公司 Reducing power consumption by migration of data within tiered storage system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101128234B1 (en) * 2006-08-23 2012-03-23 엘지전자 주식회사 Apparatus and method for controlling access of memory
CN101216772B (en) * 2008-01-15 2011-05-11 中兴通讯股份有限公司 Embedded equipment startup method and software upgrading method
CN102214115A (en) * 2011-07-21 2011-10-12 松翰科技股份有限公司 Universal serial bus (USB) control device and initialization method thereof
WO2013100936A1 (en) * 2011-12-28 2013-07-04 Intel Corporation A method and device to distribute code and data stores between volatile memory and non-volatile memory
CN103677654B (en) * 2012-09-24 2018-03-23 联想(北京)有限公司 The method and electronic equipment of a kind of data storage
CN103150257A (en) * 2013-02-28 2013-06-12 天脉聚源(北京)传媒科技有限公司 Memory management method and memory management device
CN103593324B (en) * 2013-11-12 2017-06-13 上海新储集成电路有限公司 A kind of quick startup low-power consumption computer on-chip system with self-learning function
CN103793332B (en) * 2014-02-28 2017-03-01 中国科学院微电子研究所 Date storage method based on internal memory, device, processor and electronic equipment
CN110413339A (en) * 2015-11-12 2019-11-05 华为技术有限公司 The method and apparatus for loading software module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986286A (en) * 2009-07-28 2011-03-16 联发科技股份有限公司 Embedded system and managing method thereof
CN102999438A (en) * 2011-07-26 2013-03-27 辉达公司 Techniques for balancing accesses to memory having different memory types
CN103376879A (en) * 2012-04-17 2013-10-30 索尼公司 Memory control apparatus, memory control method, information processing apparatus and program
CN104272386A (en) * 2012-04-25 2015-01-07 国际商业机器公司 Reducing power consumption by migration of data within tiered storage system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080383A1 (en) * 2015-11-12 2017-05-18 华为技术有限公司 Method and device for loading software module

Also Published As

Publication number Publication date
CN110413339A (en) 2019-11-05
WO2017080383A1 (en) 2017-05-18
CN105320543B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN107437110B (en) Block convolution optimization method and device of convolutional neural network
CN109753443B (en) Data processing method and device and electronic equipment
CN102707966A (en) Method and device for acceleratively starting operating system, and method, device and terminal for generating prefetched information
CN105320543A (en) Software module loading method and apparatus
JP6297208B2 (en) System and method for expanding memory for system on chip
CN106951521B (en) Method, device and system for reading and writing log file
JP6363191B2 (en) System and method for reducing memory I / O power via data masking
CN102866954B (en) The method of Memory Allocation and device
CN117524279A (en) SRAM with virtual-body architecture, and system and method including the same
CN100377086C (en) Method for realizing operating procedure directly from file system in embedded system
CN111984557A (en) Data processing method, device and system
CN111625546A (en) Data writing method, device, equipment and medium
CN113849124A (en) Disk array capacity expansion method and device
CN105426322A (en) Data prefetching method and device
CN105608013B (en) A kind of the storage card control chip and storage card of integrated MRAM
US10970206B2 (en) Flash data compression decompression method and apparatus
CN102982536B (en) Image processing method and device
CN115249057A (en) System and computer-implemented method for graph node sampling
CN104808953A (en) Device and method for controlling data storage and mobile terminal
CN113253939B (en) Data processing method, device, electronic equipment and storage medium
CN102117245A (en) Embedded device and method for loading and starting operation of cutting system executable file thereof
CN112153722B (en) Frequency point processing method and device, related equipment and storage medium
CN110032446B (en) Method and device for allocating memory space in embedded system
CN111580831A (en) Method and device for improving code running efficiency, computer equipment and storage medium
CN115525208A (en) Storage management method, storage device, and storage medium

Legal Events

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