A redundant control system based on FPGA, RISC-V soft core processor and national secret soft core
By adopting redundant control systems based on FPGA and RISC-V soft core processors and Guomi soft cores in the instrumentation and control system of nuclear power plants, the challenges of the system in high reliability and information security are solved, and high reliability and Improve information security and support flexible expansion and upgrade of the system.
Patent Information
- Application Number
- CN202410565770.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Nuclear power plant instrumentation control systems have challenges in high reliability and information security, especially in the application of small modular reactors, and the prior art is difficult to achieve high reliability, high information security and flexible expansion control systems.
Using a redundant control system based on FPGA and RISC-V soft core processors and Guoshu soft cores, the redundant or master-slave modules are realized by deploying two RISC-V CPU soft cores and Guoshu modules on a single chip FPGA. Redundant control supports encrypted data transmission, improving system reliability and information security.
It realizes the high reliability and fault tolerance of the system, ensures the normal operation of the nuclear reactor, enhances information security, and supports flexible upgrades and expansion of the system, reducing overall size and power consumption.
Smart Images

Figure CN118348864B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of digital instrumentation and control technology for nuclear power plants, and in particular to a redundant control system based on FPGA, RISC-V soft core processor and national secret soft core. Background Art
[0002] The instrumentation and control system is the "nerve center" of a nuclear power plant and plays a key role in ensuring the safe and economical operation of a nuclear power plant. Digital instrumentation and control technology has become the mainstream of current nuclear power plants. The high reliability and information security of digital instrumentation and control systems are the key issues of concern to the industry. On the other hand, with the growing demand for energy, nuclear energy, as an efficient and clean form of energy, plays a pivotal role in power production. The power of a single module of a small modular reactor (SMR) does not exceed 300Mwe. It generally has outstanding advantages such as inherent safety, simplicity, low cost, easy maintenance, and multi-purpose. Through parallel connection, it can also be used to build a large-scale multi-purpose nuclear energy system for power generation, nuclear hydrogen production, and shale gas mining. Therefore, it is recommended by the International Atomic Energy Agency as the mainstream direction of future nuclear energy development. SMR has put forward new requirements for digital instrumentation and control technology in terms of high reliability, high information security, adaptability to use, and convenient upgrade and expansion. Summary of the invention
[0003] In view of this, the present disclosure proposes a redundant control system based on FPGA, RISC-V soft-core processor and national secret soft-core, deploying two RISC-V-based CPU soft-cores, IP soft-cores of other modules and control modules implemented by national secret modules on a single FPGA, which can realize redundant control by using peer-to-peer redundant control or master-slave redundant control, thus improving the reliability and fault tolerance of the system, and can also monitor the status of each control module and handle abnormal situations in a timely manner. Both soft-core processors can call the on-chip national secret algorithm, support data encryption transmission, and improve the information security of the system.
[0004] According to one aspect of the present disclosure, a redundant control system based on FPGA, RISC-V soft core processor and national secret soft core is provided, wherein the system comprises a peer-to-peer redundant device, which is implemented by a field programmable gate array FPGA, and the peer-to-peer redundant device comprises a first control module, a second control module, a plurality of isolation modules, a plurality of analog-to-digital conversion modules, and a signal output selection circuit.
[0005] The first control module includes a first processing unit, a plurality of first GPIO units, and a plurality of first SPI units, wherein the plurality of first GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the first processing unit, and the plurality of first SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the first processing unit;
[0006] The second control module includes a second processing unit, a plurality of second GPIO units, and a plurality of second SPI units, wherein the plurality of second GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the second processing unit, and the plurality of second SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the second processing unit;
[0007] The first processing unit and the second processing unit are both implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the first processing unit and the second processing unit are the same, the signals to be processed include the switch input signals, the analog input signals, and the communication input signals, and the signals to be processed represent the operation and configuration of the nuclear reactor;
[0008] The first processing unit is used to receive the signal to be processed, process the signal to be processed according to a predetermined processing rule to obtain a first result, the first result including a first switch output signal, a first analog output signal, and a first communication output signal, and send the first result to the signal output selection circuit;
[0009] The second processing unit is used to receive the signal to be processed, process the signal to be processed according to the processing rule to obtain a second result, the second result includes a second switch output signal, a second analog output signal, and a second communication output signal, and send the second result to the signal output selection circuit;
[0010] The signal output selection circuit is used to determine a peer-to-peer redundant control result according to the first result and the second result, and the peer-to-peer redundant control result is used as a basis for determining a control action to be performed on the nuclear reactor.
[0011] In a possible implementation, the multiple isolation modules include multiple groups of input isolation modules, each group of input isolation modules includes a first isolation module and a second isolation module, each of the first GPIO units is connected between the corresponding first isolation module and the first processing unit, each of the first isolation modules is used to forward the received switch input signal to the connected first GPIO unit, each of the first GPIO units is used to forward the received switch input signal to the first processing unit, each of the second GPIO units is connected between the corresponding second isolation module and the second processing unit, each of the second isolation modules is used to forward the received switch input signal to the connected second GPIO unit, each of the second GPIO units is used to forward the received switch input signal to the second processing unit, wherein the switch input signals received by the first isolation module and the second isolation module in the same group of input isolation modules are the same; or
[0012] The multiple isolation modules include multiple third isolation modules, and the peer redundancy device also includes a first logic judgment module. Each of the third isolation modules is connected to the corresponding first GPIO unit and second GPIO unit through the first logic judgment module. Each of the third isolation modules is used to forward the received switch input signal to the first logic judgment module. The first logic judgment module is used to forward the switch input signal to the first GPIO unit and the second GPIO unit corresponding to the third isolation module. Each of the first GPIO units is also used to forward the received switch input signal to the first processing unit, and each of the second GPIO units is used to forward the received switch input signal to the second processing unit.
[0013] In a possible implementation, the peer-to-peer redundant device further includes a plurality of first current-voltage conversion modules, the plurality of analog-to-digital conversion modules are divided into a plurality of groups, each group of analog-to-digital conversion modules includes a first analog-to-digital conversion module and a second analog-to-digital conversion module, the first analog-to-digital conversion module and the second analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding first current-voltage conversion module, each of the first SPI units is connected between the corresponding first analog-to-digital conversion module and the first processing unit, each of the second SPI units is connected between the corresponding second analog-to-digital conversion module and the second processing unit, and each of the first current-voltage conversion modules is used to convert the received current signal into a voltage signal. signal, and forward the voltage signal to the connected first analog-to-digital conversion module and the second analog-to-digital conversion module, each of the first analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected first SPI unit, each of the first SPI units is used to forward the received analog input signal to the first processing unit, each of the second analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected second SPI unit, each of the second SPI units is used to forward the received analog input signal to the second processing unit; or
[0014] The peer-to-peer redundant device further includes a second logic judgment module and a plurality of second current-voltage conversion modules, wherein the plurality of analog-to-digital conversion modules include a plurality of third analog-to-digital conversion modules, each of the third analog-to-digital conversion modules is respectively connected to a corresponding second current-voltage conversion module, and each of the second current-voltage conversion modules is connected to the second logic judgment module.
[0015] Each of the first SPI units is connected between the second logic judgment module and the first processing unit, each of the second SPI units is connected between the second logic judgment module and the second processing unit, each of the second current-voltage conversion modules is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected third analog-to-digital conversion module, each of the third analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the second logic judgment module, the second logic judgment module is used to forward the analog input signal to the corresponding first SPI unit and second SPI unit, each of the first SPI units is used to forward the received analog input signal to the first processing unit, and each of the second SPI units is used to forward the received analog input signal to the second processing unit.
[0016] In a possible implementation, the multiple isolation modules include multiple groups of output isolation modules, each group of output isolation modules includes a fourth isolation module and a fifth isolation module, the fourth isolation module and the fifth isolation module in the same group of output isolation modules are arranged in parallel or in series, the first control module also includes multiple third GPIO units, the second control module also includes multiple fourth GPIO units, each of the third GPIO units is connected between the corresponding fourth isolation module and the first processing unit, each of the third GPIO units is used to forward the first switch output signal to the connected fourth isolation module, each of the fourth isolation modules is used to forward the received first switch output signal to the outside, each of the fourth GPIO units is connected between the corresponding fifth isolation module and the second processing unit, each of the fourth GPIO units is used to forward the second switch output signal to the connected fifth isolation module, and each of the fifth isolation modules is used to forward the received second switch output signal to the outside.
[0017] In a possible implementation, the first control module further includes a plurality of third SPI units, the second control module further includes a plurality of fourth SPI units, the peer-to-peer redundant device further includes a third logic judgment module and a plurality of first digital-to-analog conversion modules, each of the first digital-to-analog conversion modules is connected to the third logic judgment module, each of the third SPI units is connected between the third logic judgment module and the first processing unit, each of the fourth SPI units is connected between the third logic judgment module and the second processing unit, each of the third SPI units is used to forward the first analog output signal to the third logic judgment module, each of the fourth SPI units is used to forward the second analog output signal to the third logic judgment module, the third logic judgment module is used to determine an output result based on the first analog output signal and the second analog output signal according to a predetermined output condition, and forward the output result to the corresponding first digital-to-analog conversion module, the first digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside.
[0018] In a possible implementation, each of the communication input signals includes a serial input communication signal and an Ethernet input communication signal, the first communication output signal includes a first serial communication signal and a first Ethernet communication signal, the second communication output signal includes a second serial communication signal and a second Ethernet communication signal, the first control module also includes a plurality of first UART units and a plurality of first LAN units, the second control module also includes a plurality of second UART units and a plurality of second LAN units, the peer-to-peer redundant device also includes a plurality of groups of level conversion modules and a plurality of groups of PHY modules, each group of level conversion modules includes a first level conversion module and a second level conversion module, each of the first UART units is connected between the corresponding first level conversion module and the first processing unit, each of the first level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding first signal and forward the first signal to the corresponding first UART unit, each of the first UART units is used to forward the received first signal to the first processing unit, and each of the second The UART units are connected between the corresponding second level conversion modules and the second processing unit, each of the second level conversion modules is used to perform level conversion on the received serial input communication signal to obtain the corresponding second signal and forward the second signal to the corresponding second UART unit, each of the second UART units is used to forward the received second signal to the second processing unit, each of the first UART units is also used to forward the first serial communication signal to the corresponding first level conversion module, each of the first level conversion modules is also used to perform level conversion on the received first serial communication signal to obtain the corresponding third signal and forward the third signal to the outside, each of the second UART units is used to forward the second serial communication signal to the corresponding second level conversion module, each of the second level conversion modules is used to perform level conversion on the received second serial communication signal to obtain the corresponding fourth signal and forward the fourth signal to the outside, wherein the serial input communication signal received by the first level conversion module and the second level conversion module in the same group of input level conversion modules is the same;Each group of input PHY modules includes a first PHY module and a second PHY module, each of the first LAN units is connected between the corresponding first PHY module and the first processing unit, each of the first PHY modules is used to forward the received Ethernet input communication signal to the connected first LAN unit, each of the first LAN units is used to forward the received Ethernet input communication signal to the first processing unit, each of the second LAN units is connected between the corresponding second PHY module and the second processing unit, each of the second PHY modules is used to forward the received Ethernet input communication signal to the connected second LAN unit, each of the second LAN units is used to forward the received Ethernet input communication signal to the second processing unit, each of the first LAN units is also used to forward the first Ethernet communication signal to the corresponding first PHY module, each of the first PHY modules is also used to forward the first Ethernet communication signal to the outside, each of the second LAN units is also used to forward the second Ethernet communication signal to the corresponding second PHY module, each of the second PHY modules is also used to forward the second Ethernet communication signal to the outside, wherein the Ethernet input communication signals received by the first PHY module and the second PHY module in the same group of input PHY modules are the same. ;
[0019] In a possible implementation, the peer-to-peer redundant device further includes a first dual-port RAM module, the first dual-port RAM module is connected between the first control module and the second control module, the first dual-port RAM module is used for data transmission between the first control module and the second control module, the first control module further includes a first synchronization unit, the second control module further includes a second synchronization unit, the process of the first processing unit and the second processing unit processing the signal to be processed both includes a plurality of predetermined processing stages, the first synchronization unit is used to synchronize first synchronization content to the second synchronization unit through the first dual-port RAM module, the first synchronization content includes the processing stage currently located by the first processing unit; the second synchronization unit is used to forward the received first synchronization content to the second processing unit, so that the second processing unit adjusts its own processing stage based on the first synchronization content; the second synchronization unit is also used to synchronize second synchronization content to the first synchronization unit through the first dual-port RAM module, the second synchronization content includes the processing stage currently located by the second processing unit; the first synchronization unit is also used to forward the received second synchronization content to the first processing unit, so that the first processing unit adjusts its own processing stage based on the second synchronization content.
[0020] In a possible implementation, the first control module further includes a first national secret unit, and the second control module further includes a second national secret unit, the first control module is used to send the first data to be transmitted to the first national secret unit before sending the first data to be transmitted via the first output communication interface; the first national secret unit is used to encrypt the first data to be transmitted based on the determined encryption method, so that the content sent out by the first control module via the first output communication interface is encrypted content; the first control module is also used to send the second data to be transmitted to the first national secret unit before receiving the second data to be transmitted via the first input communication interface; the first national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the first control module via the first input communication interface is decrypted content; wherein the first input communication interface and the first output communication interface are respectively from the first UART unit and the first LAN unit of the first control module, and the first data to be transmitted includes a first serial communication signal and a first Ethernet communication signal, the second data to be transmitted includes a serial input communication signal and an Ethernet input communication signal; the second control module is used to send the third data to be transmitted to the second national secret unit before sending the third data to be transmitted through the second output communication interface; the second national secret unit is used to encrypt the third data to be transmitted based on the determined encryption method, so that the content sent out by the second control module through the second output communication interface is encrypted content; the second control module is also used to send the second data to be transmitted to the second national secret unit before receiving the second data to be transmitted through the second input communication interface; the second national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the second control module through the second input communication interface is decrypted content; wherein the second input communication interface and the second output communication interface are respectively from the second UART unit and the second LAN unit of the second control module, and the third data to be transmitted includes a second serial communication signal and a second Ethernet communication signal.
[0021] In a possible implementation, the first control module further includes a first heartbeat sending unit and a first determination unit, the second control module further includes a second heartbeat sending unit and a second determination unit, the system further includes a display device, the first heartbeat sending unit is used to send a first heartbeat signal to the second determination unit at a predetermined frequency; the second determination unit is used to determine a first flag bit based on the first heartbeat signal, and send the first flag bit to the display device, the first flag bit is used to indicate the current state of the first control module; the second heartbeat sending unit is used to send a second heartbeat signal to the first determination unit at a predetermined frequency; the first determination unit is used to determine a second flag bit based on the second heartbeat signal, and send the second flag bit to the display device, the second flag bit is used to indicate the current state of the second control module; the display device is used to display the first flag bit and the second flag bit to remind a user of the current state of the first control module and the second control module, the current state including one of a normal state and an abnormal state.
[0022] According to another aspect of the present disclosure, a redundant control system based on FPGA, RISC-V soft core processor and national secret soft core is provided, wherein the system comprises a master-slave redundant device, wherein the master-slave redundant device is implemented by a field programmable gate array FPGA, wherein the master-slave redundant device comprises two control modules, a plurality of isolation modules, and a plurality of analog-to-digital conversion modules, wherein the two control modules are a third control module and a fourth control module,
[0023] The third control module includes a third processing unit, a plurality of fifth GPIO units, and a plurality of fifth SPI units, wherein the plurality of fifth GPIO units are used to forward the switch input signals sent by the corresponding isolation module to the third processing unit, and the plurality of fifth SPI units are used to forward the analog input signals sent by the corresponding analog-to-digital conversion module to the third processing unit;
[0024] The fourth control module includes a fourth processing unit, a plurality of sixth GPIO units, and a plurality of sixth SPI units, wherein the plurality of sixth GPIO units are used to forward the switch input signals sent by the corresponding isolation modules to the fourth processing unit, and the plurality of sixth SPI units are used to forward the analog input signals sent by the corresponding analog-to-digital conversion modules to the fourth processing unit;
[0025] The third processing unit and the fourth processing unit are both implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the third processing unit and the fourth processing unit are the same, the signals to be processed include each of the switch input signals, each of the analog input signals, and each of the communication input signals, and the signals to be processed represent the operation and configuration of the nuclear reactor;
[0026] The third processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a third result, wherein the third result includes a third switch output signal, a third analog output signal, and a third communication output signal;
[0027] The fourth processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a fourth result, wherein the fourth result includes a fourth switch output signal, a fourth analog output signal, and a fourth communication output signal;
[0028] One of the two control modules of the master-slave redundant device is a master and the other is a slave. The master-slave control result output by the master-slave redundant device is the output of the master. The master-slave control result is used as a basis for determining the control action on the nuclear reactor.
[0029] In a possible implementation, the third control module and the fourth control module both include a third heartbeat sending unit, a third synchronization unit, a third state query unit, a third active switching unit, a fourth determination unit, a fourth synchronization unit, a fourth state query unit, and a fourth active switching unit; the host runs the third heartbeat sending unit, the third synchronization unit, the third state query unit, and the third active switching unit, and the slave runs the fourth determination unit, the fourth synchronization unit, the fourth state query unit, and the fourth active switching unit; the third synchronization unit is used to synchronize the third synchronization content to the fourth synchronization unit according to a predetermined synchronization frequency, and the third synchronization content includes the current processing progress of the current host processing the signal to be processed; the fourth synchronization unit is used to The received third synchronization content is forwarded to the processing unit corresponding to the current slave, so as to continue processing based on the third synchronization content when the slave is switched to the master; the third heartbeat sending unit is used to send a third heartbeat signal to the fourth determination unit according to a predetermined sending frequency; the fourth determination unit is used to determine the current state of the master based on the third heartbeat signal, the current state including one of a normal state and an abnormal state, and when the master is in the abnormal state, switch the slave to a new master; the fourth active switching unit is used to send a host switching instruction to the fourth active switching unit when the current host self-test is abnormal; the fourth active switching unit is used to switch the current slave to a new master according to the received host switching instruction.
[0030] In a possible implementation, the system also includes a display device, and the third status query unit is used to send a slave status query instruction to the fourth status query unit according to a predetermined query frequency; the fourth status query unit is used to return a data packet indicating the working status of the slave to the third status query unit according to the slave status query instruction; the third status query unit is also used to determine a third flag bit according to the data packet, and send the third flag bit to the display device, the third flag bit is used to indicate the current status of the current slave; the display device is used to display the third flag bit to remind the user of the current status of the host and the slave, and the current status includes one of a normal state and an abnormal state.
[0031] In a possible implementation, the multiple isolation modules include multiple groups of input isolation modules, each group of input isolation modules includes a sixth isolation module and a seventh isolation module, each of the fifth GPIO units is connected between the corresponding sixth isolation module and the third processing unit, each of the sixth isolation modules is used to forward the received switch input signal to the connected fifth GPIO unit, each of the fifth GPIO units is used to forward the received switch input signal to the third processing unit, each of the sixth GPIO units is connected between the corresponding seventh isolation module and the fourth processing unit, each of the seventh isolation modules is used to forward the received switch input signal to the connected sixth GPIO unit, and each of the sixth GPIO units is used to forward the received switch input signal to the fourth processing unit, wherein the switch input signals received by the sixth isolation module and the seventh isolation module in the same group of input isolation modules are the same; or
[0032] The multiple isolation modules include multiple eighth isolation modules, and the master-slave redundancy device also includes a fourth logic judgment module. Each of the eighth isolation modules is connected to the corresponding fifth GPIO unit and sixth GPIO unit through the fourth logic judgment module. Each of the eighth isolation modules is used to forward the received switch input signal to the fourth logic judgment module. The fourth logic judgment module is used to forward the switch input signal to the fifth GPIO unit and sixth GPIO unit corresponding to the eighth isolation module. Each of the fifth GPIO units is also used to forward the received switch input signal to the third processing unit, and each of the sixth GPIO units is used to forward the received switch input signal to the fourth processing unit.
[0033] In a possible implementation, the master-slave redundancy device further includes a plurality of third current-voltage conversion modules, the plurality of analog-to-digital conversion modules are divided into a plurality of groups, each group of analog-to-digital conversion modules includes a fourth analog-to-digital conversion module and a fifth analog-to-digital conversion module, the fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding third current-voltage conversion module, each of the fifth SPI units is connected between the corresponding fourth analog-to-digital conversion module and the third processing unit, each of the sixth SPI units is connected between the corresponding fifth analog-to-digital conversion module and the fourth processing unit, and each of the third current-voltage conversion modules is used to convert the received current signal into a voltage signal. signal, and forward the voltage signal to the connected fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module, each of the fourth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected fifth SPI unit, each of the fifth SPI units is used to forward the received analog input signal to the third processing unit, each of the fifth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected sixth SPI unit, and each of the sixth SPI units is used to forward the received analog input signal to the fourth processing unit; or
[0034] The master-slave redundancy device further includes a fifth logic judgment module and a plurality of fourth current-voltage conversion modules, the plurality of analog-to-digital conversion modules include a plurality of sixth analog-to-digital conversion modules, each of the sixth analog-to-digital conversion modules is respectively connected to a corresponding fourth current-voltage conversion module, and each of the fourth current-voltage conversion modules is connected to the fifth logic judgment module.
[0035] Each of the fifth SPI units is connected between the fifth logic judgment module and the third processing unit, each of the sixth SPI units is connected between the fifth logic judgment module and the fourth processing unit, each of the fourth current-voltage conversion modules is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected sixth analog-to-digital conversion module, each of the sixth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the fifth logic judgment module, the fifth logic judgment module is used to forward the analog input signal to the corresponding fifth SPI unit and sixth SPI unit, each of the fifth SPI units is used to forward the received analog input signal to the third processing unit, and each of the sixth SPI units is used to forward the received analog input signal to the fourth processing unit.
[0036] In a possible implementation, the multiple isolation modules include multiple groups of output isolation modules, each group of output isolation modules includes a ninth isolation module and a tenth isolation module, the ninth isolation module and the tenth isolation module in the same group of output isolation modules are arranged in parallel, the third control module also includes a plurality of seventh GPIO units, the fourth control module also includes a plurality of eighth GPIO units, each of the seventh GPIO units is connected between the corresponding ninth isolation module and the third processing unit, each of the seventh GPIO units is used to forward the third switch output signal to the connected ninth isolation module, and each of the ninth isolation modules is used to output to the outside according to the third switch output signal and the current master-slave situation, each of the eighth GPIO units is connected between the corresponding tenth isolation module and the fourth processing unit, each of the eighth GPIO units is used to forward the fourth switch output signal to the connected tenth isolation module, and each of the tenth isolation modules is used to output to the outside according to the fourth switch output signal and the current master-slave situation; or
[0037] The multiple isolation modules include multiple eleventh isolation modules, and the master-slave redundancy device also includes a sixth logic judgment module. Each of the eleventh isolation modules is connected to the corresponding seventh GPIO unit and eighth GPIO unit through the sixth logic judgment module. Each of the seventh GPIO units is used to forward the third switch output signal to the sixth logic judgment module, and each of the eighth GPIO units is used to forward the fourth switch output signal to the sixth logic judgment module. The sixth logic judgment module is used to output to the outside according to the third switch output signal, the fourth switch output signal and the current master-slave situation; wherein the master-slave situation indicates whether the host is the third control module or the fourth control module.
[0038] In a possible implementation, the third control module further includes a plurality of third SPI units, the fourth control module further includes a plurality of fourth SPI units, the master-slave redundancy device further includes a seventh logic judgment module and a plurality of second digital-to-analog conversion modules, each of the second digital-to-analog conversion modules is connected to the seventh logic judgment module, each of the third SPI units is connected between the seventh logic judgment module and the third processing unit, each of the fourth SPI units is connected between the seventh logic judgment module and the fourth processing unit, each of the third SPI units is used to forward the third analog output signal to the seventh logic judgment module, each of the fourth SPI units is used to forward the fourth analog output signal to the seventh logic judgment module, the seventh logic judgment module is used to determine an output result according to the third analog output signal, the fourth analog output signal, and the current master-slave situation, and forward the output result to the corresponding second digital-to-analog conversion module, the second digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside; wherein, the master-slave situation indicates whether the host is the third control module or the fourth control module.
[0039] In a possible implementation, each of the communication input signals includes a serial input communication signal and an Ethernet input communication signal, the third communication output signal includes a third serial communication signal and a third Ethernet communication signal, the fourth communication output signal includes a fourth serial communication signal and a fourth Ethernet communication signal, the third control module also includes a plurality of third UART units and a plurality of third LAN units, the fourth control module also includes a plurality of fourth UART units and a plurality of fourth LAN units, the master-slave redundancy device also includes a plurality of level conversion modules and a plurality of PHY modules, each level conversion module includes a third level conversion module and a fourth level conversion module, each of the third UART units is connected between the corresponding third level conversion module and the third processing unit, each of the third level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding first signal and forward the first signal to the corresponding third UART unit, each of the third UART units is used to forward the received first signal to the third processing unit, each of the fourth UART units is connected between the corresponding fourth level conversion module and the fourth processing unit, and each of the fourth level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding first signal and forward the first signal to the corresponding third UART unit, The third UART unit is used to convert the received second signal to obtain the corresponding second signal and forward the second signal to the corresponding fourth UART unit, each of the fourth UART units is used to forward the received second signal to the fourth processing unit, each of the third UART units is also used to forward the third serial communication signal to the corresponding third level conversion module when the current host is the third control module and the current slave is the fourth control module, each of the third level conversion modules is also used to convert the received third serial communication signal to obtain the corresponding third signal and forward the third signal to the outside when the current host is the third control module and the current slave is the fourth control module, each of the fourth UART units is also used to forward the fourth serial communication signal to the corresponding fourth level conversion module when the current host is the fourth control module and the current slave is the third control module, each of the fourth level conversion modules is used to convert the received fourth serial communication signal to obtain the corresponding fourth signal and forward the fourth signal to the outside when the current host is the fourth control module and the current slave is the third control module, wherein the serial input communication signal received by the third level conversion module and the fourth level conversion module in the same group of level conversion modules is the same;Each group of PHY modules includes a third PHY module and a fourth PHY module, each of the third LAN units is connected between the corresponding third PHY module and the third processing unit, each of the third PHY modules is used to forward the received Ethernet input communication signal to the connected third LAN unit, each of the third LAN units is used to forward the received Ethernet input communication signal to the third processing unit, each of the fourth LAN units is connected between the corresponding fourth PHY module and the fourth processing unit, each of the fourth PHY modules is used to forward the received Ethernet input communication signal to the connected fourth LAN unit, each of the fourth LAN units is used to forward the received Ethernet input communication signal to the fourth processing unit, and each of the third LAN units is also used to forward the received Ethernet input communication signal to the fourth processing unit when the current host is the third When the current host is the fourth control module and the current slave is the fourth control module, the third Ethernet communication signal is forwarded to the corresponding third PHY module. Each of the third PHY modules is also used to forward the third Ethernet communication signal to the outside when the current host is the third control module and the current slave is the fourth control module. Each of the fourth LAN units is also used to forward the fourth Ethernet communication signal to the corresponding fourth PHY module when the current host is the fourth control module and the current slave is the third control module. Each of the fourth PHY modules is also used to forward the fourth Ethernet communication signal to the outside when the current host is the fourth control module and the current slave is the third control module. The third PHY module and the fourth PHY module in the same group of input PHY modules receive the same Ethernet input communication signal. ;
[0040] In a possible implementation, the master-slave redundancy device also includes a second dual-port RAM module, which is connected between the two control modules and used for data transmission between the two control modules; the third synchronization unit is further used to synchronize the third synchronization content to the fourth synchronization unit through the second dual-port RAM module when the current host is the third control module and the current slave is the fourth control module; the fourth synchronization unit is further used to synchronize the fourth synchronization content to the third synchronization unit through the second dual-port RAM module when the current host is the fourth control module and the current slave is the third control module.
[0041] In a possible implementation, the third control module further includes a third national secret unit, and the fourth control module further includes a fourth national secret unit. The third control module is used to send the fourth data to be transmitted to the third national secret unit before sending the fourth data to be transmitted via the third output communication interface; the third national secret unit is used to encrypt the fourth data to be transmitted based on the determined encryption method, so that the content sent out by the third control module via the third output communication interface is encrypted content; the third control module is also used to send the fifth data to be transmitted to the third national secret unit before receiving the fifth data to be transmitted via the third input communication interface; the third national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the third control module via the third input communication interface is decrypted content; wherein the third input communication interface and the third output communication interface are respectively from the third UART unit and the third LAN unit of the third control module, and the fourth data to be transmitted includes a third serial communication signal and a third Ethernet communication signal, the fifth data to be transmitted includes a serial input communication signal and an Ethernet input communication signal; the fourth control module is used to send the sixth data to be transmitted to the fourth national secret unit before sending the sixth data to be transmitted through the fourth output communication interface; the fourth national secret unit is used to encrypt the sixth data to be transmitted based on the determined encryption method, so that the content sent out by the fourth control module through the fourth output communication interface is encrypted content; the fourth control module is also used to send the fifth data to be transmitted to the fourth national secret unit before receiving the fifth data to be transmitted through the fourth input communication interface; the fourth national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the fourth control module through the fourth input communication interface is decrypted content; wherein the fourth input communication interface and the fourth output communication interface are respectively from the fourth UART unit and the fourth LAN unit of the fourth control module, and the sixth data to be transmitted includes a second serial communication signal and a second Ethernet communication signal.
[0042] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0044] Figures 1 to 23A schematic diagram of a redundant control system based on FPGA, RISC-V soft core processor and national secret soft core provided according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0045] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0046] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0047] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0048] In order to facilitate those skilled in the art to understand the technical solution provided by the embodiments of the present disclosure, the technical environment in which the technical solution is implemented is described below.
[0049] As the "nerve center" of nuclear reactors, the I&C system provides monitoring and control functions, and plays a vital role in the safe and stable operation of the entire facility. For nuclear power plants or small modular reactor facilities, due to their miniaturization, customization, modular layout and highly automated operation, higher requirements are placed on the high availability of non-safety-level I&C systems.
[0050] In order to solve the above technical problems, the present invention implements a software-defined on-chip reconfigurable redundant architecture based on FPGA technology, soft-core processors and IP soft cores of various functional modules. The software realizes virtualization from the architecture, system and application, and can perform function tailoring and architecture reconstruction according to the needs of SMR modular deployment, so as to realize the seamless and smooth upgrade and expansion of the SMR control system as a whole, and can effectively deal with risks such as module expansion, module failure, chip discontinuation and software operating system obsolescence. The embodiment of the present invention provides a redundant control system based on FPGA and RISC-V soft-core processor and national secret soft core, and deploys two control modules implemented by CPU soft core based on RISC-V instruction set, national secret unit and other IP soft core units on a single-chip FPGA. The composition of the control module can be configured by software, supporting encryption and decryption of data transmission, and the two control modules support peer-to-peer redundant control mode or master-slave redundant control mode. When using the peer-to-peer redundant control mode, the system includes a peer-to-peer redundant device implemented by an FPGA and provided with two control modules on the FPGA; when using the master-slave redundant control mode, the system includes a master-slave redundant device implemented by an FPGA and provided with two control modules on the FPGA. The redundant control system disclosed in the present invention deploys two control modules on a single-chip FPGA, and can implement redundant control using a peer-to-peer redundant control method or a master-slave redundant control method, thereby improving the reliability and fault tolerance of the system. The support of national security functions improves the information security of the system.
[0051] Figures 1 to 23 A schematic diagram of a redundant control system based on FPGA, RISC-V soft core processor and national secret soft core provided according to an embodiment of the present disclosure is shown. Figures 1 to 23 The redundant control system provided by the embodiment of the present disclosure is schematically illustrated.
[0052] When utilizing a peer-to-peer redundant control method, a redundant control system based on an FPGA, a RISC-V soft-core processor, and a national secret soft-core provided by an embodiment of the present disclosure includes a peer-to-peer redundant device, which is implemented by a field programmable gate array FPGA. The peer-to-peer redundant device includes a first control module, a second control module, a plurality of isolation modules, a plurality of analog-to-digital conversion modules, and a signal output selection circuit. The first control module includes a first processing unit, a plurality of first GPIO units, and a plurality of first SPI units. The plurality of first GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the first processing unit, and the plurality of first SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the first processing unit; the second control module includes a second processing unit, a plurality of second GPIO units, and a plurality of second SPI units. The plurality of second GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the second processing unit, and the plurality of second SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the second processing unit. ; Both the first processing unit and the second processing unit are implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the first processing unit and the second processing unit are the same, the signals to be processed include various switch input signals, various analog input signals, and various communication input signals, and the signals to be processed represent the operation and configuration of the nuclear reactor; the first processing unit is used to receive the signal to be processed, process the signal to be processed according to a predetermined processing rule to obtain a first result, the first result includes a first switch output signal, a first analog output signal, and a first communication output signal, and send the first result to a signal output selection circuit; the second processing unit is used to receive the signal to be processed, process the signal to be processed according to the processing rule to obtain a second result, the second result includes a second switch output signal, a second analog output signal, and a second communication output signal, and send the second result to the signal output selection circuit; the signal output selection circuit is used to determine a peer-to-peer redundant control result according to the first result and the second result, and the peer-to-peer redundant control result is used as a basis for determining the control action performed on the nuclear reactor. In this way, two control modules based on the RISC-V instruction set are deployed on a single-chip FPGA, and redundant control is achieved using a peer-to-peer redundant control method. This redundant design of two control modules on a system-on-chip can improve the reliability and fault tolerance of the system. That is, if one control module fails, the other control module can also perform tasks, thereby ensuring the normal operation of the system, improving the reliability and fault tolerance of the system, and being able to monitor the status of each control module and handle abnormal situations in a timely manner. It has high availability and high information security to support applications in the field of reactor safety, and by integrating the control modules into a single chip, the overall size, weight and power consumption of the system can be reduced while improving system performance.
[0053] like Figure 1 As shown, the redundant control system 100 may include a peer redundant device 110. In some embodiments, the redundant control system 100 may be provided with a plurality of peer redundant devices 110 as required.
[0054] The peer-to-peer redundant device 110 is implemented by a field programmable gate array FPGA, the scope of which is the system on chip (SoC) where the peer-to-peer redundant device 110 is located, and other devices (such as the isolation module and the digital-to-analog conversion module described later) are expanded on the SoC where the peer-to-peer redundant device 110 is located to form a board where the peer-to-peer redundant device 110 is located. The redundant control system 100 includes a board where the peer-to-peer redundant device 110 is located.
[0055] The peer-to-peer redundant device 110 is achieved by simultaneously deploying two RISC-V architecture-based soft-core processors (i.e. Figure 2 In this way, two RISC-V CPU Cores are deployed on an FPGA at the same time to realize the redundant control function through logical operations of two processors on a chip, which can improve the reliability and fault tolerance of the system. If one processor fails, the other processor can also perform tasks, thereby reducing the probability of common cause failures at the CPU Core level and ensuring the normal operation of the system. Among them, the two CPU Cores RISC-V CPU Core-1 and RISC-V CPU Core-2 can adopt exactly the same structure, or different CPU Cores can be used to support heterogeneity. It should be noted that the heterogeneity here is only for CPU Core. In order to simplify the design, the other intellectual property (Intellectual Property, IP) core modules are the same. Regardless of whether the two RISC-V CPU Cores are the same in structure, their respective work contents are the same, and the structure of RISC-V CPUCore can be selected according to actual needs. The embodiment of the present disclosure does not limit this.
[0056] The peer-to-peer redundant device 110 includes a first control module, a second control module, a signal output selection circuit, a plurality of isolation modules, and a plurality of analog-to-digital conversion modules. The first control module includes a first processing unit for task processing. The second control module includes a second processing unit for task processing. The first processing unit in the first control module and the second processing unit in the second control module are both implemented on the FPGA based on a preset RISC-V instruction set, that is, the first processing unit is RISC-V CPU Core-1 and the second processing unit is RISC-V CPU Core-2. The peer-to-peer redundant device 110 provided in the embodiment of the present disclosure performs redundant control using a peer-to-peer redundant method. In other words, in a peer-to-peer redundant method, RISC-V CPU Core-1 and RISC-V CPU Core-2 are completely equal, that is, the first processing unit and the second processing unit are completely equal, and data reception, data calculation, and data output are performed synchronously. The peer-to-peer redundant method is suitable for nuclear power application scenarios in which only a single task is executed on CPU Core-1 and CPU Core-2, that is, the peer-to-peer redundant device 110 starts to cyclically execute the tasks that are solidified in advance, that is, stored on the board, after power-on. In this way, the first control module implements task processing through RISC-V CPU Core-1, i.e., the first processing unit, and the second control module implements the same task processing through RISC-V CPU Core-2, i.e., the second processing unit. The task processing process includes receiving a signal to be processed sent by an external device and processing a predetermined task according to a predetermined processing rule to obtain a result. In this way, two control modules (i.e., the first control module and the second control module) implemented based on RISC-V CPU soft core are deployed on an FPGA at the same time to implement redundant control functions through the two control modules, which can improve the reliability and fault tolerance of the system. If one control module fails, the other control module can also perform tasks to ensure the normal operation of the system.
[0057] The peer-to-peer redundant device 110 receives the signals to be processed sent by the external device through two control modules respectively, independently processes the predetermined tasks according to the predetermined processing rules, and can output the peer-to-peer redundant results using the signal output selection circuit. The first processing unit in the first control module can be used to receive the input signal to be processed, process the signal to be processed according to the predetermined processing rules to obtain the first result, the first result includes the first switch output signal, the first analog output signal, and the first communication output signal, and send the first result to the signal output selection circuit. The second processing unit in the second control module can be used to receive the signal to be processed, process the signal to be processed according to the processing rules to obtain the second result, the second result includes the second switch output signal, the second analog output signal, and the second communication output signal, and send the second result to the signal output selection circuit. The signal output selection circuit can be used to determine the final peer-to-peer redundant control result according to the first result sent by the first control module and the second result sent by the second control module according to the predetermined selection rules. The peer-to-peer redundant control result can be used as a basis for determining the control action performed on the nuclear reactor. The specific implementation method of the signal output selection circuit can be detailed in the DO signal output method and the AO signal output method in the following text, which will not be specifically expanded here. The signal output selection circuit is connected to an external device, and the external device can take corresponding control actions on the nuclear reactor according to the peer redundancy result sent by the signal output selection circuit. Among them, the processing rules and control actions can be determined according to the external device and the predetermined tasks and other contents related to the actual application scenario. The embodiment of the present disclosure does not limit this. The user can flexibly set the tasks processed by the peer redundancy device 110 and the external device connected to the signal output selection circuit according to actual needs.
[0058] The first processing unit and the second processing unit can receive the signal to be processed at the same time. The signal to be processed can indicate the operation and configuration of the nuclear reactor. The specific content indicated by the signal to be processed can also be determined according to the tasks and external devices processed by the peer-to-peer redundant device 110 and other contents related to the actual application scenario, and the embodiments of the present disclosure are not limited to this. The signal to be processed can come from an external device used to detect and configure the operation of the nuclear reactor, such as a temperature sensor for detecting temperature, a display console for issuing control instructions and configuration. The signal to be processed may include a switch input signal (DI signal), an analog input signal (AI signal) such as a 4-20mA current signal, and a communication input signal. The user can select a suitable signal access method for the signal to be processed according to the actual application scenario. The first processing unit and the second processing unit can collect the signal to be processed at the same time, and the signals to be processed received by the first processing unit and the second processing unit are the same.
[0059] The first control module includes a plurality of first general-purpose input / output (GPIO) units and a plurality of first serial peripheral interface (SPI) units, wherein the plurality of first GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the first processing unit, and the plurality of first SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the first processing unit. The second control module includes a plurality of second GPIO units and a plurality of second SPI units, wherein the plurality of second GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the second processing unit, and the plurality of second SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the second processing unit.
[0060] The present disclosure provides two DI signal access methods: Figure 3 , Figure 4 The DI signal access method shown in the figure is as follows. Figure 3 , Figure 4 Only the implementation of accessing one DI signal in the peer redundant device 110 is schematically shown. The implementation of accessing multiple DI signals can refer to Figure 3 , Figure 4 And related text descriptions for setting.
[0061] In a possible implementation, the plurality of isolation modules include a plurality of groups of input isolation modules, each group of input isolation modules includes: Figure 3 A first isolation module and a second isolation module are shown, each first GPIO unit is connected between the corresponding first isolation module and the first processing unit, each first isolation module is used to forward the received switch input signal to the connected first GPIO unit, each first GPIO unit is used to forward the received switch input signal to the first processing unit, each second GPIO unit is connected between the corresponding second isolation module and the second processing unit, each second isolation module is used to forward the received switch input signal to the connected second GPIO unit, each second GPIO unit is used to forward the received switch input signal to the second processing unit, wherein the switch input signals received by the first isolation module and the second isolation module in the same group of input isolation modules are the same. Each first GPIO unit is arranged in the SoC where the peer redundant device 110 is located, and each first isolation module and each second isolation module are arranged outside the SoC where the peer redundant device 110 is located but located on the board where the peer redundant device 110 is located.
[0062] by Figure 3 The DI signal method provided by the embodiment of the present disclosure is described as an example. Figure 3The range indicated by the double-dotted line is the range of the board where the peer redundant device 110 is located. Figure 3 The range indicated by the dotted line is the range of the SoC where the peer-to-peer redundant device 110 is located. On the board where the peer-to-peer redundant device 110 is located, a dual redundant acquisition circuit can be set for each DI signal, that is, Figure 3 As shown, two first isolation modules located on the board where the redundant control system 100 is located are respectively set for each DI signal, and the first GPIO unit in the first control module is externally connected to one of the first isolation modules, and the second GPIO unit in the second control module is externally connected to a second isolation module. The first isolation module queries the external signal state, that is, queries whether the switch input signal is on or off. The query result is collected by the first GPIO unit of the first control module, and the second isolation module is the same. Among them, the query results of the first isolation module and the second isolation module are the same. In this way, the isolation between the internal electrical signals of each control module and the external electrical signals can be achieved through the first isolation module and the second isolation module. This isolation design can effectively prevent the electromagnetic interference or other noise signals in the external equipment that detects the operation of the nuclear reactor from affecting the internal signal processing process of the control module, thereby improving the stability and accuracy of the signal.
[0063] In one possible implementation, Figure 4 As shown, the multiple isolation modules include multiple third isolation modules, the peer-to-peer redundant device also includes a first logic judgment module, each third isolation module is connected to the corresponding first GPIO unit and second GPIO unit through the first logic judgment module, each third isolation module is used to forward the received switch input signal to the first logic judgment module, the first logic judgment module is used to forward the switch input signal to the first GPIO unit and the second GPIO unit corresponding to the third isolation module, each first GPIO unit is also used to forward the received switch input signal to the first processing unit, each second GPIO unit is used to forward the received switch input signal to the second processing unit, and each target control module is a first control module or a second control module. Each first GPIO unit and the first logic judgment module are both arranged in the SoC where the peer-to-peer redundant device 110 is located, and the first isolation module is arranged outside the SoC where the peer-to-peer redundant device 110 is located but located on the board where the peer-to-peer redundant device 110 is located.
[0064] by Figure 4 The second access method of the DI signal provided in the embodiment of the present disclosure is described as an example. Figure 4 The range indicated by the double-dotted line is the range of the board where the peer redundant device 110 is located. Figure 4 The range indicated by the dotted line is the range of the SoC where the peer-to-peer redundant device 110 is located. On the board where the peer-to-peer redundant device 110 is located, one acquisition circuit can be set for each DI signal, that is, Figure 4As shown, the first GPIO unit in the first control module and the second GPIO unit in the second control module are not directly connected to the third isolation module, but are connected to the first logic judgment module set on the SoC where the peer redundant device 110 is located, and a third isolation module is set for one DI signal on the board where the redundant control system 100 is located, and the third isolation module is connected to the first logic judgment module. The third isolation module queries the external signal state, that is, queries whether the switch input signal is on or off, and sends the query result to the first logic judgment module. The first logic judgment module receives the query result (that is, the DI signal) transmitted by the third isolation module, and transmits the DI signal transmitted by the third isolation module to the second GPIO unit of the first control module and the second control module at the same time.
[0065] In this way, by opening up a special VHDL logic judgment area on the FPGA to form a first logic judgment module, and through a third isolation module, the internal electrical signals of each control module can be isolated from the external electrical signals. This isolation design can effectively prevent the electromagnetic interference or other noise signals in the external equipment that detects the operation of the nuclear reactor from affecting the internal signal processing process of the control module, thereby improving the stability and accuracy of the signal. Compared with the first DI signal access method, this access method can save one hardware and is conducive to the miniaturization of the board.
[0066] The present disclosure provides two AI signal access methods: Figures 5 and 6 The AI signal access method is shown in Figure 2. Figure 5 , Figure 6 Only the implementation of one AI signal access in the peer-to-peer redundant device 110 is schematically shown. The implementation of multiple AI signal access can refer to Figure 5 , Figure 6 And related text descriptions for setting.
[0067] In a possible implementation, the peer-to-peer redundant device 110 further includes a plurality of first current-voltage conversion modules, the plurality of analog-to-digital conversion modules are divided into a plurality of groups, and each group of analog-to-digital conversion modules includes: Figure 5 A first analog-to-digital conversion module and a second analog-to-digital conversion module are shown, the first analog-to-digital conversion module and the second analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding same first current-to-voltage conversion module, each first SPI unit is connected between the corresponding first analog-to-digital conversion module and the first processing unit, each second SPI unit is connected between the corresponding second analog-to-digital conversion module and the second processing unit, each first current-to-voltage conversion module is used to convert a received current signal into a voltage signal, and forward the voltage signal to the connected first analog-to-digital conversion module and the second analog-to-digital conversion module,
[0068] Each first analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected first SPI unit, each first SPI unit is used to forward the received analog input signal to the first processing unit, each second analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected second SPI unit, each second SPI unit is used to forward the received analog input signal to the second processing unit. Each first SPI unit is arranged in the SoC where the peer-to-peer redundant device 110 is located, and each first analog-to-digital conversion module and the first conversion module are arranged outside the SoC where the peer-to-peer redundant device 110 is located but on the board where the peer-to-peer redundant device 110 is located.
[0069] by Figure 5 The first access method of the AI signal provided by the embodiment of the present disclosure is described as an example. Figure 5 The range indicated by the double-dotted line is the range of the board where the peer redundant device 110 is located. Figure 5 The range indicated by the dotted line is the range of the SoC where the peer-to-peer redundant device 110 is located. On the board where the peer-to-peer redundant device 110 is located, a dual-channel acquisition circuit can be set for each AI signal, that is, Figure 5 As shown, a first analog-to-digital conversion module and a second analog-to-digital conversion module located on the board where the redundant control system 100 is located are respectively set for each AI signal, the first SPI unit in the first control module is externally connected to the first analog-to-digital conversion module, the second SPI unit in the second control module is externally connected to the second analog-to-digital conversion module, and the first analog-to-digital conversion module and the second analog-to-digital conversion module are respectively connected to the first conversion module. In addition, if the AI signal input by the external device is a voltage signal (such as a voltage signal of 0 to 10mV), it does not need to be converted by the first current-to-voltage conversion module. In order to support different types of analog input signals, it can also be set Figure 5 The bypass configuration circuit shown is configured to support settings for different application requirements. The bypass configuration circuits in the remaining figures are similar and will not be described in detail below.
[0070] In this way, fast and efficient transmission of digital signals can be achieved. This design reduces delays and losses in the signal transmission process, improves the real-time and accuracy of signal processing, and at the same time, the integrated design simplifies the wiring structure of the system, reducing manufacturing costs and maintenance difficulties.
[0071] In one possible implementation, Figure 6As shown, the peer-to-peer redundant device 110 may also include a second logic judgment module and a plurality of second current-voltage conversion modules, the plurality of analog-to-digital conversion modules include a plurality of third analog-to-digital conversion modules, each third analog-to-digital conversion module is respectively connected to the corresponding second current-voltage conversion module, each second current-voltage conversion module is connected to the second logic judgment module, each first SPI unit is connected between the second logic judgment module and the first processing unit, each second SPI unit is connected between the second logic judgment module and the second processing unit, each second current-voltage conversion module is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected third analog-to-digital conversion module, each third analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the second logic judgment module, the second logic judgment module is used to forward the analog input signal to the corresponding first SPI unit and second SPI unit, each first SPI unit is used to forward the received analog input signal to the first processing unit, and each second SPI unit is used to forward the received analog input signal to the second processing unit. Each first SPI unit and the second logic judgment module are arranged in the SoC where the peer redundant device 110 is located, and the third analog-to-digital conversion module and the second current-voltage conversion module are arranged outside the SoC where the peer redundant device 110 is located but on the board where the peer redundant device 110 is located.
[0072] by Figure 6 The second access method of the AI signal provided by the embodiment of the present disclosure is described as an example. Figure 6 The range indicated by the double-dotted line is the range of the board where the peer redundant device 110 is located. Figure 6 The range indicated by the dotted line is the range of the SoC where the peer-to-peer redundant device 110 is located. On the board where the peer-to-peer redundant device 110 is located, one acquisition circuit can be set for each AI signal, that is, Figure 6 As shown, the second logic judgment module provided on the SoC where the peer-to-peer redundant device 110 is located may include a first SPI sending unit, a second SPI sending unit and a first SPI receiving unit, the first SPI unit in the first control module is connected to the first SPI sending unit in the second logic judgment module, the first SPI unit in the second control module is connected to the second SPI sending unit in the second logic judgment module, the first SPI receiving unit in the second logic judgment module is connected to the third analog-to-digital conversion module provided on the board where the peer-to-peer redundant device 110 is located, and the third analog-to-digital conversion module is connected to the second current-to-voltage conversion module.
[0073] In this way, by opening up a special VHDL logic judgment area on the FPGA to form a second logic judgment module, and combining the SPI unit, analog-to-digital conversion module and current-voltage conversion module, the fast and efficient transmission of digital signals can be achieved. This design reduces the delay and loss in the signal transmission process, improves the real-time and accuracy of signal processing, and at the same time, the integrated design simplifies the wiring structure of the system, reduces manufacturing costs and maintenance difficulties. Compared with the first AI signal access method, this access method can save a hardware channel, which is conducive to the miniaturization of the board.
[0074] In the peer-to-peer redundant device 110, the first control module and the second control module form a peer-to-peer redundant control. In this way, if one control module fails, the output of the other control module can be used as the peer-to-peer redundant control result. The peer-to-peer redundant control can improve the reliability and fault tolerance of the system and ensure the normal operation of the system.
[0075] The signal output selection circuit is used to determine the peer-to-peer redundant control result according to the first result and the second result. The specific composition of the peer-to-peer redundant control result can be determined according to the actual application scenario, and the user can set a suitable signal output mode according to the peer-to-peer redundant control result actually output, that is, the signal output selection circuit can select a suitable composition according to the composition of the peer-to-peer redundant control result and the actual application scenario.
[0076] The embodiment of the present disclosure provides two DO signal output modes for the peer-to-peer redundant device 110. Figures 7 and 8 The DO signal output mode is shown in Figure 1. Figure 7 , Figure 8 Only the implementation of accessing one DO signal in the peer-to-peer redundant device 110 is schematically shown. The implementation of accessing multiple DO signals can refer to Figure 7 , Figure 8 And related text descriptions for setting.
[0077] The plurality of isolation modules include a plurality of groups of output isolation modules, each group of output isolation modules includes a fourth isolation module and a fifth isolation module, and the fourth isolation module and the fifth isolation module in the same group of output isolation modules adopt the following method: Figure 7 The parallel connection shown or Figure 8In the series arrangement shown, the first control module also includes multiple third GPIO units, and the second control module also includes multiple fourth GPIO units, each third GPIO unit is connected between the corresponding fourth isolation module and the first processing unit, each third GPIO unit is used to forward the first switch output signal to the connected fourth isolation module, and each fourth isolation module is used to forward the received first switch output signal to the outside, each fourth GPIO unit is connected between the corresponding fifth isolation module and the second processing unit, each fourth GPIO unit is used to forward the second switch output signal to the connected fifth isolation module, and each fifth isolation module is used to forward the received second switch output signal to the outside, such as an external device for controlling the operation of a nuclear reactor. Figure 7 The connection relationship and position setting method of each module / unit in the Figure 3 For the sake of brevity, this article will not go into details. Figure 8 The same is true.
[0078] like Figure 7 As shown, the fourth isolation module and the fifth isolation module in the same group of output isolation modules are arranged in parallel. The switches (or contacts) on the fourth isolation module and the fifth isolation module are connected in parallel to form a DO signal and then connected to the external device. The external device receives the "or" logic of the DO signal output by the first control module and the second control module. In other words, as long as one control module outputs a DO signal indicating "take action", the external device will take action. This solution can be applied to occasions that are more sensitive to refusal to act. Refusal to act usually refers to the failure of the relevant equipment to perform the corresponding action according to the command when the system fails or needs to perform a certain action. In this way, by setting the fourth isolation module and the fifth isolation module in parallel, the external device can take corresponding actions in time to reduce the risk of system failure, so as to be better applied to occasions that are more sensitive to refusal to act.
[0079] like Figure 8 As shown, the fourth isolation module and the fifth isolation module in the same group of output isolation modules are arranged in series. The switches (or contacts) on the fourth isolation module and the fifth isolation module are connected in series to form a DO signal and then connected to the external device. The external device receives the "AND" logic of the DO signal output by the first control module and the second control module. In other words, only when both control modules output a DO signal indicating "take action", the external device will take action. This solution can be applied to occasions that are more sensitive to false actions. False actions usually refer to the situation where the relevant equipment mistakenly issues a fault alarm or performs a protection action when the system is operating normally or no fault occurs. In this way, by setting the fourth isolation module and the fifth isolation module in series, the probability of false actions of external devices can be reduced, avoiding unnecessary problems, so as to be better applied to occasions that are more sensitive to false actions.
[0080] The embodiment of the present disclosure also provides an AO signal output method for the peer-to-peer redundant device 110. Fig. 9 As shown, the first control module also includes a plurality of third SPI units, the second control module also includes a plurality of fourth SPI units, the peer-to-peer redundant device also includes a third logic judgment module and a plurality of first digital-to-analog conversion modules, each first digital-to-analog conversion module is connected to the third logic judgment module, each third SPI unit is connected between the third logic judgment module and the first processing unit, each fourth SPI unit is connected between the third logic judgment module and the second processing unit, each third SPI unit is used to forward the first analog output signal to the third logic judgment module, each fourth SPI unit is used to forward the second analog output signal to the third logic judgment module, the third logic judgment module is used to determine the output result based on the first analog output signal and the second analog output signal according to a predetermined output condition, and forward the output result to the corresponding first digital-to-analog conversion module, the first digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside, such as an external device for controlling the operation of a nuclear reactor.
[0081] Fig. 9 The connection relationship and position setting method of each module / unit in the Figure 6 For the sake of brevity, we will not go into details here. Fig. 9 Take the example to illustrate the AO signal output method. A special VHDL logic judgment area can be set on the FPGA to form a third logic judgment module. The third logic judgment module implements the SPI receiving function through two SPI receiving units (i.e., the third SPI receiving unit and the fourth SPI receiving unit) to respectively receive the data values of the analog quantity of the first control module and the second control module, and implements the SPI sending function through the second SPI sending unit to send the set value after logical judgment to the first digital-to-analog conversion module. The first digital-to-analog conversion module is used to realize the conversion of the set value to the analog quantity (generally 4-20mA current), so as to output the analog quantity (i.e., AO signal) to the external device. Among them, the content of the logic judgment of the third logic judgment module may include comparing the data values of the analog quantity of the first control module and the second control module, and the output can be performed according to the following comparison rules: 1) take the larger value of the data value of the first control module and the second control module for output; 2) take the lower value of the data value of the first control module and the second control module for output; 3) take the relatively safe data value required by the application for output; 4) lock the current channel and keep the current output unchanged. The specific output strategy is set according to the specific application requirements, and the embodiment of the present disclosure does not limit this.
[0082] The first control module and the second control module of the peer redundant device 110 can also monitor the operating status of each other's CPU according to a predetermined judgment rule. The predetermined judgment rule can be to determine whether the received heartbeat signal has timed out, in other words, whether the heartbeat signal is received within a specified time. The specific judgment rule can be determined according to the actual application scenario, and the embodiment of the present disclosure does not limit this.
[0083] In order to monitor the operating status of each other's CPU, the first control module and the second control module are also provided with multiple functional units running on the CPU Core, such as Fig.10 As shown, the first control module may also include a first heartbeat sending unit and a first determination unit running on RISC-V CPU Core-1, and the second control module may also include a second heartbeat sending unit and a second determination unit running on RISC-V CPU Core-2. The system also includes a display device, which may be arranged outside the system on chip, for example, at a display console, so that the user can handle abnormal situations in time. The first heartbeat sending unit may be used to send a first heartbeat signal to the second determination unit at a predetermined frequency. The second determination unit may be used to determine a first flag bit based on the first heartbeat signal, and send the first flag bit to the display device. The first flag bit is used to indicate the current state of the first control module. The second heartbeat sending unit may be used to send a second heartbeat signal to the first determination unit at a predetermined frequency. The first determination unit may be used to determine a second flag bit based on the second heartbeat signal, and send the second flag bit to the display device, and the second flag bit is used to indicate the current state of the second control module. The display device may be used to display the first flag bit and the second flag bit to remind the user of the current state of the first control module and the second control module, and the current state includes one of a normal state and an abnormal state. In this way, if the first control module or the second control module is in an abnormal state, the user can promptly know the abnormal state through the first flag bit or the second flag bit displayed on the display device, so as to promptly troubleshoot the fault.
[0084] The peer-to-peer redundant device 110 may further include a first dual-port RAM module. The first dual-port RAM module is connected between the first control module and the second control module. The first dual-port RAM module may be used for data transmission between the first control module and the second control module. The first dual-port RAM module may be partitioned to store different contents.
[0085] like Fig.10 As shown, the first control module may further include a first synchronization unit running on RISC-V CPU Core-1, and the second control module may further include a second synchronization unit running on RISC-V CPU Core-2. The process of the first processing unit and the second processing unit processing the signal to be processed includes a plurality of predetermined processing stages, namely Fig.11 Multiple execution points in the process can be divided into processing stages according to pre-stored tasks.
[0086] The first synchronization unit can be used to synchronize the first synchronization content to the second synchronization unit through the first dual-port RAM module. The first synchronization content includes the processing stage that the first processing unit is currently in. The second synchronization unit can be used to forward the received first synchronization content to the second processing unit, so that the second processing unit adjusts its own processing stage based on the first synchronization content. For example, when the heartbeat signals on both sides are normal, the first synchronization unit sends the first synchronization content including the execution point information of the first processing unit to the second synchronization unit, and by comparing the execution point information of the first processing unit in the first synchronization content with the execution point information of the second processing unit, when the execution point of the opposite side is later than its own execution point (that is, the second processing unit executes the task slower than the first processing unit), assuming that Fig.11 As shown, at this time, the first processing unit is at execution point 3 and the second processing unit is at execution point 2. The first processing unit needs to wait until the execution point on the other side is the same as or faster than its own execution point before continuing to execute the current task. That is, the first processing unit needs to wait for the second processing unit and the second processing unit continues to execute. Fig.11 The first processing unit and the second processing unit are both located at execution point 1, that is, the tasks are synchronized at this time, and the first processing unit and the second processing unit can both continue to execute. Among them, the comparison of the execution point information on both sides can be performed by the first synchronization unit or the first processing unit or other units, and the embodiment of the present disclosure does not limit this.
[0087] The second synchronization unit can also be used to synchronize the second synchronization content to the first synchronization unit through the first dual-port RAM module, and the second synchronization content includes the processing stage currently in which the second processing unit is located. The first synchronization unit can also be used to forward the received second synchronization content to the first processing unit, so that the first processing unit adjusts its own processing stage based on the second synchronization content. The adjustment process is the same as that of the first processing unit in the above example, and will not be repeated here.
[0088] In order to support sending the running status of CPU Core-1 to CPU Core-2 so that CPU Core-2 can master the working status of CPU Core-1, the first heartbeat sending unit running on CPU Core-1 is used to continuously send heartbeat signals to CPU Core-2. The second determination unit receives the heartbeat signal on the CPU Core-2 side and determines whether it has timed out. If the heartbeat signal from CPU Core-1 times out, CPU Core-2 will set the corresponding first flag bit, and the first flag bit can be transmitted to the display device via an external communication channel (see below for details). In the case of a timeout of the heartbeat signal of CPU Core-1, CPU Core-2 itself sequentially executes a plurality of predetermined execution points, and the device degenerates to a single processor execution mode. The first synchronization unit running on CPU Core-1 is used to send the data to be synchronized, i.e., the first synchronization content, and send it to CPU Core-2 via the first dual-port RAM module. The second synchronization unit running on CPU Core-2 receives the first synchronization content sent by CPU Core-1 to support CPU Core-2 to master the running status of CPU Core-1 as a whole. In order to support sending the running status of CPU Core-2 to CPU Core-1 so that CPU Core-1 can master the working status of CPU Core-2, a corresponding module design is performed, that is, a first determination unit and a first synchronization unit are set to run on CPU Core-1, and a second heartbeat sending unit and a second synchronization unit are set to run on CPU Core-2. Their functions are similar to sending the heartbeat signal of CPU Core-1 and the data to be synchronized to CPU Core-2, and will not be repeated. In this way, the status of each control module can be monitored and abnormal situations can be handled in a timely manner.
[0089] Since the interaction frequency of the heartbeat signal is higher than the frequency of data synchronization, and the data space required by the two is different, the first dual-port RAM module can be differentiated according to function, such as Fig.10 As shown, it is divided into a heartbeat signal area (DRAM-1 and DRAM-3) and a synchronization data area (DRAM-2 and DRAM-4). The heartbeat signal is sent to the opposite side in the form of a byte length containing a real-time accumulated sequence number. Each time data synchronization is performed, all data to be synchronized must be updated. The specific content of the data to be synchronized can be set according to the actual task requirements, and the embodiments of the present disclosure do not limit this. It should be noted that the sending frequency of the heartbeat signal and the synchronization data is set according to the requirements of the specific application scenario so that it can be executed multiple times within a task cycle.
[0090] The present disclosure provides two communication methods, such as Fig.12The serial communication and Ethernet communication shown. Each communication input signal includes a serial input communication signal and an Ethernet input communication signal, the first communication output signal includes a first serial communication signal and a first Ethernet communication signal, and the second communication output signal includes a second serial communication signal and a second Ethernet communication signal. Fig.12 As shown, the first control module also includes a plurality of first Universal Asynchronous Receiver / Transmitter (UART) units and a plurality of first Local Area Network (LAN) units, the second control module also includes a plurality of second UART units and a plurality of second LAN units, the peer-to-peer redundant device also includes a plurality of groups of level conversion modules and a plurality of groups of physical layer (PHY) modules, each group of level conversion modules includes a first level conversion module and a second level conversion module, each group of input PHY modules includes a first PHY module and a second PHY module, wherein the serial input communication signals received by the first level conversion module and the second level conversion module in the same group of input level conversion modules are the same, and the Ethernet input communication signals received by the first PHY module and the second PHY module in the same group of input PHY modules are the same.
[0091] Each first UART unit is connected between the corresponding first level conversion module and the first processing unit, each first level conversion module is used to perform level conversion on the received serial input communication signal to obtain the corresponding first signal and forward the first signal to the corresponding first UART unit, each first UART unit is used to forward the received first signal to the first processing unit, each second UART unit is connected between the corresponding second level conversion module and the second processing unit, each second level conversion module is used to perform level conversion on the received serial input communication signal to obtain the corresponding second signal and forward the second signal to the corresponding second UART unit, each second UART unit is used to forward the received second signal to the second processing unit, thereby realizing the use of serial communication to receive externally input serial input communication signals.
[0092] Each first UART unit is also used to forward the first serial communication signal to the corresponding first level conversion module, and each first level conversion module is also used to perform level conversion on the received first serial communication signal to obtain a corresponding third signal and forward the third signal to the outside. Each second UART unit is used to forward the second serial communication signal to the corresponding second level conversion module, and each second level conversion module is used to perform level conversion on the received second serial communication signal to obtain a corresponding fourth signal and forward the fourth signal to the outside, thereby realizing the first communication output signal sent to the outside using serial communication.
[0093] Each first LAN unit is connected between the corresponding first PHY module and the first processing unit, each first PHY module is used to forward the received Ethernet input communication signal to the connected first LAN unit, each first LAN unit is used to forward the received Ethernet input communication signal to the first processing unit, each second LAN unit is connected between the corresponding second PHY module and the second processing unit, each second PHY module is used to forward the received Ethernet input communication signal to the connected second LAN unit, and each second LAN unit is used to forward the received Ethernet input communication signal to the second processing unit, thereby realizing the use of Ethernet communication to receive externally input Ethernet input communication signals.
[0094] Each first LAN unit is also used to forward the first Ethernet communication signal to the corresponding first PHY module, and each first PHY module is also used to forward the first Ethernet communication signal to the outside. Each second LAN unit is also used to forward the second Ethernet communication signal to the corresponding second PHY module, and each second PHY module is also used to forward the second Ethernet communication signal to the outside, thereby realizing the use of Ethernet communication to receive the second communication output signal of external input.
[0095] The peer-to-peer redundant device 110 can communicate with a downstream device in the form of serial communication, such as a small device set up outside. The external device is generally a standard level, and the first level conversion module can be used to convert the standard level (i.e., the serial input communication signal) into a TTL level signal (i.e., the first signal) so that the external device and the peer-to-peer redundant device 110 can communicate normally. The first level conversion module can use a serial signal level conversion chip to achieve the conversion of the TTL level to the RS-232 standard serial port or RS-422 / 485 type electrical characteristics. The second level conversion module is similar to the first level conversion module and will not be described in detail herein. The peer-to-peer redundant device 110 can also communicate with an upstream device, such as a display console, in the form of a local area network such as Ethernet.
[0096] In some embodiments, the external devices are connected to the peer redundant device 110 via dual redundant communication links. Fig.12 As shown, Fig.12 The range indicated by the double-dotted line is the range of the board where the peer redundant device 110 is located. Fig.12 The range indicated by the middle dotted line is the range of the SoC where the peer redundant device 110 is located. Fig.12The setting of the communication channel used by the peer redundant device 110 to communicate with the external device is shown, wherein the communication channel may include a communication channel for serial communication and a communication channel for local area network communication, and the data transmitted through the communication channel is a communication input signal and a communication output signal (a first communication output signal and a second communication output signal), and the communication channel can realize bidirectional transmission, that is, the peer redundant device transmits data to the external device and the external device transmits data to the peer redundant device. For the form of serial communication, the first control module and the second control module support the external device to be connected in a peer-to-peer manner via dual redundant serial communication, and are used to expand the FLASH, AD and DA chips that support UART and SPI interfaces and support direct connection with external devices. For the communication form of Ethernet, the LAN unit located in the SoC where the peer redundant device 110 is located realizes the MAC function of Ethernet, and the PHY module located outside the SoC where the peer redundant device 110 is located but on the board where the peer redundant device 110 is located realizes the complete Ethernet function, such as Fig.12 As shown, the first PHY module corresponding to the first control module can communicate with the external device through Ethernet LAN2, and the second PHY module corresponding to the second control module can communicate with the external device through Ethernet LAN1, based on which the external device is supported to be connected to the first control module and the second control module in a dual redundant Ethernet manner.
[0097] In some embodiments, the communication process between the peer redundant device 110 and the external device may also include: the peer redundant device 110 sends the status of the first control module and the second control module that require real-time maintenance to a display device outside the peer redundant device 110. The communication process can be implemented through serial communication or Ethernet, which is not limited by the embodiments of the present disclosure. Table 1 shows the status of the peer redundant device that requires real-time maintenance and the setting method of each status. The communication data of the peer redundant device 110 may include the status of the real-time maintenance required in Table 1. The synchronization module in Table 1 is the synchronization unit included in the corresponding control module (for example, if the control module is the first control module, the synchronization module is the first synchronization unit). The communication link of the serial communication and the communication link of the Ethernet communication can be seen in Fig.12 .
[0098] Table 1 The states required for real-time maintenance of peer-to-peer redundant devices and the setting methods of each state
[0099]
[0100] During the operation of the peer-to-peer redundant device 110, if data abnormality occurs on one side, i.e., one of the control modules, the data on the other side is used to make up for the data. The data here may include communication data, DI signal, and AI signal. For example, when the communication on one side is interrupted, the data synchronized from the other side is used to make up for the data. When the data quality is abnormal, a predetermined processing strategy is used to select appropriate data, which is not limited in the embodiments of the present disclosure.
[0101] The peer-to-peer redundant device 110 also includes a national secret unit corresponding to each control module. The first control module also includes a first national secret unit, and the second control module also includes a second national secret unit. The first control module is used to send the first data to be transmitted to the first national secret unit before sending the first data to be transmitted via the first output communication interface; the first national secret unit is used to encrypt the first data to be transmitted based on the determined encryption method, so that the content sent out by the first control module via the first output communication interface is encrypted content; the first control module is also used to send the second data to be transmitted to the first national secret unit before receiving the second data to be transmitted via the first input communication interface; the first national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the first control module via the first input communication interface is decrypted content; wherein the first input communication interface and the first output communication interface are respectively from the first UART unit and the first LAN unit of the first control module, the first data to be transmitted includes a first serial communication signal and a first Ethernet communication signal, and the second data to be transmitted includes a serial input communication signal and an Ethernet input communication signal. In a possible implementation, Figure 2As shown, the first national secret unit may include a national secret unit SM2, a national secret unit SM3, and a national secret unit SM4. The national secret unit SM2 can be used to implement the national secret SM2 algorithm. The national secret SM2 algorithm was released by the State Cryptography Administration in 2010. It is an asymmetric encryption algorithm based on elliptic curve cryptography, mainly used for digital signatures, key exchange and public key encryption. The national secret unit SM2 provided in the embodiment of the present disclosure can be implemented on the FPGA based on a preset hardware description language, and a corresponding interface is provided to support the call of other units to support applications such as identity authentication and access control, end-to-end encrypted communication, etc. The national secret unit SM3 can be used to implement the national secret SM3 algorithm. The national secret SM3 algorithm was released by the State Cryptography Administration in 2010. Its principle is based on a cryptographic hash function, and data of any length can be mapped to a fixed-length summary. The national secret unit SM3 provided in the embodiment of the present disclosure can be implemented on the FPGA based on a preset hardware description language, and a corresponding interface is provided to support the call of other units to support applications related to data generation and data integrity verification. The national secret unit SM4 can be used to implement the national secret SM4 algorithm. This algorithm was released by the State Cryptography Bureau in 2012 and is a block cipher algorithm. The national secret unit SM4 provided in the embodiment of the present disclosure implements the national secret SM4 unit on the FPGA based on the hardware description language, and provides corresponding interfaces to support the calling of other units to support applications related to data encryption and communication transmission encryption. It should be noted that although the first national secret unit is introduced with national secret unit SM2, national secret unit SM3, and national secret unit SM4 as examples, those skilled in the art can understand that the embodiment of the present disclosure should not be limited to this. In fact, the user can flexibly set the application mode of the national secret unit according to the actual application scenario, and the encryption method can also be set according to actual needs.
[0102] The second control module is used to send the third data to be transmitted to the second national secret unit before sending the third data to be transmitted through the second output communication interface; the second national secret unit is used to encrypt the third data to be transmitted based on the determined encryption method, so that the content sent out by the second control module through the second output communication interface is encrypted content; the second control module is also used to send the second data to be transmitted to the second national secret unit before receiving the second data to be transmitted through the second input communication interface; the second national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the second control module through the second input communication interface is decrypted content; wherein the second input communication interface and the second output communication interface are respectively from the second UART unit and the second LAN unit of the second control module, and the third data to be transmitted includes the second serial communication signal and the second Ethernet communication signal. The functions and settings of the second national secret unit are the same as those of the first national secret unit, please refer to the above for details, and will not be repeated here.
[0103] In this way, by setting the first national secret unit in the first control module and the second national secret unit in the second control module, encryption can be achieved before data is transmitted outside the chip, effectively preventing the plaintext data from being eavesdropped and injected with malicious data when being transmitted outside the chip, which greatly enhances the security of data transmission and the information security performance of the system.
[0104] When using the master-slave redundant control mode, the redundant control system based on FPGA, RISC-V soft core processor and national secret soft core provided by the embodiment of the present disclosure may include a master-slave redundant device, the master-slave redundant device is implemented by a field programmable gate array FPGA, the master-slave redundant device includes two control modules, multiple isolation modules, and multiple analog-to-digital conversion modules. The two control modules are a third control module and a fourth control module. The third control module includes a third processing unit, multiple fifth GPIO units, and multiple fifth SPI units. The multiple fifth GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the third processing unit, and the multiple fifth SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the third processing unit; the fourth control module includes a fourth processing unit, multiple sixth GPIO units, and multiple sixth SPI units. The multiple sixth GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the fourth processing unit, and the multiple sixth SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the third processing unit. The input signal is forwarded to the fourth processing unit; the third processing unit and the fourth processing unit are both implemented on the FPGA based on the preset RISC-V instruction set, and the signals to be processed received by the third processing unit and the fourth processing unit are the same, the signals to be processed include various switch input signals, various analog input signals, and various communication input signals, and the signals to be processed represent the operation and configuration of the nuclear reactor; the third processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a third result, and the third result includes a third switch output signal, a third analog output signal, and a third communication output signal; the fourth processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a fourth result, and the fourth result includes a fourth switch output signal, a fourth analog output signal, and a fourth communication output signal; one of the two control modules of the master-slave redundant device is a host and the other is a slave, the master-slave control result output by the master-slave redundant device is the output of the host, and the master-slave control result is used as a basis for determining the control action performed on the nuclear reactor. In this way, two control modules based on the RISC-V instruction set are deployed on a single-chip FPGA, and redundant control is achieved using a master-slave redundant control method. This redundant design of two control modules on a system on a chip can improve the reliability and fault tolerance of the system. Under normal circumstances, there is only one control module in the system, namely the host, to perform tasks. If a host fails, the slave can switch to the host to continue to perform tasks, thereby ensuring the normal operation of the system and improving the reliability and fault tolerance of the system. At the same time, it can also monitor the status of each control module and handle abnormal situations in a timely manner. It has high availability and high information security to support applications in the field of reactor safety. In addition, by integrating the control modules into a single chip, the overall size, weight and power consumption of the system can be reduced, while improving system performance.
[0105] like Fig.13 As shown, the redundant control system 200 may include a master-slave redundant device 130. In some embodiments, the redundant control system 200 may be provided with a plurality of peer redundant devices 130 as required.
[0106] The master-slave redundant device 130 is implemented by a field programmable gate array FPGA. The scope of the FPGA is the SoC where the master-slave redundant device 130 is located. Other devices (such as the isolation module and the digital-to-analog conversion module described later) are expanded on the SoC where the master-slave redundant device 130 is located to form a board where the master-slave redundant device 130 is located. The redundant control system 200 includes the board where the master-slave redundant device 130 is located. The master-slave redundant device 130 is also implemented by simultaneously deploying two RISC-V architecture-based processors (i.e. Fig.23 The redundancy is realized by using RISC-V CPU Core-1 and RISC-V CPU Core-2 in the master-slave redundancy device 130. For the specific description of CPUCore, please refer to the above text and will not be repeated here. Unlike the peer-to-peer redundancy device 110, without discussing the extreme case where both processors are abnormal, the master-slave redundancy device 130 provided in the embodiment of the present disclosure, when both processors are in a normal state, only one processor processes the predetermined task according to the predetermined processing rules. When the processor is abnormal, the master-slave redundancy device 130 continues to execute the task through the other processor. In this way, two RISC-V cores are deployed on an FPGA at the same time. If one processor fails, the other processor can continue to execute the task, realizing the redundant control function, thereby reducing the probability of common cause failures at the CPU Core level, improving the reliability and fault tolerance of the system, and ensuring the normal operation of the system.
[0107] The master-slave redundancy device 130 includes two control modules, multiple isolation modules, and multiple analog-to-digital conversion modules. The two control modules are a third control module and a fourth control module. The third control module includes a third processing unit, multiple fifth GPIO units, and multiple fifth SPI units. The multiple fifth GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the third processing unit, and the multiple fifth SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the third processing unit; the fourth control module includes a fourth processing unit, multiple sixth GPIO units, and multiple sixth SPI units. The multiple sixth GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the fourth processing unit, and the multiple sixth SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the fourth processing unit; the third processing unit and the fourth processing unit are both implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the third processing unit and the fourth processing unit are the same, and the signals to be processed include each switch input signal, each analog input signal, and each communication input signal, and the signals to be processed represent the operation and configuration of the nuclear reactor. The description of the signal to be processed by the master-slave redundant device 130 is similar to the description of the peer redundant device 110 above, and will not be repeated here.
[0108] The third processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a third result, and the third result includes a third switch output signal, a third analog output signal, and a third communication output signal. The fourth processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a fourth result, and the fourth result includes a fourth switch output signal, a fourth analog output signal, and a fourth communication output signal.
[0109] One of the two control modules of the master-slave redundant device is a host and the other is a slave. The master-slave control result output by the master-slave redundant device is the output of the host, and the master-slave control result is used as a basis for determining the control action performed on the nuclear reactor. For example, the master-slave redundant device 130 includes a control module A and a control module B, the third processing unit in the control module A is a RISC-V CPU Core-1, and the third processing unit in the control module B is a RISC-V CPU Core-2. The master-slave redundant device 130 provided in the embodiment of the present disclosure performs redundant control using a master-slave redundant method. In the master-slave redundant method, although the RISC-V CPU Core-1 and the RISC-V CPU Core-2 can be completely peer-to-peer or heterogeneous, and can synchronously receive data and process tasks, only one Core outputs data. The peer-to-peer redundant method can be applied to nuclear power application scenarios in the form of secondary multi-task execution. The task processing process includes receiving a signal to be processed sent by an external device and processing a predetermined task according to a predetermined processing rule to obtain a result. In this way, both control modules in the master-slave redundancy device 130 can perform task processing through the RISC-V CPU Core. If the control module that is processing a task fails, the other control module can continue to process the task, ensuring the normal operation of the system and improving the reliability and fault tolerance of the system.
[0110] The master and slave in the master-slave redundant device are not pre-set manually. The initial master and slave are generally determined according to the power-on sequence of the control modules. This is because in actual applications, the power-on of each control module of the master-slave redundant device 130 always has a sequence. After the master-slave redundant device 130 is powered on, each control module can be used to set itself as a master or slave according to the power-on status of the two control modules in the device (it should be noted that the master and slave set according to the power-on status here are only the initial master and slave, and the subsequent master-slave settings can be adjusted according to the current status of each control module). Among them, the master is the control module that is powered on first of the two control modules, and the slave is the control module that is powered on later of the two control modules. For example, when control module A is powered on first, it starts to detect the heartbeat signal of control module B, but since control module B is not powered on at this time, control module A sets itself as the master, so that control module B is the slave, and sends the settings of the master and slave to an external display device so that the user can timely understand the current master-slave situation, and control module A that sets itself as the master starts to process tasks, so the master can also be understood as the control module that processes tasks, and the other control module that does not process tasks is the slave. The master-slave redundant device 130 can also include a display device, and the settings of the display device refer to the description in the above-mentioned peer redundant device 110, which will not be repeated here.
[0111] For example, the master-slave redundant device 130 includes a control module A and a control module B. The control module A of the master-slave redundant device 130 is initially the master and is the master from the start of processing the task to the completion of the task. Then, the third processing unit of the control module A can obtain the master-slave control result. If the control module A is initially the master but an abnormality occurs halfway through the execution, then the other control module B of the master-slave redundant device 130 is used as the master and continues to execute the remaining tasks according to the received current processing progress (see below for details). Then, the third processing unit of the host at this time can also be used to process the to-be-processed signal according to the predetermined processing rules and the received current processing progress to obtain the master-slave control result. The master-slave control result can be used as a basis for determining the control action to be performed on the nuclear reactor. The external device can take corresponding control actions on the nuclear reactor according to the master-slave control result. Among them, the settings of the processing rules and control actions are all referred to the description in the above-mentioned peer redundant device 110, which will not be repeated here.
[0112] In the master-slave redundant device 130 provided in the embodiment of the present disclosure, similarly to the above-mentioned peer redundant device 110, two DI signal access modes and two AI signal access modes are also provided.
[0113] In one possible implementation, Fig.14 As shown, the multiple isolation modules include multiple groups of input isolation modules, each group of input isolation modules includes a sixth isolation module and a seventh isolation module, each fifth GPIO unit is connected between the corresponding sixth isolation module and the third processing unit, each sixth isolation module is used to forward the received switch input signal to the connected fifth GPIO unit, each fifth GPIO unit is used to forward the received switch input signal to the third processing unit, each sixth GPIO unit is connected between the corresponding seventh isolation module and the fourth processing unit, each seventh isolation module is used to forward the received switch input signal to the connected sixth GPIO unit, each sixth GPIO unit is used to forward the received switch input signal to the fourth processing unit, wherein the switch input signals received by the sixth isolation module and the seventh isolation module in the same group of input isolation modules are the same. This implementation is similar to that in the above-mentioned peer redundant device 110. Figure 3 The description of the first access method of the DI signal shown will not be repeated here.
[0114] In one possible implementation, Fig.15As shown, the multiple isolation modules include multiple eighth isolation modules, and the master-slave redundancy device also includes a fourth logic judgment module. Each eighth isolation module is connected to the corresponding fifth GPIO unit and sixth GPIO unit through the fourth logic judgment module. Each eighth isolation module is used to forward the received switch input signal to the fourth logic judgment module. The fourth logic judgment module is used to forward the switch input signal to the fifth GPIO unit and the sixth GPIO unit corresponding to the eighth isolation module. Each fifth GPIO unit is also used to forward the received switch input signal to the third processing unit, and each sixth GPIO unit is used to forward the received switch input signal to the fourth processing unit. This implementation method is similar to that in the above-mentioned peer redundancy device 110. Figure 4 The description of the second access method of the DI signal shown will not be repeated here.
[0115] In one possible implementation, Fig.16 As shown, the master-slave redundant device also includes a plurality of third current-voltage conversion modules, and the plurality of analog-to-digital conversion modules are divided into a plurality of groups, each group of analog-to-digital conversion modules includes a fourth analog-to-digital conversion module and a fifth analog-to-digital conversion module, and the fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding third current-voltage conversion module, each fifth SPI unit is connected between the corresponding fourth analog-to-digital conversion module and the third processing unit, and each sixth SPI unit is connected between the corresponding fifth analog-to-digital conversion module and the fourth processing unit, each third current-voltage conversion module is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module, each fourth analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected fifth SPI unit, each fifth SPI unit is used to forward the received analog input signal to the third processing unit, each fifth analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected sixth SPI unit, and each sixth SPI unit is used to forward the received analog input signal to the fourth processing unit. The implementation is similar to that in the above-mentioned peer redundant device 110 Figure 5 The description of the AI signal access method shown will not be repeated here.
[0116] In one possible implementation, Fig.17As shown, the master-slave redundant device also includes a fifth logic judgment module and a plurality of fourth current-voltage conversion modules, the plurality of analog-to-digital conversion modules include a plurality of sixth analog-to-digital conversion modules, each sixth analog-to-digital conversion module is respectively connected to the corresponding fourth current-voltage conversion module, each fourth current-voltage conversion module is connected to the fifth logic judgment module, each fifth SPI unit is connected between the fifth logic judgment module and the third processing unit, each sixth SPI unit is connected between the fifth logic judgment module and the fourth processing unit, each fourth current-voltage conversion module is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected sixth analog-to-digital conversion module, each sixth analog-to-digital conversion module is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the fifth logic judgment module, the fifth logic judgment module is used to forward the analog input signal to the corresponding fifth SPI unit and sixth SPI unit, each fifth SPI unit is used to forward the received analog input signal to the third processing unit, and each sixth SPI unit is used to forward the received analog input signal to the fourth processing unit. This implementation is similar to that in the above-mentioned peer redundant device 110. Figure 6 The description of the AI signal access method shown will not be repeated here.
[0117] In the master-slave redundant device 130 provided in the embodiment of the present disclosure, similarly to the above-mentioned peer redundant device 110, a DO signal output mode is also provided. In a possible implementation mode, Fig.18 As shown, the multiple isolation modules include multiple groups of output isolation modules, each group of output isolation modules includes a ninth isolation module and a tenth isolation module, the ninth isolation module and the tenth isolation module in the same group of output isolation modules are arranged in parallel, the third control module also includes a plurality of seventh GPIO units, the fourth control module also includes a plurality of eighth GPIO units, each seventh GPIO unit is connected between the corresponding ninth isolation module and the third processing unit, each seventh GPIO unit is used to forward the third switch output signal to the connected ninth isolation module, each ninth isolation module is used to output to the outside according to the third switch output signal and the current master-slave situation, each eighth GPIO unit is connected between the corresponding tenth isolation module and the fourth processing unit, each eighth GPIO unit is used to forward the fourth switch output signal to the connected tenth isolation module, each tenth isolation module is used to output to the outside according to the fourth switch output signal and the current master-slave situation. This method is similar to that in the above-mentioned peer redundant device 110. Figure 7 The parallel connection method shown will not be described in detail here.
[0118] In addition to the above parallel connection method, for the master-slave redundant device 130, as Fig.19As shown, the multiple isolation modules include multiple eleventh isolation modules, and the master-slave redundancy device also includes a sixth logic judgment module. Each eleventh isolation module is connected to the corresponding seventh GPIO unit and eighth GPIO unit through the sixth logic judgment module. Each seventh GPIO unit is used to forward the third switch output signal to the sixth logic judgment module, and each eighth GPIO unit is used to forward the fourth switch output signal to the sixth logic judgment module. The sixth logic judgment module is used to output to the outside according to the third switch output signal, the fourth switch output signal and the current master-slave situation; wherein the master-slave situation indicates whether the host is the third control module or the fourth control module, and the master-slave situation can be determined by the flag bit. For example, the control module whose master-slave situation flag bit is 1 is the host, and the flag bit is 0, indicating that the corresponding control module is the slave. In this way, a sixth logic judgment module is formed by opening up a special VHDL logic judgment area on the FPGA, and the isolation between the internal electrical signals of each control module and the external electrical signals can be achieved through an eleventh isolation module. This isolation design can effectively prevent electromagnetic interference or other noise signals in external devices that detect the operation of the nuclear reactor from affecting the internal signal processing process of the control module, thereby improving the stability and accuracy of the signal. At the same time, this output method can save one hardware channel, which is conducive to the miniaturization of the board.
[0119] In the master-slave redundant device 130 provided in the embodiment of the present disclosure, similarly to the above-mentioned peer redundant device 110, an AO signal output mode is also provided. In a possible implementation mode, Fig. 20 As shown, the third control module also includes a plurality of third SPI units, the fourth control module also includes a plurality of fourth SPI units, the master-slave redundancy device also includes a seventh logic judgment module and a plurality of second digital-to-analog conversion modules, each second digital-to-analog conversion module is connected to the seventh logic judgment module, each third SPI unit is connected between the seventh logic judgment module and the third processing unit, each fourth SPI unit is connected between the seventh logic judgment module and the fourth processing unit, each third SPI unit is used to forward the third analog output signal to the seventh logic judgment module, each fourth SPI unit is used to forward the fourth analog output signal to the seventh logic judgment module, the seventh logic judgment module is used to determine the output result according to the third analog output signal, the fourth analog output signal, and the current master-slave situation, and forward the output result to the corresponding second digital-to-analog conversion module, the second digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside; wherein, the master-slave situation indicates whether the host is the third control module or the fourth control module. This implementation is similar to the description of the AO signal output method in the above-mentioned peer redundancy device 110, and will not be repeated here.
[0120] The two control modules of the master-slave redundant device 130 can also monitor the operating status of each other's CPU according to a predetermined determination rule. The specific determination rule is the same as that of the above-mentioned peer redundant device 110, and will not be repeated here.
[0121] In order to monitor the operating status of each other's CPU, the two control modules of the master-slave redundant device 130 are also provided with multiple functional units running on the CPU Core. The third control module and the fourth control module both include eight functional units, namely, a third heartbeat sending unit, a third synchronization unit, a third state query unit, a third active switching unit, a fourth determination unit, a fourth synchronization unit, a fourth state query unit, and a fourth active switching unit. The host runs the third heartbeat sending unit, the third synchronization unit, the third state query unit, and the third active switching unit. The slave runs the fourth determination unit, the fourth synchronization unit, the fourth state query unit, and the fourth active switching unit. In other words, one control module is provided with the above eight functional units, and the control module runs four of them when it is a host and runs the remaining four when it is a slave.
[0122] like Fig. 22 As shown, the third synchronization unit in the control module in the host state is used to synchronize the third synchronization content to the fourth synchronization unit according to a predetermined synchronization frequency, and the third synchronization content includes the current processing progress of the signal to be processed by the current host; the fourth synchronization unit in the control module in the slave state is used to forward the received third synchronization content to the processing unit corresponding to the current slave, so as to continue processing based on the third synchronization content when the slave is switched to the host. The specific composition of the third synchronization content is determined according to the actual task, as long as the switched host can continue to perform the task, the embodiment of the present disclosure does not limit this.
[0123] like Fig. 22 As shown, the third heartbeat sending unit in the control module in the host state is used to send a third heartbeat signal to the fourth determination unit according to a predetermined sending frequency; the fourth determination unit in the control module in the slave state is used to determine the current state of the host based on the third heartbeat signal, the current state including one of a normal state and an abnormal state, and when the host is in an abnormal state, the slave is switched to a new master.
[0124] like Fig. 22 As shown, the third state query unit in the control module in the host state is used to send a slave state query instruction to the fourth state query unit according to a predetermined query frequency; the fourth state query unit in the control module in the slave state is used to return a data packet indicating the slave working state to the third state query unit according to the slave state query instruction. The specific composition of the data packet can be determined according to the actual application scenario, and the embodiments of the present disclosure are not limited to this.
[0125] like Fig. 22 As shown, the third state query unit in the control module in the master state is also used to determine the third flag bit according to the data packet, and send the third flag bit to the display device, the third flag bit is used to indicate the current state of the current slave; the display device is used to display the third flag bit to remind the user of the current state of the master and the slave, and the current state includes one of a normal state and an abnormal state. In this way, the user can know the current state of the slave in time through the third flag bit displayed by the display device, and can respond quickly once an abnormal state is found.
[0126] like Fig. 22 As shown, the fourth active switching unit is used to send a host switching instruction to the fourth active switching unit when the current host self-test is abnormal; the fourth active switching unit is used to switch the current slave to a new master according to the received host switching instruction.
[0127] The master-slave redundancy device 130 may further include a second dual-port RAM module. The second dual-port RAM module is connected between the two control modules, and the second dual-port RAM module is used for data transmission between the two control modules. The third synchronization unit is also used to synchronize the third synchronization content to the fourth synchronization unit through the second dual-port RAM module when the current host is the third control module and the current slave is the fourth control module. The fourth synchronization unit is also used to synchronize the fourth synchronization content to the third synchronization unit through the second dual-port RAM module when the current host is the fourth control module and the current slave is the third control module. The second dual-port RAM module can be partitioned to store different contents.
[0128] Both CPU Core-1 and CPU Core-2 can run to the state of the host or the state of the slave, and under normal circumstances, only one of them runs in the state of the host. The third heartbeat sending unit in the control module in the host state is used to continuously send the third heartbeat signal to the slave. The fourth determination unit receives the heartbeat signal on the slave side and determines whether it has timed out. If the heartbeat signal from the host can be correctly detected, the slave maintains the current running state; if the heartbeat signal from the host times out, the slave switches itself to the host state and takes over the work of the host. The third synchronization unit in the control module in the host state is used to send the data to be synchronized, that is, the third synchronization content, to the slave through the second dual-port RAM module. The fourth synchronization unit receives the third synchronization content sent by the host to support the slave to continue to run based on the current running state after switching to the host. The third state query unit in the control module in the host state is used to periodically send a slave state query instruction. After receiving the instruction, the slave responds to the instruction and sends a data packet that can be used to indicate the slave state (i.e., the slave state reply).
[0129] In view of the fact that the interaction frequency of the heartbeat signal is higher than the frequency of data synchronization, slave status query instructions, slave return data packets, and host switching instructions, and the required data space size is different, the second dual-port RAM module can be divided into multiple areas according to function (such as Fig.15 DRAM-1, DRAM-2, DRAM-3, DRAM-4, DRAM-5 in .
[0130] During the operation of the master-slave redundant device 130, the slave does not output DO signals and AO signals, and does not respond to external configuration and control instructions, but can maintain communication connection to receive communication input data and signals to be processed. The host outputs DO signals and AO signals, responds to configuration data or control instructions conveyed by the communication channel, etc. The communication channel of the master-slave redundant device 130 is also similar to that of the peer redundant device 110.
[0131] In the master-slave redundant device 130 provided in the embodiment of the present disclosure, similarly to the above-mentioned peer redundant device 110, the following is also provided: Fig. 22 The serial communication and Ethernet communication shown. Each communication input signal includes a serial input communication signal and an Ethernet input communication signal, the third communication output signal includes a third serial communication signal and a third Ethernet communication signal, and the fourth communication output signal includes a fourth serial communication signal and a fourth Ethernet communication signal. The third control module also includes a plurality of third UART units and a plurality of third LAN units, the fourth control module also includes a plurality of fourth UART units and a plurality of fourth LAN units, the master-slave redundancy device also includes a plurality of level conversion modules and a plurality of PHY modules, each level conversion module includes a third level conversion module and a fourth level conversion module, each PHY module includes a third PHY module and a fourth PHY module, wherein the serial input communication signals received by the third level conversion module and the fourth level conversion module in the same level conversion module group are the same, and the Ethernet input communication signals received by the third PHY module and the fourth PHY module in the same input PHY module group are the same.
[0132] Each third UART unit is connected between the corresponding third level conversion module and the third processing unit, each third level conversion module is used to perform level conversion on the received serial input communication signal to obtain the corresponding first signal and forward the first signal to the corresponding third UART unit, each third UART unit is used to forward the received first signal to the third processing unit, each fourth UART unit is connected between the corresponding fourth level conversion module and the fourth processing unit, each fourth level conversion module is used to perform level conversion on the received serial input communication signal to obtain the corresponding second signal and forward the second signal to the corresponding fourth UART unit, each fourth UART unit is used to forward the received second signal to the fourth processing unit, thereby realizing the use of serial communication to receive externally input serial input communication signals.
[0133] Each third UART unit is also used to forward the third serial communication signal to the corresponding third level conversion module when the current host is the third control module and the current slave is the fourth control module. Each third level conversion module is also used to perform level conversion on the received third serial communication signal to obtain the corresponding third signal and forward the third signal to the outside when the current host is the third control module and the current slave is the fourth control module. Each fourth UART unit is also used to forward the fourth serial communication signal to the corresponding fourth level conversion module when the current host is the fourth control module and the current slave is the third control module. Each fourth level conversion module is used to perform level conversion on the received fourth serial communication signal to obtain the corresponding fourth signal and forward the fourth signal to the outside when the current host is the fourth control module and the current slave is the third control module, thereby realizing the third communication output signal sent to the outside using serial communication.
[0134] Each third LAN unit is connected between the corresponding third PHY module and the third processing unit, each third PHY module is used to forward the received Ethernet input communication signal to the connected third LAN unit, each third LAN unit is used to forward the received Ethernet input communication signal to the third processing unit, each fourth LAN unit is connected between the corresponding fourth PHY module and the fourth processing unit, each fourth PHY module is used to forward the received Ethernet input communication signal to the connected fourth LAN unit, each fourth LAN unit is used to forward the received Ethernet input communication signal to the fourth processing unit, thereby realizing the use of Ethernet communication to receive the externally input Ethernet input communication signal.
[0135] Each third LAN unit is also used for forwarding the third Ethernet communication signal to the corresponding third PHY module when the current host is the third control module and the current slave is the fourth control module. Each third PHY module is also used for forwarding the third Ethernet communication signal to the outside when the current host is the third control module and the current slave is the fourth control module. Each fourth LAN unit is also used for forwarding the fourth Ethernet communication signal to the corresponding fourth PHY module when the current host is the fourth control module and the current slave is the third control module. Each fourth PHY module is also used for forwarding the fourth Ethernet communication signal to the outside when the current host is the fourth control module and the current slave is the third control module, thereby realizing the fourth communication output signal received from the outside by using Ethernet communication.
[0136] The master-slave redundant device 130 can also communicate with the downstream device through serial communication and communicate with the upstream device through a local area network such as Ethernet. The communication method, communication channel, level conversion and other communication-related contents are the same as those of the peer redundant device 110. Please refer to the above for details and will not be repeated here.
[0137] In some embodiments, the communication process between the master-slave redundant device 130 and the external device may also include: the host in the master-slave redundant device 130 sends the status of the control module that needs real-time maintenance to a display device outside the master-slave redundant device 130. The communication process can be implemented through serial communication or Ethernet, which is not limited in the embodiments of the present disclosure. Table 2 shows the status of the master-slave redundant device that needs real-time maintenance and the setting method of each status. The communication data of the master-slave redundant device 130 may include the status of the real-time maintenance required in Table 2. The communication link of the serial communication and the communication link of the Ethernet communication can be seen in Fig. 22 .
[0138] Table 2 The states required for real-time maintenance of the master-slave redundant device and the setting methods of each state
[0139]
[0140] In the redundant control system provided in the embodiment of the present disclosure, the data input source may include communication input and hard-wired signal input, the communication input includes data of Ethernet communication input and data of serial communication input, and the hard-wired input signal (i.e., the signal to be processed) includes DI signal and AI signal. As for the operation result of the control module, in some embodiments, it can also be output to an external device in the form of communication output and hard-wired signal. For communication signals, they can be output to external devices via dual redundant Ethernet communication or serial communication respectively, and for hard-wired signals, they can be combined into a single channel through the above-mentioned output scheme of DO signal and AO signal to connect to the external device.
[0141] The master-slave redundancy device 130 may further include a national secret unit corresponding to each control module. The third control module further includes a third national secret unit, and the fourth control module further includes a fourth national secret unit.
[0142] The third control module is used to send the fourth data to be transmitted to the third national secret unit before sending the fourth data to be transmitted through the third output communication interface; the third national secret unit is used to encrypt the fourth data to be transmitted based on the determined encryption method, so that the content sent out by the third control module through the third output communication interface is the encrypted content. The third control module is also used to send the fifth data to be transmitted to the third national secret unit before receiving the fifth data to be transmitted through the third input communication interface; the third national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the third control module through the third input communication interface is the decrypted content; wherein the third input communication interface and the third output communication interface are respectively from the third UART unit and the third LAN unit of the third control module, the fourth data to be transmitted includes the third serial communication signal and the third Ethernet communication signal, and the fifth data to be transmitted includes the serial input communication signal and the Ethernet input communication signal. The third national secret unit is similar to the first national secret unit in the above-mentioned peer-to-peer redundant device 110, and the details are referred to above, which will not be repeated here.
[0143] The fourth control module is used to send the sixth data to be transmitted to the fourth national secret unit before sending the sixth data to be transmitted through the fourth output communication interface; the fourth national secret unit is used to encrypt the sixth data to be transmitted based on the determined encryption method, so that the content sent out by the fourth control module through the fourth output communication interface is the encrypted content. The fourth control module is also used to send the fifth data to be transmitted to the fourth national secret unit before receiving the fifth data to be transmitted through the fourth input communication interface; the fourth national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the fourth control module through the fourth input communication interface is the decrypted content; wherein the fourth input communication interface and the fourth output communication interface are respectively from the fourth UART unit and the fourth LAN unit of the fourth control module, and the sixth data to be transmitted includes the second serial communication signal and the second Ethernet communication signal. The fourth national secret unit is similar to the second national secret unit in the above-mentioned peer-to-peer redundant device 110, and the details are referred to above, which will not be repeated here.
[0144] In the control device supporting the peer-to-peer redundant control mode or the master-slave redundant control mode provided by the redundant control system of the embodiment of the present disclosure, in addition to deploying the RISC-V-based CPU Core-1 and CPU Core-2 on a single-chip FPGA, Figure 2 or Fig.23As shown, the system bus and the peripheral bus are bridged through the system bus (AHB), peripheral bus (APB) random access memory (RAM), SPI, GPIO, universal asynchronous receiver and transmitter (UART), timer (TIMER), watchdog (Watchdog) module, floating point processing function module, and EMIF module through the bus bridge (APB Bridge). Each peripheral interface module (SPI, GPIO, UART, TIMER, LAN, Watchdog) is added in the form of an IP soft core and deployed on the FPGA together with the Core. The number of various peripheral interfaces depends on the application requirements and the resources of the selected FPGA. On this basis, the protection logic module is deployed according to the protection function requirements to implement specific protection logic. In addition, in order to realize the debugging function, the JTAG debugging interface support corresponding to the Core is also realized.
[0145] The above-mentioned CPU Core-1 and CPU Core-2 can be implemented based on the RISC-V architecture, and are used to implement the CPU's instruction execution, arithmetic and logical operations, clock management, address allocation and storage resource management, power management, interrupt management, general IO management and other functions. The above-mentioned system bus can be used to realize data interaction between the CPU soft core and the internal ROM, RAM, bus bridge, national secret module, etc. The peripheral bus can be used to realize data interaction with various external interfaces. The above-mentioned bus bridge can be used for bridging between the system bus and the peripheral bus. The above-mentioned SPI module may include a first SPI unit, a second SPI unit, and other SPI units for data interaction, which can be used to implement the SPI interface protocol and support data interaction with external devices or equipment via the SPI protocol. External devices or devices that support the SPI interface protocol include EEPROM, FLASH, real-time clock chips, analog-to-digital and digital-to-analog conversion chips, etc. The above-mentioned GPIO module may include a first GPIO unit, a second GPIO unit, a third GPIO unit, a fourth GPIO unit, and other GPIO units for input and output data, which can be used to realize the general input and output port function and support connection with external devices or equipment via GPIO pins. External devices or equipment connected via GPIO include LED lights, buttons, etc. The above-mentioned UART module can be used to implement the asynchronous communication interface function and support serial communication with external devices. The above-mentioned TIMER module can be used to implement timing and counting functions. The above-mentioned Watchdog module can be used to implement the watchdog function. The above-mentioned EMIF module can be used to connect the RISC-VCPU Core with the external memory SDRAM. The above-mentioned LAN module can be used to implement the MAC layer protocol of Ethernet, with an external matching PHY chip to support Ethernet connection.
[0146] The redundant control system receives data through each peripheral interface (SPI, GPIO, UART, LAN) to realize the data acquisition function. The corresponding data is transmitted to the RISC-V CPU Core via the bus to complete arithmetic and logical operations. The operation results are stored in the on-chip RAM and SDRAM, and then returned to each peripheral interface via the bus. Each peripheral interface outputs data to a peripheral component or device to realize the corresponding control function, or transmits it to a component or device with a human-machine interface function via a peripheral interface to realize the monitoring function. The IP soft core of each peripheral interface can be implemented based on the hardware description language by itself, or an open source module can be used, which is not limited in the embodiment of the present disclosure. Between the two RISC-V CPU Cores, a special inter-core dual-port RAM is set to support the heartbeat signal and data interaction between the two processor cores. On the basis of CPU Core-1 and CPU Core-2, redundant function modules that execute the above-mentioned peer redundant device working process or the master-slave redundant device working process are respectively set to support the hot standby redundant operation of the two processor cores.
[0147] The redundant control system provided by the embodiment of the present disclosure implements redundant control on a single-chip FPGA, thereby improving the functional integration of the device, improving the basic reliability of the system, and also facilitating the low-power and miniaturized design of the equipment. In addition, it can support the calling of national secret modules to realize identity authentication and encrypted communication, with higher confidentiality.
[0148] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A redundant control system based on FPGA, RISC-V soft core processor and national secret soft core, characterized in that: The system includes a peer-to-peer redundant device, which is implemented by a field programmable gate array (FPGA). The peer-to-peer redundant device includes a first control module, a second control module, a plurality of isolation modules, a plurality of analog-to-digital conversion modules, and a signal output selection circuit. The first control module includes a first processing unit, a plurality of first GPIO units, and a plurality of first SPI units, wherein the plurality of first GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the first processing unit, and the plurality of first SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the first processing unit; The second control module includes a second processing unit, a plurality of second GPIO units, and a plurality of second SPI units, wherein the plurality of second GPIO units are used to forward the switch input signal sent by the corresponding isolation module to the second processing unit, and the plurality of second SPI units are used to forward the analog input signal sent by the corresponding analog-to-digital conversion module to the second processing unit; The first processing unit and the second processing unit are both implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the first processing unit and the second processing unit are the same, the signals to be processed include the switch input signals, the analog input signals, and the communication input signals, and the signals to be processed represent the operation and configuration of the nuclear reactor; The first processing unit is used to receive the signal to be processed, process the signal to be processed according to a predetermined processing rule to obtain a first result, the first result including a first switch output signal, a first analog output signal, and a first communication output signal, and send the first result to the signal output selection circuit; The second processing unit is used to receive the signal to be processed, process the signal to be processed according to the processing rule to obtain a second result, the second result includes a second switch output signal, a second analog output signal, and a second communication output signal, and send the second result to the signal output selection circuit; The signal output selection circuit is used to determine a peer-to-peer redundant control result according to the first result and the second result, and the peer-to-peer redundant control result is used as a basis for determining a control action to be performed on the nuclear reactor; The first control module further includes a first national secret unit, and the second control module further includes a second national secret unit. The first control module is used to send the first data to be transmitted to the first national secret unit before sending the first data to be transmitted via the first output communication interface; the first national secret unit is used to encrypt the first data to be transmitted based on the determined encryption method, so that the content sent out by the first control module via the first output communication interface is encrypted content; the first control module is also used to send the second data to be transmitted to the first national secret unit before receiving the second data to be transmitted via the first input communication interface; the first national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the first control module via the first input communication interface is decrypted content; wherein the first input communication interface and the first output communication interface are respectively from the first UART unit and the first LAN unit of the first control module, the first data to be transmitted includes a first serial communication signal and a first Ethernet communication signal, and the second data to be transmitted includes a serial input communication signal and an Ethernet input communication signal; The second control module is used to send the third data to be transmitted to the second national secret unit before sending the third data to be transmitted via the second output communication interface; the second national secret unit is used to encrypt the third data to be transmitted based on the determined encryption method, so that the content sent out by the second control module via the second output communication interface is encrypted content; the second control module is also used to send the second data to be transmitted to the second national secret unit before receiving the second data to be transmitted via the second input communication interface; the second national secret unit is also used to decrypt the second data to be transmitted based on the determined decryption method, so that the content received by the second control module via the second input communication interface is decrypted content; wherein the second input communication interface and the second output communication interface are respectively from the second UART unit and the second LAN unit of the second control module, and the third data to be transmitted includes a second serial communication signal and a second Ethernet communication signal.
2. The system according to claim 1, characterized in that The multiple isolation modules include multiple groups of input isolation modules, each group of input isolation modules includes a first isolation module and a second isolation module, each of the first GPIO units is connected between the corresponding first isolation module and the first processing unit, each of the first isolation modules is used to forward the received switch input signal to the connected first GPIO unit, each of the first GPIO units is used to forward the received switch input signal to the first processing unit, each of the second GPIO units is connected between the corresponding second isolation module and the second processing unit, each of the second isolation modules is used to forward the received switch input signal to the connected second GPIO unit, each of the second GPIO units is used to forward the received switch input signal to the second processing unit, wherein the switch input signals received by the first isolation module and the second isolation module in the same group of input isolation modules are the same; or The multiple isolation modules include multiple third isolation modules, and the peer redundancy device also includes a first logic judgment module. Each of the third isolation modules is connected to the corresponding first GPIO unit and second GPIO unit through the first logic judgment module. Each of the third isolation modules is used to forward the received switch input signal to the first logic judgment module. The first logic judgment module is used to forward the switch input signal to the first GPIO unit and the second GPIO unit corresponding to the third isolation module. Each of the first GPIO units is also used to forward the received switch input signal to the first processing unit, and each of the second GPIO units is used to forward the received switch input signal to the second processing unit.
3. The system according to claim 1, characterized in that The peer-to-peer redundant device further includes a plurality of first current-voltage conversion modules, the plurality of analog-to-digital conversion modules are divided into a plurality of groups, each group of analog-to-digital conversion modules includes a first analog-to-digital conversion module and a second analog-to-digital conversion module, the first analog-to-digital conversion module and the second analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding first current-voltage conversion module, each of the first SPI units is connected between the corresponding first analog-to-digital conversion module and the first processing unit, each of the second SPI units is connected between the corresponding second analog-to-digital conversion module and the second processing unit, each of the first current-voltage conversion modules is used to convert a received current signal into a voltage signal, and forward the voltage signal to the connected first analog-to-digital conversion module and the second analog-to-digital conversion module, each of the first analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected first SPI unit, each of the first SPI units is used to forward the received analog input signal to the first processing unit, each of the second analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected second SPI unit, and each of the second SPI units is used to forward the received analog input signal to the second processing unit; or The peer-to-peer redundant device further includes a second logic judgment module and a plurality of second current-voltage conversion modules, wherein the plurality of analog-to-digital conversion modules include a plurality of third analog-to-digital conversion modules, each of the third analog-to-digital conversion modules is respectively connected to a corresponding second current-voltage conversion module, and each of the second current-voltage conversion modules is connected to the second logic judgment module. Each of the first SPI units is connected between the second logic judgment module and the first processing unit, each of the second SPI units is connected between the second logic judgment module and the second processing unit, each of the second current-voltage conversion modules is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected third analog-to-digital conversion module, each of the third analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the second logic judgment module, the second logic judgment module is used to forward the analog input signal to the corresponding first SPI unit and second SPI unit, each of the first SPI units is used to forward the received analog input signal to the first processing unit, and each of the second SPI units is used to forward the received analog input signal to the second processing unit.
4. The system according to claim 1, characterized in that The multiple isolation modules include multiple groups of output isolation modules, each group of output isolation modules includes a fourth isolation module and a fifth isolation module, the fourth isolation module and the fifth isolation module in the same group of output isolation modules are arranged in parallel or in series, the first control module also includes multiple third GPIO units, the second control module also includes multiple fourth GPIO units, each of the third GPIO units is connected between the corresponding fourth isolation module and the first processing unit, each of the third GPIO units is used to forward the first switch output signal to the connected fourth isolation module, each of the fourth isolation modules is used to forward the received first switch output signal to the outside, each of the fourth GPIO units is connected between the corresponding fifth isolation module and the second processing unit, each of the fourth GPIO units is used to forward the second switch output signal to the connected fifth isolation module, and each of the fifth isolation modules is used to forward the received second switch output signal to the outside.
5. The system according to claim 1, characterized in that The first control module further includes a plurality of third SPI units, the second control module further includes a plurality of fourth SPI units, the peer-to-peer redundant device further includes a third logic judgment module and a plurality of first digital-to-analog conversion modules, each of the first digital-to-analog conversion modules is connected to the third logic judgment module, each of the third SPI units is connected between the third logic judgment module and the first processing unit, each of the fourth SPI units is connected between the third logic judgment module and the second processing unit, each of the third SPI units is used to forward the first analog output signal to the third logic judgment module, each of the fourth SPI units is used to forward the second analog output signal to the third logic judgment module, the third logic judgment module is used to determine an output result based on the first analog output signal and the second analog output signal according to a predetermined output condition, and forward the output result to the corresponding first digital-to-analog conversion module, the first digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside.
6. The system according to claim 1, characterized in that Each of the communication input signals includes a serial input communication signal and an Ethernet input communication signal, the first communication output signal includes a first serial communication signal and a first Ethernet communication signal, the second communication output signal includes a second serial communication signal and a second Ethernet communication signal, the first control module further includes a plurality of first UART units and a plurality of first LAN units, the second control module further includes a plurality of second UART units and a plurality of second LAN units, the peer-to-peer redundant device further includes a plurality of level conversion modules and a plurality of PHY modules, Each group of level conversion modules includes a first level conversion module and a second level conversion module, each of the first UART units is connected between the corresponding first level conversion module and the first processing unit, each of the first level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding first signal and forward the first signal to the corresponding first UART unit, each of the first UART units is used to forward the received first signal to the first processing unit, each of the second UART units is connected between the corresponding second level conversion module and the second processing unit, each of the second level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding second signal and forward the second signal to the corresponding second UART unit, each The second UART unit is used to forward the received second signal to the second processing unit, each of the first UART units is also used to forward the first serial communication signal to the corresponding first level conversion module, each of the first level conversion modules is also used to perform level conversion on the received first serial communication signal to obtain a corresponding third signal and forward the third signal to the outside, each of the second UART units is used to forward the second serial communication signal to the corresponding second level conversion module, each of the second level conversion modules is used to perform level conversion on the received second serial communication signal to obtain a corresponding fourth signal and forward the fourth signal to the outside, wherein the serial input communication signal received by the first level conversion module and the second level conversion module in the same group of input level conversion modules is the same; Each group of input PHY modules includes a first PHY module and a second PHY module, each of the first LAN units is connected between the corresponding first PHY module and the first processing unit, each of the first PHY modules is used to forward the received Ethernet input communication signal to the connected first LAN unit, each of the first LAN units is used to forward the received Ethernet input communication signal to the first processing unit, each of the second LAN units is connected between the corresponding second PHY module and the second processing unit, each of the second PHY modules is used to forward the received Ethernet input communication signal to the connected second LAN unit, each of the second LAN units is used to forward the received Ethernet input communication signal to the second processing unit, each of the first LAN units is also used to forward the first Ethernet communication signal to the corresponding first PHY module, each of the first PHY modules is also used to forward the first Ethernet communication signal to the outside, each of the second LAN units is also used to forward the second Ethernet communication signal to the corresponding second PHY module, each of the second PHY modules is also used to forward the second Ethernet communication signal to the outside, wherein the Ethernet input communication signals received by the first PHY module and the second PHY module in the same group of input PHY modules are the same.
7. The system according to claim 1, characterized in that The peer-to-peer redundant device further comprises a first dual-port RAM module, the first dual-port RAM module is connected between the first control module and the second control module, the first dual-port RAM module is used for data transmission between the first control module and the second control module, the first control module further comprises a first synchronization unit, the second control module further comprises a second synchronization unit, and the process of the first processing unit and the second processing unit processing the signal to be processed both comprises a plurality of predetermined processing stages, The first synchronization unit is used to synchronize the first synchronization content to the second synchronization unit through the first dual-port RAM module, wherein the first synchronization content includes the processing stage currently located by the first processing unit; the second synchronization unit is used to forward the received first synchronization content to the second processing unit, so that the second processing unit adjusts its own processing stage based on the first synchronization content; The second synchronization unit is further used to synchronize the second synchronization content to the first synchronization unit through the first dual-port RAM module, and the second synchronization content includes the processing stage currently located by the second processing unit; the first synchronization unit is further used to forward the received second synchronization content to the first processing unit, so that the first processing unit adjusts its own processing stage based on the second synchronization content.
8. The system according to claim 1, characterized in that The first control module further includes a first heartbeat sending unit and a first determination unit, the second control module further includes a second heartbeat sending unit and a second determination unit, and the system further includes a display device. The first heartbeat sending unit is used to send a first heartbeat signal to the second determination unit at a predetermined frequency; the second determination unit is used to determine a first flag bit based on the first heartbeat signal, and send the first flag bit to the display device, wherein the first flag bit is used to indicate a current state of the first control module; The second heartbeat sending unit is used to send a second heartbeat signal to the first determination unit at a predetermined frequency; the first determination unit is used to determine a second flag bit based on the second heartbeat signal, and send the second flag bit to the display device, wherein the second flag bit is used to indicate the current state of the second control module; The display device is used to display the first flag bit and the second flag bit to remind the user of the current state of the first control module and the second control module, and the current state includes one of a normal state and an abnormal state.
9. A redundant control system based on FPGA, RISC-V soft core processor and national secret soft core, characterized in that: The system includes a master-slave redundancy device, which is implemented by a field programmable gate array (FPGA). The master-slave redundancy device includes two control modules, multiple isolation modules, and multiple analog-to-digital conversion modules. The two control modules are a third control module and a fourth control module. The third control module includes a third processing unit, a plurality of fifth GPIO units, and a plurality of fifth SPI units, wherein the plurality of fifth GPIO units are used to forward the switch input signals sent by the corresponding isolation module to the third processing unit, and the plurality of fifth SPI units are used to forward the analog input signals sent by the corresponding analog-to-digital conversion module to the third processing unit; The fourth control module includes a fourth processing unit, a plurality of sixth GPIO units, and a plurality of sixth SPI units, wherein the plurality of sixth GPIO units are used to forward the switch input signals sent by the corresponding isolation modules to the fourth processing unit, and the plurality of sixth SPI units are used to forward the analog input signals sent by the corresponding analog-to-digital conversion modules to the fourth processing unit; The third processing unit and the fourth processing unit are both implemented on the FPGA based on a preset RISC-V instruction set, and the signals to be processed received by the third processing unit and the fourth processing unit are the same, the signals to be processed include each of the switch input signals, each of the analog input signals, and each communication input signal, and the signals to be processed represent the operation status and configuration status of the nuclear reactor; The third processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a third result, wherein the third result includes a third switch output signal, a third analog output signal, and a third communication output signal; The fourth processing unit is used to receive the signal to be processed, and process the signal to be processed according to a predetermined processing rule to obtain a fourth result, wherein the fourth result includes a fourth switch output signal, a fourth analog output signal, and a fourth communication output signal; One of the two control modules of the master-slave redundant device is a master and the other is a slave. The master-slave control result output by the master-slave redundant device is the output of the master. The master-slave control result is used as a basis for determining the control action to be performed on the nuclear reactor. Wherein, the third control module further includes a third national secret unit, and the fourth control module further includes a fourth national secret unit, and the third control module is used to send the fourth data to be transmitted to the third national secret unit before sending the fourth data to be transmitted via the third output communication interface; the third national secret unit is used to encrypt the fourth data to be transmitted based on the determined encryption method, so that the content sent out by the third control module via the third output communication interface is encrypted content; the third control module is also used to send the fifth data to be transmitted to the third national secret unit before receiving the fifth data to be transmitted via the third input communication interface; the third national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the third control module via the third input communication interface is decrypted content; wherein the third input communication interface and the third output communication interface are respectively from the third UART unit and the third LAN unit of the third control module, the fourth data to be transmitted includes a third serial communication signal and a third Ethernet communication signal, and the fifth data to be transmitted includes a serial input communication signal and an Ethernet input communication signal; The fourth control module is used to send the sixth data to be transmitted to the fourth national secret unit before sending the sixth data to be transmitted via the fourth output communication interface; the fourth national secret unit is used to encrypt the sixth data to be transmitted based on the determined encryption method, so that the content sent out by the fourth control module via the fourth output communication interface is encrypted content; the fourth control module is also used to send the fifth data to be transmitted to the fourth national secret unit before receiving the fifth data to be transmitted via the fourth input communication interface; the fourth national secret unit is also used to decrypt the fifth data to be transmitted based on the determined decryption method, so that the content received by the fourth control module via the fourth input communication interface is decrypted content; wherein the fourth input communication interface and the fourth output communication interface are respectively from the fourth UART unit and the fourth LAN unit of the fourth control module, and the sixth data to be transmitted includes a second serial communication signal and a second Ethernet communication signal.
10. The system according to claim 9, characterized in that The third control module and the fourth control module both include a third heartbeat sending unit, a third synchronization unit, a third state query unit, a third active switching unit, a fourth determination unit, a fourth synchronization unit, a fourth state query unit, and a fourth active switching unit; The host runs the third heartbeat sending unit, the third synchronization unit, the third state query unit, and the third active switching unit, and the slave runs the fourth determination unit, the fourth synchronization unit, the fourth state query unit, and the fourth active switching unit; The third synchronization unit is used to synchronize the third synchronization content to the fourth synchronization unit according to a predetermined synchronization frequency, wherein the third synchronization content includes a current processing progress of the host processing the signal to be processed; The fourth synchronization unit is used to forward the received third synchronization content to the processing unit corresponding to the current slave, so as to continue processing based on the third synchronization content when the slave is switched to the master; The third heartbeat sending unit is used to send a third heartbeat signal to the fourth determination unit according to a predetermined sending frequency; the fourth determination unit is used to determine the current state of the host based on the third heartbeat signal, wherein the current state includes one of a normal state and an abnormal state, and when the host is in the abnormal state, switch the slave to a new host; The fourth active switching unit is used to send a host switching instruction to the fourth active switching unit when the current host self-test is abnormal; the fourth active switching unit is used to switch the current slave to a new master according to the received host switching instruction.
11. The system according to claim 10, characterized in that The system further comprises a display device, The third status query unit is used to send a slave status query instruction to the fourth status query unit according to a predetermined query frequency; The fourth status query unit is used to return a data packet indicating the working status of the slave to the third status query unit according to the slave status query instruction; The third state query unit is further used to determine a third flag bit according to the data packet and send the third flag bit to the display device, where the third flag bit is used to indicate the current state of the current slave; The display device is used to display the third flag to remind the user of the current state of the master and the slave, and the current state includes one of a normal state and an abnormal state.
12. The system according to claim 9, characterized in that The multiple isolation modules include multiple groups of input isolation modules, each group of input isolation modules includes a sixth isolation module and a seventh isolation module, each of the fifth GPIO units is connected between the corresponding sixth isolation module and the third processing unit, each of the sixth isolation modules is used to forward the received switch input signal to the connected fifth GPIO unit, each of the fifth GPIO units is used to forward the received switch input signal to the third processing unit, each of the sixth GPIO units is connected between the corresponding seventh isolation module and the fourth processing unit, each of the seventh isolation modules is used to forward the received switch input signal to the connected sixth GPIO unit, and each of the sixth GPIO units is used to forward the received switch input signal to the fourth processing unit, wherein the switch input signals received by the sixth isolation module and the seventh isolation module in the same group of input isolation modules are the same; or The multiple isolation modules include multiple eighth isolation modules, and the master-slave redundancy device also includes a fourth logic judgment module. Each of the eighth isolation modules is connected to the corresponding fifth GPIO unit and sixth GPIO unit through the fourth logic judgment module. Each of the eighth isolation modules is used to forward the received switch input signal to the fourth logic judgment module. The fourth logic judgment module is used to forward the switch input signal to the fifth GPIO unit and sixth GPIO unit corresponding to the eighth isolation module. Each of the fifth GPIO units is also used to forward the received switch input signal to the third processing unit, and each of the sixth GPIO units is used to forward the received switch input signal to the fourth processing unit.
13. The system according to claim 9, characterized in that The master-slave redundancy device further includes a plurality of third current-voltage conversion modules, the plurality of analog-to-digital conversion modules are divided into a plurality of groups, each group of analog-to-digital conversion modules includes a fourth analog-to-digital conversion module and a fifth analog-to-digital conversion module, the fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module in the same group of analog-to-digital conversion modules are respectively connected to the corresponding third current-voltage conversion module, each of the fifth SPI units is connected between the corresponding fourth analog-to-digital conversion module and the third processing unit, each of the sixth SPI units is connected between the corresponding fifth analog-to-digital conversion module and the fourth processing unit, each of the third current-voltage conversion modules is used to convert the received current signal into a voltage signal, and convert the received current signal into a voltage signal. The voltage signal is forwarded to the connected fourth analog-to-digital conversion module and the fifth analog-to-digital conversion module, each of the fourth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected fifth SPI unit, each of the fifth SPI units is used to forward the received analog input signal to the third processing unit, each of the fifth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the connected sixth SPI unit, and each of the sixth SPI units is used to forward the received analog input signal to the fourth processing unit; or The master-slave redundancy device further includes a fifth logic judgment module and a plurality of fourth current-voltage conversion modules, the plurality of analog-to-digital conversion modules include a plurality of sixth analog-to-digital conversion modules, each of the sixth analog-to-digital conversion modules is respectively connected to a corresponding fourth current-voltage conversion module, and each of the fourth current-voltage conversion modules is connected to the fifth logic judgment module. Each of the fifth SPI units is connected between the fifth logic judgment module and the third processing unit, each of the sixth SPI units is connected between the fifth logic judgment module and the fourth processing unit, each of the fourth current-voltage conversion modules is used to convert the received current signal into a voltage signal, and forward the voltage signal to the connected sixth analog-to-digital conversion module, each of the sixth analog-to-digital conversion modules is used to perform analog-to-digital conversion on the received voltage signal to obtain an analog input signal and send the analog input signal to the fifth logic judgment module, the fifth logic judgment module is used to forward the analog input signal to the corresponding fifth SPI unit and sixth SPI unit, each of the fifth SPI units is used to forward the received analog input signal to the third processing unit, and each of the sixth SPI units is used to forward the received analog input signal to the fourth processing unit.
14. The system according to claim 9, characterized in that The multiple isolation modules include multiple groups of output isolation modules, each group of output isolation modules includes a ninth isolation module and a tenth isolation module, the ninth isolation module and the tenth isolation module in the same group of output isolation modules are arranged in parallel, the third control module also includes a plurality of seventh GPIO units, the fourth control module also includes a plurality of eighth GPIO units, each of the seventh GPIO units is connected between the corresponding ninth isolation module and the third processing unit, each of the seventh GPIO units is used to forward the third switch output signal to the connected ninth isolation module, each of the ninth isolation modules is used to output to the outside according to the third switch output signal and the current master-slave situation, each of the eighth GPIO units is connected between the corresponding tenth isolation module and the fourth processing unit, each of the eighth GPIO units is used to forward the fourth switch output signal to the connected tenth isolation module, and each of the tenth isolation modules is used to output to the outside according to the fourth switch output signal and the current master-slave situation; or The multiple isolation modules include multiple eleventh isolation modules, and the master-slave redundancy device also includes a sixth logic judgment module. Each of the eleventh isolation modules is connected to the corresponding seventh GPIO unit and eighth GPIO unit through the sixth logic judgment module. Each of the seventh GPIO units is used to forward the third switch output signal to the sixth logic judgment module, and each of the eighth GPIO units is used to forward the fourth switch output signal to the sixth logic judgment module. The sixth logic judgment module is used to output to the outside according to the third switch output signal, the fourth switch output signal and the current master-slave situation; wherein the master-slave situation indicates whether the host is the third control module or the fourth control module.
15. The system according to claim 9, characterized in that The third control module further includes a plurality of third SPI units, the fourth control module further includes a plurality of fourth SPI units, the master-slave redundancy device further includes a seventh logic judgment module and a plurality of second digital-to-analog conversion modules, each of the second digital-to-analog conversion modules is connected to the seventh logic judgment module, each of the third SPI units is connected between the seventh logic judgment module and the third processing unit, each of the fourth SPI units is connected between the seventh logic judgment module and the fourth processing unit, each of the third SPI units is used to forward the third analog output signal to the seventh logic judgment module, each of the fourth SPI units is used to forward the fourth analog output signal to the seventh logic judgment module, the seventh logic judgment module is used to determine an output result according to the third analog output signal, the fourth analog output signal, and the current master-slave situation, and forward the output result to the corresponding second digital-to-analog conversion module, the second digital-to-analog conversion module is used to perform digital-to-analog conversion on the received output result to obtain a corresponding current signal and forward the current signal to the outside; wherein, the master-slave situation indicates whether the host is the third control module or the fourth control module.
16. The system according to claim 9, characterized in that Each of the communication input signals includes a serial input communication signal and an Ethernet input communication signal, the third communication output signal includes a third serial communication signal and a third Ethernet communication signal, the fourth communication output signal includes a fourth serial communication signal and a fourth Ethernet communication signal, the third control module also includes a plurality of third UART units and a plurality of third LAN units, the fourth control module also includes a plurality of fourth UART units and a plurality of fourth LAN units, the master-slave redundancy device also includes a plurality of level conversion modules and a plurality of PHY modules, Each group of level conversion modules includes a third level conversion module and a fourth level conversion module, each of the third UART units is connected between the corresponding third level conversion module and the third processing unit, each of the third level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding first signal and forward the first signal to the corresponding third UART unit, each of the third UART units is used to forward the received first signal to the third processing unit, each of the fourth UART units is connected between the corresponding fourth level conversion module and the fourth processing unit, each of the fourth level conversion modules is used to perform level conversion on the received serial input communication signal to obtain a corresponding second signal and forward the second signal to the corresponding fourth UART unit, each of the fourth UART units is used to forward the received second signal to the fourth processing unit, and each of the third UART units is also used to perform level conversion on the received serial input communication signal to obtain a corresponding second signal and forward the second signal to the corresponding fourth UART unit, When the current host is a fourth control module and the current slave is a fourth control module, the third serial communication signal is forwarded to the corresponding third level conversion module, each of the third level conversion modules is also used for level conversion of the received third serial communication signal to obtain a corresponding third signal and forward the third signal to the outside when the current host is a third control module and the current slave is a fourth control module, each of the fourth UART units is also used for forwarding the fourth serial communication signal to the corresponding fourth level conversion module when the current host is a fourth control module and the current slave is a third control module, each of the fourth level conversion modules is used for level conversion of the received fourth serial communication signal to obtain a corresponding fourth signal and forward the fourth signal to the outside when the current host is a fourth control module and the current slave is a third control module, wherein the serial input communication signal received by the third level conversion module and the fourth level conversion module in the same group of level conversion modules is the same; Each group of PHY modules includes a third PHY module and a fourth PHY module, each of the third LAN units is connected between the corresponding third PHY module and the third processing unit, each of the third PHY modules is used to forward the received Ethernet input communication signal to the connected third LAN unit, each of the third LAN units is used to forward the received Ethernet input communication signal to the third processing unit, each of the fourth LAN units is connected between the corresponding fourth PHY module and the fourth processing unit, each of the fourth PHY modules is used to forward the received Ethernet input communication signal to the connected fourth LAN unit, each of the fourth LAN units is used to forward the received Ethernet input communication signal to the fourth processing unit, and each of the third LAN units is also used to forward the received Ethernet input communication signal to the fourth processing unit when the current host is the third The third PHY module is used for forwarding the third Ethernet communication signal to the corresponding third PHY module when the current host is the third control module and the current slave is the fourth control module. Each of the third PHY modules is also used for forwarding the third Ethernet communication signal to the outside when the current host is the third control module and the current slave is the fourth control module. Each of the fourth LAN units is also used for forwarding the fourth Ethernet communication signal to the corresponding fourth PHY module when the current host is the fourth control module and the current slave is the third control module. Each of the fourth PHY modules is also used for forwarding the fourth Ethernet communication signal to the outside when the current host is the fourth control module and the current slave is the third control module, wherein the Ethernet input communication signals received by the third PHY module and the fourth PHY module in the same group of input PHY modules are the same.
17. The system according to claim 10, characterized in that The master-slave redundancy device further includes a second dual-port RAM module, which is connected between the two control modules and is used for data transmission between the two control modules. The third synchronization unit is further used for synchronizing the third synchronization content to the fourth synchronization unit through the second dual-port RAM module when the current host is the third control module and the current slave is the fourth control module; The fourth synchronization unit is further configured to synchronize the fourth synchronization content to the third synchronization unit through the second dual-port RAM module when the current host is the fourth control module and the current slave is the third control module.
Citation Information
Patent Citations
Soft core fault-tolerant spaceborne computer based on FPGA (Field Programmable Gata Array)
CN102650962A
Redundancy control equipment of digital instrument control system, digital instrument control system and control method
CN105974879A
Main control station and hot standby redundancy control method thereof
CN114355760A
System on chip with redundancy function and control method thereof
CN117573609A
Processor card and intelligent multi-purpose system for use with processor card
US11586497B1
