Dynamic bit stream configuration method and system based on petainux

Through the dynamic bit stream configuration method based on petalinux, new bit stream files are generated and loaded into the FPGA, which solves the problem of high hardware update cost under static configuration, and realizes dynamic hardware logic updates, reducing the time and labor cost of replacing hardware.

CN119045901APending Publication Date: 2024-11-29TIANJIN JINHANG COMP TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411196309.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In the prior art, the static configuration method of FPGA cannot effectively avoid the cost and time consumption of frequent hardware replacement, especially in application scenarios that require rapid response to changes, and cannot meet the needs of dynamic updates and optimization of hardware logic.

Method used

The dynamic bit stream configuration method based on petalinux is adopted, and the newly generated bit stream file is generated, integrated into the petalinux FPGA Manager, and dynamically loaded into the FPGA through software control, realizing dynamic modification and update of hardware logic. The method includes newly generated hardware logic design, generation of bit stream files, integration and registration of FPGA Manager, dynamic loading and reconfiguration processes.

Benefits of technology

It realizes that the newly generated bitstream is loaded into the FPGA through software control during the system operation, dynamically modifying and updating the hardware logic, avoiding the cost and time consumption of frequent hardware replacement, especially when closed device updates, it greatly reduces the cost and time of Labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045901A_ABST
    Figure CN119045901A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of embedded software, and discloses a petainux-based dynamic bit stream configuration method and a petainux-based dynamic bit stream configuration system. According to the method, a new bit stream file is generated, the new bit stream file is integrated to petalinux FPGA Manager, a bit stream is loaded to an FPGA, and the FPGA is reconfigured and initialized. The method comprises the following steps: generating a newly generated bit stream file, integrating the newly generated bit stream file to a petalinux FPGA Manager, loading a bit stream to an FPGA, and reconfiguring and initializing the FPGA. According to the dynamic bit stream configuration method, the system can load the newly generated bit stream into the FPGA in a software control mode in the operation process, and dynamic modification and updating of hardware logic are achieved. According to the invention, the operation system can dynamically update the logic part as required, and for some closed equipment, the manpower cost consumed by dismounting and updating the equipment is greatly avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of embedded software, and in particular relates to a dynamic bit stream configuration method and system based on petalinux. Background Art

[0002] As a flexible and programmable hardware platform, FPGAs are traditionally configured by loading a complete bitstream file into the FPGA at once to configure its logic and functions. This static configuration method is suitable for application scenarios where the hardware logic does not need to change or changes infrequently. However, in many practical applications, especially when real-time updates or flexible adaptation to different needs are required, static configuration obviously cannot meet the requirements.

[0003] The existing Zynq architecture uses static allocation for PL-side bitstream loading. This traditional loading method can only solidify the pre-specified bitstream file into the FPGA, and then start loading the FPGA through the ARM side after power-on.

[0004] The emergence of dynamic loading technology fills this gap, allowing the system to update part of the FPGA logic during operation, thereby realizing dynamic changes and optimization of hardware functions. This is of great significance for applications that need to respond quickly to changes, such as communications, data processing, and control systems, and also provides more flexibility and innovation space in research and development.

[0005] Through the above analysis, the problems and defects of the existing technology are: the existing static configuration method and dynamic bit stream configuration method cannot effectively avoid the cost and time consumption of frequent hardware replacement. Summary of the invention

[0006] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a dynamic bitstream configuration method and system based on petalinux. The emergence of the dynamic loading technology provided by the present invention fills this gap, which allows the system to update the logic of part of the FPGA during operation, thereby realizing the dynamic change and optimization of hardware functions. This is of great significance for applications that require rapid response to changes such as communications, data processing and control systems, and also provides more flexibility and innovation space in research and development. The present invention can load the newly generated bitstream into the FPGA during the operation of the system, thereby realizing the dynamic modification and update of the hardware logic.

[0007] The technical solution is as follows: A dynamic bitstream configuration method based on petalinux, comprising:

[0008] S1, generating a newly generated bit stream file according to the newly generated hardware logic design and functions;

[0009] S2, the newly generated bitstream file is integrated and registered by the petalinux FPGA Manager driver;

[0010] S3, dynamically load the newly generated bit stream file into the FPGA;

[0011] S4, the FPGA device completes reconfiguration and initialization according to the newly generated bit stream file.

[0012] In step S1, a newly generated bit stream file is generated, including:

[0013] S101. Design hardware logic circuits and engineering according to newly generated application requirements;

[0014] S102, compiling the hardware description language into a logic gate level through the comprehensive tool in the FPGA development tool chain and the automatic compilation through the vivado software; the logic gate level includes: generating a logic netlist, mapping, layout and routing, and generating a bit stream;

[0015] S103, after synthesis, the logic gate level is automatically mapped to the corresponding FPGA chip bit data resource through the vivado software through the layout and routing tool, and the specific circuit connection and layout are generated;

[0016] S104, mapping the generated specific circuit connection and layout to the FPGA architecture, generating a bit stream file describing the complete configuration information, the bit stream file including the logic and connection information of the FPGA.

[0017] In step S2, Petalinux FPGA Manager provides a standardized interface framework in the Linux kernel for managing and controlling the configuration of FPGA devices.

[0018] In step S3, the newly generated bit stream file is dynamically loaded into the FPGA, including: providing a device file or sysfs interface through the operating system so that the application interacts with the FPGA Manager and sends a command to load the newly generated bit stream to the FPGA; the application writes the newly generated bit stream data into the corresponding device file to trigger the FPGAManager driver to complete the loading operation.

[0019] The specific steps include:

[0020] S301. In the vivado installation directory, build the Full_Bitstream.bif file, the content of which is the name of the newly generated bitstream file.

[0021] S302, convert the newly generated bit stream file into a file in bit.bin format: enter the file conversion command in TSL Consol of vivado: bootgen-image Full_Bitstream.bif-arch zynq-process_bitstream bin, convert the newly generated bit file into a bit.bin file, including converting design_1_wrapper.bit into design_1_wrapper.bit.bin;

[0022] S303, during the power-on process of the board, the newly generated bit stream is dynamically loaded; first, the startup command is written to flags, then the bin file is copied to the firmware directory, and finally the bin file is written to the firmware.

[0023] Furthermore, the FPGA integrates hardware support and software control interfaces; logic units are arranged inside the FPGA, including configurable logic units CLB or areas with reconfiguration capabilities; when the configurable logic unit receives newly formed bit stream data, it is loaded into the corresponding logic unit to complete the reconstruction; the software control interface uses the FPGAManager under petalinux, through which the application sends a reconstruction command to the FPGA to request the loading of the newly generated bit stream file.

[0024] Further, when the configurable logic unit receives the newly formed bit stream data, it is loaded into the corresponding logic unit to complete the reconstruction, including:

[0025] The configurable logic unit obtains the newly formed bit stream instruction input and generates a newly formed bit stream instruction;

[0026] The initially newly formed bit stream instruction request in the FPGA data processing network is reshaped into a newly formed bit stream instruction element executed by the bit data resource of the current FPGA data processing network, and a newly formed bit stream instruction flow is constructed; the bit data resource time-varying graph is used to represent the time-varying relationship of the bit data resource and the coupling relationship between different bit data resources, and the bit data resource flow is constructed. On the basis of the newly formed bit stream instruction flow and the bit data resource flow, the operation corresponding to the specific bit data resource in the FPGA data processing network is obtained through the newly formed bit stream instruction and bit data resource matching algorithm, so as to form a dynamically loaded newly formed bit stream file data flow;

[0027] Use bit data resource virtualization technology to form a bit data resource pool and provide a transmission channel;

[0028] Extraction of newly formed bit stream instruction elements, splitting, aggregation and shaping of newly formed bit stream instructions;

[0029] The implementation steps of constructing the bit data resource stream are as follows:

[0030] (i) virtualizing the bit data resources of the nodes in the spatial information FPGA data processing network by using bit data resource virtualization, and virtualizing the bit data resources of all nodes in the FPGA data processing network into a bit data resource pool;

[0031] (ii) sensing the status of bit data resource elements in the bit data resource pool through onboard sensors;

[0032] (iii) Use the time expansion graph to construct a bit data resource time-varying graph to characterize the bit data resource status in the FPGA data processing network and the relationship between the bit data resources at different times, and construct the bit data resource flow;

[0033] The forming of dynamically loading a newly formed bit stream file data stream comprises:

[0034] (a) Based on the bit data resource time-varying graph obtained by the bit data resource representation module, a bit data resource time-varying conflict graph is constructed to model the conflict relationship of bit data resource scheduling in the FPGA data processing network. Based on the bit data resource conflict analysis method, conflict analysis is implemented;

[0035] (b) On the bit data resource time-varying conflict graph, the independent set algorithm is used to find the bit data resource time-varying conflict-free graph according to the newly formed bit stream instruction requirements, and the bit data resource combination for conflict-free scheduling is obtained;

[0036] (c) using the maximum flow algorithm on the time-varying conflict-free graph of bit data resources, finding the best way to match the newly formed bit stream instructions with the bit data resources, and forming a planning scheme to achieve the matching of the newly formed bit stream instructions with the bit data resources;

[0037] (d) submitting the obtained planning scheme to the bit data resource layer, generating the corresponding bit data resource action sequence, and forming a data stream for dynamically loading the newly formed bit stream file;

[0038] The loading into the corresponding logic unit to complete the reconstruction further includes:

[0039] (1) Classifying the attributes of the newly formed bit stream instructions according to the requirements of the newly formed bit stream instructions, determining whether the newly formed bit stream instructions belong to the newly formed bit stream instructions for observation, the newly formed bit stream instructions for communication, and the newly formed bit stream instructions for navigation; and defining key factors of the newly formed bit stream instruction attributes for different newly formed bit stream instruction attributes;

[0040] (2) Determine the specific FPGA data processing network bit data resources required for the newly formed bit stream instruction based on the analysis result of the newly formed bit stream instruction attributes, and split a complex newly formed bit stream instruction that cannot be completed independently by a logic unit into multiple independently executable elementary newly formed bit stream instructions according to the imager width and logic unit observation angle requirements, and decompose them into multiple logic units to collaboratively complete the newly formed bit stream instruction;

[0041] (3) Based on the bit data resources of the FPGA data processing network required by the newly formed bit stream instruction, the newly formed bit stream instructions with similar requirements are merged into a single newly formed bit stream instruction according to their newly formed bit stream instruction requirements, such as the observation target area, priority, and feasible observation window, and are concentrated on a single logic unit for execution;

[0042] The loading into the corresponding logic unit to complete the reconstruction also includes:

[0043] 1) Check the bit data resources required by the newly formed bit stream instruction element;

[0044] 2) Release the constraints of the optimization algorithm and apply the fast newly formed bit stream instruction planning method to find the newly formed bit stream instruction elements that are completed with a small probability by the FPGA data processing network, and reject these newly formed bit stream instruction elements;

[0045] 3) The remaining newly formed bit stream instruction elements, i.e., the newly formed bit stream instruction elements that may be completed by the current FPGA data processing network, are composed of the newly formed bit stream instruction groups to form a newly formed bit stream instruction element request set after the newly formed bit stream instruction shaping, thereby constructing a newly formed bit stream instruction stream.

[0046] Furthermore, the software control interface uses the FPGA Manager under petalinux, through which the application sends a reconstruction command to the FPGA to request to load the newly generated bit stream file, including:

[0047] Step 1: Take the newly formed bit stream data signal reconstructed by the received BOC (3, 1) into M segments of 1ms length, denoted as S(l) (t), l = 1, 2 ... M, respectively mixed with the local carrier to obtain the newly formed bit stream data signal reconstructed in phase I and quadrature Q;

[0048] Step 2: Split the locally reconstructed newly formed bit stream data signal into multiple groups of newly formed bit stream data code signals; split each chip of the locally reconstructed newly formed bit stream data sequence into multiple equal parts, and sequentially intercept the chip information of the jth, j=1, 2…6th part of each pseudo-random chip, and split it into multiple newly formed bit stream data unit signals C j (t), j = 1, 2…6;

[0049] Step 3: Perform dynamic loading association operation on the in-phase branch of each segment of the newly formed bit stream data signal reconstructed by the M segments of BOC (3,1) in parallel with the multiple groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the real part of the dynamic loading association value; similarly, perform dynamic loading association operation on the orthogonal branch in parallel with the k groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the imaginary part of the dynamic loading association value:

[0050]

[0051] In the formula, is the imaginary part of the dynamically loaded associated value, P s is the dynamic loading pressure, T s is the dynamic loading period, θ is the dynamic loading phase angle, l is the segment number, j is the code group number generated for each segment, is the dynamic loading correlation function between the BOC(3,1) signal and the newly formed bit stream data code signal of the jth group of reconstruction, Δτ is the code phase error, Δf D is the Doppler residual, is Gaussian noise subject to N(0,σ2);

[0052] The dynamic loading association operation results of the in-phase and quadrature branches corresponding to each group of newly reconstructed bit stream data code signals are modulo to obtain 6 dynamic loading association values:

[0053]

[0054] In the formula, is a trigonometric function with a bottom width of 2y, a height of 1, and a center at x=0, then the BOC(3,1) / PRN dynamic loading correlation function consists of 6 sub-dynamic loading correlation functions;

[0055] Step 4: Multiply the six values ​​after dynamic loading in each section by two by two to generate three dynamic loading correlation peaks;

[0056] Step 5: Add the three dynamically loaded correlation peaks to obtain the correlation peak with an unambiguous span of 1 / 6 chip, recorded as

[0057] Step 6: Use non-interference methods to output the detection quantity of segment M Reconstruct and obtain the final detection quantity Sc;

[0058] Step 7: Compare the detection value Sc with the detection threshold value set by the decision device. If the detection value exceeds the detection threshold value, it is considered that the signal is accurately and dynamically loaded, and it is determined whether the logic unit signal required for loading exists in the received input signal;

[0059] Step 8: When it is found that there is a logic unit signal required for positioning, the bit stream file newly generated after dynamic loading is obtained by continuing to receive the logic unit signal normally, and loading is realized.

[0060] In step S4, the specific process is as follows:

[0061] S401, the FPGA Manager driver parses the newly generated bit stream file and extracts the configuration content and logic information in the file;

[0062] S402, the FPGA device reconfigures internal logic units and connection methods according to the configuration content obtained by parsing;

[0063] S403. During the reconfiguration process, the FPGA device performs a state conversion and verification process, and finally completes the complete dynamic bit stream loading of the newly formed bit stream instructions.

[0064] Another object of the present invention is to provide a petalinux-based dynamic bitstream configuration system, which implements the petalinux-based dynamic bitstream configuration method, and the system comprises:

[0065] A new bit stream file generation module is used to generate a new bit stream file according to the newly generated hardware logic design and function;

[0066] petalinux FPGA Manager integration module, used for newly generated bitstream files to be integrated and registered by the petalinux FPGAManager driver;

[0067] Bit stream dynamic loading module, used to dynamically load the newly generated bit stream file into FPGA;

[0068] The FPGA reconfiguration and initialization module is used to complete the reconfiguration and initialization of the FPGA device according to the newly generated bit stream file.

[0069] In combination with all the above technical solutions, the beneficial effects of the present invention are as follows: the present invention generates a newly generated bitstream file, integrates it into the petalinux FPGA Manager, loads the bitstream into the FPGA, and reconfigures and initializes the FPGA. The dynamic bitstream configuration method enables the system to load the newly generated bitstream into the FPGA through software control during operation, thereby realizing dynamic modification and updating of hardware logic. Compared with the prior art, the present invention realizes that the operating system can dynamically update the logic part as needed. Compared with the static configuration method, the dynamic bitstream configuration method can effectively avoid the cost and time consumption of frequent hardware replacement, and for some closed devices, it greatly avoids the labor cost consumed by disassembling and updating the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;

[0071] Figure 1 It is a flow chart of a dynamic bitstream configuration method based on petalinux provided by an embodiment of the present invention;

[0072] Figure 2 It is a schematic diagram of a dynamic bitstream configuration system based on petalinux provided by an embodiment of the present invention;

[0073] In the figure: 1. New bitstream file generation module; 2. Petalinux FPGA Manager integration module; 3. Bitstream dynamic loading module; 4. FPGA reconfiguration and initialization module. DETAILED DESCRIPTION

[0074] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0075] The innovation of the present invention is that the present invention generates a newly generated bit stream file, integrates it into the petalinuxFPGA Manager, loads the bit stream into the FPGA, and reconfigures and initializes the FPGA. The dynamic bit stream configuration method enables the system to load the newly generated bit stream into the FPGA through software control during operation, thereby realizing dynamic modification and updating of hardware logic.

[0076] Embodiment 1, as Figure 1 As shown, the petalinux-based dynamic bitstream configuration method provided by the embodiment of the present invention includes:

[0077] S1, generating a newly generated bit stream file according to the newly generated hardware logic design and functions;

[0078] S2, the newly generated bitstream file is integrated and registered by the petalinux FPGA Manager driver;

[0079] S3, dynamically load the newly generated bit stream file into the FPGA;

[0080] S4, the FPGA device completes reconfiguration and initialization according to the newly generated bit stream file.

[0081] In step S1, generating a newly generated bit stream file includes:

[0082] S101. According to the newly generated application requirements, design the newly generated hardware logic circuit and engineering, and perform corresponding functional simulation to ensure the correctness of the functions.

[0083] It can be understood that the hardware logic circuit is the corresponding logic circuit generated according to the written Verilog language. The newly generated hardware logic circuit and project under Vivado is a complete digital circuit design project, from the beginning of design to the generation of bitstream files, including the complete process of design, synthesis, implementation, verification and final debugging and optimization;

[0084] S102, using a comprehensive tool in an FPGA development tool chain and automatically compiling the hardware description language into a logic gate level through vivado software, wherein the logic gate level includes generating a logic netlist, mapping, layout and routing, and generating a bit stream;

[0085] S103, after synthesis, the logic gate level is automatically mapped to the corresponding FPGA chip bit data resource through the vivado software through the layout and routing tool, and the specific circuit connection and layout are generated;

[0086] S104, mapping the generated specific circuit connection and layout to the FPGA architecture, thereby generating a bit stream file describing complete configuration information, wherein the file includes logic and connection information of the FPGA.

[0087] In step S2, it is integrated into the petalinux FPGA Manager, which provides a standardized interface framework in the Linux kernel for managing and controlling the configuration of FPGA devices.

[0088] The newly generated bitstream file is integrated and registered by the petalinux FPGA Manager driver.

[0089] In step S3, dynamically loading the bitstream to the FPGA includes: after the newly generated bitstream file is integrated and registered by the petalinux FPGAManager driver, the newly generated bitstream starts to be loaded into the FPGA. First, through the device file or sysfs interface provided by the operating system, the application can interact with the FPGA Manager, and then send a command to load the newly generated bitstream to the FPGA. The application writes the newly generated bitstream data into the corresponding device file to trigger the FPGA Manager driver to complete the loading operation.

[0090] For example, dynamically loading a bitstream into an FPGA (dynamically loading a bitstream under petalinux) mainly includes the following steps:

[0091] S301. Build the Full_Bitstream.bif file in the vivado installation directory. The content in the file is the name of the newly generated bitstream file.

[0092] S302, convert the newly generated bitstream file into a file in bit.bin format: Enter the file conversion command in TSL Console of vivado: bootgen-image Full_Bitstream.bif-arch zynq-process_bitstream bin, and convert the newly generated bit file into a bit.bin file. For example, design_1_wrapper.bit is converted into design_1_wrapper.bit.bin.

[0093] S303, during the board power-on process, execute the following instructions to complete the dynamic loading of the newly generated bit stream;

[0094] For example, let's take loading design_1_wrapper.bit.bin as an example:

[0095] Write the startup command to flags;

[0096] Copy the bin file to the firmware directory;

[0097] Write the bin file to the firmware.

[0098] The code is:

[0099] echo 0> / sys / class / fpga_manager / fpga0 / flags;

[0100] cp / media / design_1_wrapper.bit.bin / lib / firmware / ;

[0101] echo design_1_wrapper.bit.bin> / sys / class / fpga_manager / fpga0 / firmware.

[0102] In step S4, after the newly generated bit stream file is successfully loaded into the FPGA, the FPGA device completes reconfiguration and initialization according to the newly generated bit stream file. The specific process is as follows:

[0103] S401, FPGAManager driver parses the newly generated bit stream file and extracts the configuration content and logic information in the file; that is, the board loads the bit stream;

[0104] S402. The FPGA device reconfigures the internal logic units and connection methods according to the configuration content obtained by parsing, that is, reallocates the internal logic devices of the chip to ensure that the newly generated hardware logic can work correctly.

[0105] S403, during the reconfiguration process, the FPGA device performs a state conversion and verification process, and finally completes the complete dynamic bit stream loading of the newly formed bit stream instruction, wherein the bottom layer verifies according to the checksum.

[0106] Example 2, as another implementation, the core of the dynamic bitstream configuration method based on petalinux provided in the embodiment of the present invention is that some logic units inside the FPGA can be reconfigured during operation without affecting the normal operation of the FPGA.

[0107] The dynamic loading bit stream process requires the FPGA to have certain hardware support and software control interface.

[0108] Among them, there needs to be a specific logic unit inside the FPGA, usually a configurable logic block (CLB) or other areas with reconfigurability. When the configurable logic unit receives the newly formed bit stream data, it loads it into the corresponding logic unit to complete the reconstruction.

[0109] The software control interface uses the FPGA Manager under petalinux, through which the application can send a reconstruction command to the FPGA to request loading of a specific bit stream file.

[0110] Exemplarily, when the configurable logic unit receives the newly formed bit stream data, loading it into the corresponding logic unit to complete the reconstruction includes:

[0111] The configurable logic unit obtains the newly formed bit stream instruction input and generates a newly formed bit stream instruction;

[0112] The initial newly formed bit stream instruction request in the FPGA data processing network is reshaped into a newly formed bit stream instruction element that may be executed by the current FPGA data processing network bit data resources, and a newly formed bit stream instruction flow is constructed; the bit data resource time-varying graph is used to represent the time-varying relationship of the bit data resources and the coupling relationship between different bit data resources, and the bit data resource flow is constructed. On the basis of the newly formed bit stream instruction flow and the bit data resource flow, the operation corresponding to the specific bit data resource in the FPGA data processing network is obtained through the newly formed bit stream instruction and bit data resource matching algorithm, so as to form a dynamically loaded newly formed bit stream file data flow;

[0113] Use bit data resource virtualization technology to form a bit data resource pool and provide a transmission channel;

[0114] Extraction of newly formed bit stream instruction elements, splitting, aggregation and shaping of newly formed bit stream instructions;

[0115] The implementation steps of constructing the bit data resource stream are as follows:

[0116] (i) virtualizing the bit data resources of the nodes in the spatial information FPGA data processing network by using bit data resource virtualization, and virtualizing the bit data resources of all nodes in the FPGA data processing network into a bit data resource pool;

[0117] (ii) sensing the key element status of the bit data resources in the bit data resource pool through onboard sensors;

[0118] (iii) Use the time expansion graph to construct a bit data resource time-varying graph to characterize the bit data resource status in the FPGA data processing network and the relationship between the bit data resources at different times, and construct the bit data resource flow;

[0119] The forming of the dynamically loaded newly formed bitstream file data stream further comprises:

[0120] (a) Based on the bit data resource time-varying graph obtained by the bit data resource representation module, a bit data resource time-varying conflict graph is constructed to model the conflict relationship of bit data resource scheduling in the FPGA data processing network. Based on the bit data resource conflict analysis method, conflict analysis is implemented;

[0121] (b) On the bit data resource time-varying conflict graph, the independent set algorithm is used to find the bit data resource time-varying conflict-free graph according to the newly formed bit stream instruction requirements, and the bit data resource combination for conflict-free scheduling is obtained;

[0122] (c) using the maximum flow algorithm on the time-varying conflict-free graph of bit data resources, finding the best way to match the newly formed bit stream instructions with the bit data resources, and forming a planning scheme to achieve the matching of the newly formed bit stream instructions with the bit data resources;

[0123] (d) submitting the obtained planning scheme to the bit data resource layer, generating the corresponding bit data resource action sequence, and forming a data stream for dynamically loading the newly formed bit stream file;

[0124] Exemplarily, the loading into the corresponding logic unit to complete the reconstruction further includes:

[0125] (1) Classifying the attributes of the newly formed bit stream instructions according to the requirements of the newly formed bit stream instructions, determining whether the newly formed bit stream instructions belong to the newly formed bit stream instructions for observation, the newly formed bit stream instructions for communication, and the newly formed bit stream instructions for navigation; and defining key factors of the newly formed bit stream instruction attributes for different newly formed bit stream instruction attributes;

[0126] (2) Determine the specific FPGA data processing network bit data resources required for the newly formed bit stream instruction based on the analysis result of the newly formed bit stream instruction attributes, and split a complex newly formed bit stream instruction that cannot be completed independently by a logic unit into multiple independently executable elementary newly formed bit stream instructions according to the imager width and logic unit observation angle requirements, and decompose them into multiple logic units to collaboratively complete the newly formed bit stream instruction;

[0127] (3) Based on the bit data resources of the FPGA data processing network required by the newly formed bit stream instruction, the newly formed bit stream instructions with similar requirements are merged into a single newly formed bit stream instruction according to their newly formed bit stream instruction requirements, such as the observation target area, priority, and feasible observation window, and are concentrated on a single logic unit for execution;

[0128] The loading into the corresponding logic unit to complete the reconstruction further includes:

[0129] 1) Check the bit data resources required by the newly formed bit stream instruction element;

[0130] 2) Release the constraints of the optimization algorithm and apply the fast newly formed bit stream instruction planning method to find the newly formed bit stream instruction elements that are completed with a small probability by the FPGA data processing network, and reject these newly formed bit stream instruction elements;

[0131] 3) The remaining newly formed bit stream instruction elements, i.e., the newly formed bit stream instruction elements that may be completed by the current FPGA data processing network, are composed of the newly formed bit stream instruction groups to form a newly formed bit stream instruction element request set after the newly formed bit stream instruction shaping, thereby constructing a newly formed bit stream instruction stream.

[0132] Exemplarily, the software control interface uses the FPGA Manager under petalinux, and the application sends a reconstruction command to the FPGA through the interface to request to load the newly generated bit stream file, including:

[0133] Step 1: Take the newly formed bit stream data signal reconstructed by the received BOC (3, 1) into M segments of 1ms length, denoted as S (l) (t), l = 1, 2 ... M, respectively mixed with the local carrier to obtain the newly formed bit stream data signal reconstructed in phase I and quadrature Q;

[0134] Step 2: Split the locally reconstructed newly formed bit stream data signal into multiple groups of newly formed bit stream data code signals; split each chip of the locally reconstructed newly formed bit stream data sequence into multiple equal parts, and sequentially intercept the chip information of the jth, j=1, 2…6th part of each pseudo-random chip, and split it into multiple newly formed bit stream data unit signals C j (t), j = 1, 2…6;

[0135] Step 3: Perform dynamic loading association operation on the in-phase branch of each segment of the newly formed bit stream data signal reconstructed by the M segments of BOC (3,1) in parallel with the multiple groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the real part of the dynamic loading association value; similarly, perform dynamic loading association operation on the orthogonal branch in parallel with the k groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the imaginary part of the dynamic loading association value:

[0136]

[0137] In the formula, is the imaginary part of the dynamically loaded associated value, P s is the dynamic loading pressure, T s is the dynamic loading period, θ is the dynamic loading phase angle, l is the segment number, j is the code group number generated for each segment, is the dynamic loading correlation function between the BOC(3,1) signal and the newly formed bit stream data code signal of the jth group of reconstruction, Δτ is the code phase error, Δf D is the Doppler residual, is a Gaussian noise with N(0,σ2)

[0138] The dynamic loading association operation results of the in-phase and quadrature branches corresponding to each group of newly reconstructed bit stream data code signals are modulo to obtain 6 dynamic loading association values:

[0139]

[0140] In the formula, is a trigonometric function with a bottom width of 2y, a height of 1, and a center at x=0, then the BOC(3,1) / PRN dynamic loading correlation function consists of 6 sub-dynamic loading correlation functions;

[0141] Step 4: Multiply the six values ​​after dynamic loading in each section by two by two to generate three dynamic loading correlation peaks;

[0142] Step 5: Add the three dynamically loaded correlation peaks to obtain the correlation peak with an unambiguous span of 1 / 6 chip, recorded as

[0143] Step 6: Use non-interference methods to output the detection quantity of segment M Reconstruct and obtain the final detection quantity Sc;

[0144] Step 7: Compare the detection value Sc with the detection threshold value set by the decision device. If the detection value exceeds the detection threshold value, it is considered that the signal is accurately and dynamically loaded, and it is determined whether the logic unit signal required for loading exists in the received input signal.

[0145] Step 8: When it is found that there is a logic unit signal required for positioning, the bit stream file newly generated after dynamic loading is obtained by continuing to receive the logic unit signal normally, and loading is realized.

[0146] Embodiment 3, as Figure 2 As shown, the petalinux-based dynamic bitstream configuration system provided by the embodiment of the present invention includes:

[0147] A new bit stream file generating module 1, used for generating a new bit stream file according to the newly generated hardware logic design and function;

[0148] petalinux FPGA Manager integration module 2, used for newly generated bitstream files to be integrated and registered by the petalinux FPGAManager driver;

[0149] The bit stream dynamic loading module 3 is used to dynamically load the newly generated bit stream file into the FPGA;

[0150] The FPGA reconfiguration and initialization module 4 is used for the FPGA device to complete reconfiguration and initialization according to the newly generated bit stream file.

[0151] It can be seen from the above embodiments that the present invention provides a dynamic bitstream configuration method based on petalinux to solve the problem that the ARM side adopts a static configuration method to load the bitstream on the FPGA side under the existing Zynq architecture, so that the system can load the newly generated bitstream into the FPGA through software control during operation, thereby realizing dynamic modification and update of the hardware logic.

[0152] The present invention enables the operating system to dynamically update the logic part as needed. Compared with the static configuration method, the dynamic bitstream configuration method can effectively avoid the cost and time consumption of frequent hardware replacement. For some closed devices, it greatly avoids the manpower cost consumed by disassembling and updating the equipment.

[0153] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0154] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A dynamic bitstream configuration method based on petalinux, characterized in that: The method includes: S1, generating a newly generated bit stream file according to the newly generated hardware logic design and functions; S2, the newly generated bitstream file is integrated and registered by the petalinux FPGA Manager driver; S3, dynamically load the newly generated bit stream file into the FPGA; S4, the FPGA device completes reconfiguration and initialization according to the newly generated bit stream file.

2. The petalinux-based dynamic bitstream configuration method according to claim 1, characterized in that: In step S1, a newly generated bit stream file is generated, including: S101. Design hardware logic circuits and engineering according to newly generated application requirements; S102, compiling the hardware description language into a logic gate level through the comprehensive tool in the FPGA development tool chain and the automatic compilation through the vivado software; the logic gate level includes: generating a logic netlist, mapping, layout and routing, and generating a bit stream; S103, after synthesis, the logic gate level is automatically mapped to the corresponding FPGA chip bit data resource through the vivado software through the layout and routing tool, and the specific circuit connection and layout are generated; S104, mapping the generated specific circuit connection and layout to the FPGA architecture, generating a bit stream file describing the complete configuration information, the bit stream file including the logic and connection information of the FPGA.

3. The petalinux-based dynamic bitstream configuration method according to claim 1, characterized in that: In step S2, Petalinux FPGA Manager provides a standardized interface framework in the Linux kernel for managing and controlling the configuration of FPGA devices.

4. The petalinux-based dynamic bitstream configuration method according to claim 1, characterized in that: In step S3, the newly generated bit stream file is dynamically loaded into the FPGA, including: providing a device file or sysfs interface through the operating system so that the application interacts with the FPGA Manager and sends a command to load the newly generated bit stream to the FPGA; the application writes the newly generated bit stream data into the corresponding device file to trigger the FPGA Manager driver to complete the loading operation.

5. The petalinux-based dynamic bitstream configuration method according to claim 4, characterized in that: The specific steps include: S301. In the vivado installation directory, build the Full_Bitstream.bif file, the content of which is the name of the newly generated bitstream file. S302, convert the newly generated bit stream file into a file in bit.bin format: enter the file conversion command in TSL Consol of vivado: bootgen-image Full_Bitstream.bif-arch zynq-process_bitstreambin, convert the newly generated bit file into a bit.bin file, including converting design_1_wrapper.bit into design_1_wrapper.bit.bin; S303, during the power-on process of the board, the newly generated bit stream is dynamically loaded; first, the startup command is written to flags, then the bin file is copied to the firmware directory, and finally the bin file is written to the firmware.

6. The petalinux-based dynamic bitstream configuration method according to claim 4, characterized in that: FPGA integrates hardware support and software control interface; FPGA is internally provided with logic units, including configurable logic units CLB or areas with reconfigurable capability; when the configurable logic units receive newly formed bit stream data, they are loaded into corresponding logic units to complete reconstruction; the software control interface adopts FPGA Manager under petalinux, through which the application sends reconstruction command to FPGA to request to load the newly generated bit stream file.

7. The petalinux-based dynamic bitstream configuration method according to claim 6, characterized in that: When the configurable logic unit receives the newly formed bit stream data, it is loaded into the corresponding logic unit to complete the reconstruction, including: The configurable logic unit obtains the newly formed bit stream instruction input and generates a newly formed bit stream instruction; The initially newly formed bit stream instruction request in the FPGA data processing network is reshaped into a newly formed bit stream instruction element executed by the bit data resource of the current FPGA data processing network, and a newly formed bit stream instruction flow is constructed; the bit data resource time-varying graph is used to represent the time-varying relationship of the bit data resource and the coupling relationship between different bit data resources, and the bit data resource flow is constructed. On the basis of the newly formed bit stream instruction flow and the bit data resource flow, the operation corresponding to the specific bit data resource in the FPGA data processing network is obtained through the newly formed bit stream instruction and bit data resource matching algorithm, so as to form a dynamically loaded newly formed bit stream file data flow; Use bit data resource virtualization technology to form a bit data resource pool and provide a transmission channel; Extraction of newly formed bit stream instruction elements, splitting, aggregation and shaping of newly formed bit stream instructions; The implementation steps of constructing the bit data resource stream are as follows: (i) virtualizing the bit data resources of the nodes in the spatial information FPGA data processing network by using bit data resource virtualization, and virtualizing the bit data resources of all nodes in the FPGA data processing network into a bit data resource pool; (ii) sensing the status of bit data resource elements in the bit data resource pool through onboard sensors; (iii) Use the time expansion graph to construct a bit data resource time-varying graph to characterize the bit data resource status in the FPGA data processing network and the relationship between the bit data resources at different times, and construct the bit data resource flow; The forming of dynamically loading a newly formed bit stream file data stream comprises: (a) Based on the bit data resource time-varying graph obtained by the bit data resource representation module, a bit data resource time-varying conflict graph is constructed to model the conflict relationship of bit data resource scheduling in the FPGA data processing network. Based on the bit data resource conflict analysis method, conflict analysis is implemented; (b) On the bit data resource time-varying conflict graph, the independent set algorithm is used to find the bit data resource time-varying conflict-free graph according to the newly formed bit stream instruction requirements, and the bit data resource combination for conflict-free scheduling is obtained; (c) using the maximum flow algorithm on the time-varying conflict-free graph of bit data resources, finding the best way to match the newly formed bit stream instructions with the bit data resources, and forming a planning scheme to achieve the matching of the newly formed bit stream instructions with the bit data resources; (d) submitting the obtained planning scheme to the bit data resource layer, generating the corresponding bit data resource action sequence, and forming a data stream for dynamically loading the newly formed bit stream file; The loading into the corresponding logic unit to complete the reconstruction further includes: (1) Classifying the attributes of the newly formed bit stream instructions according to the requirements of the newly formed bit stream instructions, determining whether the newly formed bit stream instructions belong to the newly formed bit stream instructions for observation, the newly formed bit stream instructions for communication, and the newly formed bit stream instructions for navigation; and defining key factors of the newly formed bit stream instruction attributes for different newly formed bit stream instruction attributes; (2) Determine the specific FPGA data processing network bit data resources required for the newly formed bit stream instruction based on the analysis result of the newly formed bit stream instruction attribute, and split a complex newly formed bit stream instruction that cannot be completed independently by a logic unit into multiple independently executed elementary newly formed bit stream instructions according to the imager width and logic unit observation angle requirements, and decompose them into multiple logic units to collaboratively complete the newly formed bit stream instruction; (3) Based on the bit data resources of the FPGA data processing network required by the newly formed bit stream instruction, the newly formed bit stream instructions with similar requirements are merged into a single newly formed bit stream instruction according to their newly formed bit stream instruction requirements, such as the observation target area, priority, and feasible observation window, and are concentrated on a single logic unit for execution; The loading into the corresponding logic unit to complete the reconstruction also includes: 1) Check the bit data resources required by the newly formed bit stream instruction element; 2) Release the constraints of the optimization algorithm and apply the fast newly formed bit stream instruction planning method to find the newly formed bit stream instruction elements that are completed with a small probability by the FPGA data processing network, and reject these newly formed bit stream instruction elements; 3) The remaining newly formed bit stream instruction elements, i.e., the newly formed bit stream instruction elements completed by the current FPGA data processing network, are composed of the newly formed bit stream instruction group to form a newly formed bit stream instruction element request set after the newly formed bit stream instruction shaping, thereby constructing a newly formed bit stream instruction stream.

8. The petalinux-based dynamic bitstream configuration method according to claim 6, characterized in that: The software control interface uses the FPGA Manager under petalinux, through which the application sends a reconstruction command to the FPGA to request to load the newly generated bit stream file, including: Step 1: Take the newly formed bit stream data signal reconstructed by the received BOC (3, 1) into M segments of 1ms length, denoted as S (l) (t), l = 1, 2 ... M, respectively mixed with the local carrier to obtain the newly formed bit stream data signal reconstructed in phase I and quadrature Q; Step 2: Split the locally reconstructed newly formed bit stream data signal into multiple groups of newly formed bit stream data code signals; split each chip of the locally reconstructed newly formed bit stream data sequence into multiple parts, and sequentially intercept the chip information of each pseudo-random chip j, j = 1, 2 ... 6, and split it into multiple newly formed reconstructed bit stream data unit signals C j (t), j = 1, 2…6; Step 3: Perform dynamic loading association operation on the in-phase branch of each segment of the newly formed bit stream data signal reconstructed by the M segments of BOC (3,1) in parallel with the multiple groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the real part of the dynamic loading association value; similarly, perform dynamic loading association operation on the orthogonal branch in parallel with the k groups of newly formed bit stream data code signals reconstructed in step 2, and the result is used as the imaginary part of the dynamic loading association value: In the formula, is the imaginary part of the dynamically loaded associated value, P s is the dynamic loading pressure, T s is the dynamic loading period, θ is the dynamic loading phase angle, l is the segment number, j is the code group number generated for each segment, is the dynamic loading correlation function between the BOC(3,1) signal and the newly formed bit stream data code signal of the jth group of reconstruction, Δτ is the code phase error, Δf D is the Doppler residual, is Gaussian noise subject to N(0,σ2); The dynamic loading association operation results of the in-phase and quadrature branches corresponding to each group of newly reconstructed bit stream data code signals are modulo to obtain 6 dynamic loading association values: In the formula, is a trigonometric function with a bottom width of 2y, a height of 1, and a center at x=0, then the BOC(3,1) / PRN dynamic loading correlation function consists of 6 sub-dynamic loading correlation functions; Step 4: Multiply the six values ​​after dynamic loading in each section by two by two to generate three dynamic loading correlation peaks; Step 5: Add the three dynamically loaded correlation peaks to obtain the correlation peak with an unambiguous span of 1 / 6 chip, recorded as Step 6: Use non-interference methods to output the detection quantity of segment M Reconstruct and obtain the final detection quantity Sc; Step 7: Compare the detection value Sc with the detection threshold value set by the judge. If the detection value exceeds the detection threshold value, it is considered that the signal is accurately and dynamically loaded, and it is determined whether the logic unit signal required for loading exists in the received input signal; Step 8: When it is found that the logic unit signal required for positioning exists, the newly generated bit stream file after dynamic loading is obtained by continuing to receive the logic unit signal normally, and the loading is realized.

9. The petalinux-based dynamic bitstream configuration method according to claim 1, characterized in that: In step S4, the specific process is as follows: S401, the FPGA Manager driver parses the newly generated bit stream file and extracts the configuration content and logic information in the file; S402, the FPGA device reconfigures internal logic units and connection methods according to the configuration content obtained by parsing; S403. During the reconfiguration process, the FPGA device performs a state conversion and verification process, and finally completes the complete dynamic bit stream loading of the newly formed bit stream instructions.

10. A dynamic bitstream configuration system based on petalinux, characterized in that: The system implements the petalinux-based dynamic bitstream configuration method according to any one of claims 1 to 9, and the system comprises: A new bit stream file generating module (1), used for generating a new bit stream file according to the newly generated hardware logic design and function; petalinux FPGA Manager integration module (2), used for newly generated bitstream files to be integrated and registered by the petalinux FPGAManager driver; A bit stream dynamic loading module (3) is used to dynamically load the newly generated bit stream file into the FPGA; The FPGA reconfiguration and initialization module (4) is used to complete the reconfiguration and initialization of the FPGA device according to the newly generated bit stream file.