A method for data storage and file management of SATA disks based on NorFlash

By mounting the jffs2 file system on the NorFlash chip and creating a total list file of SATA disk storage block status, the problems of high development difficulty and limited storage speed of SATA disk data storage methods are solved, and flexible file management and operation functions are realized.

CN121070260BActive Publication Date: 2026-03-06SAIDI RUICHUANG (SICHUAN) INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511161716.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2026-03-06
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

In existing embedded storage devices, data storage based on SATA disks suffers from high development difficulty or limited storage speed, and cannot simultaneously achieve flexible data management and operation by file.

Method used

By mounting the jffs2 file system on the NorFlash chip and creating a total list file of SATA disk storage block status in the NorFlash chip, combined with the BRAM data interaction register, file management and operation of the SATA disk are realized, including file storage, reading and deletion.

Benefits of technology

It enables data on SATA disks to have file-based management and operation features, including file storage, reading, and deletion, without mounting a file system, and improves storage speed and management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070260B_ABST
    Figure CN121070260B_ABST
Patent Text Reader

Abstract

This invention discloses a data storage and file management method for SATA disks based on NorFlash, belonging to the field of disk management technology. Used in a storage control system, it includes the following steps: the PL terminal of the ZYNQ embedded storage control unit initializes the SATA disk and divides the SATA disk's storage space into a preset number of storage blocks, each block being assigned a fixed storage block address sequentially; a jffs2 file system is mounted on the NorFlash chip; the PS terminal establishes a total list file of SATA disk storage block status in the NorFlash chip and sets the occupancy status of all storage blocks in the total list to idle; the PS terminal establishes a file storage thread, a file reading thread, and a file deletion thread, and when a file operation command is received, the corresponding thread is executed according to the command type. This invention mounts the jffs2 file system on the NorFlash chip, enabling the stored data on the SATA disk to have file-based management and operation characteristics even without mounting a file system on the SATA disk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of disk management technology, and in particular to a data storage and file management method for SATA disks based on NorFlash. Background Technology

[0002] In embedded storage devices, data storage technology based on SATA disks generally includes two implementation methods:

[0003] One type is a data storage method that directly manipulates the SATA disk address without a file system. Its advantages are low development difficulty, no file system overhead, and unlimited data storage speed. Its disadvantages are that the stored data does not have the characteristics of file management and operation, and the data access is inflexible.

[0004] Another method is to mount a file system on the SATA disk. Its advantage is that mounting a file system makes it easier to store and manage data by file. Its disadvantages are that it requires a lot of development work and is difficult to develop. In addition, the overhead of mounting a file system will reduce the data storage speed of the SATA disk to some extent. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a data storage and file management method for SATA disks based on NorFlash.

[0006] The objective of this invention is achieved through the following technical solution: a data storage and file management method based on NorFlash for managing SATA disks, used in a storage control system, comprising the following steps:

[0007] The ZYNQ embedded storage control unit initializes the SATA disk at the PL end and divides the storage space of the SATA disk into a preset number of storage blocks, with each storage block assigned a fixed storage block address in sequence.

[0008] The PS terminal of the ZYNQ embedded storage control unit initializes the NorFlash chip and mounts the jffs2 file system on the NorFlash chip.

[0009] On the PS side, a total list file of SATA disk storage block status is created in the NorFlash chip, and the occupied status of all storage blocks in the total list of SATA disk storage block status is set to free.

[0010] A BRAM data exchange register is established between the PS and PL ends to transmit SATA disk storage block addresses and external file operation commands.

[0011] The PS side establishes a file storage thread, a file reading thread, and a file deletion thread. When a file operation command is received, the corresponding thread is executed according to the command type.

[0012] Preferably, the preset quantity is 65536.

[0013] Preferably, the BRAM data exchange register includes an address transfer register and an instruction transfer register.

[0014] Preferably, when the PS receives a file storage instruction, it performs the following steps:

[0015] S51 and PS enter the file storage thread and synchronously transmit the file storage instruction to PL through the instruction transfer register.

[0016] The S52 and PS terminals create and open a SATA disk data management file in the NorFlash chip, and set the number of storage block addresses N occupied by the current file storage in the first 4 bytes of the file to 0.

[0017] S53 and PS open the SATA disk storage block status list file in the NorFlash chip and read it into the storage block status list cache array. The cache array length is 65536.

[0018] S54 and PS sequentially search for the address of the first free memory block with a status of 0 in the cache array, and send the address to PL through the address transfer register;

[0019] After receiving the address of the free storage block, the S55 and PL terminals will write the data input from the data interface unit into the SATA disk storage space corresponding to the storage block address in sequence.

[0020] S56. When the SATA disk storage space corresponding to the free storage block address is full, the PL terminal returns the storage block address to the PS terminal through the address transfer register.

[0021] S57. If the storage block address returned by PL is consistent with the storage block address sent by PS, it means that the storage block is full. PS modifies the occupied status of the corresponding storage block in the storage block status cache array to occupied, adds the storage block address to the storage block address list of the current SATA disk data management file, and increments the storage block address count N by 1.

[0022] S58. Repeat steps S53~S57 until the PS receives a file storage stop command or all 65536 storage block addresses are occupied.

[0023] S59. The PS end rewrites the modified storage block status cache array into the SATA disk storage block status total list file.

[0024] S510 and PS terminals shut down and saved the SATA disk storage block status list file and the current SATA disk data management file.

[0025] The S511, PS, and PL terminals all exited the file storage thread.

[0026] Preferably, when the PS receives a file read command, it performs the following steps:

[0027] S61: The PS end receives the file read command and the file name of the SATA disk data management file to be read, enters the file read thread, and synchronously transmits the file read command to the PL end through the command transfer register.

[0028] S62, PS opens the SATA disk data management file to be read in the NorFlash chip, reads the number of storage block addresses N occupied by the first 4 bytes of the file, and reads the storage block address list in the file into the storage block address list cache array with a length of N.

[0029] S63, the PS end reads a memory block address sequentially from the memory block address list cache array, and sends the memory block address to the PL end through the address transfer register;

[0030] After receiving the storage block address, the S64 and PL terminals read the data of the SATA disk storage space corresponding to the storage block address in sequence and output it to the data interface unit.

[0031] S65. After the data in the SATA disk storage space corresponding to a single storage block address is read, the PL end returns the storage block address to the PS end through the address transfer register.

[0032] S66. If the storage block address returned by the PL end to the PS end is consistent with the storage block address sent, it means that the data of the SATA disk storage space corresponding to the storage block address has been read. The PS end then sends the next storage block address.

[0033] S67. Repeat steps S63~S66 for a total of N times until all data in the SATA disk storage space corresponding to all storage block addresses in the storage block address list cache array has been read.

[0034] S68, PS end close the SATA disk data management file for this time;

[0035] The S69, PS, and PL terminals all exited the file reading thread.

[0036] Preferably, when the PS receives a file deletion command, it performs the following steps:

[0037] The S71 and PS terminals receive the file deletion command and the file name of the SATA disk data management file to be deleted, enter the file deletion thread, and transmit the file deletion command to the PL terminal through the command transmission register.

[0038] S72, PS opens the SATA disk data management file to be deleted in the NorFlash chip, reads the number of storage block addresses N occupied by this file in the first 4 bytes of this file, and reads the list of storage block addresses in this file into the cache array, the length of the cache array is N;

[0039] S73 and PS open the SATA disk storage block status list file in the NorFlash chip and read the SATA disk storage block status list into the cache array, which has a length of 65536.

[0040] S74, the PS end reads a memory block address sequentially from the memory block address list cache array, and sends the memory block address to the PL end through the address transfer register;

[0041] After receiving the storage block address, the S75 and PL terminals erase the data in the SATA disk storage space corresponding to the storage block address in sequence.

[0042] S76. After the data stored in the SATA disk storage space corresponding to a single storage block address is erased, the PL end returns the storage block address to the PS end through the address transfer register.

[0043] S77. If the storage block address returned by the PL end to the PS end is consistent with the storage block address sent, it means that the data in the SATA disk storage space corresponding to the storage block address has been erased. The PS end will change the occupied status of the corresponding storage block in the cache array of the SATA disk storage block status list to free.

[0044] S78. Repeat steps S74 to S77 for a total of N times until the data erasure of the storage space of the SATA disk corresponding to all storage block addresses in the storage block address list cache array is completed;

[0045] S79, PS end rewrites the modified SATA disk storage block status cache array into the SATA disk storage block status file;

[0046] The S710 and PS terminals close and save the modified SATA disk storage block status list file, and delete the SATA disk data management file for this operation.

[0047] The file deletion thread was exited on the S711, PS, and PL sides.

[0048] Preferably, the storage control system includes a ZYNQ embedded storage control unit, wherein the PL terminal of the ZYNQ embedded storage control unit is connected to the high-speed interface of the SATA disk storage unit and the data interface unit, and the PL terminal of the ZYNQ embedded storage control unit is connected to the low-speed interface of the NorFlash flash memory unit and the data interface unit; the high-speed interface is used for data transmission, and the low-speed interface is used for file operation commands.

[0049] Preferably, the PL terminal is connected to a SATA disk storage unit via a SATA interface, and the PS terminal is connected to a NorFlash flash memory unit via an SPI bus.

[0050] The beneficial effects of this invention are:

[0051] 1) This invention mounts the jffs2 file system on the NorFlash chip and establishes a binary management file in the NorFlash chip to indirectly manage the SATA disk storage block address. This enables the stored data on the SATA disk to have file-based management and operation characteristics, including file storage, file reading, file deletion and other operations, even without mounting a file system on the SATA disk.

[0052] 2) Divide the storage space of the SATA disk into 65536 storage blocks, assign a fixed storage block address to each storage block, and map the storage block address to the SATA disk storage block status list file in the NorFlash chip to achieve unified management of SATA disk storage blocks in the NorFlash chip.

[0053] 3) By creating a new SATA disk data management file in the NorFlash chip to record the SATA disk storage block address and occupancy status used each time data is stored, and synchronizing the storage block address recorded in each SATA disk data management file with the storage block status list in the SATA disk storage block status master list file, the stored data can be indirectly managed and operated on the SATA disk without mounting a file system, including file storage, file reading, file deletion and other operations. Attached Figure Description

[0054] Figure 1 This is a flowchart of the method of the present invention;

[0055] Figure 2 This is a block diagram of the storage control system.

[0056] Figure 3 A schematic diagram illustrating the principle of SATA disk storage block address management framework;

[0057] Figure 4 This is a flowchart of the file storage process;

[0058] Figure 5 Here is a flowchart of the file reading process;

[0059] Figure 6 This is a flowchart of the file deletion process. Detailed Implementation

[0060] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] See Figures 1-6 This invention provides a technical solution: a data storage and file management method for SATA disks based on NorFlash, used in a storage control system, comprising the following steps:

[0062] The ZYNQ embedded storage control unit initializes the SATA disk at the PL end and divides the storage space of the SATA disk into a preset number of storage blocks, with each storage block assigned a fixed storage block address in sequence.

[0063] The PS terminal of the ZYNQ embedded storage control unit initializes the NorFlash chip and mounts the jffs2 file system on the NorFlash chip.

[0064] On the PS side, a total list file of SATA disk storage block status is created in the NorFlash chip, and the occupied status of all storage blocks in the total list of SATA disk storage block status is set to free.

[0065] A BRAM data exchange register is established between the PS and PL ends to transmit SATA disk storage block addresses and external file operation commands.

[0066] The PS side establishes a file storage thread, a file reading thread, and a file deletion thread. When a file operation command is received, the corresponding thread is executed according to the command type.

[0067] In this embodiment, as Figure 3As shown, the SATA disk storage space is divided into 65536 storage blocks by the PL end, and each storage block is assigned a fixed storage block address in the order of 0 to 65535; the NorFlash chip is mounted with the jffs2 file system by the PS end, which is used to create binary files to manage the SATA disk storage blocks, including a unique SATA disk storage block status list file and several SATA disk data management files.

[0068] The SATA disk storage block status list file is used to map the 65536 equally divided storage block addresses on the PL end, and records the occupancy status of each SATA disk storage block in the order of storage block address 0 to 65535, forming the SATA disk storage block status list. Status 0 indicates free, and status 1 indicates occupied.

[0069] The SATA disk data management file manages the storage block addresses used for each data storage operation on the SATA disk, recording them in a list of storage block addresses in the order they were used. The first 4 bytes of this file store the number of storage block addresses used for that data storage operation, and the following 2 bytes store the occupied storage block addresses sequentially, forming a storage block address list. A corresponding SATA disk data management file is created in the NorFlash chip for each data storage operation. The storage block addresses recorded in all SATA disk data management files are unique, and the total number does not exceed 65536.

[0070] In some embodiments, the preset quantity is 65536.

[0071] In some embodiments, the BRAM data exchange register includes an address transfer register and an instruction transfer register.

[0072] In some embodiments, when the PS receives a file storage instruction, the following steps are performed:

[0073] S51 and PS enter the file storage thread and synchronously transmit the file storage instruction to PL through the instruction transfer register.

[0074] The S52 and PS terminals create and open a SATA disk data management file in the NorFlash chip, and set the number of storage block addresses N occupied by the current file storage in the first 4 bytes of the file to 0.

[0075] S53 and PS open the SATA disk storage block status list file in the NorFlash chip and read it into the storage block status list cache array. The cache array length is 65536.

[0076] S54 and PS sequentially search for the address of the first free memory block with a status of 0 in the cache array, and send the address to PL through the address transfer register;

[0077] After receiving the address of the free storage block, the S55 and PL terminals will write the data input from the data interface unit into the SATA disk storage space corresponding to the storage block address in sequence.

[0078] S56. When the SATA disk storage space corresponding to the free storage block address is full, the PL terminal returns the storage block address to the PS terminal through the address transfer register.

[0079] S57. If the storage block address returned by PL is consistent with the storage block address sent by PS, it means that the storage block is full. PS modifies the occupied status of the corresponding storage block in the storage block status cache array to occupied, adds the storage block address to the storage block address list of the current SATA disk data management file, and increments the storage block address count N by 1.

[0080] S58. Repeat steps S53~S57 until the PS receives a file storage stop command or all 65536 storage block addresses are occupied.

[0081] S59. The PS end rewrites the modified storage block status cache array into the SATA disk storage block status total list file.

[0082] S510 and PS terminals shut down and saved the SATA disk storage block status list file and the current SATA disk data management file.

[0083] The S511, PS, and PL terminals all exited the file storage thread.

[0084] In some embodiments, when the PS receives a file read instruction, the following steps are performed:

[0085] S61: The PS end receives the file read command and the file name of the SATA disk data management file to be read, enters the file read thread, and synchronously transmits the file read command to the PL end through the command transfer register.

[0086] S62, PS opens the SATA disk data management file to be read in the NorFlash chip, reads the number of storage block addresses N occupied by the first 4 bytes of the file, and reads the storage block address list in the file into the storage block address list cache array with a length of N.

[0087] S63, the PS end reads a memory block address sequentially from the memory block address list cache array, and sends the memory block address to the PL end through the address transfer register;

[0088] After receiving the storage block address, the S64 and PL terminals read the data of the SATA disk storage space corresponding to the storage block address in sequence and output it to the data interface unit.

[0089] S65. After the data in the SATA disk storage space corresponding to a single storage block address is read, the PL end returns the storage block address to the PS end through the address transfer register.

[0090] S66. If the storage block address returned by the PL end to the PS end is consistent with the storage block address sent, it means that the data of the SATA disk storage space corresponding to the storage block address has been read. The PS end then sends the next storage block address.

[0091] S67. Repeat steps S63~S66 for a total of N times until all data in the SATA disk storage space corresponding to all storage block addresses in the storage block address list cache array has been read.

[0092] S68, PS end close the SATA disk data management file for this time;

[0093] The S69, PS, and PL terminals all exited the file reading thread.

[0094] In some embodiments, when the PS receives a file deletion command, the following steps are performed:

[0095] The S71 and PS terminals receive the file deletion command and the file name of the SATA disk data management file to be deleted, enter the file deletion thread, and transmit the file deletion command to the PL terminal through the command transmission register.

[0096] S72, PS opens the SATA disk data management file to be deleted in the NorFlash chip, reads the number of storage block addresses N occupied by this file in the first 4 bytes of this file, and reads the list of storage block addresses in this file into the cache array, the length of the cache array is N;

[0097] S73 and PS open the SATA disk storage block status list file in the NorFlash chip and read the SATA disk storage block status list into the cache array, which has a length of 65536.

[0098] S74, the PS end reads a memory block address sequentially from the memory block address list cache array, and sends the memory block address to the PL end through the address transfer register;

[0099] After receiving the storage block address, the S75 and PL terminals erase the data in the SATA disk storage space corresponding to the storage block address in sequence.

[0100] S76. After the data stored in the SATA disk storage space corresponding to a single storage block address is erased, the PL end returns the storage block address to the PS end through the address transfer register.

[0101] S77. If the storage block address returned by the PL end to the PS end is consistent with the storage block address sent, it means that the data in the SATA disk storage space corresponding to the storage block address has been erased. The PS end will change the occupied status of the corresponding storage block in the cache array of the SATA disk storage block status list to free.

[0102] S78. Repeat steps S74 to S77 for a total of N times until the data erasure of the storage space of the SATA disk corresponding to all storage block addresses in the storage block address list cache array is completed;

[0103] S79, PS end rewrites the modified SATA disk storage block status cache array into the SATA disk storage block status file;

[0104] The S710 and PS terminals close and save the modified SATA disk storage block status list file, and delete the SATA disk data management file for this operation.

[0105] The file deletion thread was exited on the S711, PS, and PL sides.

[0106] In some embodiments, the storage control system includes a ZYNQ embedded storage control unit. The PL terminal of the ZYNQ embedded storage control unit is connected to the high-speed interface of the SATA disk storage unit and the data interface unit, and the PL terminal of the ZYNQ embedded storage control unit is connected to the low-speed interface of the NorFlash flash memory unit and the data interface unit. The high-speed interface is used to transmit data, and the low-speed interface is used to transmit file operation commands.

[0107] In this embodiment, as Figure 2 As shown, the ZYNQ embedded storage control unit consists of a ZYNQ chip and peripheral circuitry. The ZYNQ chip includes a PS terminal and a PL terminal, which communicate via BRAM. The SATA disk storage unit consists of a SATA disk and its peripheral circuitry, with the SATA disk connected to the PL terminal via a SATA interface. The NorFlash flash memory unit consists of a NorFlash chip and its peripheral circuitry, with the NorFlash chip connected to the PS terminal via an SPI bus. The data interface unit includes both high-speed and low-speed interfaces. The high-speed interface connects to the PL terminal for data transmission, while the low-speed interface connects to the PS terminal for file operation commands.

[0108] In some embodiments, the PL terminal is connected to a SATA disk storage unit via a SATA interface, and the PS terminal is connected to a NorFlash flash memory unit via an SPI bus.

[0109] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A data storage and file management method for SATA disks based on NorFlash, characterized in that: A storage control system comprises the following steps: The PL end of the ZYNQ embedded storage control unit initializes a SATA disk and equally divides the storage space of the SATA disk into a preset number of storage blocks, each of which is sequentially assigned a fixed storage block address; The PS end of the ZYNQ embedded storage control unit initializes a NorFlash chip and mounts a jffs2 file system on the NorFlash chip; The PS end establishes a total list file of SATA disk storage block states in the NorFlash chip and sets the occupancy state of all storage blocks in the total list of SATA disk storage block states as idle; A BRAM data interaction register is established between the PS end and the PL end for transmitting SATA disk storage block addresses and external file operation instructions; The PS end establishes a file storage thread, a file reading thread and a file deletion thread, and executes corresponding threads according to the instruction type when receiving a file operation instruction.

2. The method for managing data storage and file of SATA disk based on NorFlash according to claim 1, characterized in that: The preset number is 65536.

3. The method for managing data storage and file of SATA disk based on NorFlash according to claim 1, characterized in that: The BRAM data interaction register comprises an address transmission register and an instruction transmission register.

4. The method for managing data storage and file of SATA disk based on NorFlash according to claim 1, characterized in that: When the PS end receives a file storage instruction, the following steps are executed: S51, the PS end enters the file storage thread and synchronously transmits the file storage instruction to the PL end through the instruction transmission register; S52, the PS end newly creates and opens a SATA disk data management file in the NorFlash chip, sets the number N of storage block addresses occupied by the current file storage stored in the first four bytes of the file as 0; S53, the PS end opens the total list file of SATA disk storage block states in the NorFlash chip and reads the total list of storage block states into a cache array, the length of the cache array being 65536; S54, the PS end sequentially searches for a first idle storage block address with a state of 0 from the cache array and sends the address to the PL end through the address transmission register; S55, after receiving the idle storage block address, the PL end writes the data input into the data interface unit into the SATA disk storage space corresponding to the storage block address in sequence; S56, when the SATA disk storage space corresponding to the idle storage block address is full, the PL end returns the storage block address to the PS end through the address transmission register; S57, if the storage block address returned by the PL end is consistent with the sent storage block address, it indicates that the storage block is full, the PS end modifies the occupancy state of the corresponding storage block in the cache array of the total list of storage block states to occupied, adds the storage block address to the storage block address list of the current SATA disk data management file and accumulates the number N of storage block addresses by 1; S58, steps S53-S57 are repeatedly executed until the PS end receives a file storage stop instruction or all 65536 storage block addresses are occupied; S59, the PS end rewrites the modified cache array of the total list of storage block states into the total list file of SATA disk storage block states; S510, the PS end closes and saves the total list file of SATA disk storage block states and the current SATA disk data management file; S511, the PS end and the PL end both exit the file storage thread.

5. The method for managing data storage and file of SATA disk based on NorFlash according to claim 1, characterized in that: When the PS end receives a file reading instruction, the following steps are performed: S61, the PS end receives a file reading instruction and the SATA disk data management file name to be read this time, enters the file reading thread, and synchronously transmits the file reading instruction to the PL end through an instruction transmission register; S62, the PS end opens the SATA disk data management file to be read this time in the NorFlash chip, reads the number N of storage block addresses occupied by the file stored in the first 4 bytes of the file, and reads the storage block address list in the file into a storage block address list cache array, with the cache array length being N; S63, the PS end reads a storage block address from the storage block address list cache array in sequence, and sends the storage block address to the PL end through an address transmission register; S64, after the PL end receives the storage block address, the data of the SATA disk storage space corresponding to the storage block address is read and output to the data interface unit in sequence; S65, after the data of the SATA disk storage space corresponding to a single storage block address is read, the PL end returns the storage block address to the PS end through the address transmission register; S66, after the PS end receives the storage block address returned by the PL end, if the storage block address is consistent with the sent storage block address, it indicates that the data of the SATA disk storage space corresponding to the storage block address has been read, and the PS end sends the next storage block address; S67, steps S63-S66 are repeatedly executed for N times, until the data of the SATA disk storage space corresponding to all storage block addresses in the storage block address list cache array is read; S68, the PS end closes the SATA disk data management file this time; S69, the PS end and the PL end both exit the file reading thread.

6. The method for managing data storage and file of SATA disk based on NorFlash according to claim 1, characterized in that: When the PS end receives a file reading instruction, the following steps are performed: S71, the PS end receives a file reading instruction and the SATA disk data management file name to be read this time, enters the file reading thread, and synchronously transmits the file reading instruction to the PL end through an instruction transmission register; S72, the PS end opens the SATA disk data management file to be deleted this time in the NorFlash chip, reads the number N of storage block addresses occupied by the file stored in the first 4 bytes of the file, and reads the storage block address list in the file into a cache array, with the cache array length being N; S73, the PS end opens the SATA disk storage block state total list file in the NorFlash chip, and reads the SATA disk storage block state total list into a cache array, with the cache array length being 65536; S74, the PS end reads a storage block address from the storage block address list cache array in sequence, and sends the storage block address to the PL end through an address transmission register; S75, after the PL end receives the storage block address, the data of the SATA disk storage space corresponding to the storage block address is sequentially erased; S76, when the data erasing of the SATA disk storage space corresponding to the single storage block address is completed, the PL end returns the storage block address to the PS end through the address transmission register; S77, if the storage block address returned by the PL end is consistent with the sent storage block address, it indicates that the data erasing of the SATA disk storage space corresponding to the storage block address is completed, and the PS end modifies the occupation state of the corresponding storage block in the SATA disk storage block state total list buffer array to be free; S78, the steps S74-S77 are repeatedly executed for N times until the data erasing of the SATA disk storage space corresponding to all storage block addresses in the storage block address list buffer array is completed; S79, the PS end rewrites the modified SATA disk storage block state total list buffer array into the SATA disk storage block state total list file; S710, the PS end closes and saves the modified SATA disk storage block state total list file, and deletes the SATA disk data management file of this time; S711, the PS end and the PL end both exit the file deletion thread.

7. The method according to any one of claims 1-6, wherein the method is based on NorFlash management of SATA disk data storage and file management. The storage control system comprises a ZYNQ embedded storage control unit, a PL end of the ZYNQ embedded storage control unit is connected with a high-speed interface of a SATA disk storage unit and a data interface unit, and a PS end of the ZYNQ embedded storage control unit is connected with a low-speed interface of a NorFlash flash memory unit and the data interface unit; the high-speed interface is used for transmitting data, and the low-speed interface is used for transmitting file operation instructions.

8. The method for managing data storage and file of SATA disk based on NorFlash according to claim 7, characterized in that: The PL end is connected with the SATA disk storage unit through a SATA interface, and the PS end is connected with the NorFlash flash memory unit through an SPI bus.

Citation Information

Patent Citations

  • Memory file system and memory block processing method

    CN114546248A

  • File system

    CN117555854A