CN113626347A - Storage device and working method thereof - Google Patents

Storage device and working method thereof Download PDF

Info

Publication number
CN113626347A
CN113626347A CN202110863032.4A CN202110863032A CN113626347A CN 113626347 A CN113626347 A CN 113626347A CN 202110863032 A CN202110863032 A CN 202110863032A CN 113626347 A CN113626347 A CN 113626347A
Authority
CN
China
Prior art keywords
physical page
address code
address
access address
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110863032.4A
Other languages
Chinese (zh)
Other versions
CN113626347B (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.)
Wuhan Xinxin Semiconductor Manufacturing Co Ltd
Original Assignee
Wuhan Xinxin Semiconductor Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Xinxin Semiconductor Manufacturing Co Ltd filed Critical Wuhan Xinxin Semiconductor Manufacturing Co Ltd
Priority to CN202110863032.4A priority Critical patent/CN113626347B/en
Publication of CN113626347A publication Critical patent/CN113626347A/en
Application granted granted Critical
Publication of CN113626347B publication Critical patent/CN113626347B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/0623Address space extension for memory modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The working method comprises the steps of firstly receiving a logical page access address, then determining a physical page access address corresponding to the logical page access address based on the logical page access address, then accessing a corresponding storage space according to the physical page access address, converting the logical page access address into the corresponding physical page access address, and then accessing storage contents, so that the situation that the storage contents are directly accessed through the physical address can be avoided, the management work of physical page states is reduced or avoided, and the access flexibility and the access efficiency of the storage device are improved.

Description

Storage device and working method thereof
Technical Field
The present application relates to the field of storage technologies, and in particular, to a storage device and a working method thereof.
Background
As shown in fig. 1, a user 1 typically accesses a storage device 2 directly using a physical address. The direct physical address access is independent of a specific access environment, that is, the contents in the storage device 2 can be accessed through the physical address under different environments.
In the physical address direct access mode, when a physical address is written, the user 1 needs to directly manage the state of a corresponding physical page, that is, determine whether the physical page is in a programming state or an erasing state, and then perform different operations according to different physical page states. However, as the upper limit of the storage capacity of the storage device 2 is increased, the types of data that can be stored are more diversified, and the management of the physical page status is more difficult.
It should be noted that the above description of the background art is only for the convenience of clear and complete understanding of the technical solutions of the present application. The technical solutions referred to above are therefore not considered to be known to the person skilled in the art, merely because they appear in the background of the present application.
Disclosure of Invention
The application provides a storage device and a working method thereof, which are used for solving the technical problem that physical page state management is easy to complicate when a physical address directly accesses the storage device.
In a first aspect, the present application provides a method for operating a storage device, including: receiving a logical page access address, wherein the logical page access address comprises a logical page address code; determining a physical page access address corresponding to the logical page access address based on the logical page access address, wherein the physical page access address comprises a physical page address code; and accessing the storage space corresponding to the physical page access address according to the physical page access address.
In some embodiments, the physical page address code includes an initial physical page address code and a target physical page address code, and the step of determining the physical page access address corresponding to the logical page access address based on the logical page access address includes: determining an initial physical page address code corresponding to the logical page access address based on the mapping index relationship; determining a physical page state corresponding to the initial physical page address code based on the state index relationship and the initial physical page address code; according to the physical page state corresponding to the initial physical page address code, maintaining the initial physical page address code or updating the initial physical page address code to be a target physical page address code; and determining a physical page access address corresponding to the logical page access address based on the initial physical page address code or the target physical page address code.
In some embodiments, the physical page states include an idle state, a valid write state, and an invalid write state, and the step of maintaining the initial physical page address code or updating the initial physical page address code to be the target physical page address code according to the physical page state corresponding to the initial physical page address code includes: when the storage device executes write-in operation, determining a physical page state corresponding to an initial physical page address code; and if the physical page state corresponding to the initial physical page address code is an idle state, keeping the initial physical page address code unchanged.
In some embodiments, if the physical page state corresponding to the initial physical page address code is an idle state, after the step of keeping the initial physical page address code unchanged, the method further includes: determining a physical page access address corresponding to the initial physical page address code according to the initial physical page address code; writing the content to be stored into a storage space corresponding to the physical page access address based on the physical page access address corresponding to the initial physical page address code; and updating the physical page state corresponding to the initial physical page address code into a valid write state.
In some embodiments, the physical page states include an idle state, a valid write state, and an invalid write state, and the step of maintaining the initial physical page address code or updating the initial physical page address code to be the target physical page address code according to the physical page state corresponding to the initial physical page address code includes: when the storage device executes write-in operation, determining a physical page state corresponding to an initial physical page address code; and if the physical page state corresponding to the initial physical page address code is a valid writing state, updating the initial physical page address code to be a target physical page address code, and enabling the physical page state corresponding to the target physical page address code to be an idle state.
In some embodiments, if the physical page status corresponding to the initial physical page address code is a valid write status, the initial physical page address code is updated to be a target physical page address code, and the step of setting the physical page status corresponding to the target physical page address code to be an idle status includes: if the physical page state corresponding to the initial physical page address code is a valid writing state, searching a physical page access address corresponding to an idle state; determining a calibrated physical page address code based on a physical page access address corresponding to an idle state; and updating the physical page state corresponding to the initial physical page address code into an invalid writing state.
In some of these embodiments, the method of operation further comprises: determining a physical page address code corresponding to the logical page access address based on the mapping index relationship; determining a physical page access address corresponding to the logical page access address based on a physical page address code corresponding to the logical page access address; and reading the storage content corresponding to the physical page access address according to the physical page access address corresponding to the logical page access address.
In some of these embodiments, the method of operation further comprises: based on the mapping index relationship, searching a physical page address code corresponding to the logical page access address; if the physical page address code corresponding to the logical page access address is not found, determining a physical page access address corresponding to the physical page address code; and returning the reading result: the physical page corresponding to the logical page access address is not described.
In some of these embodiments, the method of operation further comprises: inquiring a physical page state corresponding to the physical page access address, wherein the physical page state comprises an idle state and an invalid writing state; judging whether the physical page state is an invalid writing state; and if the physical page state is the invalid writing state, updating the physical page state corresponding to the physical page access address to be an idle state.
In a second aspect, the present application provides a memory device comprising a translation device and a memory device, the translation device being configured to receive a logical page access address and determine a physical page access address corresponding to the logical page access address based on the logical page access address, the logical page access address comprising a logical page address code, the physical page access address comprising a physical page address code; the storage device is used for accessing the storage space corresponding to the physical page access address according to the physical page access address.
In some embodiments, the conversion device includes a first determination module, a second determination module, a processing module, and a third determination module, where the first determination module is configured to determine an initial physical page address code corresponding to the logical page access address based on the mapping index relationship; the second determining module is used for determining the physical page state corresponding to the initial physical page address code based on the state index relationship and the initial physical page address code; the processing module is used for keeping the initial physical page address code or updating the initial physical page address code to be a target physical page address code according to the physical page state corresponding to the initial physical page address code; the third determining module is used for determining a physical page access address corresponding to the logical page access address based on the initial physical page address code or the target physical page address code.
According to the storage device and the working method thereof, the logical page access address is converted into the corresponding physical page access address, and then the storage content is accessed, so that the storage content can be prevented from being directly accessed through the physical address, the management work of the physical page state is reduced or avoided, and the access flexibility and the access efficiency of the storage device are improved.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of accessing a storage device in a conventional technical solution.
Fig. 2 is a schematic flowchart of a working method of a storage device according to an embodiment of the present disclosure.
Fig. 3 is a schematic view of a storage structure of multiple logical page access addresses according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a physical page state according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a mapping index relationship provided in the embodiment of the present application.
Fig. 6 is a schematic diagram of a structure of storage of a physical page access address and a relationship between the physical page access address and a physical page according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of a mapping index relationship provided in the embodiment of the present application.
Fig. 8 is a schematic structural diagram of a state index relationship provided in the embodiment of the present application.
Fig. 9 is a schematic diagram illustrating a first structure of a write operation according to an embodiment of the present application.
Fig. 10 is a second structural diagram of a write operation according to an embodiment of the present application.
Fig. 11 is a schematic diagram illustrating a third structure of a write operation according to an embodiment of the present application.
Fig. 12 is a schematic diagram illustrating a fourth structure of a write operation according to an embodiment of the present application.
Fig. 13 is a fifth structural diagram of a write operation according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of a memory device according to an embodiment of the present application.
Fig. 15 is a schematic structural diagram of a conversion device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2 to 15, as shown in fig. 2, the present embodiment provides a working method of a memory device, which includes the following steps:
step S100: a logical page access address is received, the logical page access address including a logical page address code.
Step S200: and determining a physical page access address corresponding to the logical page access address based on the logical page access address, wherein the physical page access address comprises a physical page address code.
And step S300: and accessing the storage space corresponding to the physical page access address according to the physical page access address.
It can be understood that, in the working method provided in this embodiment, by converting the logical page access address into the corresponding physical page access address and then accessing the storage content, it is possible to avoid directly accessing the storage content through the physical address, thereby reducing or avoiding the management work required to perform the physical page state, and improving the access flexibility and the access efficiency of the storage device.
As shown in fig. 3, it should be noted that the logical page access address may be aligned with the physical page access address page to characterize the storage space of the storage device by the logical page access address, one logical page access address may correspond to one physical page, and one physical page may be the minimum access unit. The logical page access address may be a logical address, and the physical page access address may be a physical address. For example, the plurality of logical page access addresses may be defined as a total of 24-bit logical page access addresses LPA0 through LPA23, which require three bytes of storage space. The 24-bit logical page access addresses LPA 0-LPA 23 may represent a 4GB page address space. Where the LPA is used to characterize the logical page address symbol, the numbers following the LPA, e.g., "0", "23", etc., are used to characterize the corresponding logical page address code.
The storage device in this embodiment may be, but is not limited to, Nor Flash, and may also be other types of Flash memories.
In one embodiment, the physical page address code includes an initial physical page address code and a target physical page address code, and the step of determining the physical page access address corresponding to the logical page access address based on the logical page access address includes: determining an initial physical page address code corresponding to the logical page access address based on the mapping index relationship; determining a physical page state corresponding to the initial physical page address code based on the state index relationship and the initial physical page address code; according to the physical page state corresponding to the initial physical page address code, maintaining the initial physical page address code or updating the initial physical page address code to be a target physical page address code; and determining a physical page access address corresponding to the logical page access address based on the initial physical page address code or the target physical page address code.
As shown in fig. 4, in one embodiment, the physical page status includes an idle status, a valid write status, and an invalid write status, and the step of keeping the initial physical page address code or updating the initial physical page address code to the target physical page address code according to the physical page status corresponding to the initial physical page address code includes: when the storage device executes write-in operation, determining a physical page state corresponding to an initial physical page address code; and if the physical page state corresponding to the initial physical page address code is an idle state, keeping the initial physical page address code unchanged.
It should be noted that the idle state indicates that the corresponding physical page has not been subjected to the write operation, and is in a standby state for selection and write operation. The valid write status indicates that the corresponding physical page has been written with valid data. The invalid writing state indicates that the corresponding physical page has written data, but the written data is invalid and is in a condition of waiting for recovery processing. For example, if the physical page in the idle state is selected for a write operation, the physical page in the idle state is correspondingly changed into a physical page in an effective write state; when the same logical page access address executes the write operation on the physical page in the valid write state again, the physical page in the valid write state is changed into the physical page in the invalid write state; and after the storage device performs recovery processing on the physical page in the invalid writing state according to the existing recovery algorithm and/or the recovery strategy, the physical page in the invalid writing state is changed into a physical page in an idle state.
Where a "0" may be used to characterize the idle state. A "1" may be used to characterize the valid write state. "-1" may be used to characterize an invalid write state.
It is understood that the state of the same physical page, i.e. the state of the same physical page, can be dynamically changed in response to the logical page access address, thereby reducing or avoiding the need for the user to pay attention to the detailed state of the storage device when accessing with the physical page access address, for example, performing management work on the physical page, and the like.
As shown in fig. 5, the mapping index relationship may be expressed that one logical page access address corresponds to one physical page address code, for example, the logical page access address LPA0 corresponds to a physical page address code 0, the logical page access address LPA1 corresponds to a physical page address code 1, the logical page access address LPA2 corresponds to a physical page address code 2, the logical page access address LPA3 corresponds to a physical page address code 3, the logical page access address LPA4 corresponds to a physical page address code 4, the logical page access address LPA5 corresponds to a physical page address code 5, the logical page access address LPA6 corresponds to a physical page address code 6, the logical page access address LPA7 corresponds to a physical page address code 7, the logical page access address LPA8 corresponds to a physical page address code 8, the logical page access address LPA9 corresponds to a physical page address code 9, the logical page access address LPA corresponds to a physical page address code M, and the like. Wherein the PPA is used to characterize the physical page address identifier.
M, N are integers, and M is greater than or equal to N.
In one embodiment, the logical page access address may also be represented by LPA N Z, where LPA may be used to characterize the logical page address identifier, N is the logical first address, and Z is the data access length, so that batch access of the logical page access address may be implemented, and the access efficiency may be improved. When receiving the logical page access address, the logical first address and the data access length can be sequentially and separately received. Wherein Z is an integer, for example, the logical page access address LPA 41 indicates that the logical page access address LPA4 with the logical first address of 4 needs to be accessed at this time, the logical page access address LPA 42 indicates that two consecutive logical page access addresses with the logical first address of 4 need to be accessed at this time, that is, LPA4 and LPA5, for example, the logical page access address LPA 53 indicates that three consecutive logical page access addresses with the logical first address of 5 need to be accessed at this time, that is, LPA5, LPA6 and LPA7, and so on.
As shown in FIG. 6, in one embodiment, the storage device may include a plurality of storage sectors, such as storage sector SEC0, storage sector SEC1, storage sector SECX, etc., where X is a positive integer. These memory sectors are used to store the corresponding physical page address codes.
One physical page address code corresponds to one physical page, for example, the physical page address codes 0 to 9 sequentially correspond to the physical pages P0 to P9, and the physical page address code M corresponds to the physical page PM. Conversely, the physical page P15 may correspond to the physical page address code 15, the physical page address code 16, the physical page address code 18, or the like.
As shown in fig. 7, the mapping index relationship may also be expressed as that one logical page access address corresponds to one physical page address code, for example, the logical page access addresses LPA0 through LPA9 correspond to physical page address codes 0 through 9 in sequence, and the logical page access address LPAN corresponds to physical page address code M in sequence.
As shown in fig. 8, the above-mentioned state index relationship may be expressed as a physical page access address corresponding to a physical page state, for example, physical page access address PPA0 corresponds to physical page state Y, physical page access address PPA1 corresponds to physical page state Y, physical page access address PPA2 corresponds to physical page state Y, physical page access address PPA3 corresponds to physical page state Y, physical page access address PPA4 corresponds to physical page state Y, physical page access address PPA5 corresponds to physical page state Y, physical page access address PPA6 corresponds to physical page state Y, physical page access address PPA7 corresponds to physical page state Y, physical page access address PPA8 corresponds to physical page state Y, physical page access address PPA9 corresponds to physical page state Y, and physical page access address m corresponds to physical page state Y, where Y may be any one of "-1", "0", and "1".
In one embodiment, if the physical page state corresponding to the initial physical page address code is an idle state, after the step of keeping the initial physical page address code unchanged, the method further includes: determining a physical page access address corresponding to the initial physical page address code according to the initial physical page address code; writing the content to be stored into a storage space corresponding to the physical page access address based on the physical page access address corresponding to the initial physical page address code; and updating the physical page state corresponding to the initial physical page address code into a valid write state.
In one embodiment, the physical page states include an idle state, a valid write state, and an invalid write state, and the step of maintaining the initial physical page address code or updating the initial physical page address code to the target physical page address code according to the physical page state corresponding to the initial physical page address code includes: when the storage device executes write-in operation, determining a physical page state corresponding to an initial physical page address code; and if the physical page state corresponding to the initial physical page address code is a valid writing state, updating the initial physical page address code to be a target physical page address code, and enabling the physical page state corresponding to the target physical page address code to be an idle state.
In one embodiment, if the physical page status corresponding to the initial physical page address code is a valid write status, the initial physical page address code is updated to be a target physical page address code, and the step of setting the physical page status corresponding to the target physical page address code to be an idle status includes: if the physical page state corresponding to the initial physical page address code is a valid writing state, searching a physical page access address corresponding to an idle state; determining a calibrated physical page address code based on a physical page access address corresponding to an idle state; and updating the physical page state corresponding to the initial physical page address code into an invalid writing state.
In one embodiment, the operation method further comprises: determining a physical page address code corresponding to the logical page access address based on the mapping index relationship; determining a physical page access address corresponding to the logical page access address based on a physical page address code corresponding to the logical page access address; and reading the storage content corresponding to the physical page access address according to the physical page access address corresponding to the logical page access address.
In one embodiment, the operation method further comprises: based on the mapping index relationship, searching a physical page address code corresponding to the logical page access address; if the physical page address code corresponding to the logical page access address is not found, determining a physical page access address corresponding to the physical page address code; and returning the reading result: the physical page corresponding to the logical page access address is not described.
In one embodiment, the operation method further comprises: inquiring a physical page state corresponding to the physical page access address, wherein the physical page state comprises an idle state and an invalid writing state; judging whether the physical page state is an invalid writing state; and if the physical page state is the invalid writing state, updating the physical page state corresponding to the physical page access address to be an idle state.
As shown in fig. 9, in the write operation, the storage device receives the logical page access address LPA0, finds that the physical page corresponding to the physical page access address PPA0 is in the free state, writes data to the physical page corresponding to the physical page access address PPA0, and rewrites the physical page address code PPA corresponding to the logical page access address LPA0 from the preset value "-1" to "0" based on the mapping index relationship, and rewrites the physical page state corresponding to the physical page access address PPA0 from "0" to "1" based on the state index relationship. The preset value "-1" of the physical page address code PPA has a different meaning from the meaning represented by "-1" of the physical page state.
It can be understood that, based on the above analysis, the storage device provided in this embodiment may automatically complete the write operation shown in fig. 9, and thus, when the storage device is accessed by using the logical page access address, the physical page state may be automatically updated correspondingly, thereby effectively improving the flexibility of access and the efficiency of access.
As shown in fig. 10, in the write operation, the storage device receives the logical page access address LPA1, finds that the physical page corresponding to the physical page access address PPA1 is in the free state, writes data to the physical page corresponding to the physical page access address PPA1, and rewrites the corresponding physical page address code PPA in the logical page access address LPA1 from the preset value "-1" to "1" based on the mapping index relationship, and rewrites the physical page state corresponding to the physical page access address PPA1 from "0" to "1" based on the state index relationship.
It can be understood that, based on the above analysis, the storage device provided in this embodiment may automatically complete the write operation shown in fig. 10, and thus, when the storage device is accessed by using the logical page access address, the physical page state may be automatically updated correspondingly, thereby effectively improving the flexibility of access and the efficiency of access.
As shown in fig. 11, in the write operation, when the storage apparatus receives the logical page access address LPA0 for the second time and finds that the physical page corresponding to the physical page access address PPA2 is in the free state, the storage apparatus writes data to the physical page corresponding to the physical page access address PPA2, rewrites the corresponding physical page address code PPA in the logical page access address LPA0 from "1" to "2" based on the mapping index relationship, rewrites the physical page state corresponding to the physical page access address PPA2 from "0" to "1" based on the state index relationship, and rewrites the physical page state corresponding to the physical page access address PPA0 from "1" to "-1".
It can be understood that, based on the above analysis, the storage device provided in this embodiment may automatically complete the write operation shown in fig. 11, and thus, when the storage device is accessed by using the logical page access address, the physical page state may be automatically updated correspondingly, thereby effectively improving the flexibility of access and the efficiency of access.
As shown in fig. 12, in the write operation, the storage device receives the logical page access address LPA2, finds that the physical page corresponding to the physical page access address PPA3 is in the free state, writes data to the physical page corresponding to the physical page access address PPA3, and rewrites the corresponding physical page address code PPA in the logical page access address LPA2 from the preset value "-1" to "3" based on the mapping index relationship, and rewrites the physical page state corresponding to the physical page access address PPA3 from "0" to "1" based on the state index relationship.
It can be understood that, based on the above analysis, the storage device provided in this embodiment may automatically complete the write operation shown in fig. 12, and thus, when the storage device is accessed by using the logical page access address, the physical page state may be automatically updated correspondingly, thereby effectively improving the flexibility of access and the efficiency of access.
In another embodiment, during the write operation, the storage device receives the logical page access address LPA2 for the second time, finds that the physical page corresponding to the physical page access address PPA4 is in the free state, writes data to the physical page corresponding to the physical page access address PPA4, and rewrites the corresponding physical page address code PPA in the logical page access address LPA2 from "3" to "4" based on the mapping index relationship, and rewrites the physical page state corresponding to the physical page access address PPA4 from "0" to "1" and rewrites the physical page state corresponding to the physical page access address PPA2 from "1" to "-1" based on the state index relationship. At this time, the physical page states corresponding to the physical page access addresses PPA0 and PPA2 are both in the invalid write state, and the physical page states corresponding to the physical page access addresses PPA1, PPA3 to PPA4 are both in the valid write state.
As shown in fig. 13, when performing a write operation, the storage device receives the logical page access address LPA0 for the third time, finds that the physical page corresponding to the physical page access address PPA4 is in a free state, writes data to the physical page corresponding to the physical page access address PPA4, and rewrites the corresponding physical page address code PPA in the logical page access address LPA0 from "2" to "4" based on the mapping index relationship, and rewrites the physical page state corresponding to the physical page access address PPA4 from "0" to "1" based on the state index relationship. At this time, the physical page state corresponding to the physical page access address PPA0 is an invalid write state, and the physical page states corresponding to the physical page access addresses PPA1 to PPA4 are all valid write states.
It can be understood that, based on the above analysis, the storage device provided in this embodiment may automatically complete the write operation shown in fig. 13, and thus, when the storage device is accessed by using the logical page access address, the physical page state may be automatically updated correspondingly, thereby effectively improving the flexibility of access and the efficiency of access.
As shown in fig. 14, in one embodiment, the present embodiment provides a memory device 1000, which includes a translation device 100 and a memory device 200, wherein the translation device 100 is configured to receive a logical page access address, and determine a physical page access address corresponding to the logical page access address based on the logical page access address, the logical page access address includes a logical page address character and a logical page address code, and the physical page access address includes a physical page address character and a physical page address code; the memory device 200 is configured to access a memory space corresponding to the physical page access address according to the physical page access address.
It can be understood that, in the storage apparatus 1000 provided in this embodiment, by converting the logical page access address into the corresponding physical page access address and then accessing the storage content, it is possible to avoid directly accessing the storage content through the physical address, thereby reducing or avoiding the management work required to perform the physical page state, and improving the access flexibility and the access efficiency of the storage apparatus 1000.
It should be noted that the switching device 100 and the memory device 200 may be electrically connected or communicatively connected. The logical page access address may come from a visitor, e.g., a user, of the storage device 1000.
As shown in fig. 15, in one embodiment, the translation device 100 includes a first determination module 10, a second determination module 20, a processing module 30, and a third determination module 40, where the first determination module 10 is configured to determine an initial physical page address code corresponding to a logical page access address based on a mapping index relationship; the second determining module 20 is configured to determine a physical page state corresponding to the initial physical page address code based on the state index relationship and the initial physical page address code; the processing module 30 is configured to maintain the initial physical page address code or update the initial physical page address code to a target physical page address code according to a physical page state corresponding to the initial physical page address code; the third determining module 40 is configured to determine a physical page access address corresponding to the logical page access address based on the initial physical page address code or the target physical page address code.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The storage device and the working method thereof provided by the embodiment of the present application are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the technical solution and the core idea of the present application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.

Claims (11)

1. A method of operating a memory device, comprising:
receiving one or more logical page access addresses, the logical page access addresses comprising a logical page address code;
determining a physical page access address corresponding to the logical page access address based on the logical page access address, wherein the physical page access address comprises a physical page address code; and
and accessing the storage space corresponding to the physical page access address according to the physical page access address.
2. The method of claim 1, wherein the physical page address code comprises an initial physical page address code and a target physical page address code, and the step of determining the physical page access address corresponding to the logical page access address based on the logical page access address comprises:
determining an initial physical page address code corresponding to the logical page access address based on a mapping index relationship;
determining a physical page state corresponding to the initial physical page address code based on a state index relationship and the initial physical page address code;
according to the physical page state corresponding to the initial physical page address code, keeping the initial physical page address code or updating the initial physical page address code to be the target physical page address code; and
and determining a physical page access address corresponding to the logical page access address based on the initial physical page address code or the target physical page address code.
3. The method according to claim 2, wherein the physical page status includes an idle status, a valid write status, and an invalid write status, and the step of maintaining the initial physical page address code or updating the initial physical page address code to the target physical page address code according to the physical page status corresponding to the initial physical page address code includes:
when the storage device executes write operation, determining a physical page state corresponding to the initial physical page address code;
and if the physical page state corresponding to the initial physical page address code is the idle state, keeping the initial physical page address code unchanged.
4. The method according to claim 3, wherein if the physical page status corresponding to the initial physical page address code is the idle status, after the step of keeping the initial physical page address code unchanged, the method further comprises:
determining a physical page access address corresponding to the initial physical page address code according to the initial physical page address code;
writing contents to be stored into a storage space corresponding to the physical page access address based on the physical page access address corresponding to the initial physical page address code; and
and updating the physical page state corresponding to the initial physical page address code into the effective writing state.
5. The method according to claim 2, wherein the physical page status includes an idle status, a valid write status, and an invalid write status, and the step of maintaining the initial physical page address code or updating the initial physical page address code to the target physical page address code according to the physical page status corresponding to the initial physical page address code includes:
when the storage device executes write operation, determining a physical page state corresponding to the initial physical page address code;
and if the physical page state corresponding to the initial physical page address code is the valid writing state, updating the initial physical page address code to be the target physical page address code, and the physical page state corresponding to the target physical page address code to be the idle state.
6. The method according to claim 5, wherein the step of updating the initial physical page address code to be the target physical page address code if the physical page status corresponding to the initial physical page address code is the valid write status, and the physical page status corresponding to the target physical page address code being the idle status comprises:
if the physical page state corresponding to the initial physical page address code is the valid writing state, searching a physical page access address corresponding to an idle state;
determining the target physical page address code based on the physical page access address corresponding to the idle state;
and updating the physical page state corresponding to the initial physical page address code into the invalid writing state.
7. The method of operation of claim 1, further comprising:
determining a physical page address code corresponding to the logical page access address based on a mapping index relationship;
determining a physical page access address corresponding to the logical page access address based on a physical page address code corresponding to the logical page access address; and
and reading out the storage content corresponding to the physical page access address according to the physical page access address corresponding to the logical page access address.
8. The method of operation of claim 1, further comprising:
based on a mapping index relation, searching a physical page address code corresponding to the logical page access address;
if the physical page address code corresponding to the logical page access address is not found, determining a physical page access address corresponding to the physical page address code; and
and returning a reading result: and the physical page corresponding to the logical page access address does not record the content.
9. The working method according to claim 1 to the above, characterized in that the working method further comprises:
querying a physical page state corresponding to the physical page access address, wherein the physical page state comprises an idle state and an invalid write state;
judging whether the physical page state is the invalid writing state or not; and
and if the physical page state is the invalid writing state, updating the physical page state corresponding to the physical page access address to be the idle state.
10. A memory device, comprising:
the conversion device is used for receiving a logical page access address and determining a physical page access address corresponding to the logical page access address based on the logical page access address, wherein the logical page access address comprises a logical page address character and a logical page address code, and the physical page access address comprises a physical page address character and a physical page address code; and
and the storage device is used for accessing the storage space corresponding to the physical page access address according to the physical page access address.
11. The memory device according to claim 10, wherein the conversion means comprises:
a first determining module, configured to determine, based on a mapping index relationship, an initial physical page address code corresponding to the logical page access address;
a second determining module, configured to determine, based on a state index relationship and the initial physical page address code, a physical page state corresponding to the initial physical page address code;
a processing module, configured to maintain the initial physical page address code or update the initial physical page address code to the target physical page address code according to a physical page state corresponding to the initial physical page address code;
a third determining module, configured to determine, based on the initial physical page address code or the target physical page address code, a physical page access address corresponding to the logical page access address.
CN202110863032.4A 2021-07-29 2021-07-29 Storage device and working method thereof Active CN113626347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110863032.4A CN113626347B (en) 2021-07-29 2021-07-29 Storage device and working method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110863032.4A CN113626347B (en) 2021-07-29 2021-07-29 Storage device and working method thereof

Publications (2)

Publication Number Publication Date
CN113626347A true CN113626347A (en) 2021-11-09
CN113626347B CN113626347B (en) 2023-12-15

Family

ID=78381542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110863032.4A Active CN113626347B (en) 2021-07-29 2021-07-29 Storage device and working method thereof

Country Status (1)

Country Link
CN (1) CN113626347B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270680A1 (en) * 2005-11-17 2008-10-30 Chee Keng Chang Controller for Non-Volatile Memories and Methods of Operating the Memory Controller
CN101859279A (en) * 2010-05-21 2010-10-13 北京星网锐捷网络技术有限公司 Memory allocation and release method and device
US20110047347A1 (en) * 2009-08-19 2011-02-24 Seagate Technology Llc Mapping alignment
CN102866955A (en) * 2012-09-14 2013-01-09 记忆科技(深圳)有限公司 Flash data management method and system
KR101936364B1 (en) * 2017-08-09 2019-01-08 성균관대학교산학협력단 Memory management system using flash memory and method thereof
US20190138445A1 (en) * 2017-11-03 2019-05-09 Hefei Core Storage Electronic Limited Mapping table updating method, memory control circuit unit and memory storage device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270680A1 (en) * 2005-11-17 2008-10-30 Chee Keng Chang Controller for Non-Volatile Memories and Methods of Operating the Memory Controller
US20110047347A1 (en) * 2009-08-19 2011-02-24 Seagate Technology Llc Mapping alignment
CN101859279A (en) * 2010-05-21 2010-10-13 北京星网锐捷网络技术有限公司 Memory allocation and release method and device
CN102866955A (en) * 2012-09-14 2013-01-09 记忆科技(深圳)有限公司 Flash data management method and system
KR101936364B1 (en) * 2017-08-09 2019-01-08 성균관대학교산학협력단 Memory management system using flash memory and method thereof
US20190138445A1 (en) * 2017-11-03 2019-05-09 Hefei Core Storage Electronic Limited Mapping table updating method, memory control circuit unit and memory storage device

Also Published As

Publication number Publication date
CN113626347B (en) 2023-12-15

Similar Documents

Publication Publication Date Title
US6477616B1 (en) Storage device, storage system, memory management method, recording medium, and computer data signal
US8510532B2 (en) Logical-to-physical address translation for a removable data storage device
JP4358111B2 (en) Semiconductor memory device and data writing method to flash memory
CN111459844B (en) Data storage device and method for accessing logical-to-physical address mapping table
US7287117B2 (en) Flash memory and mapping control apparatus and method for flash memory
WO1999044113A9 (en) Increasing the memory performance of flash memory devices by writing sectors simultaneously to multiple flash memory devices
JP2003296188A (en) Data operation method for high-capacity flash memory card system
JPH08328762A (en) Semiconductor disk device and memory management method therefor
US9009442B2 (en) Data writing method, memory controller and memory storage apparatus
CN114416147B (en) Firmware loading method, memory and computer readable storage medium
CN113885808A (en) Mapping information recording method, memory control circuit unit and memory device
US8762685B2 (en) Data writing method, memory controller and memory storage apparatus
CN111338562B (en) Data storage device and data processing method
CN112015671A (en) Flash memory controller, memory device and method for accessing flash memory module
CN114546292B (en) Method and system for managing nand flash bad blocks
CN113626347B (en) Storage device and working method thereof
CN115576863A (en) Data reading and writing method, storage device and storage medium
CN110825658B (en) Flash memory controller and method
CN112347524A (en) Flash memory programming method and device and electronic equipment
JP4334331B2 (en) Flash memory access control method
CN117632809B (en) Memory controller, data reading method and memory device
CN111596859B (en) Data storage device and data processing method
CN111198651B (en) Method for managing storage space, data storage device and controller thereof
KR100688463B1 (en) Method for writing and erasing data of physical memory
CN113867642A (en) Data processing method and device and storage equipment

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