Memory access device with address scrambling mechanism and memory access method thereof

By introducing an address scrambling mechanism in the memory access device, using the address scrambling circuit and the memory controller to generate the scrambling access address, the problems of low data transmission efficiency and maintenance difficulties in the prior art are solved, and the logical memory address is realized Continuity maintenance and continuity of memory operation.

CN114764511BActive Publication Date: 2024-11-01REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110053053.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-15
Publication Date
2024-11-01
Estimated Expiration
2041-01-15

AI Technical Summary

Technical Problem

The prior art cannot effectively utilize the flash memory device using the serial transmission interface to apply address scrambling mechanisms in random access memory and read-only memory, resulting in inefficient data transmission and difficulty in maintaining.

Method used

A memory access device with an address scrambling mechanism is designed, including an address scrambling circuit and a memory controller. It is generated by converting the original access address into a complex original unit index and a minimum original unit, and using a random number address generation algorithm to generate it. The scrambled unit index and the minimum scrambled unit generates a scrambled access address to maintain address continuity of logical memory.

Benefits of technology

It realizes the continuity of logical memory addresses in physical memory, while improving data transmission efficiency and memory operation continuity, solving the problems of low data transmission efficiency and difficult maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764511B_ABST
    Figure CN114764511B_ABST
Patent Text Reader

Abstract

A memory access device with an address scrambling mechanism comprises an address scrambling circuit and a memory controller. The address scrambling circuit is configured to: receive an original access address to translate into a plurality of original unit indexes and a minimum original unit according to a plurality of regional unit levels in the memory; and generate a plurality of scrambling unit indexes and a minimum scrambling unit according to a random number address generation algorithm, so as to generate a scrambled access address according to the scrambling unit index and the minimum scrambling unit, wherein when different original access addresses have at least one same original unit index from the highest regional unit level, the scrambling unit indexes generated corresponding to the same original unit index are the same. The memory controller is configured to access the memory according to the scrambled access address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a memory access technology, and in particular to a memory access device with an address scrambling mechanism and a memory access method thereof. Background Art

[0002] Scrambling the memory contents and addressing is a common method to protect memory contents from attacks. However, due to the operating characteristics of flash memory of the serial transmission interface (serial interface), it is not possible to directly adopt the scrambling method applied to random access memory (RAM) and read only memory (ROM). If the general memory scrambling method is directly applied, the data transmission efficiency will be low and data maintenance will be difficult. Summary of the invention

[0003] In view of the problems in the prior art, an object of the present invention is to provide a memory access device with an address scrambling mechanism and a memory access method thereof to improve the prior art.

[0004] The present invention includes a memory access device with an address scrambling mechanism, including an address scrambling circuit and a memory controller. The address scrambling circuit is configured to: receive an original access address, so as to translate into a plurality of original unit indexes and a minimum original unit according to a plurality of regional unit levels in the memory; and to generate a plurality of scrambling unit indexes and a minimum scrambling unit according to a random number address generation algorithm, so as to generate a scrambled access address according to the scrambling unit index and the minimum scrambling unit, wherein when different original access addresses have at least one same original unit index from the highest regional unit level, the scrambling unit indexes generated corresponding to the same original unit index are the same. The memory controller is configured to access the memory according to the scrambled access address.

[0005] The present invention also includes a memory access method with an address scrambling mechanism, which is applied to a memory access device and includes the following steps: enabling an address scrambling circuit to receive an original access address, so as to translate it into a plurality of original unit indexes and a minimum original unit according to a plurality of regional unit levels in the memory; enabling the address scrambling circuit to generate a plurality of scrambling unit indexes and a minimum scrambling unit according to a random number address generation algorithm, so as to generate a scrambled access address according to the scrambling unit index and the minimum scrambling unit, wherein when different original access addresses have at least one same original unit index from the highest regional unit level, the scrambling unit indexes generated corresponding to the same original unit index are the same; and enabling a memory controller to access the memory according to the scrambled access address.

[0006] The features, practices and effects of the present invention are described in detail below with reference to the accompanying drawings as preferred embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 A block diagram showing a computer system according to an embodiment of the present invention;

[0008] Figure 2 A more detailed block diagram of a memory access device with an address scrambling mechanism according to an embodiment of the present invention is shown;

[0009] Figure 3 A more detailed block diagram of an address scrambling circuit is shown in one embodiment of the present invention;

[0010] Figure 4 A schematic diagram showing a logical memory referenced by an original access address and a physical memory referenced by a scrambled access address in one embodiment of the present invention; and

[0011] Figure 5 A flowchart of a memory access method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0012] An object of the present invention is to provide a memory access device with an address scrambling mechanism and a memory access method thereof, so that the scrambled physical memory retains the address continuity of the corresponding logical memory, and at the same time achieves the purpose of address scrambling and continuous memory operation.

[0013] Please refer to Figure 1 . Figure 1 The block diagram of a computer system 100 according to an embodiment of the present invention is shown. The computer system 100 includes a processor 110, a memory access device 120 and a memory 130.

[0014] In one embodiment, a bus (not shown) is provided between the processor 110, the memory access device 120, and the memory 130 to enable data and instructions to be transmitted between these components. In operation, the processor 110 generates instructions, and after being processed by the memory access device 120, the memory 130 is accessed. In one embodiment, the memory 130 is, for example, but not limited to, a serial peripheral interface (SPI) flash memory.

[0015] When the access operation performed is a write operation, the processor 110 transmits the write data WD and the original access address ADD to be written to the memory access device 120 for processing. The memory access device 120 scrambles the original access address ADD to generate a scrambled access address ADDS, and selectively scrambles the write data WD to generate scrambled write data WDS. Further, the memory access device 120 writes the scrambled write data WDS into the memory 130 for storage according to the scrambled access address ADDS.

[0016] When the access performed is a read operation, the processor 110 transmits the original access address ADD to be read to the memory access device 120 for processing. The memory access device 120 scrambles the original access address ADD to generate a scrambled access address ADDS, and reads the scrambled read data RDS from the memory 130 accordingly. Furthermore, the memory access device 120 recovers (unscrambling) the scrambled read data RDS to generate read data RD, and then transmits it to the processor 110.

[0017] Therefore, in the processing of the memory access device 120, the original access address ADD will be used as a logical access address for reference by the processor 110, and the scrambled access address ADDS corresponds to the physical access address of the memory 130. The original access address ADD and the scrambled access address ADDS are mapped to each other according to the address scrambling mechanism of the memory access device 120.

[0018] Please refer to Figure 2 . Figure 2 A more detailed block diagram of a memory access device 120 with an address scrambling mechanism is shown in one embodiment of the present invention. The memory access device 120 includes an address scrambling circuit 200, a data sequence scrambling circuit 210, a data sequence recovery circuit 220, a data content scrambling and recovery circuit 230, and a memory controller 240.

[0019] The address scrambling circuit 200 is Figure 1 The processor 110 receives the original access address ADD and scrambles it to generate a scrambled access address ADDS.

[0020] Please also refer to Figure 3 . Figure 3 A more detailed block diagram of the address scrambling circuit 200 is shown in one embodiment of the present invention. In one embodiment, the address scrambling circuit 200 includes a translation circuit 300, a plurality of scrambling circuits 310A-310E and a combination circuit 320.

[0021] The translation circuit 300 receives an original access address ADD, and translates the original access address ADD into a primitive unit index and a minimum primitive unit according to a plurality of local unit levels in the memory 130 .

[0022] In one embodiment, the regional unit levels in the memory 130 include block level, sector level, page level, section level and offset level from the highest to the lowest. The original unit indexes will correspond to the above levels respectively, including the original block level index BLI, the original sector level index SRI, the original page level index PAI and the original segment level index SNI. The smallest original unit corresponds to the offset level and is the original offset OFF.

[0023] For example, in a numerical example, the unit size of the memory 130 at the block level is 64 kilobytes (KB), the unit size at the sector level is 4 kilobytes, the unit size at the page level is 256 bytes, the unit size at the fragment level is 32 bytes, and the unit size at the offset level is 1 byte. In this case, when a hexadecimal original access address ADD is 0x28344, the original block level index BLI translated by the translation circuit 300 is 2, the original sector level index SRI is 8, the original page level index PAI is 3, the original fragment level index SNI is 4, and the original offset OFF is 4.

[0024] It should be noted that, in practice, the unit size of the memory 130 at each block level may vary depending on the size of the memory 130 and is not limited to the above implementation.

[0025] The scrambling circuits 310A-310E scramble the original unit index and the minimum original unit in sequence according to the random number address generation algorithm to generate a scrambling unit index and a minimum scrambling unit. The scrambling unit index also corresponds to the above-mentioned levels, including a scrambling block level index BLIS, a scrambling sector level index SRIS, a scrambling page level index PAIS and a scrambling segment level index SNIS. The minimum scrambling unit corresponds to the offset level and is a scrambling offset OFFS.

[0026] That is, the scrambling circuits 310A~310E receive the original block level index BLI, the original sector level index SRI, the original page level index PAI, the original segment level index SN and the original offset OFF in sequence, so as to scramble each index to generate the corresponding scrambled block level index BLIS, the scrambled sector level index SRIS, the scrambled page level index PAIS, the scrambled segment level index SNIS and the scrambled offset OFFS.

[0027] In one embodiment, the random number address generation algorithm of the scrambling circuits 310A-310E is based on the address scrambling key AK. After receiving the address scrambling key AK, the scrambling circuits 310A-310E can generate a scrambling unit index based on an internal pseudo random number generator (not shown). In one embodiment, the scrambling unit index will not exceed the maximum value of the original unit index.

[0028] In another embodiment, the random number address generation algorithm generates a random number based on one of the generated scrambling unit indexes. The scrambling circuits 310A to 310E can feed the generated scrambling unit index to the next scrambling circuit as a basis for the internal virtual random number generator to generate the scrambling unit index. For example, the scrambling circuit 310A can feed the generated scrambling block level index BLIS to the scrambling circuit 310B, and the scrambling circuit 310B feeds the generated scrambling sector level index SRIS to the scrambling circuit 310C. Similarly, the scrambling circuits 310C to 310E can perform the same scrambling unit index generation and feeding, which will not be repeated here.

[0029] It should be noted that the above-mentioned different random number address generation algorithms (eg, scrambling with a key or feeding in a hierarchical manner) can be selected one by one, used simultaneously, or added with other mechanisms, and the present invention is not limited to the above-mentioned implementation methods.

[0030] The combining circuit 320 combines the scrambling unit index and the minimum scrambling unit to generate the scrambling access address ADDS. Figure 2 The memory controller 240 in will access the memory 130 according to the scrambled access address ADDS.

[0031] In one embodiment, when different original access addresses ADD have at least one same original unit index starting from the highest area unit level, the scrambled unit indexes of the scrambled access addresses ADDS generated corresponding to the same original unit index are the same.

[0032] Please refer to Figure 4 . Figure 4 The schematic diagram shows a logical memory 400 referenced by an original access address ADD and a physical memory 410 referenced by a scrambled access address ADDS according to an embodiment of the present invention.

[0033] The logical memory 400 includes multiple blocks corresponding to an original block level index BLI respectively, each block includes multiple sectors corresponding to an original sector level index SRI respectively, each sector includes multiple pages corresponding to an original page level index PAI respectively, and each page includes multiple segments corresponding to an original segment level index SNI respectively.

[0034] exist Figure 4, blocks BLI0 and BLI1 corresponding to the original block level index BLI of 0 and 1 respectively, sectors SRI0 and SRI1 corresponding to the original sector level index SRI of 0 and 1 respectively in block BLI0, pages PAI0 and PAI1 corresponding to the original page level index PAI of 0 and 1 respectively in sector SRI0, and fragments SNI0 and SNI1 corresponding to the original fragment level index SNI of 0 and 1 respectively in page PAI0 are illustrated as examples.

[0035] The physical memory 410 has a similar structure. However, after scrambling, the block BLI0 of the logical memory 400 will correspond to the block BLIS in the physical memory 410. x That is, as long as the value of the original block level index BLI in the original access address ADD is 0, the value of the corresponding scrambled block level index BLIS in the scrambled access address ADDS generated after the scrambling process is x.

[0036] Similarly, sector SRI0 in block BLI0 of logical memory 400 corresponds to block BLIS in physical memory 410. x Sector SRIS y That is, as long as the value of the original block level index BLI in the original access address ADD is 0 and the value of the original sector level index SRI is 0, the value of the scrambled block level index BLIS in the scrambled access address ADDS generated after scrambling is x and the value of the scrambled sector level index SRIS is y.

[0037] Page PAI0 in sector SRI0 in block BLI0 of logical memory 400 corresponds to block BLS in physical memory 410 x Sector SRIS y Pages in PAIS z That is, as long as the value of the original block level index BLI in the original access address ADD is 0, the value of the original sector level index SRI is 0, and the value of the original page level index PAI is 0, the value of the scrambled block level index BLIS in the scrambled access address ADDS generated after the scrambling process is x, the value of the scrambled sector level index SRIS is y, and the value of the scrambled page level index PAIS is z.

[0038] The segments SNI0 and SNI1 in the page PAI0 in the sector SRI0 in the block BLI0 of the logical memory 400 may also be associated with the block BLS in the physical memory 410. x Sector SRIS y Pages in PAIS z Fragments from SNIS a and fragment SNIS bThey correspond to each other and will not be elaborated here.

[0039] The address scrambling mechanism described above can preserve the continuity of a relatively large and continuous memory area in the memory 130. Figure 4 Each memory area in the physical memory 410 shown may still correspond to each memory area in the logical memory 400 .

[0040] After the address scrambling circuit 200 generates the scrambled access address ADDS, Figure 2 The data sequence scrambling circuit 210, the data sequence recovery circuit 220, and the data content scrambling and recovery circuit 230 in the embodiment of the present invention will perform data sequence scrambling and data content scrambling. The operation of these components will be described in more detail below.

[0041] In one embodiment, the processor 110 may perform a write operation on the memory 130 at a segment level or a page level.

[0042] When the write operation corresponds to the segment level, since the unit size of the offset level one level lower corresponds to the smallest memory area unit, the data sequence scrambling circuit 210 will be bypassed to make the write data WD as the to-be-written data UWD.

[0043] Furthermore, the data content scrambling and recovery circuit 230 generates scrambled write data WDS according to the random number data generation algorithm for the data to be written UWD, and the memory controller 240 writes the scrambled write data WDS into the memory 130 for storage according to the scrambled access address ADDS. In one embodiment, the random number data generation algorithm performed by the data content scrambling and recovery circuit 230 generates a random number according to the data scrambling key DK and / or the original access address ADD.

[0044] To achieve the purpose of data sequential scrambling, when the original access address ADD used in the write operation corresponds to the page level, the address scrambling circuit 200 also generates a scrambling sequence table TAB1 and a scrambling sequence table TAB2 according to the original access address ADD. In more detail, in one embodiment, the scrambling sequence table TAB1 corresponds to the segment level and can be generated by the address scrambling key AK and the scrambled page level index PAIS. The scrambling sequence table TAB2 corresponds to the offset level and can be generated by the address scrambling key AK and the scrambled segment level index SNIS.

[0045] Among them, the scrambling sequence table TAB1 records the address arrangement order after the original segment level index SNI in a page is scrambled. Therefore, the original segment level index SNI can be converted to the scrambled segment level index SNIS according to the scrambling sequence table TAB1. On the other hand, the scrambling sequence table TAB2 records the address arrangement order after the original offset OFF in a segment is scrambled. Therefore, the original offset OFF can be converted to the scrambled offset OFFS according to the scrambling sequence table TAB2.

[0046] In contrast, other levels such as the original block level index BLI, the original sector level index SRI, and the original page level index PAI are directly converted by the scrambling circuits 310A, 310B, and 310C into the scrambled block level index BLIS, the scrambled sector level index SRIS, and the scrambled page level index PAIS.

[0047] Therefore, the data sequence scrambling circuit 210 performs data sequence scrambling on the write data WD according to the scrambling sequence table TAB1 and the scrambling sequence table TAB2 to generate and transmit the to-be-written data UWD to the data content scrambling and recovery circuit 230 for subsequent data content scrambling.

[0048] In one embodiment, the scrambling sequence table TAB1 and the scrambling sequence table TAB2 may be stored in a register (not shown) in the memory access device 120, so as to be accessed by the data sequence scrambling circuit 210. In addition, the data sequence scrambling circuit 210 may also include a cache (or register) for storing the write data WD, and a computing circuit for processing the write data WD.

[0049] Similarly, the processor 110 may perform a read operation on the memory 130 at a segment level or a page level.

[0050] First, the data content scrambling and recovery circuit 230 reads the scrambled read data RDS from the memory 130 , and recovers it according to the random number data generation algorithm to generate the to-be-read data URD.

[0051] When the read operation corresponds to the segment level, since the unit size of the offset level at the next lower level corresponds to the smallest memory region unit, the data sequence recovery circuit 220 will be bypassed so that the to-be-read data URD is used as the read data RD.

[0052] In order to achieve the purpose of data sequence recovery, when the original access address ADD used in the read operation corresponds to the page level, the address scrambling circuit 200 also generates a scrambling sequence table TAB1 and a scrambling sequence table TAB2 according to the original access address ADD. In more detail, in one embodiment, the scrambling sequence table TAB1 corresponds to the segment level and can be generated by the address scrambling key AK and the scrambled page level index PAIS. The scrambling sequence table TAB2 corresponds to the offset level and can be generated by the address scrambling key AK and the scrambled segment level index SNIS. The meanings of the scrambling sequence table TAB1 and the scrambling sequence table TAB2 have been described in the previous paragraph and will not be repeated here.

[0053] Therefore, the data sequence recovery circuit 220 recovers the data sequence to be read URD according to the scrambling sequence table TAB1 and the scrambling sequence table TAB2 to generate and transmit the read data RD to the processor 110 .

[0054] Similarly, in one embodiment, the scrambling sequence table TAB1 and the scrambling sequence table TAB2 may be stored in a register in the memory access device 120 to be accessed by the data sequence recovery circuit 220. In addition, the data sequence recovery circuit 220 may also include a cache (or register) for storing the to-be-read data URD, and a computing circuit for processing the to-be-read data URD.

[0055] In one embodiment, the access to the memory 130 includes an erase operation in addition to a write operation and a read operation. In more detail, the memory controller 240 also performs an erase operation on a memory area in the memory 130 according to the scrambled access address ADDS generated by the address scrambling circuit 200. For the processor 110, the physical memory 130 is operated by the scrambled access address ADDS, and there is a larger and continuous memory area logically, so the erase operation can be performed on a larger area in the memory 130, such as but not limited to a sector.

[0056] In some technologies, the address scrambling mechanism is completely random. However, since the scrambled physical memory cannot retain the original continuity of the logical memory, it will be impossible to operate on a larger and continuous memory area on the memory 130.

[0057] By using the address scrambling mechanism of the present invention, the physical memory can maintain the address continuity of the corresponding logical memory. Figure 1 The processor 110 in the memory 130 can perform operations such as reading, writing, erasing or locking the area at a higher area unit level (such as a block, sector or page) in the memory 130, while achieving the purpose of address scrambling and continuous memory operation.

[0058] Please refer to Figure 5 . Figure 5 A flowchart of a memory access method 500 according to an embodiment of the present invention is shown.

[0059] In addition to the aforementioned apparatus, the present invention also discloses a memory access method 500, which is applied to, for example, but not limited to Figure 1 In the memory access device 120. An embodiment of the memory access method 500 is as follows: Figure 5 As shown, the following steps are included.

[0060] In step S510 , the address scrambling circuit 200 receives the original access address ADD, and translates it into the original unit index and the minimum original unit according to the plurality of region unit levels in the memory 130 , for example Figure 3 Shown are the original block level index BLI, the original sector level index SRI, the original page level index PAI, the original slice level index SNI, and the original offset OFF.

[0061] In step S520: the address scrambling circuit 200 generates a scrambling unit index and a minimum scrambling unit according to a random number address generation algorithm, for example Figure 3 The address scrambling circuit 200 generates a scrambled access address ADDS according to the scrambling unit index and the minimum scrambling unit, wherein when different original access addresses ADD have at least one same original unit index from the highest area unit level, the scrambled unit indexes generated corresponding to the same original unit index are the same.

[0062] In step S530 : the memory controller 240 accesses the memory 130 according to the scrambled access address ADDS.

[0063] It should be noted that the above implementation is only an example. In other embodiments, those skilled in the art may make changes without departing from the spirit of the present invention.

[0064] In summary, the memory access device with address scrambling mechanism and the memory access method thereof in the present invention can make the scrambled physical memory keep the address continuity of the corresponding logical memory, and achieve the purpose of address scrambling and continuous memory operation at the same time.

[0065] Although the embodiments of the present case are described above, these embodiments are not intended to limit the present case. Those skilled in the art may make changes to the technical features of the present case based on the explicit or implicit content of the present case. All these changes may fall within the scope of patent protection sought in the present case. In other words, the scope of patent protection in the present case shall be subject to that defined in the claims of this application.

[0066]

Explanation of symbols

[0067] 100: Computer Systems

[0068] 110: Processor

[0069] 120: memory access device

[0070] 130: Memory

[0071] 200: Address scrambling circuit

[0072] 210: Data sequence scrambling circuit

[0073] 220: Data sequence recovery circuit

[0074] 230: Data content scrambling and recovery circuit

[0075] 240:Memory controller

[0076] 300:Translation circuit

[0077] 310A~310E: Scrambling circuit

[0078] 320: Combinational Circuits

[0079] 400:Logical memory

[0080] 410: Physical Memory

[0081] 500: Memory access method

[0082] S510~S530: Steps

[0083] ADD: original access address

[0084] ADDS: Scrambled access address

[0085] AK: Address scrambling key

[0086] BLI: Raw Block Level Index

[0087] BLI0, BLI1, BLIS x :Block

[0088] BLIS: Scrambled Block Level Index

[0089] DK: Data scrambling key

[0090] OFF: Original offset

[0091] OFFS: Scrambled offset

[0092] PAI: Original Page Level Index

[0093] PAI0, PAI1, PAIS z-1 、PAIS z 、PAIS z+1 :Page

[0094] PAIS: Scrambled Page Level Index

[0095] RD: Read data

[0096] RDS: Scrambled Read Data

[0097] SNI: Raw Segment Level Index

[0098] SNI0, SNI1, SNIS a 、SNIS b :Fragment

[0099] SNIS Scrambled Segment Level Index

[0100] SRI: Raw Sector Level Index

[0101] SRI0, SRI1, SRIS y-1 、SRIS y 、SRIS y+1 :Sector

[0102] SRIS Scrambled Sector Level Index

[0103] TAB1, TAB2: Scrambling sequence table

[0104] URD: data to be read

[0105] UWD: data to be written

[0106] WD: Write data

[0107] WDS: Scrambled write data

Claims

1. A memory access device with an address scrambling mechanism, comprising: The address scrambling circuit is configured to: receiving an original access address to translate into a plurality of primitive unit indexes and a minimum primitive unit according to a plurality of regional unit hierarchies in a memory; as well as Generate a plurality of scrambling unit indexes and a minimum scrambling unit according to a random number address generation algorithm, and generate a scrambled access address according to the plurality of scrambling unit indexes and the minimum scrambling unit, wherein when different original access addresses have at least one same plurality of original unit indexes starting from the highest plurality of regional unit levels, the plurality of scrambling unit indexes generated corresponding to the same plurality of original unit indexes are the same; as well as A memory controller is configured to access the memory according to the scrambled access address.

2. The memory access device according to claim 1, wherein the plurality of regional unit levels include a block level, a sector level, a page level, a slice level and an offset level from high to low, wherein the plurality of original unit indexes and the plurality of scrambling unit indexes correspond to the block level, the sector level, the page level and the slice level respectively, and the minimum original unit and the minimum scrambling unit correspond to the offset level.

3. The memory access device according to claim 1, wherein the address scrambling circuit comprises: A translation circuit configured to receive the original access address and translate it into the plurality of primitive unit indexes and the minimum primitive unit; a complex scrambling circuit, each configured to scramble one of the complex original unit index and the minimum original unit according to the random number address generation algorithm to generate one of the complex scrambling unit index and the minimum scrambling unit; as well as The combining circuit is configured to combine the plurality of scrambling unit indexes and the minimum scrambling unit to generate the scrambled access address. 4 . The memory access device according to claim 3 , wherein the random number address generation algorithm generates a random number according to an address scrambling key and / or one of the generated plural scrambling unit indexes.

5. The memory access device according to claim 1, further comprising: Data content scrambling and recovery circuit, configured with: When performing a write operation, the memory controller writes the data to be written into the memory after generating scrambled write data according to a random number data generation algorithm; and When performing a read operation, the memory controller reads the scrambled read data from the memory to recover and generate data to be read according to a random number data generation algorithm.

6. The memory access device according to claim 5, wherein the address scrambling circuit is further configured to generate two scrambling sequence tables according to the scrambled access address when the write operation and the read operation are performed at the page level in the plurality of regional unit levels, wherein the two scrambling sequence tables are respectively configured to record the address scrambling arrangement sequence of the address scrambling circuit corresponding to the segment level and the offset level in the plurality of regional unit levels, and the memory access device further comprises: a data sequence scrambling circuit configured to perform data sequence scrambling on the write data according to the two scrambling sequence tables to generate and transmit the to-be-written data to the data content scrambling and recovery circuit; and The data sequence recovery circuit is configured to perform data sequence recovery on the data to be read according to the two scrambling sequence tables to generate read data.

7. The memory access device according to claim 6, wherein when the write operation and the read operation are performed corresponding to the fragment level in the plurality of region unit levels, the data sequence scrambling circuit is bypassed so that the write data is used as the data to be written, and the data sequence recovery circuit is bypassed so that the data to be read is used as the read data. 8 . The memory access device according to claim 1 , wherein the memory controller is further configured to erase a memory area in the memory according to the scrambled access address.

9. The memory access device according to claim 1, wherein the memory is a Serial Peripheral Interface flash memory.

10. A memory access method with an address scrambling mechanism, applied to a memory access device, comprising: The address scrambling circuit receives the original access address to translate it into a plurality of original unit indexes and a minimum original unit according to a plurality of region unit levels in the memory; The address scrambling circuit generates a plurality of scrambling unit indexes and a minimum scrambling unit according to a random number address generation algorithm, so as to generate a scrambled access address according to the plurality of scrambling unit indexes and the minimum scrambling unit, wherein when different original access addresses have at least one same plurality of original unit indexes starting from the highest plurality of regional unit levels, the plurality of scrambling unit indexes generated corresponding to the same plurality of original unit indexes are the same; as well as A memory controller is enabled to access the memory according to the scrambled access address.