Multi-channel bidirectional IO control system and method based on PCIE

By designing a PCIE-based multi-channel bidirectional IO control system on FPGA devices, the synchronization problem when the main controller controls the output of multiple GPIO channels is solved, and parallelized control and flexible configuration of multiple IO interfaces are realized, which reduces development Cost and safety hazards improve the efficiency and flexibility of the control system.

CN118964266APending Publication Date: 2024-11-15TIANJIN JINHANG COMP TECH RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410980033.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, there is a synchronization problem when the main controller controls multiple GPIO channels to output outward, resulting in potential safety hazards and high development costs caused by the sequential control method.

Method used

A multi-channel bidirectional IO control system based on PCIE is designed, using FPGA device design, including PCIE bus control module, GPIO data configuration module and GPIO output control module. The parallel control of multiple GPIOs is realized through the PCIE bus to ensure IO Flexible configuration and synchronous output for interface orientation.

Benefits of technology

Complete parallel control of multiple IO interfaces is realized, synchronization problems in sequential control methods are avoided, development costs are reduced, hardware upgrade process is simplified, and the flexibility and security of the control system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964266A_ABST
    Figure CN118964266A_ABST
Patent Text Reader

Abstract

The invention relates to a PCIE (Peripheral Component Interface Express)-based multichannel bidirectional IO (Input / Output) control system and method, and belongs to the technical field of computer bus communication. The multichannel bidirectional IO control system comprises a PCIE (Peripheral Component Interface Express) bus control module, a GPIO (General Purpose Input / Output) data configuration module, a GPIO input acquisition module and a GPIO output control module. According to the system, the advantage of FPGA architecture parallelization is utilized, control over complete parallelization of input and output of multiple GPIOs can be achieved, meanwhile, the function that IO directions are configurable is achieved, and flexible use of IO interfaces is achieved. Compared with the prior art, complete parallel control of multiple IO interfaces at a certain moment by a single main controller is realized, and the IO interface direction can be flexibly configured through the main controller, so that potential non-simultaneous potential safety hazards caused by a traditional sequence control method are avoided. According to the modular design mode, all functions can be achieved through a single chip, the adjustment problem of the hardware PCB cannot occur in the subsequent upgrading process, great convenience is brought to work, and the development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer bus communication, and in particular relates to a PCIE-based multi-channel bidirectional IO control system and method. Background Art

[0002] General Purpose Input / Output (GPIO) is a very important content in the field of embedded systems and electronic equipment control. It realizes the communication between the processor and the external circuit, and then realizes the input and output of data. It can be used to connect various external devices, such as sensors, actuators, displays, etc. For example, through GPIO, we can connect a temperature sensor to an embedded system to read the ambient temperature and make corresponding processing. In addition, GPIO can also be used to control and monitor common electronic components such as buttons, switches, LED indicators, etc.

[0003] Bidirectional GPIO enables bidirectional data transmission on the same pin, that is, it can be used as both an input and output port. By configuring GPIO as input or output mode, we can flexibly control the direction of data flow according to demand. In general, the flexibility and versatility of bidirectional GPIO make it an indispensable part of embedded system design. It provides a convenient way to control peripherals and communicate with other devices. Whether in industrial automation, Internet of Things or consumer electronics, bidirectional GPIO plays an important role, helping to realize various intelligent control and data interaction applications. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In order to solve the problem that the main controller controls multiple GPIO channels to output outward asynchronously under the prior art sequential control method, the present invention designs a control method for multi-channel bidirectional IO based on PCIE.

[0006] (II) Technical solution

[0007] In order to solve the above technical problems, the present invention provides a control system based on PCIE multi-channel bidirectional IO, wherein the host end interacts with the control system through the PCIE bus to control the control system; the control system comprises a PCIE bus control module, a GPIO data configuration module and a GPIO output control module; the control system is designed by an FPGA device, and the PCIE bus control module, the GPIO data configuration module and the GPIO output control module are all implemented on the FPGA device;

[0008] The PCIE bus control module includes a PCIE IP core part and a PIO read-write control part; the PIO read-write control part includes an overall state machine for implementing the framing and frame parsing of TLP messages, and a controller for implementing AXI bus reception and transmission;

[0009] The GPIO data configuration module includes two functions, one is to obtain the valid data to be output of the GPIO sent by the host end, and the other is to obtain the GPIO direction configuration signal sent by the host end; the host end writes the valid data to be output of the GPIO and the GPIO direction configuration signal to the specified address of the PCIE bus control module through the PCIE bus, and the GPIO data configuration module extracts the valid data to be output of the GPIO from the specified address and assigns it to the GPIO output register GPIO_reg_out, and the data bit width of the GPIO output register is strongly related to the number of GPIOs; then, the GPIO data configuration module extracts the GPIO direction configuration signal from the specified address and assigns it to the GPIO direction register GPIO_reg_dir, after both parts are read and configured, the host end writes control information to the specified control address through the PCIE bus, and the GPIO output control module turns on the output master switch after receiving the control information, and the valid data will be output to the specified IO according to the configured IO direction, thereby completing the reading and writing of IO;

[0010] The GPIO output control module is used to cooperate with the GPIO data configuration module to complete the output of IO signals; when the host side configures multiple GPIO outputs, the configuration information is first written through the GPIO data configuration module, and the configuration information includes high and low level output information and direction configuration information for each GPIO; after the configuration information is written, the host side writes control information to the specified control address through the PCIE bus, and the GPIO output control module will turn on the output master switch after receiving the control information, and the configuration information is sent out from each IO port configured as output at the same time.

[0011] Preferably, the data bit width of the GPIO direction register GPIO_reg_dir is strongly correlated with the number of GPIOs.

[0012] Preferably, the IP core part uses 7 Series Integrated Block for PCI Express, the corresponding user interface is AXI4-LITE, and the size of the BAR0 space opened is 4KB.

[0013] Preferably, the control system is designed using Xilinx K7 series FPGA device XC7K325TFTG900-2.

[0014] Preferably, the control system further comprises a GPIO input acquisition module, wherein the GPIO input acquisition module is used to acquire external input IO information, and the GPIO input acquisition module is implemented on an FPGA device.

[0015] Preferably, the external IO input information is configured from the GPIO input acquisition module to be input from each input IO interface, and the GPIO input acquisition module caches the external IO input information in the GPIO input register GPIO_reg_in, and each bit information of the GPIO input register represents the input information of each IO interface; after the reception is completed, the content in the GPIO input register is mapped to a certain address of the GPIO input acquisition module, and the host end reads the data under the address through the PCIE bus to obtain the input IO information.

[0016] The present invention also provides a method for controlling the output of 4 IO signals and making the high level effective by using the control system. A complete GPIO control process is completed by the cooperation of the GPIO output control module, the GPIO data configuration module, and the PCIE bus control module. The steps are as follows:

[0017] (1) The host writes the output valid data 0xf in the form of data to the address 0x58001004 of the PCIE bus control module of the FPGA device through the PCIE bus;

[0018] (2) The host writes the direction configuration information 0xf to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus;

[0019] (3) The GPIO data configuration module determines the PCIE write enable. When the write enable becomes high level, indicating that data is written from the host, the corresponding output valid data is taken from the address 0x58001004 and assigned to the GPIO output register GPIO_reg_out; the GPIO data configuration module extracts the lower 4 bits of the GPIO output register GPIO_reg_out, where bit3 to bit0 respectively represent the control mode of the 4th GPIO to the 1st GPIO;

[0020] (4) Similarly, when the write enable becomes high level, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir; the GPIO data configuration module extracts the lower 4 bits of the GPIO direction register GPIO_reg_dir, where bit 3 to bit 0 respectively represent the output direction of the 4th GPIO to the 1st GPIO;

[0021] (5) After completing the configuration of the relevant parameters of GPIO, the host writes the parameter 0x5a5a0101 to the address 0x58003004 of the PCIE bus control module of the FPGA device through the PCIE bus to indicate starting the GPIO output;

[0022] (6) After the GPIO output control module detects that PCIE writes 0x5a5a0101 to address 0x58003004, it outputs the content in the GPIO output register GPIO_reg_out according to the direction value in the GPIO direction register GPIO_reg_dir, and clears the data in the address to facilitate the next write;

[0023] (7) The external four-way IO port completes the corresponding opening action according to the configured GPIO output signal parameters.

[0024] The present invention also provides a method for obtaining four-way IO signal input and making the high level effective by using the control system. The method is a complete GPIO input process completed by a GPIO input acquisition module, a GPIO data configuration module and a PCIE bus control module, and the steps are as follows:

[0025] (1) When the input status of the external four-way IO signal is that the 4th and 2nd inputs are valid, and the 3rd and 1st inputs are invalid, feedback is given in the form of GPIO signals;

[0026] (2) Before receiving data, the host first writes the direction configuration information 0x0 to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus;

[0027] (3) When the write enable becomes high level, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir; extracts the lower 4 bits of the GPIO direction register GPIO_reg_dir, where bit 3 to bit 0 respectively represent the input direction from the 4th GPIO to the 1st GPIO;

[0028] (4) The GPIO input acquisition module extracts the corresponding input information, caches the IO input information into the GPIO input register GPIO_reg_in, and assigns the obtained four-way GPIO data 0xa to the address 0x58002004;

[0029] (5) After the GPIO input acquisition module completes the assignment, it writes data 0x1 to address 0x58006004 to indicate that there is an external GPIO signal input. The startup parameter can be any value;

[0030] (6) The host detects that address 0x58006004 is not 0, which means there is a GPIO signal input, so it reads the data information from address 0x58002004;

[0031] (7) When data reading is completed, the host sends a read enable signal to the PCIE bus control module of the FPGA device, and the GPIO input acquisition module clears the 0x1 of the data written at address 0x58006004 according to the read enable signal to wait for the next reception.

[0032] The invention also provides an application of the control system in computer bus communication.

[0033] The invention also provides an application of the method in computer bus communication.

[0034] (III) Beneficial effects

[0035] In order to improve the parallel control of multi-channel IO interfaces, the present invention provides a control method for multi-channel bidirectional IO based on PCIE. The method utilizes the advantages of FPGA architecture parallelism, designs each module through the FPGA architecture, realizes the complete parallel control of multi-channel GPIO input and output, and has the function of configurable IO direction to realize flexible use of IO interfaces.

[0036] Compared with the prior art, the present invention realizes the complete parallel control of multiple IO interfaces by a single main controller at a certain moment, and the direction of the IO interface can be flexibly configured by the main controller, thereby avoiding the potential non-simultaneous safety hazards brought by the traditional sequential control method. This modular design method can realize all functions through a single chip, and there will be no adjustment problems of the hardware PCB circuit board in the subsequent upgrade process, which brings great convenience to the work and reduces the development cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the main structural modules of the PCIE-based multi-channel bidirectional IO control system of the present invention;

[0038] Figure 2 The figure is a schematic diagram of the connection relationship between modules of the PCIE-based multi-channel bidirectional IO control system of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0040] To solve the problems of the prior art, the present invention provides a control system and method for a multi-channel bidirectional IO based on PCIE, such as Figure 1 As shown, the multi-channel bidirectional IO parallel control system includes a PCIE bus control module, a GPIO data configuration module, a GPIO input acquisition module and a GPIO output control module.

[0041] The host side controls the control system of the present invention, and the host side interacts with the control system of the present invention through the PCIE bus. The multi-channel bidirectional IO control system of the PCIE is implemented using the Xilinx K7 series FPGA device XC7K325TFTG900-2, which is mainly used for system control, interface logic and communication data processing. The PCIE bus control module, GPIO data configuration module, GPIO input acquisition module and GPIO output control module are all implemented on the XC7K325TFTG900-2 FPGA device. The connection between each module is as follows: Figure 2 shown.

[0042] The PCIE bus control module includes a PCIE IP core part and a PIO read-write control part, wherein the IP core part uses the 7Series Integrated Block for PCI Express, the corresponding user interface is AXI4-LITE, and the BAR0 space size is 4KB; the PIO read-write control part includes an overall state machine for realizing the framing and frame parsing of TLP messages, and a controller for realizing AXI bus reception and transmission.

[0043] The GPIO data configuration module includes two functions, one is to obtain the valid data to be output of the GPIO sent by the host side, and the other is to obtain the GPIO direction configuration signal sent by the host side. It is further described that the host side writes the valid data to be output of the GPIO and the GPIO direction configuration signal (direction configuration information, the content in the GPIO direction configuration signal is the IO direction, which is used to configure the input and output of the IO) to the specified address of the PCIE bus control module through the PCIE bus, and the GPIO data configuration module extracts the valid data to be output of the GPIO from the specified address and assigns it to the GPIO output register GPIO_reg_out, and the data bit width of the GPIO output register is strongly related to the number of GPIOs. Then, the GPIO data configuration module extracts the GPIO direction configuration signal from the specified address and assigns it to the GPIO direction register GPIO_reg_dir, and the data bit width of the GPIO direction register GPIO_reg_dir is strongly related to the number of GPIOs. After both parts are read and configured, the host side will write control information to the specified control address through the PCIE bus. After receiving the control information, the GPIO output control module will turn on the output master switch, and the valid data will be output to the specified IO path according to the configured IO direction, thereby completing the IO reading and writing.

[0044] The main function of the GPIO output control module is to cooperate with the GPIO data configuration module to complete the output of IO signals. It is further described that when the host side configures multiple GPIO outputs, the configuration information must first be written through the GPIO data configuration module. The configuration information includes the high and low level output information and direction configuration information for each GPIO. After the configuration information is written, the host side will write the control information to the specified control address through the PCIE bus. After receiving the control information, the GPIO output control module will turn on the output master switch, and the configuration information will be sent out from each IO port configured as output at the same time.

[0045] Furthermore, taking the control of outputting 4 IO signals and high level being effective as an example, a complete GPIO control process completed by the cooperation of the GPIO output control module, the GPIO data configuration module, and the PCIE bus control module is introduced. The steps are as follows:

[0046] (1) The host side writes the output valid data 0xf in the form of data to the address 0x58001004 of the PCIE bus control module of the FPGA device through the PCIE bus. The address can be any readable and writable address.

[0047] (2) The host writes the direction configuration information 0xf to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus. The address can be any readable and writable address.

[0048] (3) The GPIO data configuration module determines the PCIE write enable. When the write enable becomes high level, it indicates that data is written from the host. Then, the corresponding output valid data is taken from the address 0x58001004 and assigned to the GPIO output register GPIO_reg_out. It is known that there are four IO ports, so the GPIO data configuration module extracts the lower 4 bits of the GPIO output register GPIO_reg_out, where bit3 to bit0 respectively represent the control mode of the 4th GPIO to the 1st GPIO.

[0049] (4) Similarly, when the write enable becomes high level, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir. It is known that there are four IO ports, so the GPIO data configuration module extracts the lower 4 bits of the GPIO direction register GPIO_reg_dir, where bit3 to bit0 respectively represent the output direction of the 4th GPIO to the 1st GPIO.

[0050] (5) After completing the configuration of the relevant parameters of GPIO, the host end writes the parameter 0x5a5a0101 to the address 0x58003004 of the PCIE bus control module of the FPGA device through the PCIE bus to indicate starting the GPIO output. The start parameter can be any value.

[0051] (6) After the GPIO output control module detects that PCIE writes 0x5a5a0101 to address 0x58003004, it outputs the content in the GPIO output register GPIO_reg_out according to the direction value in the GPIO direction register GPIO_reg_dir, and clears the data in the address to facilitate the next write.

[0052] (7) The external four-way IO port completes the corresponding opening action according to the configured GPIO output signal parameters.

[0053] The main function of the GPIO input acquisition module is to obtain external input IO information. Further described as, the external IO input information is input from each IO interface configured as input on the GPIO input acquisition module, and the GPIO input acquisition module will cache the external IO input information in the GPIO input register GPIO_reg_in, and each bit information of the GPIO input register represents the input information of each IO interface. When the reception is completed, the content in the GPIO input register will be mapped to a certain address of the GPIO input acquisition module, and the host end will read the data under the address through the PCIE bus to obtain the input IO information.

[0054] Furthermore, taking the acquisition of four-way IO signal input and high level valid as an example, a complete GPIO input process completed by the GPIO input acquisition module, the GPIO data configuration module and the PCIE bus control module is introduced, and the steps are as follows:

[0055] (1) When the input status of the external four-way IO signal is that the 4th and 2nd inputs are valid, and the 3rd and 1st inputs are invalid, feedback will be given in the form of GPIO signals.

[0056] (2) Before receiving data, the host must first write the direction configuration information 0x0 to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus. The address can be any readable and writable address.

[0057] (3) When the write enable becomes high, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir. It is known that there are four IO ports, so the lower 4 bits of the GPIO direction register GPIO_reg_dir are extracted, where bit3 to bit0 respectively represent the input direction from the 4th GPIO to the 1st GPIO.

[0058] (4) The GPIO input acquisition module extracts the corresponding input information, caches the IO input information into the GPIO input register GPIO_reg_in, and assigns the obtained four-way GPIO data 0xa to the address 0x58002004, which can be any readable and writable address.

[0059] (5) After the GPIO input acquisition module completes the assignment, it writes data 0x1 to address 0x58006004 to indicate that there is an external GPIO signal input. The startup parameter can be any value.

[0060] (6) The host detects that address 0x58006004 is not 0, which means that the GPIO has data input (that is, there is GPIO signal input), so it goes to address 0x58002004 to read the data information.

[0061] When data reading is completed, the host side sends a read enable signal to the PCIE bus control module of the FPGA device, and the GPIO input acquisition module clears 0x1 of the data written at address 0x58006004 according to the read enable signal to wait for the next reception.

[0062] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A PCIE-based multi-channel bidirectional IO control system, characterized in that: The host end interacts with the control system through the PCIE bus to control the control system; the control system includes a PCIE bus control module, a GPIO data configuration module and a GPIO output control module; the control system is designed using an FPGA device, and the PCIE bus control module, the GPIO data configuration module and the GPIO output control module are all implemented on the FPGA device; The PCIE bus control module includes a PCIEIP core part and a PIO read-write control part; the PIO read-write control part includes an overall state machine for implementing the framing and frame parsing of TLP messages, and a controller for implementing AXI bus reception and transmission; The GPIO data configuration module includes two functions, one is to obtain the valid data to be output of the GPIO sent by the host end, and the other is to obtain the GPIO direction configuration signal sent by the host end; the host end writes the valid data to be output of the GPIO and the GPIO direction configuration signal to the specified address of the PCIE bus control module through the PCIE bus, and the GPIO data configuration module extracts the valid data to be output of the GPIO from the specified address and assigns it to the GPIO output register GPIO_reg_out, and the data bit width of the GPIO output register is strongly related to the number of GPIOs; then, the GPIO data configuration module extracts the GPIO direction configuration signal from the specified address and assigns it to the GPIO direction register GPIO_reg_dir, after both parts are read and configured, the host end writes control information to the specified control address through the PCIE bus, and the GPIO output control module turns on the output master switch after receiving the control information, and the valid data will be output to the specified IO according to the configured IO direction, thereby completing the reading and writing of IO; The GPIO output control module is used to cooperate with the GPIO data configuration module to complete the output of IO signals; when the host side configures multiple GPIO outputs, the configuration information is first written through the GPIO data configuration module, and the configuration information includes high and low level output information and direction configuration information for each GPIO; after the configuration information is written, the host side writes control information to the specified control address through the PCIE bus, and the GPIO output control module will turn on the output master switch after receiving the control information, and the configuration information is sent out from each IO port configured as output at the same time.

2. The system according to claim 1, characterized in that The data bit width of the GPIO direction register GPIO_reg_dir is strongly related to the number of GPIOs.

3. The system according to claim 1, characterized in that The IP core uses 7 Series Integrated Block for PCI Express, the corresponding user interface is AXI4-LITE, and the BAR0 space size is 4KB.

4. The system according to claim 1, characterized in that The control system is designed using the Xilinx K7 series FPGA device XC7K325TFTG900-2.

5. The system according to claim 1, characterized in that The control system also includes a GPIO input acquisition module, which is used to acquire external input IO information. The GPIO input acquisition module is implemented on an FPGA device.

6. The system according to claim 5, characterized in that The external IO input information is configured from the GPIO input acquisition module to be input from each input IO interface. The GPIO input acquisition module caches the external IO input information into the GPIO input register GPIO_reg_in. Each bit of the GPIO input register represents the input information of each IO interface. After the reception is completed, the content in the GPIO input register is mapped to a certain address of the GPIO input acquisition module, and the host end reads the data under the address through the PCIE bus to obtain the input IO information.

7. A method for controlling 4-way IO signal output and making high level effective by using the control system according to any one of claims 1 to 4, characterized in that: A complete GPIO control process is completed by the GPIO output control module, GPIO data configuration module, and PCIE bus control module. The steps are as follows: (1) The host writes the output valid data 0xf in the form of data to the address 0x58001004 of the PCIE bus control module of the FPGA device through the PCIE bus; (2) The host writes the direction configuration information 0xf to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus; (3) The GPIO data configuration module determines the PCIE write enable. When the write enable becomes high level, indicating that data is written from the host, the corresponding output valid data is taken from the address 0x58001004 and assigned to the GPIO output register GPIO_reg_out; the GPIO data configuration module extracts the lower 4 bits of the GPIO output register GPIO_reg_out, where bit3 to bit0 respectively represent the control mode of the 4th GPIO to the 1st GPIO; (4) Similarly, when the write enable becomes high level, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir; the GPIO data configuration module extracts the lower 4 bits of the GPIO direction register GPIO_reg_dir, where bit 3 to bit 0 respectively represent the output direction of the 4th GPIO to the 1st GPIO; (5) After completing the configuration of the relevant parameters of GPIO, the host writes the parameter 0x5a5a0101 to the address 0x58003004 of the PCIE bus control module of the FPGA device through the PCIE bus to indicate starting the GPIO output; (6) After the GPIO output control module detects that PCIE writes 0x5a5a0101 to address 0x58003004, it outputs the content in the GPIO output register GPIO_reg_out according to the direction value in the GPIO direction register GPIO_reg_dir, and clears the data in the address to facilitate the next write; (7) The external four-way IO port completes the corresponding opening action according to the configured GPIO output signal parameters.

8. A method for obtaining four-way IO signal input and making the high level effective by using the control system according to claim 5 or 6, characterized in that: This method is a complete GPIO input process completed by the GPIO input acquisition module, the GPIO data configuration module and the PCIE bus control module, and the steps are as follows: (1) When the input status of the external four-way IO signal is that the 4th and 2nd inputs are valid, and the 3rd and 1st inputs are invalid, feedback is given in the form of GPIO signals; (2) Before receiving data, the host first writes the direction configuration information 0x0 to the address 0x58004004 of the PCIE bus control module of the FPGA device through the PCIE bus; (3) When the write enable becomes high level, indicating that data is written from the host, the GPIO data configuration module takes out the corresponding direction configuration information from address 0x58004004 and assigns it to the GPIO direction register GPIO_reg_dir; extracts the lower 4 bits of the GPIO direction register GPIO_reg_dir, where bit 3 to bit 0 respectively represent the input direction from the 4th GPIO to the 1st GPIO; (4) The GPIO input acquisition module extracts the corresponding input information, caches the IO input information into the GPIO input register GPIO_reg_in, and assigns the obtained four-way GPIO data 0xa to the address 0x58002004; (5) After the GPIO input acquisition module completes the assignment, it writes data 0x1 to address 0x58006004 to indicate that there is an external GPIO signal input. The startup parameter can be any value; (6) The host detects that address 0x58006004 is not 0, which means there is a GPIO signal input, so it reads the data information from address 0x58002004; (7) When data reading is completed, the host sends a read enable signal to the PCIE bus control module of the FPGA device, and the GPIO input acquisition module clears the 0x1 of the data written at address 0x58006004 according to the read enable signal to wait for the next reception.

9. Application of the control system according to any one of claims 1 to 6 in computer bus communication.

10. Application of the method according to claim 7 or 8 in computer bus communication.

Citation Information

Cited By

  • Multi-channel industrial sensor signal simulation system based on PCI and PCIe buses

    CN120122471A