CN111190852A - PowerPC and Microblaze interaction system and interaction method based on double ports - Google Patents
PowerPC and Microblaze interaction system and interaction method based on double ports Download PDFInfo
- Publication number
- CN111190852A CN111190852A CN201911238023.5A CN201911238023A CN111190852A CN 111190852 A CN111190852 A CN 111190852A CN 201911238023 A CN201911238023 A CN 201911238023A CN 111190852 A CN111190852 A CN 111190852A
- Authority
- CN
- China
- Prior art keywords
- microblaze
- powerpc
- initialization
- interface
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000003993 interaction Effects 0.000 title claims abstract description 55
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000012545 processing Methods 0.000 claims abstract description 61
- 230000036541 health Effects 0.000 claims abstract description 24
- 238000012544 monitoring process Methods 0.000 claims abstract description 24
- 238000004891 communication Methods 0.000 claims abstract description 5
- 239000000872 buffer Substances 0.000 claims description 44
- 238000012360 testing method Methods 0.000 claims description 33
- 230000008569 process Effects 0.000 claims description 20
- 230000002452 interceptive effect Effects 0.000 claims description 18
- 230000005540 biological transmission Effects 0.000 claims description 6
- 230000009977 dual effect Effects 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention provides a dual-port-based PowerPC and Microblaze interaction system and an interaction method, wherein a dual-port RAM inside an FPGA is adopted for communication between the Microblaze and the PowerPC, a PowerPC processing system LocalBus communicates with the MicroBlaze processing system inside the FPGA through a local parallel bus, the MicroBlaze processing system comprises a dual-port RAM, a MicroBlaze processor and an interface IP core, and the interface IP core comprises an RS422, an ARINC429, an SPI, a GPIO and a 1553B. According to the invention, a set of universal data structure and a universal interaction mechanism are designed on the double ports, so that data receiving and sending, health state monitoring and mode control between the PowerPC and the Microblaze can be realized, the data interaction efficiency of the two processing systems is improved, and the overall processing capacity and real-time performance of the system are improved; the circuit board has the advantages of effectively reducing the number of chips, reducing circuit connecting lines, reducing the area of the circuit board, improving the reliability of the system and having great advantages in aspects of volume, weight, power consumption, cost, configurability and the like.
Description
Technical Field
The invention relates to the field of airborne embedded computing, in particular to an interaction system and an interaction method of PowerPC and Microblaze.
Background
MicroBlaze (hereinafter referred to as MB) is an embedded soft-core processor which is realized in FPGA, can be flexibly cut and configured in a parameterization way, has higher data processing capacity, and can construct a multi-core processing system in FPGA by instantiating a plurality of MB processors. Meanwhile, by using the general storage resources in the FPGA and the IP core of the related interface and combining the MB processor, the general data processing and the data receiving and sending of various interfaces can be realized in the FPGA.
The PowerPC processor has strong data processing capacity and abundant interfaces, and is widely applied in the airborne field. With the increasing requirements of the system on processing performance and external interfaces, data processing of various complex external interfaces occupies more PowerPC processing time, and affects the real-time performance of the whole system, so that the requirements cannot be met by simply relying on a PowerPC processor to realize data processing and interface processing.
In order to realize the cooperative work of the PowerPC and the MicroBlaze processor systems, a set of efficient and universal interaction mechanism needs to be designed.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a dual-port-based PowerPC and Microblaze interaction system and an interaction method. Compared with the bus-based interaction mechanism, the dual-port RAM-based interaction mechanism does not need to define the bus cycle, and has higher real-time performance, expansibility and communication bandwidth. Meanwhile, by controlling the time sequence of the double-port reading and writing and adopting mechanisms such as a circular buffer area and the like, the stability of the double-port reading and writing is ensured, the double-port reading and writing conflict is avoided, and the method is an ideal interaction mechanism for processing systems.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the utility model provides a two port based PowerPC and Microblaze interactive system, contains PowerPC processing system and Microblaze processing system, adopts inside two port RAM of FPGA to communicate between Microblaze and the PowerPC, as shown in figure 1, PowerPC processing system Local Bus communicates with the inside Microblaze processing system of FPGA through Local parallel Bus, and the Microblaze processing system contains two port RAM, the Microblaze treater and interface IP core, and wherein the interface IP core includes RS422, ARINC429, SPI, GPIO and 1553B.
The dual-port-based PowerPC and MicroBlaze interactive system comprises an initialization interactive module, an interface data transceiving interactive module and a health monitoring module, and when the PowerPC processing system and the MicroBlaze processing system are powered on, initialization interaction is executed first, so that power-on self-check, state report and interface initialization of an MB processor are completed; and then, the PowerPC processing system and the MicroBlaze processing system start to perform interface data transceiving interaction in a period, and simultaneously, the PowerPC processing system performs health monitoring on the MicroBlaze processing system in the period so as to perform fault processing and reporting.
Further, the initialization interaction module includes executing interruption after Microblaze runs, initiating CACHE, executing power-on self-test, reporting running state and initializing an interface.
Furthermore, in order to improve the sending efficiency and reduce the waiting time of the PowerPC, the interface data between the two processing systems is asynchronously sent and received through a circular buffer area on the dual-port RAM.
Furthermore, the health monitoring module writes in a double-port count value through the PowerPC processor cycle, Microblaze reads the count value and then copies to another double-port address, and PowerPC reads the count value again and checks whether the count value is the same as the written value, and the Microblaze is used for judging whether the Microblaze normally runs.
The detailed steps of the interaction method of the PowerPC and Microblaze interaction system based on the double ports are as follows:
step 1: initializing an interaction procedure
The initialization process comprises starting initialization and interface initialization, wherein the interface initialization is executed after the starting initialization is finished;
step 1.1: starting initialization;
after the system is powered on or reset hard, the starting time of the operating system of the PowerPC end is far longer than the Microblaze starting time, the Microblaze end completes initialization first and enters a waiting state, and the PowerPC end reads the running state of the Microblaze and sets the operating state to enter an application state;
after Microblaze is powered on and started, the following steps are executed:
a) initializing a debugging serial port of Microblaze;
b) enable data CACHE and instruction CACHE;
c) initializing an interrupt controller;
d) emptying the double ports interacting with the PowerPC;
e) setting the self state of the Microblaze as a starting operation state (start), which indicates that the Microblaze starts to operate;
f) performing power-on self-test, wherein the self-test contents comprise double-port reading and writing (emptying double ports after the test is finished), RS422 inner ring test and ARINC429 inner ring test; after the power-on self-test is executed, storing a power-on self-test result into a double-port structural body;
h) setting the self state of the Microblaze to be a waiting state, identifying that the Microblaze has completed power-on initialization, starting entering a cycle period of the MB, and checking a command sent to the Microblaze by the PowerPC in each cycle; entering different states according to different commands, and executing different codes;
the initialization steps of the PowerPC terminal are as follows:
a) checking whether Microblaze has already finished initialization and enters a waiting state;
b) checking the power-on self-test result of Microblaze, if the self-test is correct, executing the step c, and if the self-test is incorrect, executing the step d;
c) setting the Microblaze state as an application state, judging whether the Microblaze enters the application state, if not, executing the step d, and if so, executing the step e;
d) setting the Microblaze state as a stop state, and reporting the stop state to an application software to return a value;
e) marking the Microblaze state as an application state, and reporting to application software that the initialization is successful;
step 1.2: interface initialization interaction procedure
The interface initialization interaction process is that the PowerPC end and the Microblaze complete the transmission of interface parameters and the interaction process of the initialization state through a customized communication structure (such as RS422/ARINC429), and the interaction steps are as follows:
a) before initializing the interface, the PowerPC terminal firstly judges whether Microblaze is in an application state, and only when the Microblaze is in the application state, the initialization of the interface and data receiving and transmitting are allowed; if the application state is in, executing step b; if the application state is not in the application state, returning an error and not continuing to execute;
b) filling interface initialization parameters including but not limited to channel number, baud rate, check bit and stop bit information into the dual-port structural body by the PowerPC terminal;
c) the PowerPC terminal fills an interface initialization command into the double port to inform the Microblaze that the initialization of the IP core can be carried out according to the interface initialization parameters;
d) in the Microblaze period, reading a command written by a PowerPC end from the double ports, and when detecting an interface initialization command, starting entering an interface initialization process by the Microblaze and reading interface initialization parameters from the double ports;
e) calling an interface initialization function by Microblaze, and transmitting initialization parameters written by a PowerPC end into the interface function;
f) after the Microblaze completes the interface initialization, a corresponding channel initialization completion mark is arranged in the double ports;
h) the PowerPC end periodically inquires whether Microblaze successfully completes interface initialization or not, the whole initialization process is completed after the Microblaze initialization is successfully acquired, and if the interface initialization fails to be inquired, an error value is returned to the application software;
step 2: interface data interaction procedure
Asynchronous receiving and sending of interface data are achieved between the PowerPC and the Microblaze in a circulating buffer area mode; the circular buffer area is provided with two pointers, namely a head pointer and a tail pointer, wherein when one end of the circular buffer area is used for writing data, only the tail pointer is moved, and when the other end of the circular buffer area is used for reading data, only the head pointer is moved; when the two pointers reach the size of the buffer area, the circulation is started from the head;
step 2.1: the interface data sending steps are as follows:
a) before the PowerPC side sends data, a head pointer and a tail pointer in a circular buffer area are saved;
b) the PowerPC writes the sent data into the buffer area from the tail pointer;
c) modifying the tail pointer after the PowerPC finishes data writing;
d) c, reading a head pointer and a tail pointer of the circular area by Microblaze, calculating whether data exist in the current circular buffer area, if no data exist, continuing reading in the next period, and if data exist, entering a step e;
e) microblaze saves the head pointer and the tail pointer in the buffer, and reads data from the head pointer;
f) microblaze modifies the head pointer;
f) the Microblaze writes the data in the double ports into a register of the IP core to realize the transmission of the data;
step 2.2: the interface data receiving step is as follows:
a) after the Microblaze end receives the data, a head pointer and a tail pointer in a circular buffer area are firstly stored;
b) microblaze writes the transmitted data into the buffer from the tail pointer;
c) after the Microblaze finishes writing data, modifying a tail pointer;
d) the PowerPC reads a head pointer and a tail pointer of the circular area and calculates whether data exists in the current circular buffer area, if no data exists, the reading is continued in the next period, and if data exists, the step e is carried out;
e) the PowerPC saves a head pointer and a tail pointer in the buffer area and reads data from the head pointer;
f) the PowerPC modifies the head pointer;
g) the PowerPC returns the data in the double ports to the application software to realize the receiving of the data;
step 2.3: microblaze health monitoring process
The method comprises the steps that PowerPC judges whether Microblaze normally operates through a flag bit and a count value, after the PowerPC executes initialization, a Microblaze health monitoring task is initiated, whether the Microblaze is healthy is periodically judged, healthy interaction between the PowerPC and the Microblaze is carried out through three variables of Monitorflag, MonitorData1 and MonitorData2 on double ports, wherein the Monitorflag indicates whether the PowerPC can be written, the MonitorData1 indicates a write count value of the PowerPC, the read count value of an opposite end is written into data2, and the MonitorData2 is a count value read by the PowerPC and written by the opposite end;
the specific steps of the health monitoring interactive process are as follows:
a) PowerPC assigns a value to monitorData1 and increments each cycle;
b) PowerPC sets flag to 1, at which time Microblaze reads this flag to assign the value of monitoreData 1 to monitoreData 2;
c) the Microblaze setting flag is 0, the PowerPC judges whether the flag is 0, and if the flag is not 0 for more than 5 times, the Microblaze fault is considered;
d) the PowerPC judges whether the value of monitorData2 is equal to the written count value, if so, Microblaze is normal, and if not, the failure is judged.
The invention has the advantages that a set of universal data structure and a universal interaction mechanism are designed on the double ports, so that data receiving and transmitting, health state monitoring and mode control between the PowerPC and the Microblaze can be realized, and the data interaction efficiency of the two processing systems is improved. The PowerPC processing system is combined with the MicroBlaze processing system in the FPGA, the PowerPC is responsible for data processing of application software, and the MicroBlaze is responsible for interface data receiving and transmitting processing, so that the overall processing capacity and real-time performance of the system are improved. Because the MicroBlaze is realized in the FPGA, the number of chips can be effectively reduced, circuit connecting wires can be reduced, the area of a circuit board can be reduced, the reliability of a system can be improved, and the MicroBlaze has great advantages in aspects of size, weight, power consumption, cost, configurability and the like.
Drawings
FIG. 1 is a diagram of the PowerPC and Microblaze processing system architecture of the present invention.
FIG. 2 is a schematic diagram of initialization interaction according to the present invention.
Fig. 3 is a flow chart of Microblaze end health monitoring according to the present invention.
FIG. 4 is a flow chart of PowerPC health monitoring according to the present invention.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
The utility model provides a two port based PowerPC and Microblaze interactive system, contains PowerPC processing system and Microblaze processing system, adopts inside two port RAM of FPGA to communicate between Microblaze and the PowerPC, as shown in figure 1, PowerPC processing system Local Bus communicates with the inside Microblaze processing system of FPGA through Local parallel Bus, and the Microblaze processing system contains two port RAM, the Microblaze treater and interface IP core, and wherein the interface IP core includes RS422, ARINC429, SPI, GPIO and 1553B.
The dual-port-based PowerPC and MicroBlaze interactive system comprises an initialization interactive module, an interface data transceiving interactive module and a health monitoring module, and when the PowerPC processing system and the MicroBlaze processing system are powered on, initialization interaction is executed first, so that power-on self-check, state report and interface initialization of an MB processor are completed; and then, the PowerPC processing system and the MicroBlaze processing system start to perform interface data transceiving interaction in a period, and simultaneously, the PowerPC processing system performs health monitoring on the MicroBlaze processing system in the period so as to perform fault processing and reporting.
Further, the initialization interaction module includes executing interruption after Microblaze runs, initiating CACHE, executing power-on self-test, reporting running state and initializing an interface.
Furthermore, in order to improve the sending efficiency and reduce the waiting time of the PowerPC, the interface data between the two processing systems is asynchronously sent and received through a circular buffer area on the dual-port RAM.
Furthermore, the health monitoring module writes in a double-port count value through the PowerPC processor cycle, Microblaze reads the count value and then copies to another double-port address, and PowerPC reads the count value again and checks whether the count value is the same as the written value, and the Microblaze is used for judging whether the Microblaze normally runs.
The Microblaze and the PowerPC use double-port interactive data, the PowerPC and the Microblaze in the double ports both define the same data structure, and the operating state, the health monitoring structure body and the interface initialization and transceiving structure body of the Microblaze are mainly defined in the data structure.
The operating states of Microblaze include: the system comprises an application state, a waiting state, a stopping state and a maintenance self-checking state, wherein when the MB enters the waiting state after being electrified and initialized, each state can be switched by sending an instruction through the PowerPC, and the application state is the application state when the system works normally.
The health monitoring structure includes: self-check result of MB, cycle count value, etc.
The interface initialization and transceiving structure comprises: interface initialization parameters (e.g., baud rate, stop bits, parity bits, etc.), transmit buffers, receive buffers, buffer pointers, etc.
(1) Initializing an interaction procedure
The initialization process includes a start initialization and an interface initialization, wherein the interface initialization is performed after the start initialization is completed, and the process is as shown in fig. 2.
1) Start-up initialization
After the system is powered on or reset, the operating system starting time of the PowerPC end is far longer than the Microblaze starting time, the Microblaze end completes initialization first and enters a waiting state, and the PowerPC end reads the running state of the Microblaze and sets the operating state to enter an application state.
After Microblaze is powered on, the following steps are executed:
a) and initializing a debugging serial port of Microblaze.
b) Enable data CACHE and instruction CACHE.
c) The interrupt controller is initialized.
d) The dual port interacting with the PowerPC is cleared.
e) The Microblaze sets its own state as a start operation state (start), indicating that the Microblaze has started to operate.
f) And performing power-on self-test, wherein the self-test contents comprise double-port reading and writing (clearing double ports after the test is finished), RS422 inner ring test, ARINC429 inner ring test and the like. And after the power-on self-test is executed, storing the power-on self-test result into the double-port structural body.
h) The state of the Microblaze is set to be a waiting state, the Microblaze is identified to finish power-on initialization, the cycle period of the MB is started to enter, and a command sent to the Microblaze by the PowerPC is checked in each cycle. And entering different states according to different commands, and executing different codes.
The initialization of the PowerPC terminal comprises the following steps:
a) check if Microblaze has reached completion of initialization and enter a wait state.
b) And (e) checking the power-on self-test result of the Microblaze, if the self-test is correct, executing the step (c), and if the self-test is incorrect, executing the step (d).
c) Setting the Microblaze state as an application state, judging whether the Microblaze enters the application state, if not, executing the step d, and if so, executing the step e.
d) And setting the Microblaze state as a stop state, and reporting the stop state to the application software to return a value.
e) And marking the Microblaze state as an application state, and reporting to the application software that the initialization is successful.
2) Interface initialization interaction procedure
The interface initialization interaction process is a process that the PowerPC end and Microblaze complete the transmission of interface parameters, initialization state interaction and the like through a customized communication structure (such as RS422/ARINC429), and the interaction steps are as follows:
a) before initializing the interface, the PowerPC end firstly judges whether Microblaze is in an application state, and only when the Microblaze is in the application state, the initialization of the interface and data receiving and transmitting are allowed. If in the application state, step b is performed. If the application state is not in the application state, an error is returned, and the execution is not continued.
b) And filling interface initialization parameters such as channel number, baud rate, check bit, stop bit and the like into the double-port structural body by the PowerPC terminal.
c) And the PowerPC terminal fills an interface initialization command into the double port to inform the Microblaze that the initialization of the IP core can be carried out according to the interface initialization parameters.
d) And in the Microblaze period, reading a command written by the PowerPC terminal from the double ports, and when detecting an interface initialization command, starting entering an interface initialization process by the Microblaze, and reading interface initialization parameters from the double ports.
e) The Microblaze calls an interface initialization function, and transmits initialization parameters written by the PowerPC terminal into the interface function.
f) After the Microblaze completes the interface initialization, a corresponding channel initialization completion mark is arranged in the double ports;
h) and the PowerPC end periodically queries whether the Microblaze successfully completes interface initialization or not, completes the whole initialization process after acquiring that the Microblaze initialization is successful, and returns an error value to the application software if the interface initialization fails.
(2) Interface data interaction procedure
In order to improve the interface data transceiving efficiency and reduce the waiting time of the PowerPC, asynchronous transceiving of interface data is realized between the PowerPC and the Microblaze in a circulating buffer area mode.
The circular buffer has two pointers, a head pointer and a tail pointer, and when one end writes data, only the tail pointer is moved, and when the other end reads data, only the head pointer is moved. When both pointers reach the buffer size, the loop is started from the beginning again.
1) The interface data sending steps are as follows:
a) before the PowerPC side sends data, a head pointer and a tail pointer in a circular buffer area are saved.
b) The PowerPC writes the transmitted data into the buffer starting from the tail pointer.
c) And after the PowerPC completes data writing, modifying the tail pointer.
d) And e, reading a head pointer and a tail pointer of the circular area by Microblaze, calculating whether data exists in the current circular buffer area, if no data exists, continuing reading in the next period, and if data exists, entering the step e.
e) Microblaze holds the head and tail pointers in a buffer and reads data from the head pointer.
f) Microblaze modifies the head pointer.
f) And the Microblaze writes the data in the double ports into a register of the IP core to realize the transmission of the data.
2) The interface data receiving step is as follows:
a) after the Microblaze end receives the data, the head pointer and the tail pointer in the circular buffer are saved.
b) Microblaze writes the transmitted data into the buffer starting from the tail pointer.
c) And after the Microblaze finishes writing the data, modifying the tail pointer.
d) And the PowerPC reads the head pointer and the tail pointer of the circular area and calculates whether data exists in the current circular buffer area, if no data exists, the reading is continued in the next period, and if data exists, the step e is carried out.
e) The PowerPC saves the head and tail pointers in the buffer and reads the data from the head pointer.
f) The PowerPC modifies the head pointer.
g) And the PowerPC returns the data in the double ports to the application software to realize the data receiving.
(3) Microblaze health monitoring process
The PowerPC judges whether Microblaze normally runs through the flag bit and the count value, after the PowerPC executes initialization, a Microblaze health monitoring task is initiated, and whether Microblaze is healthy or not is judged periodically. The healthy interaction of PowerPC with Microblaze is performed by three variables on both mouths, meaning as follows:
monitorflag, 1 represents PowerPC writable, 0 represents PowerPC non-writable;
monitorData1, writing a count value by PowerPC, reading from the opposite end and writing into data 2;
monitorerdata 2, PowerPC reads the count of end-to-end writes;
the health monitoring interactive process is shown in fig. 3 and 4, and the specific process is as follows:
a) PowerPC assigns a value to monitorData1 that increments each cycle;
b) PowerPC sets flag to 1, at which time Microblaze reads this flag to assign the value of monitoreData 1 to monitoreData 2;
c) the Microblaze setting flag is 0, the PowerPC judges whether the flag is 0, and if the flag is not 0 for more than 5 times, the Microblaze fault is considered.
d) PowerPC judges whether the value of monitoreData 2 is equal to the written count value, if equal, Microblaze is normal, and if not, fault is detected.
Claims (3)
1. The utility model provides a power PC and Microblaze interactive system based on two port which characterized in that:
PowerPC and Microblaze interactive system based on two port contains PowerPC processing system and Microblaze processing system, and the inside two port RAM of FPGA communicates between Microblaze and the PowerPC, and PowerPC processing system Local Bus communicates with the inside Microblaze processing system of FPGA through Local parallel Bus, and the Microblaze processing system contains two port RAM, Microblaze treater and interface IP core, and wherein interface IP core includes RS422, ARINC429, SPI, GPIO and 1553B.
2. The dual port-based PowerPC and Microblaze interaction system of claim 1, wherein:
the dual-port-based PowerPC and MicroBlaze interactive system comprises an initialization interactive module, an interface data transceiving interactive module and a health monitoring module, and when the PowerPC processing system and the MicroBlaze processing system are powered on, initialization interaction is executed first, so that power-on self-check, state report and interface initialization of an MB processor are completed; then, the PowerPC processing system and the MicroBlaze processing system start to carry out interface data transceiving interaction in a period, and meanwhile, the PowerPC processing system carries out health monitoring on the MicroBlaze processing system in the period so as to carry out fault processing and reporting;
the initialization interaction module comprises interruption execution after Microblaze operation, CACHE initialization, power-on self-test execution, running state reporting and interface initialization;
the interface data receiving and transmitting interactive module improves the sending efficiency and reduces the waiting time of PowerPC, and interface data between the two processing systems are asynchronously received and transmitted through a circular buffer area on the double-port RAM;
the health monitoring module writes in the double-port count value through the PowerPC processor cycle, and Microblaze reads the count value and then copies to another double-port address, and PowerPC reads the count value again and looks over whether the value is the same with the value of writing in for judge whether Microblaze normally operates.
3. A method for interacting with a Microblaze interaction system using the dual port-based PowerPC of claim 1, comprising the steps of:
the detailed steps of the interaction method of the PowerPC and Microblaze interaction system based on the double ports are as follows:
step 1: initializing an interaction procedure
The initialization process comprises starting initialization and interface initialization, wherein the interface initialization is executed after the starting initialization is finished;
step 1.1: starting initialization;
after the system is powered on or reset hard, the starting time of the operating system of the PowerPC end is far longer than the Microblaze starting time, the Microblaze end completes initialization first and enters a waiting state, and the PowerPC end reads the running state of the Microblaze and sets the operating state to enter an application state;
after Microblaze is powered on and started, the following steps are executed:
a) initializing a debugging serial port of Microblaze;
b) enable data CACHE and instruction CACHE;
c) initializing an interrupt controller;
d) emptying the double ports interacting with the PowerPC;
e) setting the self state of the Microblaze as a starting operation state (start), which indicates that the Microblaze starts to operate;
f) performing power-on self-test, wherein the self-test contents comprise double-port reading and writing (emptying double ports after the test is finished), RS422 inner ring test and ARINC429 inner ring test; after the power-on self-test is executed, storing a power-on self-test result into a double-port structural body;
h) setting the self state of the Microblaze to be a waiting state, identifying that the Microblaze has completed power-on initialization, starting entering a cycle period of the MB, and checking a command sent to the Microblaze by the PowerPC in each cycle; entering different states according to different commands, and executing different codes;
the initialization steps of the PowerPC terminal are as follows:
a) checking whether Microblaze has already finished initialization and enters a waiting state;
b) checking the power-on self-test result of Microblaze, if the self-test is correct, executing the step c, and if the self-test is incorrect, executing the step d;
c) setting the Microblaze state as an application state, judging whether the Microblaze enters the application state, if not, executing the step d, and if so, executing the step e;
d) setting the Microblaze state as a stop state, and reporting the stop state to an application software to return a value;
e) marking the Microblaze state as an application state, and reporting to application software that the initialization is successful;
step 1.2: interface initialization interaction procedure
The interface initialization interaction process is that the PowerPC end and the Microblaze complete the transmission of interface parameters and the interaction process of the initialization state through a customized communication structure (such as RS422/ARINC429), and the interaction steps are as follows:
a) before initializing the interface, the PowerPC terminal firstly judges whether Microblaze is in an application state, and only when the Microblaze is in the application state, the initialization of the interface and data receiving and transmitting are allowed; if the application state is in, executing step b; if the application state is not in the application state, returning an error and not continuing to execute;
b) filling interface initialization parameters including but not limited to channel number, baud rate, check bit and stop bit information into the dual-port structural body by the PowerPC terminal;
c) the PowerPC terminal fills an interface initialization command into the double port to inform the Microblaze that the initialization of the IP core can be carried out according to the interface initialization parameters;
d) in the Microblaze period, reading a command written by a PowerPC end from the double ports, and when detecting an interface initialization command, starting entering an interface initialization process by the Microblaze and reading interface initialization parameters from the double ports;
e) calling an interface initialization function by Microblaze, and transmitting initialization parameters written by a PowerPC end into the interface function;
f) after the Microblaze completes the interface initialization, a corresponding channel initialization completion mark is arranged in the double ports;
h) the PowerPC end periodically inquires whether Microblaze successfully completes interface initialization or not, the whole initialization process is completed after the Microblaze initialization is successfully acquired, and if the interface initialization fails to be inquired, an error value is returned to the application software;
step 2: interface data interaction procedure
Asynchronous receiving and sending of interface data are achieved between the PowerPC and the Microblaze in a circulating buffer area mode; the circular buffer area is provided with two pointers, namely a head pointer and a tail pointer, wherein when one end of the circular buffer area is used for writing data, only the tail pointer is moved, and when the other end of the circular buffer area is used for reading data, only the head pointer is moved; when the two pointers reach the size of the buffer area, the circulation is started from the head;
step 2.1: the interface data sending steps are as follows:
a) before the PowerPC side sends data, a head pointer and a tail pointer in a circular buffer area are saved;
b) the PowerPC writes the sent data into the buffer area from the tail pointer;
c) modifying the tail pointer after the PowerPC finishes data writing;
d) c, reading a head pointer and a tail pointer of the circular area by Microblaze, calculating whether data exist in the current circular buffer area, if no data exist, continuing reading in the next period, and if data exist, entering a step e;
e) microblaze saves the head pointer and the tail pointer in the buffer, and reads data from the head pointer;
f) microblaze modifies the head pointer;
f) the Microblaze writes the data in the double ports into a register of the IP core to realize the transmission of the data;
step 2.2: the interface data receiving step is as follows:
a) after the Microblaze end receives the data, a head pointer and a tail pointer in a circular buffer area are firstly stored;
b) microblaze writes the transmitted data into the buffer from the tail pointer;
c) after the Microblaze finishes writing data, modifying a tail pointer;
d) the PowerPC reads a head pointer and a tail pointer of the circular area and calculates whether data exists in the current circular buffer area, if no data exists, the reading is continued in the next period, and if data exists, the step e is carried out;
e) the PowerPC saves a head pointer and a tail pointer in the buffer area and reads data from the head pointer;
f) the PowerPC modifies the head pointer;
g) the PowerPC returns the data in the double ports to the application software to realize the receiving of the data;
step 2.3: microblaze health monitoring process
The method comprises the steps that PowerPC judges whether Microblaze normally operates through a flag bit and a count value, after the PowerPC executes initialization, a Microblaze health monitoring task is initiated, whether the Microblaze is healthy is periodically judged, healthy interaction between the PowerPC and the Microblaze is carried out through three variables of Monitorflag, MonitorData1 and MonitorData2 on double ports, wherein the Monitorflag indicates whether the PowerPC can be written, the MonitorData1 indicates a write count value of the PowerPC, the read count value of an opposite end is written into data2, and the MonitorData2 is a count value read by the PowerPC and written by the opposite end;
the specific steps of the health monitoring interactive process are as follows:
a) PowerPC assigns a value to monitorData1 and increments each cycle;
b) PowerPC sets flag to 1, at which time Microblaze reads this flag to assign the value of monitoreData 1 to monitoreData 2;
c) the Microblaze setting flag is 0, the PowerPC judges whether the flag is 0, and if the flag is not 0 for more than 5 times, the Microblaze fault is considered;
d) the PowerPC judges whether the value of monitorData2 is equal to the written count value, if so, Microblaze is normal, and if not, the failure is judged.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911238023.5A CN111190852A (en) | 2019-12-06 | 2019-12-06 | PowerPC and Microblaze interaction system and interaction method based on double ports |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911238023.5A CN111190852A (en) | 2019-12-06 | 2019-12-06 | PowerPC and Microblaze interaction system and interaction method based on double ports |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111190852A true CN111190852A (en) | 2020-05-22 |
Family
ID=70707635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911238023.5A Pending CN111190852A (en) | 2019-12-06 | 2019-12-06 | PowerPC and Microblaze interaction system and interaction method based on double ports |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111190852A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035394A (en) * | 2020-07-27 | 2020-12-04 | 首都师范大学 | Storage device of multi-core processor for real-time processing and data processing method |
CN112433966A (en) * | 2020-11-15 | 2021-03-02 | 中国航空工业集团公司洛阳电光设备研究所 | Multi-interface architecture based on Windows platform and implementation method |
CN117851268A (en) * | 2024-03-07 | 2024-04-09 | 广东省新一代通信与网络创新研究院 | High-frequency differential system of prototype verification platform based on FPGA |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6687903B1 (en) * | 2000-06-28 | 2004-02-03 | Emc Corporation | Inhibiting starvation in a multitasking operating system |
CN103885844A (en) * | 2014-03-25 | 2014-06-25 | 卡斯柯信号有限公司 | High-speed safe double-port RAM data interaction method and device based on role changing |
CN107203484A (en) * | 2017-06-27 | 2017-09-26 | 北京计算机技术及应用研究所 | A kind of PCIe based on FPGA and SRIO bus bridge systems |
CN107562437A (en) * | 2017-09-12 | 2018-01-09 | 中国航空工业集团公司洛阳电光设备研究所 | A kind of system and method for the FPGA online upgradings based on the soft cores of MicroBlaze |
-
2019
- 2019-12-06 CN CN201911238023.5A patent/CN111190852A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6687903B1 (en) * | 2000-06-28 | 2004-02-03 | Emc Corporation | Inhibiting starvation in a multitasking operating system |
CN103885844A (en) * | 2014-03-25 | 2014-06-25 | 卡斯柯信号有限公司 | High-speed safe double-port RAM data interaction method and device based on role changing |
CN107203484A (en) * | 2017-06-27 | 2017-09-26 | 北京计算机技术及应用研究所 | A kind of PCIe based on FPGA and SRIO bus bridge systems |
CN107562437A (en) * | 2017-09-12 | 2018-01-09 | 中国航空工业集团公司洛阳电光设备研究所 | A kind of system and method for the FPGA online upgradings based on the soft cores of MicroBlaze |
Non-Patent Citations (1)
Title |
---|
高玺;张志国;: "一种基于Microblaze的用户接口电路设计", 计算机与网络 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035394A (en) * | 2020-07-27 | 2020-12-04 | 首都师范大学 | Storage device of multi-core processor for real-time processing and data processing method |
CN112035394B (en) * | 2020-07-27 | 2021-04-27 | 首都师范大学 | Storage device of multi-core processor for real-time processing and data processing method |
CN112433966A (en) * | 2020-11-15 | 2021-03-02 | 中国航空工业集团公司洛阳电光设备研究所 | Multi-interface architecture based on Windows platform and implementation method |
CN117851268A (en) * | 2024-03-07 | 2024-04-09 | 广东省新一代通信与网络创新研究院 | High-frequency differential system of prototype verification platform based on FPGA |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111190852A (en) | PowerPC and Microblaze interaction system and interaction method based on double ports | |
CN108228513B (en) | Intelligent serial port communication device based on FPGA framework | |
CN101807076B (en) | Duplication redundancy fault-tolerant high-reliability control system having synergistic warm standby function based on PROFIBUS field bus | |
CN108132897B (en) | SRIO controller based on ZYNQ platform soft core | |
CN101882119B (en) | NAND flash memory controller and data transmission method thereof | |
CN112463614A (en) | Software virtualization test environment construction method based on hardware board card access | |
CN114691578B (en) | High-performance serial communication method, system, medium, equipment and terminal | |
CN103092656A (en) | Navigation system and navigation method | |
CN102955474A (en) | Measurement control method and system of automobile ECU (electronic control unit) | |
CN113377701B (en) | Serial port control system based on complex programmable logic device CPLD and communication method thereof | |
US9026838B2 (en) | Computer system, host-bus-adaptor control method, and program thereof | |
CN111737103A (en) | Processor including debugging unit and debugging system | |
CN105718396A (en) | I<2>C bus device with big data master device transmission function and communication method thereof | |
CN105574242A (en) | Communication interface and simulation application method based on same | |
CN109739697B (en) | High-speed data exchange-based strong real-time dual-computer synchronization fault-tolerant system | |
CN115454881B (en) | Debugging system and debugging method of RISC-V architecture | |
CN114124609B (en) | Communication device and communication method based on 1553B bus | |
CN116382115A (en) | Safety platform simulation system and application method thereof | |
CN107861421B (en) | Dual-redundancy control device and method based on distributed system master-slave rotation type | |
CN115549782A (en) | Information query method of optical module and related assembly thereof | |
CN107977278A (en) | The method and apparatus that crash status data recovers processing | |
CN108153485A (en) | A kind of more equipment collaborations access the method and system of SRAM | |
CN205139625U (en) | HDLC transceiver controller based on FPGA | |
CN108037942B (en) | Adaptive data recovery and update method and device for embedded equipment | |
CN103455401A (en) | Coordinated verifying method for tight coupling architecture of DSP (Digital Signal Processor) and FPGA (Field Programmable Gate Array) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200522 |