CN105095009B - A kind of method for deleting and device of memory - Google Patents
A kind of method for deleting and device of memory Download PDFInfo
- Publication number
- CN105095009B CN105095009B CN201510353868.4A CN201510353868A CN105095009B CN 105095009 B CN105095009 B CN 105095009B CN 201510353868 A CN201510353868 A CN 201510353868A CN 105095009 B CN105095009 B CN 105095009B
- Authority
- CN
- China
- Prior art keywords
- erasing
- target area
- numerical value
- slave computer
- specified numerical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Storage Device Security (AREA)
Abstract
The embodiment of the invention provides a kind of method for deleting of memory and devices, wherein the described method includes: receiving the erasing check command that host computer is sent;It include file destination information in the erasing check command;Target area is determined using the file destination information;It include target data in the target area;It is verified according to default verification rule for target data, obtains check results;The host computer judges whether to wipe the target area for obtaining the check results, and using the check results, if so, the host computer generates erasing order;Receive the erasing order that the host computer is sent;It is wiped using the erasing order for the target area.Time overhead of the embodiment of the present invention to reduce erasing memory, improves the service life of memory.
Description
Technical field
The present invention relates to memory data processing technology fields, more particularly to the method for deleting and one kind of a kind of memory
The erasing apparatus of memory.
Background technique
As the rapid development and extensive use of various electronic devices and embedded system, such as computer, individual digital help
Reason, mobile phone, digital camera etc., largely need it is a kind of can repeatedly program, capacity is big, read and write, wipe it is quick and easy, simple,
Peripheral components are few, cheap memory.
Usually need to guarantee that the storage region in the memory of wanted burning program is before burning program in memory
Sky, then with regard to needing to wipe memory before burning program, however, being not in practical applications institute for memory
Erasing be all it is necessary, directly to memory erasing there are two obvious drawback: (1) time for increasing erasing memory opens
Pin;(2) service life of memory is reduced.
Therefore, a technical problem that needs to be urgently solved by technical personnel in the field at present is exactly: proposing a kind of memory
Erasing mechanism, to reduce erasing memory time overhead, improve the service life of memory.
Summary of the invention
In view of the above problems, it proposes the embodiment of the present invention and overcomes the above problem or at least partly in order to provide one kind
A kind of method for deleting of the memory to solve the above problems and a kind of corresponding erasing apparatus of memory.
To solve the above-mentioned problems, the embodiment of the invention discloses a kind of method for deleting of memory, comprising:
Receive the erasing check command that host computer is sent;It include file destination information in the erasing check command;
Target area is determined using the file destination information;It include target data in the target area;
It is verified according to default verification rule for target data, obtains check results;The host computer is for obtaining
The check results, and judge whether to wipe the target area using the check results, if so, described upper
Machine generates erasing order;
Receive the erasing order that the host computer is sent;
It is wiped using the erasing order for the target area.
Preferably, the file destination information includes document size information, and the target area is located at the storage of slave computer
In region, described the step of determining target area using the file destination information, includes:
Address range in storage region is determined using document size information;
Using the corresponding storage region of address range described in the storage region as target area.
Preferably, the slave computer includes register, described to be verified according to default verification rule for target data,
Obtain check results the step of include:
Read the target data in the target area;
It is compared using the target data with preset data;
If the target data is consistent with preset data, the deposit is written using the first specified numerical value as check results
In device;
If the target data and preset data are inconsistent, posted using the second specified numerical value as described in check results write-in
In storage.
The embodiment of the invention also discloses a kind of method for deleting of memory, comprising:
Erasing check command is sent to slave computer;It include file destination information in the erasing check command;The bottom
Machine is used to determine target area using file destination information, and according to default verification for the target data in the target area
It is verified, obtains check results;
The check results are obtained from the slave computer;
Judge whether to wipe the target area using the check results;
If so, generating erasing order and being sent to the slave computer;
If it is not, the slave computer then is written in the corresponding file destination of the file destination information.
Preferably, the slave computer includes register, includes specified numerical value in the register, described to obtain from slave computer
The step of check results are as follows:
The specified numerical value is read from the register of the slave computer.
Preferably, the specified numerical value includes the first specified numerical value or the second specified numerical value, described to be sentenced using check results
Disconnected the step of whether wiping the target area includes:
Judge the specified numerical value for the first specified numerical value or the second specified numerical value;
If the specified numerical value is the first specified numerical value, it is judged to needing to be wiped for the target area;
If the specified numerical value is the second specified numerical value, it is determined as without being wiped for the target area.
Preferably, before the step of check command to slave computer is wiped in the transmission, further includes:
Default verification rule is downloaded to slave computer.
Preferably, the method further include:
When slave computer changes, default verification rule is downloaded to the slave computer of the change.
The embodiment of the invention also discloses a kind of erasing apparatus of memory, comprising:
Check command receiving module is wiped, for receiving the erasing check command of host computer transmission;The erasing verification life
It include file destination information in order;
Target area determining module, for determining target area using the file destination information;In the target area
Including target data;
Correction verification module is wiped, for being verified according to default verification rule for target data, obtains check results;Institute
Host computer is stated to judge whether to wipe the target area for obtaining the check results, and using the check results
It removes, if so, the host computer generates erasing order;
Erasing order receiving module, the erasing order sent for receiving the host computer;
Module is wiped in target area, for being wiped using the erasing order for the target area.
Preferably, the file destination information includes document size information, and the target area is located at the storage of slave computer
In region, the target area determining module includes:
Address range determines submodule, for determining the address range in storage region using document size information;
Target area determines submodule, for using the corresponding storage region of address range described in the storage region as
Target area.
Preferably, the slave computer includes register, and the erasing correction verification module includes:
Target data reading submodule, for reading the target data in the target area;
Data Comparative sub-module, for being compared using the target data with preset data;If the target data
It is consistent with preset data, then it calls, if the target data is inconsistent with preset data, calls;
Submodule is written in first numerical value, for being written the first specified numerical value as check results in the register;
Submodule is written in second value, for being written the second specified numerical value as check results in the register.
The embodiment of the invention also discloses a kind of erasing apparatus of memory, comprising:
Check command sending module is wiped, for sending erasing check command to slave computer;In the erasing check command
Including file destination information;The slave computer is used to that file destination information to be used to determine target area, and according to default verification needle
Target data in the target area is verified, check results are obtained;
Check results obtain module, for obtaining the check results from the slave computer;
Judgment module is wiped, for judging whether to wipe the target area using the check results;If so,
Erasing order generation module is then called, if it is not, then calling write-in file destination module;
Erasing order generation module, for generating erasing order and being sent to the slave computer;
File destination module is written, for the slave computer to be written in the corresponding file destination of the file destination information.
Preferably, the slave computer includes register, includes specified numerical value in the register, and the check results obtain
Module includes:
Specified numerical value reading submodule, for reading the specified numerical value from the register of the slave computer.
Preferably, the specified numerical value includes the first specified numerical value or the second specified numerical value, the erasing judgment module packet
It includes:
Specified numerical value judging submodule, for judging the specified numerical value for the first specified numerical value or the second specified numerical value;
First decision sub-module is judged to needing for described if being the first specified numerical value for the specified numerical value
It is wiped target area;
Second decision sub-module is determined as if being the second specified numerical value for the specified numerical value without for described
It is wiped target area.
Preferably, the device further include:
First download module, for default verification rule to be downloaded to slave computer.
Preferably, the device further include:
Second download module, for when slave computer changes, default verification rule to be downloaded under the change
Position machine.
The embodiment of the present invention includes following advantages:
Host computer sends the erasing school for carrying file destination information corresponding to file destination in embodiments of the present invention
Order is tested, slave computer then determines target area according to file destination information, carries out erasing verification for target area, and upper
Judge whether to need to be wiped for the target area in machine, if host computer judgement is wiped, in slave computer
In receive the erasing order of host computer transmission, slave computer can then be wiped according to erasing order for target area, and
After erasure completion, target area is written into file destination;If host computer determines without being wiped, can be directly by mesh
It marks file and target area is written.
The embodiment of the present invention, can be before downloading object file, according to target in the offline downloader project based on SWD
The file information carries out erasing verification in slave computer, and host computer then judges whether to need to carry out according to the check results in slave computer
Erasing carries out unnecessary erasing to avoid to memory, to reduce the time overhead of erasing memory, improves memory
Service life.
The work for wiping verification in embodiments of the present invention is carried out in slave computer, since slave computer itself executes verification
Function, speed is relatively fast, therefore can save time overhead.Meanwhile erasing is carried out to the target area in slave computer, it needs
The erasing verification of considerable time overhead, slave computer can be saved when memory is sky piece, i.e., slave computer is without appointing
When the chip of what data, time overhead caused by blindly wiping is carried out.
The embodiment of the present invention can first send the relevant assembly code of erasing verification rule in initial phase, host computer
To slave computer, in addition to this, when slave computer changes, host computer also sends the relevant assembly code of erasing verification rule
Slave computer after to change, to guarantee normally execute the work of erasing verification in slave computer.
Detailed description of the invention
Fig. 1 is a kind of step flow chart of the method for deleting embodiment 1 of memory of the invention;
Fig. 2 is a kind of step flow chart of the method for deleting embodiment 2 of memory of the invention;
Fig. 3 is the schematic diagram that step is wiped between a kind of upper computer and lower computer of the invention;
Fig. 4 is a kind of structural block diagram of the erasing apparatus embodiment 1 of memory of the invention;
Fig. 5 is a kind of structural block diagram of the erasing apparatus embodiment 2 of memory of the invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real
Applying mode, the present invention is described in further detail.
One of the core concepts of the embodiments of the present invention is, will be divided into erasing verification for the entire erase process of memory
With the two parts of erasing.Specifically, host computer will be used to realize a paragraph assembly of verification erasing verification (full F verification) function
Code downloads in slave computer, and when there is file destination to need to be written to slave computer, slave computer can start according to assembly code
Erasing verification is carried out to the target area for stored target file, after the completion of erasing verification, host computer is anti-according to slave computer
The check results of feedback judge whether to need to wipe target area.Even if in empty piece, since erasing verifies work
Work is completed in slave computer, and the required time is also very short, it is possible to be efficiently controlled the time overhead of erasing, be improved storage
The service life of device.
Referring to Fig.1, a kind of step flow chart of the method for deleting embodiment 1 of memory of the invention is shown, specifically may be used
To include the following steps:
Step 101, the erasing check command that host computer is sent is received;It include that file destination is believed in the erasing check command
Breath;
In the concrete realization, host computer refers to the equipment that can directly issue manipulation command, and slave computer is then according to host computer
The equipment that the manipulation command of sending executes operation.I.e. the manipulation command of host computer sending is to slave computer, and slave computer is further according to this behaviour
Control command interpretation operates itself or other equipment at corresponding operation.
In general, controller and service provider are host computers, and controlled person and attendee are slave computers, can also be with
It is interpreted as the relationship of host and slave, but it should be recognized that it is unalterable that the relationship of upper computer and lower computer, which is not, but
It can convert mutually.
In the concrete realization, there is two kinds of basic units of storage in memory, wipe storage unit (erase cell)
With memory cells (program cell), namely " 1 " and " 0 ", therefore corresponding it also there is erasing and program both
The basic operation of memory cell.Wherein, " 0 " is become to the process of " 1 ", is referred to as wiped;Conversely, " 1 " to be become to the mistake of " 0 "
Journey referred to as programs.
In embodiments of the present invention, file destination is the file that host computer will be burnt in slave computer, by file destination
It is burnt to before slave computer, the target area for needing to guarantee want in programming slave computer is sky, i.e. storage unit in target area
It is erasing storage unit, therefore needs to wipe target area.
In order to avoid carrying out unnecessary erasing operation, in slave computer before burning file destination, sent in host computer
The erasing check command of file destination information is carried to slave computer, and erasing school is carried out according to erasing check command in slave computer
It tests.
Step 102, target area is determined using the file destination information;It include target data in the target area;
In one preferred embodiment of the invention, the file destination information may include document size information, described
Target area is located in the storage region of slave computer, and the step 102 may include following sub-step:
Sub-step S11 determines the address range in storage region using document size information;
Sub-step S12, using the corresponding storage region of address range described in the storage region as target area.
Slave computer can determine the target area in the storage region of slave computer according to the size information of file destination.
In a kind of example of concrete application of the present invention, it is assumed that the size of file destination is 16K, then can be by the target area in slave computer
The address range in domain is determined as 0x08000000-0x08004000.
Step 103, it is verified according to default verification rule for target data, obtains check results;The host computer
Judge whether to wipe the target area for obtaining the check results, and using the check results, if so,
The host computer generates erasing order;
In one preferred embodiment of the invention, the slave computer may include register, and the step 103 can wrap
Include following sub-step:
Sub-step S21 reads the target data in the target area;
Sub-step S22 is compared using the target data with preset data;If the target data and preset data
Unanimously, then sub-step S23 is executed, if the target data is inconsistent with preset data, executes sub-step S24;
Sub-step S23 is written the first specified numerical value as check results in the register;
Sub-step S24 is written the second specified numerical value as check results in the register.
In embodiments of the present invention, the verification for verifying by the erasing of the target area to slave computer, and erasing being verified
As a result be written in slave computer particular address, host computer then can by read slave computer particular address check results, thus
Judge whether to need to wipe the target area in slave computer.
For example, the target data in the target area of read slave computer is compared with preset data 0xFFFFFFFF
Compared with as check results can be written in the R11 register of slave computer if the numerical value in target area is F entirely
Two specified numerical value 0 can then be write, whereas if the numerical value in target area is not F entirely in the R11 register of slave computer
Enter the first specified numerical value 1 as check results.
It should be noted that in embodiments of the present invention the first specified numerical value can also be used as by 0, and second is used as by 1
Specified numerical value, or check results can also be stored in slave computer using other modes, the embodiment of the present invention pair
This is without restriction.
Step 104, the erasing order that the host computer is sent is received;
Step 105, it is wiped using the erasing order for the target area.
In the concrete realization, if host computer needs to wipe the target area of slave computer according to check results judgement
It removing, then sends erasing order to slave computer, slave computer will be wiped according to erasing order for target area after receiving, and
After erasure completion, burning file destination in the target area.
It certainly, can if host computer is not necessarily to wipe the target area of slave computer according to check results judgement
Directly file destination to be written in target area, so as to avoid unnecessary erasing operation.
In the embodiment of the present invention, in the offline downloader project based on SWD, can in slave computer burning file destination
Before, erasing verification is carried out in slave computer according to file destination information, generates check results, and receive host computer according to
After the erasing order that check results are sent, just target area is wiped, to avoid carrying out unnecessary wiping to memory
It removes, reduces the time overhead of erasing memory, improve the service life of memory.
The work for wiping verification in embodiments of the present invention is carried out in slave computer, since slave computer itself executes verification
Function, speed is relatively fast, therefore can save time overhead.Meanwhile erasing is carried out to the target area in slave computer, it needs
The erasing verification of considerable time overhead, slave computer can be saved when memory is sky piece, carried out blindly erasing and caused
Time overhead.
Referring to Fig. 2, a kind of step flow chart of the method for deleting embodiment 2 of memory of the invention is shown, specifically may be used
To include the following steps:
In one preferred embodiment of the invention, in step 201, that is, the step of wiping check command to slave computer is sent
Before, the method can also include the following steps:
Default verification rule is downloaded to slave computer.
In initial phase, host computer needs to download to verification rule relevant assembly code in slave computer, so that can
Before the burning file destination in slave computer, erasing verification can be carried out in advance for target area.
Step 201, erasing check command is sent to slave computer;It include file destination information in the erasing check command;
The slave computer is used to determine target area using file destination information, and according to default verification in the target area
Target data is verified, and check results are obtained;
Step 202, the check results are obtained from the slave computer;
In one preferred embodiment of the invention, the slave computer may include register, can be in the register
Including specifying numerical value, the step 202 can be following sub-step:
Sub-step S31 reads the specified numerical value from the register of the slave computer.
In embodiments of the present invention, slave computer is tied according to the check results of storage region using specified numerical value as verification
Fruit is written in register, and host computer can then read the specified numerical value as check results from the register.
Step 203, judge whether to wipe the target area using the check results;If so, executing step
Rapid 204, if it is not, thening follow the steps 205;
In one preferred embodiment of the invention, the specified numerical value includes the first specified numerical value or the second specified number
Value, the step 203 may include following sub-step:
Sub-step S41 judges the specified numerical value for the first specified numerical value or the second specified numerical value;If the specified numerical value
For the first specified numerical value, then sub-step S42 is executed, if the specified numerical value is the second specified numerical value, executes sub-step S43;
Sub-step S42 is judged to needing to be wiped for the target area;
Sub-step S43 is determined as without being wiped for the target area.
A kind of example as the present invention as concrete application, if reading the first specified numerical value from R11 register
0, it indicates that the storage unit in target area is erasing storage unit, then determines not needing to wipe the target area, instead
It indicates that the storage unit in target area is program storage list if reading the second specified numerical value 1 from R11 register
Member then determines to need to wipe the target area.
Step 204, it generates erasing order and is sent to the slave computer;
Step 205, the slave computer is written into the corresponding file destination of the file destination information.
In one preferred embodiment of the invention, the method can also include the following steps:
When slave computer changes, default verification rule is downloaded to the slave computer of the change.
In embodiments of the present invention, the slave computer being connected with host computer is replaced, or has new slave computer to be linked into
When host computer, host computer requires for assembly code to be downloaded in slave computer, to guarantee that erasing can be normally carried out in slave computer
The work of verification.
In order to make those skilled in the art more fully understand the embodiment of the present invention, below using simple example come to storage
The process of device verification and erasing is described.
Referring to the schematic diagram for wiping step between a kind of upper computer and lower computer of the invention shown in Fig. 3, mutually it is being connected
SRAM has been respectively included in the upper computer and lower computer connect, and (Static Random Access Memory, static random-access are deposited
Reservoir) and FLASH (storage region), specifically, in this example, carrying out the step of erasing verifies can specifically include:
Step 1: before having file destination to need to be burnt to the FLASH of slave computer in host computer, host computer will realize school
The assembly code for testing function is written to the SRAM of slave computer;
Step 2: whether the FLASH of slave computer verification storage file destination is full F;
Step 3: slave computer returns to check results in the FLASH of host computer;
Step 4: host computer judges whether to need to wipe target area according to the check results that slave computer returns.
In embodiments of the present invention, host computer sends the erasing school for carrying file destination information corresponding to file destination
Order is tested, slave computer then determines target area according to file destination information, carries out erasing verification for target area, and upper
Judge whether to need to be wiped for the target area in machine, if host computer judgement is wiped, in slave computer
In receive the erasing order of host computer transmission, slave computer can then be wiped according to erasing order for target area, and
After erasure completion, target area is written into file destination;If host computer determines without being wiped, can be directly by mesh
It marks file and target area is written.
Due to can be before slave computer downloading object file, according to file destination information in bottom in the embodiment of the present invention
Erasing verification is carried out in machine, host computer then judges whether to be wiped according to the check results in slave computer, to avoid right
Memory carries out unnecessary erasing, to reduce the time overhead of erasing memory, improves the service life of memory.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method
It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to
According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented
Necessary to example.
Referring to Fig. 4, a kind of structural block diagram of the erasing apparatus embodiment 1 of memory of the invention is shown, it specifically can be with
Including following module:
Check command receiving module 301 is wiped, for receiving the erasing check command of host computer transmission;The erasing verification
It include file destination information in order;
Target area determining module 302, for determining target area using the file destination information;The target area
In include target data;
In one preferred embodiment of the invention, the file destination information may include document size information, described
Target area is located in the storage region of slave computer, and the target area determining module 302 may include following submodule:
Address range determines submodule, for determining the address range in storage region using document size information;
Target area determines submodule, for using the corresponding storage region of address range described in the storage region as
Target area.
Correction verification module 303 is wiped, for being verified according to default verification rule for target data, obtains verification knot
Fruit;The host computer for obtaining the check results, and using the check results judge whether to the target area into
Row erasing, if so, the host computer generates erasing order;
In one preferred embodiment of the invention, the slave computer may include register, the erasing correction verification module
303 may include following submodule:
Target data reading submodule, for reading the target data in the target area;
Data Comparative sub-module, for being compared using the target data with preset data;If the target data
It is consistent with preset data, then it calls, if the target data is inconsistent with preset data, calls;
Submodule is written in first numerical value, for being written the first specified numerical value as check results in the register;
Submodule is written in second value, for being written the second specified numerical value as check results in the register.
Erasing order receiving module 304, the erasing order sent for receiving the host computer;
Module 305 is wiped in target area, for being wiped using the erasing order for the target area.
Referring to Fig. 5, a kind of structural block diagram of the erasing apparatus embodiment 2 of memory of the invention is shown, it specifically can be with
Including following module:
Check command sending module 401 is wiped, for sending erasing check command to slave computer;The erasing check command
In include file destination information;The slave computer is used to that file destination information to be used to determine target area, and according to default verification
It is verified for the target data in the target area, obtains check results;
Check results obtain module 402, for obtaining the check results from the slave computer;
In one preferred embodiment of the invention, the slave computer may include register, include in the register
Specified numerical value, it may include following submodule that the check results, which obtain module 402:
Specified numerical value reading submodule, for reading the specified numerical value from the register of the slave computer.
Judgment module 403 is wiped, for judging whether to wipe the target area using the check results;If
It is then to call erasing order generation module, if it is not, then calling write-in file destination module;
In one preferred embodiment of the invention, the specified numerical value may include that the first specified numerical value or second are specified
Numerical value, the erasing judgment module 403 may include following submodule:
Specified numerical value judging submodule, for judging the specified numerical value for the first specified numerical value or the second specified numerical value;
First decision sub-module is judged to needing for described if being the first specified numerical value for the specified numerical value
It is wiped target area;
Second decision sub-module is determined as if being the second specified numerical value for the specified numerical value without for described
It is wiped target area.
Erasing order generation module 404, for generating erasing order and being sent to the slave computer;
File destination module 405 is written, for the bottom to be written in the corresponding file destination of the file destination information
Machine.
In one preferred embodiment of the invention, the device can also include following module:
First download module, for default verification rule to be downloaded to slave computer.
In one preferred embodiment of the invention, the device can also include following module:
Second download module, for when slave computer changes, default verification rule to be downloaded under the change
Position machine.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple
Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate
Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these
Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals
Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices
Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices
In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet
The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram
The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that
Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus
The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart
And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases
This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as
Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap
Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article
Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
The method for deleting to a kind of memory provided by the present invention and memory wipe a kind of device above, carry out
It is discussed in detail, used herein a specific example illustrates the principle and implementation of the invention, above embodiments
Illustrate to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, according to
According to thought of the invention, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification
It should not be construed as limiting the invention.
Claims (16)
1. a kind of method for deleting of memory, which is characterized in that be applied to slave computer, comprising:
Receive the erasing check command that host computer is sent;It include file destination information in the erasing check command;The erasing
Check command is for carrying out erasing verification;
Target area is determined using the file destination information;It include target data in the target area;
It is verified according to default verification rule for target data, obtains check results;The host computer is described for obtaining
Check results, and judge whether to wipe the target area using the check results, if so, the host computer is raw
At erasing order, if it is not, then directly the file destination is written in the target area;
Receive the erasing order that the host computer is sent;
It is wiped using the erasing order for the target area.
2. the method according to claim 1, wherein the file destination information includes document size information, institute
It states target area to be located in the storage region of slave computer, the step of determining target area using file destination information packet
It includes:
Address range in storage region is determined using document size information;
Using the corresponding storage region of address range described in the storage region as target area.
3. method according to claim 1 or 2, which is characterized in that the slave computer includes register, described according to default
Verification rule is directed to the step of target data is verified, obtains check results
Read the target data in the target area;
It is compared using the target data with preset data;
If the target data is consistent with preset data, the register is written using the first specified numerical value as check results
In;
If the target data and preset data are inconsistent, the register is written using the second specified numerical value as check results
In.
4. a kind of method for deleting of memory, which is characterized in that be applied to host computer, comprising:
Erasing check command is sent to slave computer;It include file destination information in the erasing check command;The slave computer is used
Target area is determined in use file destination information, and is carried out according to default verification for the target data in the target area
Verification obtains check results;The erasing check command is for carrying out erasing verification;
The check results are obtained from the slave computer;
Judge whether to wipe the target area using the check results;
If so, generating erasing order and being sent to the slave computer;
If it is not, the slave computer then is written in the corresponding file destination of the file destination information.
5. according to the method described in claim 4, being wrapped in the register it is characterized in that, the slave computer includes register
Include specified numerical value, described the step of obtaining the check results from slave computer are as follows:
The specified numerical value is read from the register of the slave computer.
6. according to the method described in claim 5, it is characterized in that, the specified numerical value includes that the first specified numerical value or second refer to
Fixed number value, it is described to judge whether that the step of wiping the target area includes: using check results
Judge the specified numerical value for the first specified numerical value or the second specified numerical value;
If the specified numerical value is the first specified numerical value, it is judged to needing to be wiped for the target area;
If the specified numerical value is the second specified numerical value, it is determined as without being wiped for the target area.
7. according to the method described in claim 4, it is characterized in that, the step of check command to slave computer is wiped in the transmission
Before, further includes:
Default verification rule is downloaded to slave computer.
8. the method according to claim 4 or 7, which is characterized in that further include:
When slave computer changes, default verification rule is downloaded to the slave computer of change.
9. a kind of erasing apparatus of memory, which is characterized in that be applied to slave computer, comprising:
Check command receiving module is wiped, for receiving the erasing check command of host computer transmission;In the erasing check command
Including file destination information;The erasing check command is for carrying out erasing verification;
Target area determining module, for determining target area using the file destination information;Include in the target area
Target data;
Correction verification module is wiped, for being verified according to default verification rule for target data, obtains check results;On described
Position machine judges whether to wipe the target area for obtaining the check results, and using the check results, if
It is that then the host computer generates erasing order, if it is not, then directly the file destination is written in the target area;
Erasing order receiving module, the erasing order sent for receiving the host computer;
Module is wiped in target area, for being wiped using the erasing order for the target area.
10. device according to claim 9, which is characterized in that the file destination information includes document size information, institute
It states target area to be located in the storage region of slave computer, the target area determining module includes:
Address range determines submodule, for determining the address range in storage region using document size information;
Target area determines submodule, for using the corresponding storage region of address range described in the storage region as target
Region.
11. device according to claim 9 or 10, which is characterized in that the slave computer includes register, the erasing school
Testing module includes:
Target data reading submodule, for reading the target data in the target area;
Data Comparative sub-module, for being compared using the target data with preset data;If the target data and pre-
It is consistent to set data, then calls, if the target data is inconsistent with preset data, calls;
Submodule is written in first numerical value, for being written the first specified numerical value as check results in the register;
Submodule is written in second value, for being written the second specified numerical value as check results in the register.
12. a kind of erasing apparatus of memory, which is characterized in that be applied to host computer, comprising:
Check command sending module is wiped, for sending erasing check command to slave computer;Include in the erasing check command
File destination information;The slave computer is used to determine target area using file destination information, and is directed to institute according to default verification
The target data stated in target area is verified, and check results are obtained;The erasing check command is for carrying out erasing verification;
Check results obtain module, for obtaining the check results from the slave computer;
Judgment module is wiped, for judging whether to wipe the target area using the check results;If so, adjusting
With erasing order generation module, file destination module is written if it is not, then calling;
Erasing order generation module, for generating erasing order and being sent to the slave computer;
File destination module is written, for the slave computer to be written in the corresponding file destination of the file destination information.
13. device according to claim 12, which is characterized in that the slave computer includes register, in the register
Including specifying numerical value, the check results obtain module and include:
Specified numerical value reading submodule, for reading the specified numerical value from the register of the slave computer.
14. device according to claim 13, which is characterized in that the specified numerical value includes the first specified numerical value or second
Specified numerical value, the erasing judgment module include:
Specified numerical value judging submodule, for judging the specified numerical value for the first specified numerical value or the second specified numerical value;
First decision sub-module is judged to needing for the target if being the first specified numerical value for the specified numerical value
It is wiped in region;
Second decision sub-module is determined as if being the second specified numerical value for the specified numerical value without for the target
It is wiped in region.
15. device according to claim 12, which is characterized in that further include:
First download module, for default verification rule to be downloaded to slave computer.
16. device described in 2 or 15 according to claim 1, which is characterized in that further include:
Second download module, for when slave computer changes, default verification rule to be downloaded to the slave computer of change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510353868.4A CN105095009B (en) | 2015-06-24 | 2015-06-24 | A kind of method for deleting and device of memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510353868.4A CN105095009B (en) | 2015-06-24 | 2015-06-24 | A kind of method for deleting and device of memory |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105095009A CN105095009A (en) | 2015-11-25 |
CN105095009B true CN105095009B (en) | 2019-04-19 |
Family
ID=54575511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510353868.4A Active CN105095009B (en) | 2015-06-24 | 2015-06-24 | A kind of method for deleting and device of memory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105095009B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105590062A (en) * | 2015-12-16 | 2016-05-18 | 国家电网公司 | Configurable security file object reusing method |
CN106898380A (en) * | 2015-12-17 | 2017-06-27 | 北京兆易创新科技股份有限公司 | A kind of method for deleting of Nand Flash |
CN106055420B (en) * | 2016-05-18 | 2019-07-16 | 东软医疗系统股份有限公司 | A kind of data verification method, device and equipment |
CN110767258B (en) * | 2019-10-22 | 2022-03-22 | 江苏芯盛智能科技有限公司 | Data erasure command test method and related device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101681677A (en) * | 2007-03-07 | 2010-03-24 | 莫塞德技术公司 | Partial block erase architecture for flash memory |
CN103425587A (en) * | 2012-05-18 | 2013-12-04 | 北京兆易创新科技股份有限公司 | Erasing method and erasing device for nonvolatile memory |
CN103544993A (en) * | 2012-07-11 | 2014-01-29 | 三星电子株式会社 | Nonvolatle memory device and memory system, and related memory management, erase and programming method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8199579B2 (en) * | 2009-09-16 | 2012-06-12 | Kabushiki Kaisha Toshiba | Nonvolatile semiconductor memory device |
-
2015
- 2015-06-24 CN CN201510353868.4A patent/CN105095009B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101681677A (en) * | 2007-03-07 | 2010-03-24 | 莫塞德技术公司 | Partial block erase architecture for flash memory |
CN103425587A (en) * | 2012-05-18 | 2013-12-04 | 北京兆易创新科技股份有限公司 | Erasing method and erasing device for nonvolatile memory |
CN103544993A (en) * | 2012-07-11 | 2014-01-29 | 三星电子株式会社 | Nonvolatle memory device and memory system, and related memory management, erase and programming method |
Also Published As
Publication number | Publication date |
---|---|
CN105095009A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106383786B (en) | Interface pressure performance testing method and device and electronic equipment | |
US20200382374A1 (en) | Method for generating network slice template and for applying network slice template, and apparatus | |
CN105095009B (en) | A kind of method for deleting and device of memory | |
KR101698029B1 (en) | System and method for automatic application test using script | |
CN104978253B (en) | A kind of method and apparatus of file destination verification | |
CN106302609B (en) | Access method and device | |
CN108549562A (en) | A kind of method and device of image load | |
CN104731622B (en) | The loading method of a kind of application program, device and mobile terminal | |
CN106155716A (en) | The configuration store method of BIOS and configuration save set | |
CN108681504A (en) | Automated testing method, test server and computer readable storage medium | |
CN110046088A (en) | A kind of interface test method, device and equipment | |
CN106066802A (en) | A kind of method and apparatus loading MBN file | |
CN109684573A (en) | Target Photo display methods and device, storage medium, electronic equipment | |
CN109922142A (en) | A kind of document down loading method, apparatus and system | |
CN104090822B (en) | The switching method and system of android system lower outer portion storage device | |
CN107733866A (en) | RPC requests, RPC request processing methods, device and equipment | |
CN107908552A (en) | A kind of test method based on link, device and equipment | |
CN108776601B (en) | Android H5 page loading method, device, equipment and storage medium | |
CN111338655A (en) | Installation package distribution method and system | |
CN106874029A (en) | image file loading method and device | |
CN101753360B (en) | Method applying system start-up, parallel management system and application management system | |
CN103777982B (en) | Open root authority updates method and the mobile terminal thereof of system | |
CN110502251A (en) | Using installation method and device | |
CN109062181A (en) | The update method and device of vehicle control instruction | |
CN109815116A (en) | A kind of method for testing software and equipment platform and computer readable 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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 230601 Building 1, Pearl Plaza, Hefei Economic and Technological Development Zone, Anhui Province Patentee after: HEFEI GEYI INTEGRATED CIRCUIT Co.,Ltd. Patentee after: Zhaoyi Innovation Technology Group Co.,Ltd. Address before: 230601 Building 1, Pearl Plaza, Hefei Economic and Technological Development Zone, Anhui Province Patentee before: HEFEI GEYI INTEGRATED CIRCUIT Co.,Ltd. Patentee before: GIGADEVICE SEMICONDUCTOR(BEIJING) Inc. |