[go: up one dir, main page]

CN105868129B - Embedded system demarcate when working page and refer to page switching method - Google Patents

Embedded system demarcate when working page and refer to page switching method Download PDF

Info

Publication number
CN105868129B
CN105868129B CN201610188100.0A CN201610188100A CN105868129B CN 105868129 B CN105868129 B CN 105868129B CN 201610188100 A CN201610188100 A CN 201610188100A CN 105868129 B CN105868129 B CN 105868129B
Authority
CN
China
Prior art keywords
page
working
embedded system
memory
data
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.)
Expired - Fee Related
Application number
CN201610188100.0A
Other languages
Chinese (zh)
Other versions
CN105868129A (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.)
Anhui Normal University
Original Assignee
Anhui Normal University
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 Anhui Normal University filed Critical Anhui Normal University
Priority to CN201610188100.0A priority Critical patent/CN105868129B/en
Publication of CN105868129A publication Critical patent/CN105868129A/en
Application granted granted Critical
Publication of CN105868129B publication Critical patent/CN105868129B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本发明公开嵌入式系统标定时工作页和参考页切换方法,包括:1,将参考页的标定量数据存储于第一内存中,将工作页的存储区设置于第二内存中;2,在第二内存中划出中转页,且中转页的存储区所占用空间与工作页的存储区所占用空间相同;3,在嵌入式系统初始化的情况下,将参考页的标定量数据拷贝到工作页的存储区中;4,当要切换到参考页运行时,控制器先将当前工作页的存储区中的数据拷贝到中转页中,再将参考页数据拷贝到工作页中;当要切换到工作页运行时,控制器将中转页中的存储区中数据拷贝到工作页中,以恢复工作页原有的数据并运行。该方法实现了标定时工作页和参考页切换。

The invention discloses a method for switching between a working page and a reference page when an embedded system is calibrated, including: 1. storing the calibration quantity data of the reference page in the first memory, and setting the storage area of the working page in the second memory; 2. In the second memory, a transition page is set out, and the space occupied by the storage area of the transition page is the same as the space occupied by the storage area of the work page; 3. When the embedded system is initialized, copy the calibration data of the reference page to the work page In the storage area of the page; 4. When switching to the reference page, the controller first copies the data in the storage area of the current working page to the transition page, and then copies the data of the reference page to the working page; When the work page is running, the controller copies the data in the storage area in the transfer page to the work page, so as to restore the original data of the work page and run it. This method realizes switching between the working page and the reference page during calibration.

Description

Embedded system demarcate when working page and refer to page switching method
Technical field
The handoff technique neck of calibration page and reference page when being adjusted the present invention relates to controller parameter in embedded system field Domain, and in particular, to embedded system demarcate when working page and refer to page switching method.
Background technique
In the application field of many embedded systems, the controller of exploitation is often general platform, same control Device hardware processed can be used in different project applications, and the software control function of controller is also identical, only the software of controller Control parameter need to carry out on-line tuning according to different project, the process of optimizing and revising of this software control parameter is referred to as Calibration needs the set of the software control parameter of on-line tuning, referred to as calibration page.In calibration, there are two types of the general of calibration page It reads: working page and reference page.Working page is normally at RAM (Random Access Memory, random access memory) area, mark Timing can read, modify this partial region;Reference page is normally in nonvolatile memory (such as Flash), and when calibration can only read The value of this partial region is taken, this partial region can not be modified.In actually calibration, calibration engineering is calibration page need to be switched to work Make page, is just able to achieve the modification to calibrating parameters a certain in working page.Currently, common chip does not have calibration page switching function Can, only calibration special chip just supports calibration page switching.But calibration special chip value is higher, a chip is up to ten thousand easily Member.Therefore, how to provide it is a kind of realize calibration page handoff functionality method and system be suitable for common chip be this field skill Art personnel technical problem urgently to be resolved.
In order to solve this problem, number of patent application is entitled " a kind of realization calibration page switching of<201410432557.2> The method and system of function " patent, propose it is a kind of all scalar quantities are changed to call by pointer, then according to calibration When host computer to the different request instructions of working page and reference page, the address information in host computer request instruction is converted simultaneously It is assigned to scalar quantity pointer, scalar quantity pointer is enabled to call the data information of different location.Although this method is able to solve This problem, but the problem of programming development amount is big, and the pointer address for needing to carry out complexity is converted, easy error is brought simultaneously.With Main core piece performance used in embedded system it is higher and higher, ram space is increasing, has better way to can solve this and asks Topic.
Summary of the invention
The object of the present invention is to provide working page when a kind of calibration of embedded system and page switching method is referred to, this is embedded When system calibrating working page and with reference to page switching method overcome method in the prior art solve calibration special chip value compared with The problem of programming development amount is big, and the pointer address for needing to carry out complexity is converted, easy error is brought while high problem, is realized Working page and reference page switching when embedded system calibration.
To achieve the goals above, working page and reference page switching side when being demarcated the present invention provides a kind of embedded system Method, the switching method include:
Step 1, the scalar quantity data of reference page are stored in the first memory, the memory block of working page is set to second In memory, and space phase occupied by scalar quantity data of the occupied space in memory block of the working page with the reference page Together;
Step 2, blade-rotating in being marked in the second memory, and space occupied by the memory block of the middle blade-rotating and the work Space occupied by the memory block of page is identical;
Step 3, in the case where embedded system initializes, by the scalar quantity data copy of reference page to the working page Memory block in;
It step 4, is all by work for reading and writing for scalar quantity data during operation for embedded system The scalar quantity data of the memory block of page are operated;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to reference page operation, controller will first work as Data copy in the memory block of preceding working page is into middle blade-rotating, then by reference page data copy into working page;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to working page operation, controller is by transfer Data copy with the original data of page of resuming work and is run into working page in memory block in page.
Preferably, in step 1, Nonvolatile memory is saved as in described first, it can only in the Nonvolatile memory It reads.
Preferably, in step 1 and step 2, random access memory is saved as in described second, in random access memory In can read and write.
Preferably, in step 1, storage address 0x0000 to 0x0FFF is divided into reference area.
Preferably, in step 1, storage address 0x6000 to 0x6FFF is divided into workspace.
Preferably, in step 2, storage address 0x7000 to 0x7FFF is divided into transfer area.
Working page and with reference to page switching method it is by above-mentioned embodiment, when embedded system calibration of the invention Page data is either referred to the gauged address read and write always when system operation still to work page data, is all unified for The address of working page is operated, the exchange of nominal data is realized by block copy, code is more reliable.
Other features and advantages of the present invention will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
The drawings are intended to provide a further understanding of the invention, and constitutes part of specification, with following tool Body embodiment is used to explain the present invention together, but is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is working page and the master chip with reference to page switching method when illustrating a kind of embedded system calibration of the invention Memory space partition structure figure;
Fig. 2 is working page and the process with reference to page switching method when illustrating a kind of embedded system calibration of the invention Figure.
Specific embodiment
Below in conjunction with attached drawing, detailed description of the preferred embodiments.It should be understood that this place is retouched The specific embodiment stated is merely to illustrate and explain the present invention, and is not intended to restrict the invention.
The present invention provides working page when a kind of embedded system is demarcated and refers to page switching method, which includes:
Step 1, the scalar quantity data of reference page are stored in the first memory, the memory block of working page is set to second In memory, and space phase occupied by scalar quantity data of the occupied space in memory block of the working page with the reference page Together;
Step 2, blade-rotating in being marked in the second memory, and space occupied by the memory block of the middle blade-rotating and the work Space occupied by the memory block of page is identical;
Step 3, in the case where embedded system initializes, by the scalar quantity data copy of reference page to the working page Memory block in;
It step 4, is all by work for reading and writing for scalar quantity data during operation for embedded system The scalar quantity data of the memory block of page are operated;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to reference page operation, controller will first work as Data copy in the memory block of preceding working page is into middle blade-rotating, then by reference page data copy into working page;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to working page operation, controller is by transfer Data copy with the original data of page of resuming work and is run into working page in memory block in page.
By above-mentioned embodiment, blade-rotating in one piece is marked off, realizes the switching of the data of reference page and working page, page Data transmission between face only needs to increase realization one piece of data block copy code, this is very easy in embedded systems It realizes.The conversion of address pointed by all scalar quantity pointers is not needed to carry out, code development quantity is small.Always to mark when system is run The quantitative address read and write either refers to page data and still works page data, be all unified for the address of working page into Row operation, the exchange of nominal data is realized by block copy, and code is more reliable.
In a kind of specific embodiment of the invention, in step 1, Nonvolatile memory is saved as in described first, It can only be read in the Nonvolatile memory.
In a kind of specific embodiment of the invention, in step 1 and step 2, arbitrary access is saved as in described second Memory can read and write in random access memory.The present invention can make full use of the RAM memory space of chip The switching of working page and reference page when realizing calibration.
In a kind of specific embodiment of the invention, in step 1, storage address 0x0000 to 0x0FFF is divided into Reference area.
In this embodiment, in step 1, storage address 0x6000 to 0x6FFF is divided into workspace.
In this embodiment, in step 2, storage address 0x7000 to 0x7FFF is divided into transfer area.
Storage address 0x0000 to 0x0FFF is divided into reference area, this partial region is the section Flash, when on-line proving only Data can be read, data cannot be written;Storage address 0x6000 to 0x6FFF is divided into workspace, this partial region is the area RAM Between, data can be read and write;Storage address 0x7000 to 0x7FFF is divided into transfer area, this partial region is the section RAM, Data can be read and write.
It is described the prefered embodiments of the present invention in detail above in conjunction with attached drawing, still, the present invention is not limited to above-mentioned realities The detail in mode is applied, within the scope of the technical concept of the present invention, a variety of letters can be carried out to technical solution of the present invention Monotropic type, these simple variants all belong to the scope of protection of the present invention.
It is further to note that specific technical features described in the above specific embodiments, in not lance In the case where shield, can be combined in any appropriate way, in order to avoid unnecessary repetition, the present invention to it is various can No further explanation will be given for the combination of energy.
In addition, various embodiments of the present invention can be combined randomly, as long as it is without prejudice to originally The thought of invention, it should also be regarded as the disclosure of the present invention.

Claims (5)

1. working page and referring to page switching method when a kind of embedded system is demarcated, which is characterized in that the switching method includes:
Step 1, the scalar quantity data of reference page are stored in the first memory, the memory block of working page is set to the second memory In, and the occupied space in memory block of the working page is identical as space occupied by the scalar quantity data of the reference page;
Step 2, blade-rotating in being marked in the second memory, and space occupied by the memory block of the middle blade-rotating and the working page Space occupied by memory block is identical;
Step 3, in the case where embedded system initializes, by scalar quantity data copy the depositing to the working page of reference page In storage area;
It step 4, is all by working page for reading and writing for scalar quantity data during operation for embedded system The scalar quantity data of memory block are operated;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to reference page operation, controller is first by current work Make the data copy in the memory block of page into middle blade-rotating, then by reference page data copy into working page;
It is requested when host computer issues, it is desirable that when current embedded system will be switched to working page operation, controller will be in middle blade-rotating Memory block in data copy into working page, with the original data of page of resuming work and run;
In step 1, Nonvolatile memory is saved as in described first, can only read in the Nonvolatile memory.
2. embedded system according to claim 1 demarcate when working page and refer to page switching method, which is characterized in that In step 1 and step 2, random access memory is saved as in described second, can be read and write in random access memory.
3. embedded system according to claim 1 demarcate when working page and refer to page switching method, which is characterized in that In step 1, storage address 0x0000 to 0x0FFF is divided into reference area.
4. embedded system according to claim 1 demarcate when working page and refer to page switching method, which is characterized in that In step 1, storage address 0x6000 to 0x6FFF is divided into workspace.
5. embedded system according to claim 1 demarcate when working page and refer to page switching method, which is characterized in that In step 2, storage address 0x7000 to 0x7FFF is divided into transfer area.
CN201610188100.0A 2016-03-24 2016-03-24 Embedded system demarcate when working page and refer to page switching method Expired - Fee Related CN105868129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610188100.0A CN105868129B (en) 2016-03-24 2016-03-24 Embedded system demarcate when working page and refer to page switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610188100.0A CN105868129B (en) 2016-03-24 2016-03-24 Embedded system demarcate when working page and refer to page switching method

Publications (2)

Publication Number Publication Date
CN105868129A CN105868129A (en) 2016-08-17
CN105868129B true CN105868129B (en) 2018-12-28

Family

ID=56626384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610188100.0A Expired - Fee Related CN105868129B (en) 2016-03-24 2016-03-24 Embedded system demarcate when working page and refer to page switching method

Country Status (1)

Country Link
CN (1) CN105868129B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871001B (en) * 2019-03-06 2023-04-18 普华基础软件股份有限公司 Method for calibrating large data volume of engine
CN116009446A (en) * 2022-12-28 2023-04-25 上海临港电力电子研究有限公司 XCP calibration method, system, electronic device and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645045A (en) * 2008-07-30 2010-02-10 威睿公司 Memory management using transparent page transformation
CN102298617A (en) * 2011-08-02 2011-12-28 百度在线网络技术(北京)有限公司 Method for obtaining target page and equipment
CN103345476A (en) * 2013-06-09 2013-10-09 北京百度网讯科技有限公司 Method and device for determining present information corresponding to destination page
CN104199787A (en) * 2014-08-28 2014-12-10 北京经纬恒润科技有限公司 Method and system for realizing function of switching calibrating pages
JP2014235641A (en) * 2013-06-04 2014-12-15 キヤノン株式会社 Device to estimate page description time, and control method and program of the device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645045A (en) * 2008-07-30 2010-02-10 威睿公司 Memory management using transparent page transformation
CN102298617A (en) * 2011-08-02 2011-12-28 百度在线网络技术(北京)有限公司 Method for obtaining target page and equipment
JP2014235641A (en) * 2013-06-04 2014-12-15 キヤノン株式会社 Device to estimate page description time, and control method and program of the device
CN103345476A (en) * 2013-06-09 2013-10-09 北京百度网讯科技有限公司 Method and device for determining present information corresponding to destination page
CN104199787A (en) * 2014-08-28 2014-12-10 北京经纬恒润科技有限公司 Method and system for realizing function of switching calibrating pages

Also Published As

Publication number Publication date
CN105868129A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
US9858008B2 (en) Method to reduce flash memory IOs with host maintained address mapping table
US11347444B2 (en) Memory device for controlling operations according to different access units of memory
EP3279788A1 (en) Access method, device and system for expanding memory
US20130073793A1 (en) Memory device
US20220237041A1 (en) Parallel processing system performing in-memory processing
US20130073795A1 (en) Memory device and method of controlling the same
US20170255565A1 (en) Method and apparatus for providing a contiguously addressable memory region by remapping an address space
US9710191B1 (en) Rapid memory buffer write storage system and method
CN104424030A (en) Sharing memory multi-process operation method and device
KR102471151B1 (en) Memory system and method of controlling the same
US9286208B2 (en) Controller controlling an interleave operation, solid-state drive including the controller, and control method controlling an interleave operation
KR100539251B1 (en) Memory controller with a read-modify-write function and SOC having the memory controller
US7278001B2 (en) Memory card, semiconductor device, and method of controlling semiconductor memory
JPS6376034A (en) Multiple address space control method
CN105868129B (en) Embedded system demarcate when working page and refer to page switching method
CN105843771A (en) Method for communication among EDMA (enhanced direct memory access) devices with different bandwidths in multi-core DSP (digital signal processor)
JP6004463B2 (en) Storage device and control method thereof
JP2018500697A (en) Method and apparatus for detecting transaction conflicts and computer system
US20140013066A1 (en) Memory sub-system and computing system including the same
US10599589B2 (en) Semiconductor device and flash-memory control method
CN118550453A (en) Memory system having multiple memory columns and method of operating the same
JP2018502392A (en) Method for a master device to access a plurality of slave devices with registers over a network
TWI488040B (en) Buffer managing method and buffer controller thereof
CN106354424A (en) Memory controller
JP4542556B2 (en) Semiconductor memory system

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181228