Launch vehicle integrated electronic unit PCIe device driving system and implementation method
By adopting IO-mapped interrupts in the integrated electronic system of the launch vehicle, the complexity and insufficient radiation resistance of the MSI/MSI-X mode in a highly reliable embedded environment are solved, achieving deterministic and reliable interrupt response and meeting the stringent requirements of the rocket's control system.
Patent Information
- Application Number
- CN202611381100.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-27
AI Technical Summary
The existing MSI/MSI-X interruption mode has problems such as complex dependencies, insufficient determinism and poor radiation resistance in the integrated electronic system of launch vehicles, which cannot meet the stringent requirements of the onboard control system for deterministic and reliable interruption response.
By adopting the IO-mapped interrupt method, the interrupt request signal is directly sent to the CPU through the external interrupt pin via the interrupt status register, enable register and interrupt request trigger inside the FPGA. This avoids relying on PCIe bus memory write transactions and deep software stack of the operating system, reduces hardware connection complexity and improves system integration.
It achieves determinism and reliability of interrupt response path, avoids interrupt delay jitter caused by PCIe bus congestion and interrupt loss caused by register single-event flip under irradiation environment, and ensures the stability of rocket-borne timing control tasks with nanosecond-level synchronization accuracy.
Smart Images

Figure CN123178312A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated electronic technology for launch vehicles, and in particular to a PCIe device drive system and implementation method for integrated electronic units of launch vehicles. Background Technology
[0002] In the integrated electronic systems of modern launch vehicles, high-speed backplane or inter-module interconnection schemes based on PCIe bus are commonly used to achieve lightweight, high integration, and strong real-time performance. As a mature interconnection technology, PCIe bus is widely used in rocket electronic equipment, providing reliable physical layer and data link layer support for high-speed data exchange between various functional modules.
[0003] In PCIe device driver implementations, traditional interrupt handling methods often employ MSI or MSI-X modes. In MSI mode, the device initiates an interrupt request by writing specific message data to host memory. The entire interrupt triggering process is implemented entirely through memory write transactions, eliminating the need for additional physical interrupt signal lines. Compared to traditional pin-based interrupt methods, MSI offers advantages such as better scalability, abundant interrupt vector resources, and higher interrupt handling efficiency, and has been widely adopted in general-purpose computers and servers.
[0004] However, in highly reliable and real-time embedded environments such as launch vehicles, the MSI mode has inherent drawbacks. First, the MSI mechanism relies entirely on the PCIe RC (root complex) for the conversion and processing of memory write transactions, as well as deep software stack support from the operating system. In onboard computers employing customized real-time operating systems or bare-metal programs, these dependencies are overly complex and may not be supported by the underlying firmware. Second, MSI is essentially a memory write transaction; when the PCIe bus is congested, its interrupt delay can cause unpredictable jitter. For onboard timing control tasks requiring extremely high nanosecond-level synchronization accuracy, such nondeterministic delays are unacceptable. Third, MSI / MSI-X relies on DMA to write to memory and the interrupt vector table, occupying the Message Address / Data registers within the base address register space. At total doses ≥30 krad(Si) or heavy ion LET ≥37 MeV·cm⁻¹, this can lead to significant delays. 2 Under / mg conditions, the aforementioned registers are prone to SEU / SEL, causing interrupt vector number jumps or interrupt loss. The CPU cannot receive a valid interrupt, which in turn causes control cycle timeout and endangers flight safety. Fourth, if the device's DMA engine or memory system fails, MSI messages may fail to be written and interrupts may be silently lost, making fault location extremely difficult.
[0005] Therefore, in the integrated electronic unit design of launch vehicles, a more direct, deterministic, stable, and less operating system-dependent PCIe interrupt-driven scheme is needed to overcome the inherent shortcomings of the MSI mode in the high-reliability embedded environment of aerospace and meet the stringent requirements of the rocket control system for deterministic and reliable interrupt response. Summary of the Invention
[0006] The technical problem to be solved by this invention is to address the shortcomings of existing technologies, specifically the problems of complex dependencies, insufficient determinism, and poor radiation resistance in existing MSI / MSI-X interruption modes in the integrated electronic system of launch vehicles. Specifically, this invention provides a PCIe device driver system and implementation method for a single integrated electronic unit of a launch vehicle, as detailed below: In a first aspect, the present invention provides a drive system for a launch vehicle's integrated electronic PCIe device, the specific technical solution of which is as follows: The CPU is used to execute driver software modules and interrupt service routines. The FPGA is connected to the CPU via a PCIe bus. The FPGA has a PCIe endpoint device module and I / O interrupt generation logic deployed inside it. The PCIe endpoint device module includes a PCIe configuration space and at least one IO-mapped register group. The PCIe endpoint device module communicates with the CPU through the PCIe bus. The I / O interrupt generation logic is connected between the interrupt signal output terminal of the FPGA's extended peripheral and the external interrupt pin of the CPU. The I / O interrupt generation logic includes: The interrupt status register is used to latch the interrupt status bit corresponding to the original interrupt event generated by the extended peripheral, so that the interrupt service routine can read it to identify the interrupt source. The interrupt enable register, configured by the driver software module, is used to enable or disable specific interrupt sources; An interrupt request trigger is set when both the contents of the interrupt status register and the interrupt enable register are not zero. The trigger then sends an interrupt request signal to the CPU via the external interrupt pin to trigger the CPU to execute the interrupt service routine. The interrupt confirmation and clearing logic circuit is used to automatically clear the corresponding interrupt status bit in the interrupt status register and reset the interrupt request trigger after the CPU completes the interrupt processing.
[0007] The beneficial effects of the integrated electronic PCIe device drive system for launch vehicles provided by this invention include: The I / O mapping interrupt method replaces the MSI / MSI-X interrupt method. I / O interrupt requests are sent directly to the CPU as physical signals through external interrupt pins. The interrupt response path does not depend on memory write transactions on the PCIe bus, avoiding the unpredictable jitter problem of interrupt delay caused by PCIe bus congestion in the MSI / MSI-X interrupt method. It also does not require the CPU to process memory write transactions or the deep software stack support of the operating system. At the same time, the I / O mapping interrupt method does not involve the Message Address register and Message Data register in the BAR space, avoiding the problem of interrupt vector number jump or interrupt loss caused by single-event flip or single-event lock in the registers under irradiation environment. Furthermore, the interrupt status register, interrupt enable register, interrupt request trigger, and interrupt acknowledgement clearing logic are deployed inside the FPGA. The FPGA hardware logic handles interrupt status latching, interrupt source identification, and automatic interrupt status clearing. The CPU only needs to read the interrupt status register through the mapped virtual address to identify the interrupt source, eliminating the need for DMA memory writes to transmit interrupt messages. This ensures that even if the DMA engine or memory system fails, the interrupt signal can still reach the CPU directly via physical pins, avoiding the interrupt silencing and fault location difficulties caused by DMA write failures in the MSI / MSI-X approach. Finally, PCIe BAR space address mapping enables the CPU to access the FPGA's internal registers and data buffers via memory mapping, establishing a bidirectional data transmission channel between the CPU and FPGA, effectively improving system integration and reducing hardware connection complexity.
[0008] Based on the above solution, the present invention also includes, but is not limited to, the following improvements.
[0009] Furthermore, the CPU is an NXP S32G399A CPU, and the FPGA is a Xilinx A7 100T; the PCIe bus is a PCIe X1 Gen3 bus, backward compatible with PCIe X1 Gen2.
[0010] Furthermore, the CPU runs the driver software module, which adopts a three-layer driver architecture consisting of a PCIe core driver layer, an FPGA peripheral adapter layer, and an application interface layer. The PCIe core driver layer is used for the initialization of the PCIe bus, device enumeration, and mapping of the FPGA internal registers and data buffers corresponding to the IO mapping register group to the CPU's virtual address space through PCIe BAR space mapping. The FPGA peripheral adapter layer is used to configure corresponding driver modules for the extended peripherals respectively, and each driver module accesses the PCIe core driver layer through a standard driver interface. The application interface layer is used to provide standardized API interfaces to application software.
[0011] Furthermore, the extended peripherals include one Powerlink interface, ten RS422 serial interfaces, two LVDS interfaces, four MLVDS interfaces, and three second pulse interfaces.
[0012] Furthermore, the IO interrupt generation logic sends an interrupt request signal to the CPU using an IO mapping interrupt method, which is a non-MSI / MSI-X interrupt method.
[0013] Secondly, the present invention also provides a method for implementing a PCIe device driver for a launch vehicle's integrated electronic unit, the specific technical solution of which is as follows: S1, the driver software module running on the CPU scans the PCIe bus and identifies the endpoint devices deployed on the FPGA by reading the PCIe configuration space; S2, the driver software module performs address mapping through the PCIe BAR space, mapping the FPGA internal registers and data buffers corresponding to the IO mapped register group to the virtual address space of the CPU, and obtains the mapped virtual address; S3, the driver software module configures the external interrupt pin of the CPU, sets the interrupt triggering mode, and binds the interrupt service routine to the external interrupt pin; when the extended peripheral of the FPGA generates a raw interrupt event, the interrupt status register latches the interrupt status bit corresponding to the raw interrupt event; when the contents of the interrupt status register and the interrupt enable register are both non-zero, the interrupt request trigger is set, and an interrupt request signal is sent to the CPU through the external interrupt pin; S4, In response to the interrupt request signal, the CPU calls the interrupt service routine. The interrupt service routine reads the interrupt status register through the mapped virtual address, traverses each interrupt status bit in the interrupt status register to identify the extended peripheral that generated the original interrupt event, and obtains the interrupt source. S5, the driver software module performs the corresponding interrupt handling for the interrupt source; after the interrupt handling is completed, the interrupt confirmation and clearing logic circuit automatically clears the corresponding interrupt status bit in the interrupt status register and resets the interrupt request trigger.
[0014] Based on the above solution, the present invention also includes, but is not limited to, the following improvements.
[0015] Furthermore, the CPU is an NXP S32G399A CPU, and the FPGA is a Xilinx A7 100T; the PCIe bus is a PCIe X1 Gen3 bus, backward compatible with PCIe X1 Gen2.
[0016] Furthermore, the CPU runs the driver software module, which adopts a three-layer driver architecture consisting of a PCIe core driver layer, an FPGA peripheral adapter layer, and an application interface layer. The PCIe core driver layer is used for the initialization of the PCIe bus, device enumeration, and mapping of the FPGA internal registers and data buffers corresponding to the IO mapping register group to the CPU's virtual address space through PCIe BAR space mapping. The FPGA peripheral adapter layer is used to configure corresponding driver modules for the extended peripherals respectively, and each driver module accesses the PCIe core driver layer through a standard driver interface. The application interface layer is used to provide standardized API interfaces to application software.
[0017] Furthermore, the extended peripherals include one Powerlink interface, ten RS422 serial interfaces, two LVDS interfaces, four MLVDS interfaces, and three second pulse interfaces.
[0018] Furthermore, the IO interrupt generation logic sends an interrupt request signal to the CPU using an IO mapping interrupt method, which is a non-MSI / MSI-X interrupt method.
[0019] Thirdly, the present invention also provides a computer device including a processor coupled to a memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the computer device to perform any of the above methods.
[0020] Fourthly, the present invention also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to perform any of the methods described above.
[0021] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description
[0022] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the overall structure of a PCIe integrated electronic unit drive system for a launch vehicle according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a three-layer drive architecture for a PCIe integrated electronic unit drive system for a launch vehicle, according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0024] The following is a unified explanation of the English abbreviations used throughout the entire implementation method: A field-programmable gate array (FPGA) is a programmable logic device that allows users to implement specific digital circuit functions by configuring its internal logic resources.
[0025] Peripheral Component Interconnect Express (PCIe) is a high-speed serial computer expansion bus standard used to connect high-speed peripherals.
[0026] The specific implementation of this invention is based on an "NXP S32G399A CPU + Xilinx A7 100T FPGA" hardware architecture, using a real-time operating system as a carrier to construct a layered PCIe device driver system, and combining an IO mapping interrupt mechanism to realize peripheral device management and data interaction. Specifically, as follows... Figure 1 As shown, an embodiment of the present invention provides a PCIe device driver system for a launch vehicle integrated electronic unit, comprising: a CPU (corresponding to...) Figure 1 The “nxp S32G399A” and FPGA (corresponding) Figure 1 (Xilinx A7 100T in the text).
[0027] The CPU, as the core of the system's computation and control, performs functions including executing driver software modules and interrupt service routines. Driver software modules are software programs running on the CPU, responsible for PCIe bus initialization, device identification, address mapping, and interrupt configuration management. Interrupt service routines are processing functions called by the CPU after an interrupt; they are written by the driver software developers and registered with the operating system, used to perform interrupt source identification and interrupt handling logic when an interrupt is triggered. The CPU completes system startup initialization by executing driver software modules and interrupt response and peripheral data processing during runtime by executing interrupt service routines.
[0028] The FPGA contains a PCIe endpoint device module and I / O interrupt generation logic.
[0029] The PCIe endpoint device module is deployed inside the FPGA and communicates with the CPU via the PCIe bus as a functional unit. The PCIe endpoint device module includes a PCIe configuration space and at least one I / O-mapped register group. The PCIe configuration space is a set of registers defined in the PCIe specification, used to store device identification and configuration information. The identification information includes a vendor identifier and a device identifier. The driver software module identifies the endpoint device deployed on the FPGA by reading the vendor identifier and device identifier from the PCIe configuration space. The I / O-mapped register group is a register group within the PCIe endpoint device module that is mapped to the CPU's virtual address space via the PCIeBAR space. The CPU can access this register group by performing read and write operations on the mapped virtual address.
[0030] The I / O interrupt generation logic is connected between the interrupt signal output of the FPGA's extended peripheral and the external interrupt pin of the CPU. The FPGA's extended peripheral interrupt signal output and the CPU's external interrupt input are dedicated hardware circuits. The I / O interrupt generation logic includes an interrupt status register, an interrupt enable register, an interrupt request trigger, and interrupt acknowledgment and clearing logic. The interrupt status register latches the interrupt status bit corresponding to the original interrupt event generated by the extended peripheral, allowing the interrupt service routine to read and identify the interrupt source. Each bit in the interrupt status register corresponds to an interrupt event of an extended peripheral; when the corresponding bit is set to 1, it indicates that the extended peripheral has generated an original interrupt event. The interrupt enable register is configured by the driver software module to enable or disable specific interrupt sources. Each bit in the interrupt enable register corresponds to an extended peripheral, and the driver software module controls whether interrupts of each extended peripheral are allowed to be triggered by writing configuration values to the interrupt enable register. The interrupt request trigger is set when both the contents of the interrupt status register and the interrupt enable register are not zero, and sends an interrupt request signal to the CPU through the external interrupt pin to trigger the CPU to execute the interrupt service routine. The fact that both the interrupt status register and the interrupt enable register are non-zero means that the result of a bitwise AND operation between them is non-zero, indicating that at least one enabled interrupt source is in a triggered state. The interrupt acknowledgment and clear logic circuit automatically clears the corresponding interrupt status bit in the interrupt status register and resets the interrupt request trigger after the CPU completes interrupt handling, allowing subsequent interrupts to be triggered again. The interrupt request trigger and interrupt acknowledgment and clear logic circuits in the above I / O interrupt generation logic are implemented using internal FPGA hardware logic circuits.
[0031] In a preferred embodiment, the CPU is an NXP S32G399A CPU, and the FPGA is a Xilinx A7100T. The NXP S32G399A is a high-performance processor chip from NXP Semiconductors, designed for automotive and industrial applications. The Xilinx A7100T is an Artix-7 series field-programmable gate array (FPGA) from Xilinx. The PCIe bus is a PCIe X1 Gen3 bus, backward compatible with PCIe X1 Gen2. PCIe X1 Gen3 represents a single-channel third-generation PCIe bus, backward compatible with a single-channel second-generation PCIe bus. The CPU and FPGA communicate via PCIe X1 Gen3, compatible with PCIe X1 Gen2. The CPU's external interrupt pin is the CPU's EIRQn pin. EIRQn is the CPU's external interrupt request pin, where 'n' represents the pin number, used to receive interrupt request signals sent by the FPGA via I / O mapped interrupts. This embodiment implements a hardware platform based on a specific CPU and FPGA model, providing a hardware foundation for subsequent PCIe device drivers.
[0032] In a preferred implementation, the FPGA deploys a PCIe X1 Gen2 IP core, a UART16550 IP core, and a Powerlink IP core. IP cores are pre-designed functional modules used to implement specific functions within the FPGA. Through the deployment of these IP cores, the FPGA expands to include multiple peripheral interfaces. These expanded peripherals include one Powerlink interface, ten RS422 serial interfaces, two LVDS interfaces, four MLVDS interfaces, and three second pulse interfaces. Powerlink is a real-time Ethernet communication protocol. RS422 is the electrical characteristic standard for balanced voltage digital interface circuits. LVDS, or Low Voltage Differential Signaling, is a low-power, high-speed differential signal transmission technology. MLVDS, or Multi-Point Low Voltage Differential Signaling, is an extension standard of LVDS that supports multi-point communication. Second pulses are pulse signals used for time synchronization. All expanded peripherals are accessed and managed by the CPU through a single PCIe interface; that is, multiple expanded peripherals share the same PCIe endpoint device to communicate with the CPU. The specific types and quantities of the aforementioned extended peripherals can be configured according to actual needs to meet the requirements of the launch vehicle's integrated electronic system for multiple communication interfaces.
[0033] In a preferred embodiment, the I / O interrupt generation logic sends an interrupt request signal to the CPU using an I / O-mapped interrupt method, which is a non-MSI / MSI-X interrupt method. MSI, or Message Signal Interrupt, is an interrupt mechanism based on memory write transactions. Devices initiate interrupts by writing specific message data to host memory. MSI-X is an extended version of MSI, supporting more interrupt vectors. The I / O-mapped interrupt method sends the interrupt request signal directly through physical pins, without relying on PCIe bus memory write transactions. This avoids the interrupt delay and unpredictable jitter issues caused by PCIe bus congestion in MSI and MSI-X interrupt methods. It also avoids the problem of interrupt vector number jumps or interrupt loss due to single-event upsets or single-event locks in the BAR space's Message Address and Message Data registers under irradiation environments. This interrupt mode facilitates the integration of verified hardware modules and reuse of existing driver code, reducing the development risk and cost of integrated electronic systems. Furthermore, the aforementioned I / O interrupt generation logic is simple, requiring only a small number of registers and gates, and does not significantly increase the logic resource consumption of the FPGA or ASIC.
[0034] In a preferred embodiment, a driver software module runs on the CPU. For example... Figure 2 As shown, the driver software module adopts the PCIe core driver layer (corresponding to...). Figure 2 The "real-time operating system" in the context of FPGA peripherals (corresponding to the "real-time operating system") and the FPGA peripheral adapter layer. Figure 2 The "driver layer" and the application interface layer (corresponding to) Figure 2 The system employs a three-layer driver architecture (the "application layer" in the code). Each layer is independent and decoupled, enhancing driver maintainability and scalability, and facilitating system function expansion and maintenance. The PCIe core driver layer is used for PCIe bus initialization, device enumeration, and mapping the FPGA's internal registers and data buffers corresponding to the I / O mapping register groups to the CPU's virtual address space via PCIe BAR space mapping. BAR, or base address register, is located in the PCIe configuration space and stores the base address of the memory or I / O space requested by the device. The PCIe BAR space is the address space corresponding to the base address registers in the PCIe configuration space. The driver software module maps the FPGA's internal register space and data buffer addresses to the CPU's virtual address space through PCIe BAR space mapping, enabling the CPU to access FPGA registers and read / write data. In a preferred implementation, the standard PCIe driver is integrated into the kernel image via a real-time operating system toolchain, MSI / MSI-X is disabled, and a system image containing the PCIe driver is compiled.
[0035] The FPGA peripheral adapter layer is used to configure corresponding driver modules for each extended peripheral. Each driver module accesses the PCIe core driver layer through a standard driver interface. Specifically, dedicated driver modules are developed for the FPGA-extended 1-channel Powerlink, 10-channel RS422, 2-channel LVDS, 4-channel MLVDS, and 3-channel second pulse. Each dedicated driver module accesses the PCIe core driver layer through a standard driver interface to implement peripheral configuration, data transmission and reception, and interrupt handling. Based on the address mapping and data interface provided by the PCIe core driver, FPGA extended peripheral driver modules are developed to implement peripheral configuration, data transmission and reception, and interrupt handling logic, managing multiple FPGA extended peripherals through a single PCIe interface.
[0036] The application interface layer provides standardized API interfaces to application software. API, or application programming interface, allows application software to interact with the driver layer and pass instructions by calling the standardized application programming interface, thus hiding the underlying hardware details.
[0037] The present invention also provides a method for implementing a PCIe device driver for a launch vehicle integrated electronic unit, comprising the following steps.
[0038] S1. The driver software module running on the CPU scans the PCIe bus and identifies endpoint devices deployed on the FPGA by reading the PCIe configuration space. The specific implementation is as follows: At system startup, the PCIe core driver layer in the driver software module running on the CPU performs a PCIe bus scan. The driver software module identifies endpoint devices mounted on the PCIe bus by reading the vendor identification code and device identification code stored in the PCIe configuration space. When the driver software module reads the vendor identification code as 0x10EEE and the device identification code as 0x7011, it confirms that a PCIe endpoint device deployed on the Xilinx A7 100T FPGA has been identified. The driver software module then matches and mounts this PCIe endpoint device with its corresponding driver.
[0039] This step enables the system to accurately identify PCIe endpoint devices on the FPGA, laying the foundation for address mapping and interrupt configuration. This method solves the problem of device discovery relying on complex configurations in existing technologies, achieving automatic device identification and driver matching through standard PCIe bus scanning and configuration space reading mechanisms.
[0040] S2, the driver software module performs address mapping through the PCIe BAR space, mapping the FPGA's internal registers and data buffers corresponding to the I / O mapped register group to the CPU's virtual address space, obtaining the mapped virtual address. The specific implementation is as follows: The driver software module obtains the BAR0 memory resource of the PCIe endpoint device. BAR0 is the first base address register in the PCIe configuration space, used to store the base address of the memory space corresponding to the FPGA's internal registers and data buffers. The driver software module maps the physical address corresponding to BAR0 to the CPU's virtual address space through PCIe BAR space mapping. After mapping, the CPU can read and write the FPGA's internal registers and data buffers by accessing the mapped virtual address.
[0041] This step allows the CPU to access FPGA internal registers and data buffers without needing to worry about physical addresses; it can perform read and write operations simply through the mapped virtual addresses, just like accessing local memory. This mapping operation establishes a data exchange channel between the CPU and the FPGA, providing an access path for interrupt service routines to read interrupt status registers and perform data transfers. This step, in conjunction with S1, completes the initialization of the PCIe core driver, enabling the CPU to access FPGA internal resources. This step maps FPGA internal registers and data buffers to the CPU's virtual address space through BAR space mapping, making CPU access to the FPGA as if it were local memory, simplifying driver software development complexity and improving data exchange efficiency.
[0042] S3. The driver software module configures the CPU's external interrupt pin, sets the interrupt triggering mode, and binds the interrupt service routine to the external interrupt pin. The specific implementation is as follows: The driver software module configures the CPU's EIRQn external interrupt pin through the interrupt registration function provided by the operating system. The driver software module sets the interrupt triggering mode, which can be either level-triggered or edge-triggered. Level-triggered mode means the interrupt is triggered when the external interrupt pin is at a valid level; edge-triggered mode means the interrupt is triggered when the external interrupt pin experiences a level transition. The driver software module binds the interrupt service routine to the EIRQn external interrupt pin. The interrupt service routine is the processing function called by the CPU after responding to an interrupt; it is written by the driver software developers and is used to execute interrupt handling logic. After binding, when the CPU's EIRQn external interrupt pin receives an interrupt request signal, the CPU automatically calls the bound interrupt service routine.
[0043] This step ensures that the interrupt service routine is registered during system startup and enters a state of waiting for interrupt triggering, guaranteeing timely response to interrupt requests sent by the FPGA during runtime. By binding the interrupt service routine to an external interrupt pin through I / O mapping interrupts, the interrupt response path is direct and deterministic, independent of PCIe bus memory write transactions, thus avoiding unpredictable interrupt delay jitter caused by bus congestion in MSI / MSI-X interrupt mode.
[0044] When an FPGA's extended peripheral generates a raw interrupt event, the interrupt status register latches the corresponding interrupt status bit. The specific implementation is as follows: During FPGA operation, extended peripherals generate raw interrupt events that require CPU processing. These extended peripherals include Powerlink interfaces, RS422 serial interfaces, LVDS interfaces, MLVDS interfaces, and second pulse interfaces. The FPGA's internal interrupt status register sets the interrupt status bit corresponding to the raw interrupt event to 1, latching the interrupt event. Each bit in the interrupt status register corresponds to an interrupt event from an extended peripheral. By reading the status of each bit, it can be determined which extended peripheral generated the interrupt. For example, when the RS422 interface receives data, the corresponding bit in the interrupt status register is set to 1, latching the data reception interrupt event.
[0045] This step automatically records interrupt events using FPGA hardware logic without CPU intervention, ensuring no interrupt events are lost and providing a basis for subsequent interrupt source identification. The interrupt status register latches interrupt events through hardware logic, without relying on DMA to write to memory, thus avoiding the problem of interrupt quiescent loss caused by DMA engine or memory system failures in MSI / MSI-X mode.
[0046] When both the interrupt status register and the interrupt enable register are non-zero, the interrupt request trigger is set and sends an interrupt request signal to the CPU via the external interrupt pin. The specific implementation is as follows: The interrupt request trigger inside the FPGA monitors the contents of the interrupt status register and the interrupt enable register in real time. The interrupt enable register is configured by the driver software module during the initialization phase to enable or disable specific interrupt sources. Each bit in the interrupt enable register corresponds to an extended peripheral; when a bit is set to 1, it indicates that the interrupt of that peripheral is enabled; when a bit is set to 0, it indicates that the interrupt of that peripheral is disabled. The interrupt request trigger performs a bitwise AND operation on the contents of the interrupt status register and the interrupt enable register. If the result of the bitwise AND operation is non-zero, it indicates that at least one enabled interrupt source is in the triggered state, and the interrupt request trigger is set. The interrupt request trigger sends an interrupt request signal to the CPU via the CPU's external interrupt pin; the interrupt request signal can be a level signal or an edge signal.
[0047] Through this step, the FPGA sends an interrupt request to the CPU in hardware. The generation of the interrupt request signal does not involve any memory write operations; it is entirely handled by hardware logic. The interrupt request signal is sent via physical pins as a hardware signal, independent of PCIe bus memory write transactions. The path is direct, and the delay is deterministic, making it suitable for onboard timing control tasks requiring nanosecond-level synchronization accuracy.
[0048] In S4, the CPU responds to an interrupt request signal by calling the interrupt service routine. The interrupt service routine reads the interrupt status register through the mapped virtual address, traversing each interrupt status bit in the interrupt status register to identify the extended peripheral that generated the original interrupt event, thus obtaining the interrupt source. The specific implementation is as follows: When the CPU's external interrupt pin receives an interrupt request signal, the CPU pauses the currently executing task, saves the context, and jumps to the interrupt service routine bound to the external interrupt pin to begin execution. The interrupt service routine reads the contents of the interrupt status register inside the FPGA through the mapped virtual address. The interrupt service routine traverses each interrupt status bit in the interrupt status register, checking which bits are set to 1 to identify the extended peripheral that generated the original interrupt event, thus obtaining the interrupt source. If the bit corresponding to RS422 in the interrupt status register is 1, it is identified as an RS422 interrupt; if the bit corresponding to Powerlink is 1, it is identified as a Powerlink interrupt. The interrupt service routine determines the processing logic to be executed based on the identification result and dispatches the interrupt to the corresponding processing branch.
[0049] This step allows multiple peripheral devices to share the same external interrupt pin and the same interrupt response path. By reading the interrupt status register, the interrupt source can be distinguished, achieving unified interrupt management for multiple peripheral devices under a single PCIe interface. This reduces the occupation of the CPU's external interrupt pin and improves the system's integration.
[0050] S5, the driver software module executes corresponding interrupt handling for each interrupt source. The specific implementation is as follows: The interrupt service routine calls the corresponding interrupt handling logic based on the identified interrupt source. If the interrupt source is an RS422 receive interrupt, the interrupt service routine executes the RS422 receive data processing logic, including reading the RS422 receive data register to obtain the received data and storing the data in the receive buffer. If the interrupt source is an RS422 error interrupt, the interrupt service routine executes the RS422 error handling logic, including reading the RS422 error status register to obtain the error type and clearing the error data. If the interrupt source is a Powerlink receive interrupt, the interrupt service routine executes the Powerlink receive data processing logic, including disabling the Powerlink receive interrupt to prevent further interruption during processing, switching the receive buffer, reading the Powerlink receive data register to obtain the received data, and re-enabling the Powerlink receive interrupt. If the interrupt source is a Powerlink transmit interrupt, the interrupt service routine executes the Powerlink transmit data processing logic, including disabling the Powerlink transmit interrupt, switching the transmit buffer, writing the data to be transmitted to the Powerlink transmit data register, and re-enabling the Powerlink transmit interrupt.
[0051] Through this step, the system performs differentiated processing operations based on the interrupt type of different peripherals, ensuring that the functions of each peripheral are normal and that the driver modules of each peripheral are independent of each other, which facilitates functional expansion and maintenance.
[0052] After interrupt handling is completed, the interrupt acknowledgment and clearing logic automatically clears the corresponding interrupt status bit in the interrupt status register and resets the interrupt request trigger. The specific implementation is as follows: The interrupt acknowledgment and clearing logic automatically performs the clearing operation after the CPU completes interrupt handling. It clears the processed interrupt status bit in the interrupt status register, changing it from 1 to 0. Simultaneously, it resets the interrupt request trigger, restoring it to a de-set state to allow subsequent interrupts to be triggered again. The interrupt acknowledgment and clearing logic also clears the CPU interrupt flag. After the contents of the interrupt status register and the state of the interrupt request trigger are restored, the FPGA can send a new interrupt request signal to the CPU again.
[0053] This step completes a full interrupt handling cycle, ensuring the interrupt mechanism functions continuously and correctly. The interrupt confirmation and clearing logic circuit automatically performs the clearing operation through hardware logic, without relying on software intervention, thus improving the efficiency and reliability of interrupt handling.
[0054] In an alternative approach, a hybrid interrupt support system is introduced on top of the basic I / O mapped interrupt method. Devices can adaptively select MSI, MSI-X, or the traditional INTx interrupt method. INTx is the traditional pin interrupt method, which sends interrupt requests via physical signal lines. An interrupt priority hierarchy is added, classifying interrupts into four levels: urgent, high, normal, and low. Priorities are assigned based on the urgency of the specific task to improve interrupt response efficiency.
[0055] In an alternative approach, a dynamic BAR space manager is established to divide the PCIe BAR space into logical partitions for secure sharing by multiple device drivers. The PCIe BAR space is the address space corresponding to the base address register in the PCIe configuration space. This approach implements an interrupt resource virtualization pool, supporting dynamic allocation of interrupt vectors and load balancing.
[0056] In an alternative approach, a triple modal redundancy check (TMR) mechanism is constructed for the aerospace environment, implementing hardware redundancy for critical interruption paths. Interruption latency and loss rate metrics are monitored in real time, triggering an automatic repair process in the event of anomalies. The radiation-hardened design includes error detection and correction circuitry to protect against single-event upsets. The principle of the TMR mechanism is as follows: three identical modules simultaneously perform the same operation. A voter selects the outputs of the three modules, following a two-out-of-three rule. If two identical errors do not occur simultaneously in the three modules, the voter outputs the correct result.
[0057] The aforementioned alternatives can be implemented independently or in combination, providing a complete and scalable PCIe interrupt handling solution for aerospace electronic system design. Each solution is designed based on aerospace engineering constraints to ensure a balance between technological advancement and engineering feasibility.
[0058] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, and these situations are also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0059] Furthermore, the acquisition process of the data involved in this application follows the principles of legality, legitimacy, and necessity. Based on obtaining the explicit authorization and consent of the user, only the minimum necessary information required to achieve the purpose is collected, and data security protection obligations are fulfilled in accordance with the law.
[0060] It should be noted that the beneficial effects of the integrated electronic unit PCIe device driver system for launch vehicles provided in the above embodiments are the same as the beneficial effects of the integrated electronic unit PCIe device driver implementation method for launch vehicles described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.
[0061] like Figure 3 As shown, an embodiment of the present invention provides a computer device 300, which includes a processor 320 coupled to a memory 310. The memory 310 stores at least one computer program 330, which is loaded and executed by the processor 320 to enable the computer device 300 to implement any of the above-described methods. Specifically: The computer device 300 can vary considerably due to differences in configuration or performance. It may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310. The one or more memories 310 store at least one computer program 330, which is loaded and executed by the one or more processors 320 to enable the computer device 300 to implement the PCIe device driver implementation method for a launch vehicle integrated electronic unit provided in the above embodiment. Of course, the computer device 300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input / output. The computer device 300 may also include other components for implementing device functions, which will not be elaborated upon here.
[0062] An embodiment of the present invention provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement any of the above-described methods.
[0063] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0064] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the above-described methods for implementing a PCIe device driver for a launch vehicle integrated electronic unit.
[0065] It should be noted that the terms "first," "second," etc., used in the specification of this application are used to distinguish similar objects and do not imply a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown in the figures or description.
[0066] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0067] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0068] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A drive system for a launch vehicle's integrated electronic PCIe device, characterized in that, include: The CPU is used to execute driver software modules and interrupt service routines. The FPGA is connected to the CPU via a PCIe bus. The FPGA has a PCIe endpoint device module and I / O interrupt generation logic deployed inside it. The PCIe endpoint device module includes a PCIe configuration space and at least one IO-mapped register group. The PCIe endpoint device module communicates with the CPU through the PCIe bus. The I / O interrupt generation logic is connected between the interrupt signal output terminal of the FPGA's extended peripheral and the external interrupt pin of the CPU. The I / O interrupt generation logic includes: The interrupt status register is used to latch the interrupt status bit corresponding to the original interrupt event generated by the extended peripheral, so that the interrupt service routine can read it to identify the interrupt source. The interrupt enable register, configured by the driver software module, is used to enable or disable specific interrupt sources; An interrupt request trigger is set when both the contents of the interrupt status register and the interrupt enable register are not zero. The trigger then sends an interrupt request signal to the CPU via the external interrupt pin to trigger the CPU to execute the interrupt service routine. The interrupt confirmation and clearing logic circuit is used to automatically clear the corresponding interrupt status bit in the interrupt status register and reset the interrupt request trigger after the CPU completes the interrupt processing.
2. The integrated electronic PCIe device drive system for launch vehicles according to claim 1, characterized in that, The CPU is an NXP S32G399A CPU, and the FPGA is a Xilinx A7 100T; the PCIe bus is a PCIeX1 Gen3 bus, backward compatible with PCIe X1 Gen2.
3. The integrated electronic PCIe device drive system for launch vehicles according to claim 1, characterized in that, The CPU runs the driver software module, which adopts a three-layer driver architecture consisting of a PCIe core driver layer, an FPGA peripheral adapter layer, and an application interface layer. The PCIe core driver layer is used for the initialization of the PCIe bus, device enumeration, and mapping of the FPGA internal registers and data buffers corresponding to the IO mapping register group to the CPU's virtual address space through PCIe BAR space mapping. The FPGA peripheral adapter layer is used to configure corresponding driver modules for the extended peripherals respectively, and each driver module accesses the PCIe core driver layer through a standard driver interface. The application interface layer is used to provide standardized API interfaces to application software.
4. The integrated electronic PCIe device drive system for launch vehicles according to claim 1, characterized in that, The extended peripherals include 1 Powerlink interface, 10 RS422 serial interfaces, 2 LVDS interfaces, 4 MLVDS interfaces, and 3 second pulse interfaces.
5. The integrated electronic PCIe device drive system for launch vehicles according to claim 1, characterized in that, The IO interrupt generation logic sends an interrupt request signal to the CPU using an IO mapping interrupt method, which is a non-MSI / MSI-X interrupt method.
6. A method for implementing a driver for a PCIe integrated electronic unit in a launch vehicle, characterized in that, include: S1, the driver software module running on the CPU scans the PCIe bus and identifies the endpoint devices deployed on the FPGA by reading the PCIe configuration space; S2, the driver software module performs address mapping through the PCIe BAR space, mapping the FPGA internal registers and data buffers corresponding to the IO mapped register group to the virtual address space of the CPU, and obtains the mapped virtual address; S3, the driver software module configures the external interrupt pin of the CPU, sets the interrupt triggering mode, and binds the interrupt service routine to the external interrupt pin; when the extended peripheral of the FPGA generates a raw interrupt event, the interrupt status register latches the interrupt status bit corresponding to the raw interrupt event; when the contents of the interrupt status register and the interrupt enable register are both non-zero, the interrupt request trigger is set, and an interrupt request signal is sent to the CPU through the external interrupt pin; S4, In response to the interrupt request signal, the CPU calls the interrupt service routine. The interrupt service routine reads the interrupt status register through the mapped virtual address, traverses each interrupt status bit in the interrupt status register to identify the extended peripheral that generated the original interrupt event, and obtains the interrupt source. S5, the driver software module performs corresponding interrupt handling for the interrupt source; After the interrupt handling is completed, the interrupt confirmation and clearing logic circuit automatically clears the corresponding interrupt status bit in the interrupt status register and resets the interrupt request trigger.
7. The method for implementing a PCIe integrated electronic unit driver for a launch vehicle according to claim 6, characterized in that, The CPU is an NXP S32G399A CPU, and the FPGA is a Xilinx A7 100T; the PCIe bus is a PCIe X1 Gen3 bus, which is backward compatible with PCIe X1 Gen2.
8. The method for implementing a PCIe integrated electronic unit driver for a launch vehicle according to claim 6, characterized in that, The CPU runs the driver software module, which adopts a three-layer driver architecture consisting of a PCIe core driver layer, an FPGA peripheral adapter layer, and an application interface layer. The PCIe core driver layer is used for the initialization of the PCIe bus, device enumeration, and mapping of the FPGA internal registers and data buffers corresponding to the IO mapping register group to the CPU's virtual address space through PCIe BAR space mapping. The FPGA peripheral adapter layer is used to configure corresponding driver modules for the extended peripherals respectively, and each driver module accesses the PCIe core driver layer through a standard driver interface. The application interface layer is used to provide standardized API interfaces to application software.
9. A computer device, characterized in that, The computer device includes a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the computer device to implement a method for driving a PCIe integrated electronic unit of a launch vehicle as described in any one of claims 6 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement a method for driving a PCIe integrated electronic unit of a launch vehicle as described in any one of claims 6 to 8.
