CN113312207A - Data storage method adopting ferroelectric memory and programmable logic controller thereof - Google Patents
Data storage method adopting ferroelectric memory and programmable logic controller thereof Download PDFInfo
- Publication number
- CN113312207A CN113312207A CN202110496904.8A CN202110496904A CN113312207A CN 113312207 A CN113312207 A CN 113312207A CN 202110496904 A CN202110496904 A CN 202110496904A CN 113312207 A CN113312207 A CN 113312207A
- Authority
- CN
- China
- Prior art keywords
- data
- ferroelectric memory
- area
- data area
- backup
- 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
Links
- 238000013500 data storage Methods 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C11/00—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
- G11C11/21—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
- G11C11/22—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using ferroelectric elements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention provides a data storage method adopting a ferroelectric memory and a programmable logic controller thereof, wherein the data of the existing data area and the data of a backup data area are compared, if different data are found, the different data are written into the backup data area and the ferroelectric memory, and then the data of the existing data area and the data of the backup data area are restarted to be detected until the existing data area and the backup data area are completely the same.
Description
Technical Field
The invention relates to the field of computer operation, in particular to a data storage method adopting a ferroelectric memory and a programmable logic controller thereof.
Background
At present, the main memory of the programmable logic controller is an SRAM (static random access memory), the data storage rate of the SRAM is very fast, but the biggest disadvantage of the SRAM is that a battery must be kept in stock to supply power, the transportation of the programmable logic controller is very inconvenient due to the existence of the battery, and the ferroelectric memory is a good substitute due to the characteristic that the ferroelectric memory does not need to be kept in stock power, however, the data storage rate of the ferroelectric memory is not very fast, so when the ferroelectric memory is used as a memory, a long time is needed to store when the data amount is large, and the running real-time performance of the whole system is affected, and therefore, a method is needed to enable the ferroelectric memory to replace the SRAM as the memory of the programmable logic controller.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a data storage method adopting a ferroelectric memory and a programmable logic controller thereof, and the technical scheme is as follows:
in a first aspect, the present invention provides a data storage method using a ferroelectric memory, which is applied to a programmable logic controller, where the programmable logic controller includes a memory and a ferroelectric memory, the memory includes an existing data area and a backup data area, and the method includes:
comparing the data of the existing data area with the data of the backup data area;
if different data are found, writing the different data into the backup data area and the ferroelectric memory;
and then restarting to detect the data of the existing data area and the data of the backup data area until the existing data area and the backup data area are completely the same.
Furthermore, a data storage area is arranged in the ferroelectric memory, and data is stored in the data storage area.
Further, the original data of the backup data area is derived from the data storage area.
Further, when the programmable logic controller is powered off and data is required to be stored in a power-off mode, the method is automatically operated.
Further, after a different data between the existing data area and the backup data area is found, the subsequent data is not detected any more.
Further, the storing and writing of a different data is done within a time period.
In a second aspect, the present invention further provides a programmable logic controller, which employs any one of the above data storage methods using a ferroelectric memory, including:
a processor;
the memory is in signal connection with the processor;
and the processor and the memory are in signal connection with the ferroelectric memory.
Further, the memory includes an existing data area for storing existing data and a backup data area for reading backup data from the ferroelectric memory.
Further, the processor controls the existing data area and the backup data area to perform data comparison.
Further, the processor may control the existing data area to write data into the ferroelectric memory.
Compared with the prior art, the invention provides a data storage method adopting a ferroelectric memory and a programmable logic controller thereof, the ferroelectric memory is adopted to replace an SRAM as a memory of the programmable logic controller, however, the data storage rate of the ferroelectric memory is lower than that of the SRAM, so that when the data amount is more, a longer time is needed for storage, and further the real-time performance of the operation of the whole system is influenced.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart of a data storage method using a ferroelectric memory;
fig. 2 is a schematic structural diagram of a programmable logic controller.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as up, down, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplicity of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In a first aspect, referring to fig. 1, the present invention provides a data storage method using a ferroelectric memory, which is applied to a programmable logic controller, where the programmable logic controller includes a memory and a ferroelectric memory, and the memory includes an existing data area and a backup data area, where the method includes:
step S1, comparing the data in the existing data area with the data in the backup data area;
step S2, if different data are found, writing the different data into the backup data area and the ferroelectric memory;
step S3, then, the detection of the data of the existing data area and the data of the backup data area is restarted until the existing data area and the backup data area are completely the same.
In this embodiment, for the slow data storage rate of the ferroelectric memory, the inventor selects to add a backup data area on the original basis, and compares the existing data area with the backup data area to select different data in the existing data area, so as to reduce the data to be stored, thereby speeding up the data storage rate and further ensuring the real-time performance of the system operation.
Furthermore, a data storage area is arranged in the ferroelectric memory, data is stored in the data storage area, and original data of the backup data area is exported from the data storage area.
In this embodiment, the data structures of the data storage area, the existing data area, and the backup data area are the same, and when a different data is found between the existing data area and the backup data area, the different data covers the original data of the data storage area and the original data of the backup data area, thereby avoiding the finding of the same data by the next comparison.
Further, when the programmable logic controller is powered off and data is required to be stored in a power-off mode, the method is automatically operated.
In the embodiment, data power failure storage is an important part in an industrial system, some data which are converted in real time and need to be recorded in the final result are likely to be lost in power failure, the prior art adopts the combination of an SRAM and a battery, the data storage rate of the SRAM is fast and can be directly stored, but the transportation of the battery is a big problem, so that the ferroelectric memory is adopted as a memory for replacing the SRAM, and the method provided by the invention can ensure that the ferroelectric memory can store all data which need to be changed within a short period of time of power failure storage by reducing the data which need to be stored.
Further, after a different data is found between the existing data area and the backup data area, the subsequent data is not detected any more.
In this embodiment, the data structures of the data storage areas, the existing data areas and the backup data areas are the same, which means that the positions of the data storage areas, the existing data areas and the backup data areas where data is stored are the same, so that the data comparison between the existing data areas and the backup data areas is actually the numerical comparison at the same position, when the numerical value at the same position is found to be different, the numerical value in the backup data area is changed, the same position in the data storage areas is found and the numerical value is changed, when different data between the existing data areas and the backup data areas is found, the subsequent data detection is not performed, because if the scanning is continued, a second different data may be found before the first different data is completely written, which may cause data storage congestion, so before the first different data is completely written into the ferroelectric memory, subsequent data is no longer detected.
Further, the storing and writing of a different data is done within a time period.
In this embodiment, the writing of the storage of one different data is completed in one time period, assuming that there are two different data in the existing data area, which are respectively the first different data arranged before the comparison and the second different data arranged after the comparison, in the first time period, since the first different data is arranged in the front, the first different data is compared, the first different data covers the original data in the data storage area and the backup data area, then the second time period is started, in the second time period, the first different data does not exist because the original data in the original position between the existing data area and the backup data area is the same, so that only the second different data arranged after the comparison can be detected, the second different data covers the original data in the data storage area and the backup data area, then the third time period is started, in the third time period, the data in the existing data area and the data in the backup data area are completely the same, so that in the third time period, after the comparison step is completed, the whole comparison and storage process is ended.
In a second aspect, referring to fig. 2, the present invention further provides a programmable logic controller, which applies any one of the above data storage methods using a ferroelectric memory, including:
a processor 100;
a memory 102, the memory 102 being in signal connection with the processor 100;
In the present embodiment, the ferroelectric memory 101 is a random access memory, which combines fast read and write accesses of the dynamic random access memory with the capability of retaining data after the power is turned off, and the ferroelectric memory 101 has the characteristics of stable data storage and storage without a battery compared with the SRAM in the prior art, thereby solving the problem of battery transportation of the programmable logic controller using the SRAM.
Further, the memory 102 includes an existing data area 103 and a backup data area 104, the existing data area 103 is used for storing existing data, the backup data area 104 reads backup data from the ferroelectric memory 101, the processor 100 controls the existing data area 103 and the backup data area 104 to perform data comparison, and the processor 100 controls the existing data area 103 to write data into the ferroelectric memory 101.
In this embodiment, in order to solve the problem of insufficient data storage rate of the ferroelectric memory 101, the processor 100 controls the memory to be divided into two data areas, one is the existing data area 103 and the other is the backup data area 104, the existing data area 103 is used for storing existing data (data characteristics such as production quantity, etc.), when the processor 100 is required to store the existing data, the processor 100 controls the existing data area 103 and the backup data area 104 to perform data comparison, find out the first different data, then the processor 100 covers the original data of the backup data area 104 and the original data of the ferroelectric memory 101 with the first different data arranged in sequence, so that the second different data arranged in sequence becomes the first different data arranged in sequence, and so on, and finally the data of the existing data area 103 and the backup data area 104 are completely the same, and stop the comparison, when the comparison is stopped, the data in the existing data area 103, the backup data area 104 and the ferroelectric memory 101 are the same, and this design can reduce the data stored in the ferroelectric memory 101, so that the whole storage process can be completed in a shorter time.
It should be noted that the comparison and storage of a different data is completed in one time period, the comparison and storage of the next different data is completed in the next time period, and the original data in the backup data area 104 is imported from the ferroelectric memory 101, so that the data in the backup data area 104 and the ferroelectric memory 101 are consistent throughout the storage process.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the foregoing and various other changes, omissions and deviations in the form and detail thereof may be made without departing from the scope of this invention.
Claims (10)
1. A data storage method using a ferroelectric memory is characterized in that the method is applied to a programmable logic controller, the programmable logic controller comprises a memory and the ferroelectric memory, the memory comprises an existing data area and a backup data area, and the method comprises the following steps:
comparing the data of the existing data area with the data of the backup data area;
if different data are found, writing the different data into the backup data area and the ferroelectric memory;
and then restarting to detect the data of the existing data area and the data of the backup data area until the existing data area and the backup data area are completely the same.
2. A data storage method using a ferroelectric memory as in claim 1, wherein a data storage area is provided in said ferroelectric memory, and data is stored in said data storage area.
3. A data storage method using a ferroelectric memory as in claim 2, wherein original data of said backup data area is derived from said data storage area.
4. A method of storing data using a ferroelectric memory as in claim 1, wherein said method is automatically performed when said programmable logic controller is powered down for storing data in a powered down state.
5. A data storage method using a ferroelectric memory as in claim 1, wherein subsequent data is not detected after finding one of said different data between said existing data area and said backup data area.
6. A data storage method using a ferroelectric memory as in claim 1, wherein said storing and writing of said different data are each completed within a time period.
7. A programmable logic controller, wherein a data storage method using a ferroelectric memory according to any one of claims 1 to 6 is employed, comprising:
a processor;
the memory is in signal connection with the processor;
and the processor and the memory are in signal connection with the ferroelectric memory.
8. The plc of claim 7, wherein the memory includes an existing data area for storing existing data and a backup data area for reading backup data from the ferroelectric memory.
9. The programmable logic controller of claim 8, wherein the processor controls the data comparison between the existing data area and the backup data area.
10. The programmable logic controller of claim 8, wherein said processor controls said existing data area to write data into said ferroelectric memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110496904.8A CN113312207B (en) | 2021-05-07 | 2021-05-07 | Data storage method adopting ferroelectric memory and programmable logic controller thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110496904.8A CN113312207B (en) | 2021-05-07 | 2021-05-07 | Data storage method adopting ferroelectric memory and programmable logic controller thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113312207A true CN113312207A (en) | 2021-08-27 |
CN113312207B CN113312207B (en) | 2023-12-05 |
Family
ID=77371587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110496904.8A Active CN113312207B (en) | 2021-05-07 | 2021-05-07 | Data storage method adopting ferroelectric memory and programmable logic controller thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113312207B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030122578A1 (en) * | 2001-12-28 | 2003-07-03 | Shoichi Masui | Programmable logic device with ferroelectric configuration memories |
US20060274566A1 (en) * | 2005-06-02 | 2006-12-07 | Daisaburo Takashima | Memory system combining flash EEPROM and FeRAM |
CN101251826A (en) * | 2007-02-27 | 2008-08-27 | 深圳市同洲电子股份有限公司 | Flash memory, method and apparatus for data management of flash memory |
CN101634958A (en) * | 2008-07-23 | 2010-01-27 | 佛山市顺德区顺达电脑厂有限公司 | Flash memory with secondary backup mechanism |
CN105512056A (en) * | 2014-09-24 | 2016-04-20 | 中兴通讯股份有限公司 | Method and device for data storage, and terminal |
CN205563224U (en) * | 2016-02-23 | 2016-09-07 | 西门子公司 | Programmable logic controler and data process system |
US9761312B1 (en) * | 2016-03-16 | 2017-09-12 | Micron Technology, Inc. | FeRAM-DRAM hybrid memory |
US20180059958A1 (en) * | 2016-08-31 | 2018-03-01 | Micron Technology, Inc. | Hybrid memory device |
CN111443873A (en) * | 2020-03-27 | 2020-07-24 | 深圳天岳创新科技有限公司 | Method and device for managing Nand Flash memory |
-
2021
- 2021-05-07 CN CN202110496904.8A patent/CN113312207B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030122578A1 (en) * | 2001-12-28 | 2003-07-03 | Shoichi Masui | Programmable logic device with ferroelectric configuration memories |
US20060274566A1 (en) * | 2005-06-02 | 2006-12-07 | Daisaburo Takashima | Memory system combining flash EEPROM and FeRAM |
CN101251826A (en) * | 2007-02-27 | 2008-08-27 | 深圳市同洲电子股份有限公司 | Flash memory, method and apparatus for data management of flash memory |
CN101634958A (en) * | 2008-07-23 | 2010-01-27 | 佛山市顺德区顺达电脑厂有限公司 | Flash memory with secondary backup mechanism |
CN105512056A (en) * | 2014-09-24 | 2016-04-20 | 中兴通讯股份有限公司 | Method and device for data storage, and terminal |
CN205563224U (en) * | 2016-02-23 | 2016-09-07 | 西门子公司 | Programmable logic controler and data process system |
US9761312B1 (en) * | 2016-03-16 | 2017-09-12 | Micron Technology, Inc. | FeRAM-DRAM hybrid memory |
US20180059958A1 (en) * | 2016-08-31 | 2018-03-01 | Micron Technology, Inc. | Hybrid memory device |
CN109643714A (en) * | 2016-08-31 | 2019-04-16 | 美光科技公司 | Composite memory device |
CN111443873A (en) * | 2020-03-27 | 2020-07-24 | 深圳天岳创新科技有限公司 | Method and device for managing Nand Flash memory |
Also Published As
Publication number | Publication date |
---|---|
CN113312207B (en) | 2023-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9275696B2 (en) | Energy conservation in a multicore chip | |
US9727462B2 (en) | Runtime backup of data in a memory module | |
US6876593B2 (en) | Method and apparatus for partial refreshing of DRAMS | |
CN100474271C (en) | Multi-level buffering type memory system and method therefor | |
US8661190B2 (en) | Flash memory device and data access method thereof | |
CN103778065A (en) | Flash memory and bad block managing method thereof | |
CN101901189B (en) | User data updating method and method for recovering user data | |
CN101963891A (en) | Method and device for data storage and processing, solid-state drive system and data processing system | |
US20110197018A1 (en) | Method and system for perpetual computing using non-volatile random access memory | |
CN104360825B (en) | One kind mixing memory system and its management method | |
CN111475425A (en) | Method for managing flash memory module and related flash memory controller and electronic device | |
CN102981977A (en) | Data storage method capable of prolonging service life of abode flash player (FLASH) | |
CN113223566B (en) | Control system and control method of memory | |
CN106200860B (en) | Hard disk power consumption and hard disk power consumption management service control method and device | |
CN112181725B (en) | Method and system for power-down anti-pulling backup of on-chip and off-chip data of embedded system | |
KR20050076156A (en) | Data recovery device and method thereof | |
CN104794066A (en) | Storage apparatus and method for selecting storage area where data is written | |
CN113312207A (en) | Data storage method adopting ferroelectric memory and programmable logic controller thereof | |
US20200233795A1 (en) | Data storage system and precharge policy setting method therefor | |
CN103870204A (en) | Data writing and reading method in cache as well as cache controller | |
CN102455979B (en) | Data protection method for damaged memory cell | |
US10496303B2 (en) | Method for reducing power consumption memory, and computer device | |
CN101620575A (en) | Flash card and method for flash memory to prevent data from being damaged | |
CN111026681A (en) | Caching method, caching system and caching medium based on Ceph | |
CN111091861A (en) | Solid state disk power failure protection method based on high-speed nonvolatile memory |
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 |