Search

CN-122019486-A - File system, file management method, equipment and medium based on FPGA

CN122019486ACN 122019486 ACN122019486 ACN 122019486ACN-122019486-A

Abstract

The application relates to the technical field of data acquisition and storage, and discloses a file system, a file management method, file management equipment and a medium based on an FPGA. The file system is built based on an FPGA internal hardware logic circuit and comprises control instruction analysis, file management, storage management and registers. The control instruction analysis module receives and analyzes an operation instruction of an external control end and sends an analysis result to the file management module, the file management module is connected with the register and the storage management module, generates and transmits an internal operation instruction in response to the analyzed instruction, the register module stores file metadata and executes metadata related operations, the storage management module divides a physical memory address space into storage blocks, maintains an idle resource pool management storage block and responds to the instruction to execute the storage block operation. The file system is realized in the FPGA through a customized hardware logic circuit, and high throughput, low delay and high reliability storage and management of mass data are realized.

Inventors

  • Request for anonymity
  • Request for anonymity
  • Request for anonymity

Assignees

  • 上海科梁信息科技股份有限公司

Dates

Publication Date
20260512
Application Date
20251230

Claims (10)

  1. 1. A file system based on FPGA is characterized in that the file system is realized based on an FPGA internal hardware logic circuit, and comprises a control instruction analysis module, a file management module, a storage management module and a register module, The control instruction analysis module is used for receiving and analyzing the operation instruction from the external control end and sending the analyzed operation instruction to the file management module, wherein the operation instruction comprises one or any combination of deletion, modification and reading; The file management module is respectively connected with the register module and the storage management module, and is configured to respond to the analyzed operation instruction to generate an internal operation instruction and send the internal operation instruction to the register module and the storage management module; The register module is used for storing metadata of the file and responding to the internal operation instruction to execute metadata operation, wherein the metadata at least comprises a file name, a file size and a storage block sequence number occupied by the file; the storage management module is used for dividing the address space of the physical storage into a plurality of storage blocks for storing files, maintaining a free resource pool for storing the storage blocks, and executing storage block operation in response to the internal operation instruction.
  2. 2. The FPGA-based file system of claim 1, wherein the file management module comprises a delete file module: The delete file module is configured to generate a delete instruction piece in response to the parsed operation instruction, send the delete instruction to the register module, obtain at least one storage block sequence number corresponding to a file to be deleted, and send the at least one storage block sequence number and the delete instruction to the storage management module; The register module is used for responding to the deleting instruction, searching the metadata of the file to be deleted, extracting at least one corresponding storage block sequence number in the metadata of the file to be deleted, and sending the at least one storage block sequence number to the file deleting module; And the storage management module is used for responding to the deleting instruction and placing the storage block corresponding to the at least one storage block sequence number into the idle resource pool.
  3. 3. The FPGA-based file system of claim 1, wherein the file management module further comprises a write file module; The file writing module is used for responding to the analyzed operation instruction to generate a creation instruction, sending the creation instruction to the register module to acquire the number of storage blocks required by a file to be created, and sending the number of storage blocks and the creation instruction to the storage management module; The register module is used for responding to the creation instruction to allocate a new metadata storage space for the file to be created, determining the number of storage blocks according to the size of the file to be created, and sending the number of storage blocks to the file writing module; The storage management module is used for ejecting the storage blocks with the required number from the idle resource pool according to the creation instruction, setting the sequence numbers of the ejected storage blocks, and storing the file to be created based on the ejected storage blocks; The file writing module is further configured to send the pop-up storage block sequence number to the register module, where the register module writes the pop-up storage block sequence number into metadata of the file to be created.
  4. 4. The FPGA-based file system of claim 3, wherein the file writing module is further configured to generate a modification instruction in response to the parsed operation instruction, send the modification instruction to the register module to obtain at least one storage block sequence number corresponding to the file to be modified, and send the modification instruction and the at least one storage block sequence number to the storage management module to extract file contents stored in a storage block corresponding to the sequence number from the storage management module, and modify the obtained file contents; the register module is further configured to determine metadata of a file to be modified according to the modification instruction, extract at least one storage block sequence number of the metadata of the file to be modified, and sequentially send the extracted at least one storage block sequence number to the write file module; the storage management module is further configured to extract a storage block with a corresponding sequence number according to the at least one storage block sequence number, and send the stored file content to the file writing module.
  5. 5. The FPGA-based file system of claim 1, wherein the file management module further comprises a read file module; The file reading module is used for responding to the analyzed operation instruction to generate a reading instruction, sending the reading instruction to the register module to extract at least one storage block sequence number corresponding to a file to be read, and sending the at least one storage block sequence number to the storage management module to extract file contents stored in a storage block corresponding to the sequence number from the storage management module; And the register module is used for determining the metadata of the file to be read according to the reading instruction and extracting at least one corresponding storage block sequence number in the metadata of the file to be read.
  6. 6. The FPGA-based file system of claim 1, wherein the register module is implemented using registers or block random access memory internal to the FPGA and is configured to support hardware parallel queries for the metadata.
  7. 7. A file management method, applied to a file management module in an FPGA-based file system according to any one of claims 1-5, the method comprising: generating an internal operation command according to the operation command of the external control terminal received and analyzed by the control command analysis module; and sending the internal operation command to a register module and a storage management module for the register module and the storage management module to execute corresponding operation.
  8. 8. The file management method according to claim 7, wherein when said operation instruction is a read file operation, said method further comprises: sending a reading instruction to the register module, so that the register module can determine metadata of a file to be read and acquire at least one storage block sequence number of the file to be read; And reading the file to be read from the physical memory according to the at least one storage block sequence number.
  9. 9. A data acquisition device, wherein the device comprises an FPGA chip and a non-volatile memory; The FPGA chip has integrated therein the FPGA-based file system of any one of claims 1 to 6; The nonvolatile memory is connected with the FPGA chip and is directly controlled by the storage management module of the file system.
  10. 10. A computer readable storage medium storing a computer program, wherein the computer program processor when executed implements the file management method according to any one of claims 7 to 8.

Description

File system, file management method, equipment and medium based on FPGA Technical Field The application relates to the technical field of data acquisition and storage, in particular to a file system based on an FPGA, a file management method, equipment and a medium. Background The Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) is widely used in the fields of high-speed data acquisition, real-time signal processing, and the like by virtue of its highly parallel processing capability and flexible customizable. In such a scenario, massive data needs to be efficiently and reliably stored in the nonvolatile memory, and the throughput rate, delay and resource occupation of data storage directly affect the performance of the whole system. The main scheme adopts a heterogeneous computing platform integrating a processor and an FPGA, a file system (such as FAT32 and ext 4) runs on a general processor at the processing system (Processing System and PS) end in a software mode, the FPG programmable logic (Programming Language and PL) end is only responsible for data acquisition and preprocessing, the data is transmitted to the PS end through an internal bus, and a CPU executes software codes to finish storing. The inventor discovers that the scheme at least has the following problems that the serial processing characteristics of the general processor and software overheads such as kernel calling, memory copying and the like of an operating system lead to limited throughput rate of data storage and incapability of releasing potential of a high-speed storage medium, the software processing path is long and has a plurality of links, so that I/O operation delay is high and fluctuation is large, a large amount of CPU (Central processing Unit) computing resources and memory are consumed for running a complete operating system and file system service, system power consumption and design complexity are increased, and the requirements of high-real-time and resource limited scenes are difficult to meet. Disclosure of Invention The embodiment of the application aims to provide a file system, a file management method, equipment and a medium based on an FPGA, and aims to solve the technical problems of limited data storage speed, high and uncertain operation delay and large system resource occupation caused by dependence on a general processor and a software file system in a high-speed data storage scene of FPGA application. In order to solve the problems, one or more embodiments of the present disclosure provide a file system based on an FPGA, where the file system is implemented based on an internal hardware logic circuit of the FPGA, and the file system includes a control instruction parsing module, a file management module, a storage management module, and a register module, where the control instruction parsing module is configured to receive and parse an operation instruction from an external control end and send the parsed operation instruction to the file management module, where the operation instruction includes one or any combination of deletion, modification, and reading, the file management module is respectively connected to the register module and the storage management module, and the file management module is configured to generate an internal operation instruction in response to the parsed operation instruction, send the internal operation instruction to the register module and the storage management module, and the register module applies metadata of a storage file to perform a metadata operation in response to the internal operation instruction, where the metadata includes at least a file name, a file size, and a storage block occupied by a file, and the storage management module is configured to divide a physical storage address space into a plurality of storage blocks in response to a storage pool for performing a storage operation. One or more embodiments of the present disclosure provide a file management method applied to a file management module in an FPGA-based file system, where the method includes generating an internal operation command according to an operation command of an external control end received and parsed by a control command parsing module, and sending the internal operation command to a register module and a storage management module for the register module and the storage management module to execute corresponding operations. One or more embodiments of the present disclosure provide a data acquisition device, where the device includes an FPGA chip and a nonvolatile memory, where the FPGA chip is integrated with the FPGA-based file system described above, and the nonvolatile memory is connected to the FPGA chip and directly controlled by a storage management module of the file system. One or more embodiments of the present specification provide a computer-readable storage medium storing a computer program that when executed by a computer program processor implements th