1. Field of the Invention
The present invention relates to a line diagnostic device, a bus system, a line diagnostic method, a bus system control method, and a line diagnostic program, and more particularly to a line diagnostic device, a bus system, a line diagnostic method, a bus system control method, and a line diagnostic program that are suitable for ensuring safety.
2. Description of Related Art
Recent advances in the bus arbiter technology for mediating competition for mastership on the common bus are remarkable. Especially, the data transfer speed of a common bus used for a PC system, such as a PCI bus or an ISA bus, is rapidly increasing and, to guarantee the operation of the system, a bus arbiter for mediating multiple bus masters is required.
The operation of the bus arbiter is executed by mediation means that selects one bus master from multiple bus masters, each of which issues a bus usage right request, and grants the bus usage right to the selected bus master. The selected bus master acquires the bus usage right for transferring data to the bus. In general, the arbiter-based mediation is executed by inputting and outputting the bus-usage-right requesting REQ signal and the bus-usage-right granting GNT signal between the masters and the arbiter as in the PCI bus. To mediate requests, the arbiter mediates the REQ signals, issued from multiple masters, according to a predetermined mediation algorithm and outputs the GNT signal to one master. A technology for a bus arbiter is disclosed, for example, in JP-A-2003-099395 (See Patent Document 1).
In a system, such as a plant, a railway, and a plane, where extremely high reliability is required to protect the safety of human beings and environment, the failsafe mechanism is required to keep the whole system safe without adverse effects on others even if a system failure or a system error occurs.
Such a system tends to employ more and more electronic devices to perform sophisticated control operations and this tendency, in turn, requires higher reliability of the electronic devices.
Safety that is based on the assumption that the devices operate properly is called functional safety. Recently, the IEC (International Electrotechnical Commission) 61508 standard is constituted to define the objective level of the functional safety of a system that uses electronic devices. To implement a system that satisfies this level, various reliability mechanisms must be included into all constituent hardware and software parts.
For example, in a power generation plant system, the control unit receives an instruction from a control terminal and sends the received instruction to an I/O device to run the power generation plant. A failure or an error, if generated in the control device controlling those I/O devices, may endanger the controlled power generation plant. To prevent this situation, various types of failsafe mechanisms are included.
In the bus system part in this control device where two masters A and B and multiple slaves A and B are connected via the bus, master A or B sends data to the slaves A and B to perform control processing. To increase the reliability of the control device including the bus, each component of the transmission system composed of masters A and B, slaves A and B, and the bus is duplicated. In this redundant configuration, data is compared between the two transmission systems to detect an error and, if a mismatch is found, the system is safely migrated or stopped. Although a dual system like this is used in many fields, the problem is that the system configuration cost and the power consumption are several times as high as those of a standard non-dual system.
To solve this problem, the following configuration is sometimes built. That is, one-bit parity signal is added to the bus, and the parity check unit is added to the masters and the slaves. Each parity check unit adds a one-bit parity to data that is sent to the bus and, when data is received from the bus, checks the one-bit parity to see if the transferred data is correct. This checking increases the reliability of data transferred via the bus. Instead of the parity signal, the error correction code or the cyclic redundancy check code is also used in many cases.
During the control operation, data is not always required to be transferred among all multiple masters and multiple salves. To transfer data between a particular master and a particular slave, JP-A-11-328383 discloses a configuration in which a bus switch, selectively turned on and off, is provided in the connection part between a slave and a bus. JP-A-2005-276136 discloses another configuration in which a master and a slave are connected via a data transfer path generated by dividing the bus via a bus switch. During a data transfer between a master and a slave, this configuration allows another master and another slave, not involved in the data transfer, to transfer data via another data transfer path in the same bus.
In the control field having a control device, many systems are built using this arbiter technology. For example, when multiple plug-ins each having the arbiter function are provided on the backplane of a control device rack mounted on the control panel in a control plant and the multiple plug-ins, which act as bus masters, control the input/output of control objects, data is read from, and written into, the bus masters via the common bus. Especially, in the field of control where responsiveness is required, the arbiter operation is required to quickly switch the mediation of bus masters when a large amount of data is transferred, including a large amount of communication data transferred from multiple bus masters, to allow the online software processing operation to keep running at a constant speed. This requires quick switching between the data transfer and the mediation. The bus used in this case is either a unique bus or a current mainstream general system bus such as the PCI bus.
On the other hand, it is highly possible, from the nature of the device and the system, that not only a control device used in a mission critical control field is responsible for controlling and protecting devices via data input/output to or from control objects but also the operation of a control device is related to the safety of devices of the controlled objects (process side) and to the protection of human beings. This possibility leads to the high requirements for the safety of the system and the control device that controls the system. One of the responses to those requirements is IEC61508, an international standard for the functional safety, that is beginning to be applied to a control device across the world. This functional safety standard IEC61508 includes the definition of the safety requirements for a bus arbiter. Satisfying those safety requirements enables a control device to attain a predetermined safety level.
To prevent a control device from performing dangerous operations, the functional safety requires that the main functions be diagnosed. The standard also requires that the arbiter operation, which is the core operation on the bus, be diagnosed. When the central processing unit, which processes safety data and outputs the processed data to a process based on data entered from a controlled object (process side), acts as a bus master and transfers the safety data to the bus, it is required that the safety-related data does not affect the safety operation when an incorrect output is sent to, or an incorrect operation is performed on, a controlled object. Even when the arbiter operates incorrectly, it is necessary to detect the error and to stop outputting the safety data to a process within the reaction time in order to prove that the safety data is not destroyed and that the safety data is not output incorrectly to a controlled object.
Various diagnostic methods are proposed as a technology for increasing the safety of a control device. The diagnosis rate can be increased by diagnosing the microprocessor, bus, memory, ASIC, and input/output. However, those diagnoses are sometimes insufficient to cover the failure mode (abnormality) that may occur on the bus arbiter, and the arbiter function must be diagnosed to further increase the diagnosis rate.
First, the possible failure mode of an arbiter includes a malfunction caused by the signal sticking of the bus request signal REQ and the bus grant signal GNT and an arbiter malfunction generated by a function error caused by an error in the functions in the arbiter such as the mediation operation function and the status control function. When any of those errors is generated and there is a failure mode that is not detected but may lead to a dangerous operation, it is necessary to check if safety data is transferred safely. Thus, diagnosing a failure mode described above that may affect the transfer of safety data is necessary to increase the safety of a control device.
One of the diagnostic methods is the software-based diagnosis of the arbiter operation. The advantage of the software-based diagnosis is that the arbiter can be diagnosed relatively flexibly by the diagnostic operation executed via a diagnostic pattern created by the microprocessor, while the disadvantage is that the creation of the diagnostic processing program requires manpower and that the diagnostic processing during the online operation takes long. Especially, the disadvantage described above requires the interruption of data transfer during the real time operation where responsiveness and high-speed operation are required, thus resulting that safety data cannot be transferred regularly and timely. This may lead to a fatal performance problem in the online real-time processing where speedy control operations are required.
Another problem is that an arbiter is usually built as a custom LSI (ASIC) and the circuit for diagnosing the arbiter is sometimes built as the hardware logic in the same LSI. In this case, if an error occurs, it is difficult to identify the scope of the error. Therefore, if an error occurs in the arbiter, it is necessary to verify that the diagnostic circuit in the same LSI for diagnosing the arbiter functions correctly.
It is one of the objects of the present invention to provide a diagnostic device, a line diagnostic method, and a line diagnostic program that can solve at least one of the problems described above.
For example, if a slave not involved in the transfer fails while a master is transferring data to another slave, the failed slave may improperly send incorrect data to the bus and the bus data become disturbed. If only one bit of the bus data signal is affected by the bus data disturbance, the error may be detected by the parity signal and the parity check. However, if two or more bits are changed at a time or if all data transferred from the master to the salve is overwritten by the data sent from the failed slave, the error cannot be detected by the parity or the error correction code. If the data transferred at that time is important data related to the functional safety of the system, the system may enter the dangerous state.
The method disclosed in JP-A-11-328383 is that, while data is transferred to a specific slave via the bus, processing is performed between each of the other slaves and its own local memory. However, there is no means for the system to check if the data is related to the functional safety. Therefore, after the data is transferred, the salve is disconnected from the bus and the processing is performed between the slave and the local memory. This means that the slave side cannot perform the functional safety processing and, in addition, there is no means for maintaining the safety of the device and the system when the master or the salve fails or the bus switch fails. The document does not describe what status will occur in this case.
The device disclosed in JP-A-2005-276136 does not have means for checking if the data is related to the functional safety. The document does not disclose means for maintaining the safety when the master or a slave fails or a bus switch fails.
It is one of the objects of the present invention to provide a reliable bus system that can prevent a failure, which occurs in a part not related to the transfer of priority data during its transfer, from affecting the transfer of the priority data.
To achieve the above object, the present invention provides a line diagnostic device comprising a mediation control unit that sends and receives a usage right mediation signal of a second communication line via a first communication line wherein information on a controlled object is sent and received via the second communication line; and a diagnosis unit that monitors signals on the first communication line for checking for an abnormality in the mediation unit, wherein, if an abnormality is found in the mediation unit, the diagnosis unit outputs a signal for suppressing a communication on the second communication line.
To increase the diagnosis rate of a control device itself, the present invention does not rely on a technology for diagnosing the bus, which is a data transfer path, and on the diagnosis by a microprocessor but provides an external diagnostic device having the arbiter function diagnosis means to cause this device to safely stop the output of data when an arbiter abnormality is detected.
According to the present invention, the “line diagnostic device” is a diagnostic device configured as a part separate from the system LSI containing the arbiter. The device monitors the bus right request REQ signal output from bus masters to the arbiter, the bus right grant GNT signal output from the arbiter to the bus masters, and the signals related to other arbiter operations to diagnose the arbiter operation.
The diagnostic device monitors the signals in the mediation period before the bus transfer cycle during the online operation. As described above, to solve the problem of performance degradation involved in the software-based arbiter operation diagnosis, the diagnostic device performs hardware-based monitoring in the mediation period to prevent the data transfer from being interrupted. Monitoring the output status of the bus right grant GNT signal in the monitoring time period makes it possible to detect whether the arbiter operation is normal or abnormal. Normally, the effective bus right grant signal should not be output during the mediation period to multiple bus masters. If the bus right grant signal is issued to multiple bus masters, it is possible that a signal sticking condition occurs or a bus right grant GNT signal generation unit in the arbiter fails. In this case, the diagnostic device can monitor the bus right grant GNT signal to diagnose the arbiter function. If multiple bus right grant GNT signals are output, multiple bus masters, which incorrectly identify that they have received the bus right, may output data to the bus with the result that a data conflict may occur. Such a situation, if generated while safety data is being transferred, destroys the safety data. Therefore, the diagnostic device has means that, when this abnormality is detected, protects the safety data immediately and outputs a stop instruction to the bus control unit to stop the data safely.
The monitoring means described above is an example, and there are other monitoring methods. Embodiments of the present invention describe means for increasing the diagnosis rate of the arbiter and the means for testing the diagnostic device from an external microprocessor on a software basis. Those means are implemented by monitoring the state transition of the arbiter, by monitoring the bus SW control signal on/off status that changes with the safety data transfer status signal on the line, and by monitoring the GNT signal.
A bus system in which one or more masters and a plurality of slaves are connected to a bus via bus switches for transferring data between the masters and the slaves comprises a first data transfer period specification unit provided in the master for specifying a transfer period of first data; and a switch control unit that, when the transfer period of the first data is specified, sets the bus switches, corresponding to the master and the slave between which the first data is transferred, to ON and, sets the bus switches, corresponding to the master and the slave not related to the transfer of the first data, to OFF.
In a preferred embodiment of the present invention, when there are two types of transfer data in a target system, the transfer of the first data is a transfer of data to which priority should be given.
In a preferred embodiment of the present invention, the transfer of the first data is a transfer of data necessary for maintaining the safety operation of a target system.
In a preferred embodiment of the present invention, the first data is data related to the basic function of a target system and the other transfer data is data related to the auxiliary function the target system.
For example, in a power generation plant, data related to the power generation plant control function is data related to the basic function of the target system and data for use by a control monitor that monitors and displays the operation status of the power generation plant is data related to the auxiliary function of the power plant system to be diagnosed.
The present invention satisfies the requirements for the responsiveness and for the safety of data transfer and mediation control operation without decreasing the transfer performance, thus increasing the safety of the whole control device. More specifically, the diagnostic device, configured by a part different from the arbiter, provides means for monitoring the timing of data transfer during an online operation for diagnosing an arbiter operation abnormality, not through software diagnostic processing, but on a hardware basis. This diagnostic device satisfies the requirement for the responsiveness of data transfer and for the safety of the mediation control operation without performance degradation due to a failure in the data transfer on the line, thus increasing the safety of the whole control device.
The present invention provides bus switches between the bus and the masters and between the bus and slaves and, during the transfer of first data, disconnects the master and the slave, not related to the transfer, from the bus. This configuration reduces failures generated in the transfer of data on the bus.
This configuration implements a reliable bus system that reliably transfers priority data simply by adding low-cost improvements to an existing bus system without duplicating the bus and the circuits.
Other objects and features of the present invention will be made more apparent by the description of embodiment described below.
Embodiments of the present invention will be described below.
The following describes the basic operation of the control device. The central processing storage unit CPU 10 transfers data to and from a data register 33 in the communication control device P030 via a line 261. The transmission/reception data written in the data register 33 is sent to a communication control device S1 serially or in parallel via a line 362. At reception time, data received via the line 3 is written in the data register 33 from which the central processing storage unit CPU 10 reads it. Similarly, the central processing storage unit CPU 10 transfers data to or from an input data register 42 of the input device 140 and an output data register 52 of the output device 150. Process input data 43 sent from a controlled object 70 to the input device 140 is written in the input data register 42 from which the central processing storage unit CPU 10 reads it. Data written from the central processing storage unit CPU 10 to the output data register 52 in the output device 150 is output to the controlled object 70 as process output data 53.
The central processing storage unit CPU 10 has a line control unit 13, and the communication control device P030 has a line control unit 31, for controlling the transfer of data to the line 261. The line control units, which issue the line usage right request signal and the line usage right grant signal, and a mediation control unit 12 in the central processing storage unit CPU 10 control the mediation of those signals. The communication control device P030 has a line SW (bus SW) 32, the input device 140 has a line SW 41, and the output device 150 has a line SW 51. The bus SW has a switching function for electrically connecting the device to, and electrically disconnecting the device from, the line 261, and the switch control signal is a part of the signals sent over a line 160. The switching control signal, output from the mediation control unit 12 of the central processing storage unit CPU 10, establishes the one-to-one connection between the central processing storage unit CPU 10 and each of the communication control device P030, input device 140, and output device 150.
The central processing storage unit CPU 10 or the communication control device P030 can acquire the bus right in the control device for using the line 261. When each of the control devices acquires the bus right, the bus right usage request signal and the bus right usage grant signal of the line 1 are used to control the mediation of the line usage. When the central processing storage unit CPU 10 requests the transfer of data, the line control unit 13 outputs the line usage right request signal to the mediation control unit 12 and, after receiving the line usage right grant signal of the line 160 output by the mediation control unit 12, transfers the data from a data register 11 to the transfer destination via the line 261. On the other hand, when the communication control device P030 requests the transfer of data, the same procedure is used. That is, the line control unit 31 outputs the line usage right request signal to the mediation control unit 12 and, after receiving the line usage right grant signal of the line 160 output by the mediation control unit 12, transfers the data from the data register 33 in the communication control device P030 to the transfer destination via the line 261.
Next, the following describes a line diagnostic device 20 according to the present invention. The line diagnostic device 20 monitors the signal of the line 261 used for data transfer and the signal of the line 160 used for the mediation operation. In this embodiment, when a line usage request is issued alternately between the central processing storage unit CPU 10 and the communication control device P030 both of which have the bus usage right, the mediation control unit 12 mediates the use of the line 2 using the signal transmitted via line 160. A monitor unit 22 in the line diagnostic device 20 monitors the signal operation and the timing of the mediation operation of the line 1 in synchronization with the timing signal sent over the line 261. When an abnormal operation is detected on the line 261, the monitor unit 22 sends an abnormal condition notification to an operation instruction unit 21 in the line diagnostic device 20. Upon receiving this notification, the operation instruction unit 21 issues an instruction to the line control unit 13 in the central processing storage unit CPU 10 to stop the output of data.
The following describes, in detail, the timing of the mediation control operation performed via the line 160 and the monitor operation of the line diagnostic device 20 with reference to
The line diagnostic device 20 according to the present invention, connected to the line 261 used as a data transfer path, is configured as a part separate from the mediation control unit 12. The line diagnostic device 20 monitors the line 160, the line 261, and a STATE signal 23 indicating the mediation operation state output by the mediation unit 14 in the mediation control unit 12 to provide means for detecting an abnormal operation in the mediation control unit. The line diagnostic device 20 has the operation instruction unit 21 that outputs an instruction to the line control unit 13 in the central processing storage unit CPU 10 when an abnormal condition is detected to provide means for stopping the output data.
In the configuration shown in
The following describes the operation timing diagram of the mediation control unit at a normal operation time shown in
The STATE signal 23 has five states, T0-T4, from the mediation operation of the line 261 to the completion of bus transfer. STATE=T0, IDLE state, indicates the idle state before the bus mediation operation is started. STATE=T1, ARB state, indicates that line usage right requests are issued from multiple devices and the mediation operation is being performed. STATE=T2, ACKWAIT state, indicates a cycle in which the line usage right grant signal GNT is issued to a device, selected by the mediation operation in the ARB state, the GNT switching specification (signal) 16 is output.
As shown in
As described above, in the timing diagram of line 261 to which multiple control devices output the line usage right request REQ at normal operation time, the state transition, T0-T4, repeatedly occurs under control of the mediation control unit 12 to transfer data. The line diagnostic device according to the present invention provides means that monitors the timing, the state signal, and the signals sent over the line 160 on a hardware basis.
The following describes the flow of the software-based diagnostic operation, performed by the mediation control unit, with reference to
Considering the above, the following describes the timing diagram of the software diagnosis shown in
First, the central processing storage unit CPU 10 performs diagnostic processing 130 for the mediation control unit and performs input processing A 133 based on input data from a controlled object. After the input processing A 133 is completed, the central processing storage unit CPU 10 transfers data from the data register 11 to the data register 33 in the communication control device P030 via the line 261. After that, the timing diagram shows that the communication control device P030 acquires the line usage right grant and transfers data to the line 2 and, after that, the central processing storage unit CPU 10 acquires the line usage right grant again and transfers data to the line 2. The mediation control unit 12 performs the mediation operation to switch the line usage right grant for data transfer to allow data to be transferred based on the timing diagram of the normal operation shown in
While the method described above increases the diagnosis rate though the variation in the data timeliness depends on how often the software-based diagnostic processing is performed, this method has a problem in data responsiveness, regularity, and timeliness. Therefore, the diagnostic method executed by the line diagnostic device implemented by the hardware monitor means of the present invention offers solutions to those problems. The following describes examples of the line diagnostic device of the present invention with reference to
In the first embodiment, the line diagnostic device 20 detects the simultaneous output of the line usage right grant signal GNT, generated by a failure mode such as a signal sticking condition on the line 160 or an abnormality in the mediation control unit 12, and takes an action for this situation to avoid a data conflict on the line 261 and to ensure safety.
Referring to
Referring to
If the means shown in
In the second embodiment, the line diagnostic device detects a signal sticking condition on the line 160 that is considered a failure mode or the incorrect output of the switch control signal or the GNT signal generated by an abnormality in the mediation control unit 12, and takes an action for those conditions to ensure safety. More specifically, when safety data is protected by the bus SW on/off control, the means shown in
Referring to
The state transition during the normal operation executed by the mediation unit 14 of the mediation control unit 12 shown in
An example of the abnormal operation is that the state detected by CHK1 is normal (CHK1100=STATE=001), the state detected by CHK2 is normal (CHK2101=STATE=010), and the state detected by CHK3 is abnormal (CHK3102=STATE=100 (expected value=011)), meaning that a state transition abnormality is detected in the ACKWAIT state detected by CHK3102. In this case, the output timing of the GNT switching specification (signal) 16 shown in
In the third embodiment, a state transition abnormality in the mediation unit 14 in the mediation control unit 12 that is considered a failure mode, an error in the internal logic state transition status bit, or a state transition abnormality generated by a signal sticking condition in the LSI for implementing the operation of the mediation control unit is detected, and an action is taken for them. This ensures the safety of the data transfer in the control device and the safety of the mediation control operation in the same way as in the first embodiment.
A control device in
The following describes the operation flow with reference to
In the fourth embodiment, the diagnostic test conducted by the line diagnostic device 20 of the present invention is performed using test patterns generated by the microprocessor μP 170 of the central processing storage unit CPU 10 for ensuring the safety when a duplication failure occurs. The diagnostic test processing is performed by allocating a part of the software processing time to the test processing in a control cycle during the execution of online processing.
Although the devices, such as the line diagnostic device 20, are shown using the functional block diagram in the above description, the central processing storage unit and the functions described above may also be created as programs.
Embodiments of the present invention will be described below with reference to the drawings. In all of the drawings, the same reference numeral is basically given to components having the same function and repetitive description will not be given.
A master (A) 301, a master (B) 302, a slave (A) 303, and a slave (B) 304 are connected to a bus 305 via bus switches 331-334, respectively.
Bus switch control signal (swc) 321-324, output by a switch control unit 311, switch the bus switches 331-334 between the ON state and the OFF state. In the description below, the state is ON when the bus switch control signal (swc) is 1, and OFF when the bus switch control signal is 0.
The master (A) 301 is connected to the bus 305 when the bus switch 331 is ON, and is disconnected from the bus 305 when the bus switch 331 is OFF. The same applies to the master (B) 302, slave (A) 303, and slave (B) 304.
A bus arbiter 312 is a part that mediates requests to avoid a conflict when multiple masters request the use of the bus 305. For example, the bus arbiter receives an asserted request (req) signal 361 from the master (A) 301, and an asserted req signal 362 from the master (B) 302 and, as a result of mediation, asserts an acknowledge (ack) signal 351 or 352 of one of the masters.
The master (A) 301 or master (B) 302, whose ack signal is asserted, transfers data via the bus 305 and, after the transfer is terminated, negates the req signal and, in response to it, the ack signal is negated.
The switch control unit 311 in
Note that there are two types of data transfer used for transferring data in the bus system of the system. The first data transfer is the transfer of data whose priority is higher than that of other (second) transfer data, for example, the transfer of data necessary to maintain the safety operation of the system. In another example, the first data is data related to the basic function of the system, and the other (second) transfer data is data related to the auxiliary function of the system.
In
In addition, a priority (safety) data signal 371, output by the master (A) 301, is 1 in the period of time during which the master (A) 301 transfers the first (safety) data in the bus system in
In the period when the value of the priority (safety) data signal 371 is 1 and the priority (safety) data of functional safety is transferred, the value of a priority (safety) data signal 384 inverted by a NOT gate 376 becomes 0.
When the value of the ack signal 351 sent to the master (A) 301 is 1, an OR gate 377 sets the value of the bus switch control signal (swc) 321 of the master (A) 301 to 1. Similarly, when the value of the ack signal 352 sent to the master (B) 302 is 1, an OR gate 378 sets the value of the bus switch control signal (swc) 322 of the master (B) 302 to 1. When the value of the priority (safety) data signal 371 is 1, the values of the bus switch control signals (swc) 323 and 324 for the slaves are determined as follows.
The address signal 393 of the slave accessed by the master (A) 301 and the address signal 394 of the slave accessed by the master (B) 302 are output by a selector 372 as a selection address signal 395. The output of the selector 372 is selected by the ack signal 351 sent to the master (A) 301 and the ack signal 352 sent to the master (B) 302. The bus arbiter 312 mediates the ack signal 351 and the ack signal 352 so that only one of them is set to 1. The selection address signal 395 is decoded by an address decoder 374 from which slave selection signals 381 and slave selection signal 382 are output. The value of the slave selection signal 381 is 1 when the slave (A) 303 is specified as the transfer destination as a result of address decoding, and is 0 when the slave (A) 303 is not specified as the transfer destination. This applies also to the slave selection signal 382 used to specify the slave (B) 304. An ack effective signal 383, whose value is set to 1 by an OR gate 375 when one of the values of the ack signals 351 and 352 is 1, is input to AND-OR gates 379 and 380. That is, the bus switch control signal (swc) 323 sent to the slave (A) 303 causes the master to select the slave (A) 303 as the transfer destination when the priority (safety) data signal 371 is 1. Its value remains 1 only when the ack signal to one of the masters is effective and data is being transferred; otherwise, the value is 0. The value of the bus switch control signal (swc) 324 sent to the slave (B) 304 also varies in the same way the bus switch control signal (swc) 323 sent to the slave (A) 303 varies.
On the other hand, in the period when the value of the priority (safety) data signal 371 is 0 and ordinary data not related to functional safety is transferred, the value of the priority (safety) data signal 384 inverted by the NOT gate 376 is 1. Therefore, the values of the bus switch control signals (swc) 321-324, output from the OR gates 377 and 378 and the AND-OR gates 379 and 380, are all set to 1.
From clock cycle t0 to clock cycle t1 in
Assume that the master (A) 301 asserts the req signal 361 of the master (A) 301 in clock cycle t2 to request the bus for transferring priority (safety) data to the slave (A) 303. This req signal 361 remains asserted till the data transfer of the master (A) 301 is terminated.
Judging that the master (A) 301 is the only master that issues a request in clock cycle t2, the bus arbiter 312 asserts the ack signal 351 of the master (A) 301 in clock cycle t3. The master (A) 301, which has the ack signal 351 asserted, asserts the priority (safety) data signal 371 and negates the bus switch control signal (swc) 322 of the master (B) 302. In addition, the address included in the selection address signal 395 is decoded to find that the slave is the slave (A) 303, and the bus switch control signal (swc) 324 of the slave (B) 304 is negated.
The timing diagram shown in
Assume that the slave (B) 304 fails during the transfer of the priority (safety) data from clock cycle t5 to clock cycle t6 in
The switch control unit 311 shown in
Because the value of the priority (safety) data signal 371 is 0 in the period from clock cycles u0 to u9 in
In clock cycle u1, the master (B) 302 that transfers ordinary data to the slave (B) 304 asserts the req signal 362 of the master (B) 302 to request the bus 305. Because the master (B) 302 is the only master that issues a request in clock cycle u1, the ack signal 352 of the master (B) 302 is asserted in clock cycle u2. Therefore, data is transferred from the master (B) 302 to the slave (B) 304 in the period from u2 to u5.
In clock cycle u3, the master (A) 301 that transfers ordinary data to the slave (A) 303 asserts the req signal 361 of the master (A) 301 to request the bus 305. However, because the master (B) 302 is using the bus 305, the master (A) 301 must wait until clock cycle u6 when the master (B) 302 terminates the transfer. Because the master (A) 301 is the only master that requests the bus in clock cycle u6, the master (A) 301 transfers data to the slave (A) 303 beginning in clock cycle u7.
Assume that the master (A) 301 or the slave (A) 303 fails during the transfer of data from the master (B) 302 to the slave (B) 304 in
Note that the bus system may be configured in such a way that the part corresponding to the switch control unit and the address signals are built in the master, which output safety data, to allow the switch control signal to be output from the master.
In the above embodiment, the masters and slaves, which transfer first data and second data, are mixed on the bus in the bus system where multiple masters and slaves are connected to one bus. The first data is priority (safety) data whose reliability must be guaranteed, and the second data is ordinary data other than priority (safety) data. That is, the master and the slave, which handle priority (safety) data, and the master and the slave, which does not handle priority (safety) data, are mixed on the bus. In this case, even if the master or the slave not related to the transfer of priority (safety) data fails during the transfer of the priority (safety) data on the bus, the priority (safety) data can be transferred correctly. That is, even if the failed mater or slave unintentionally flows incorrect data into the bus, the bus switch control disconnects a part not related to the transfer to allow the priority (safety) data to be transferred correctly.
In addition, when ordinary data that is not priority (safety) data is transferred, setting all bus switches to ON to make the configuration compatible with a conventional bus to allow the design of this embodiment to be added and applied to an existing bus system easily.
Although the address bus and the data bus are separate in
In addition, if the salves have the direct memory access function for transferring data between the slaves, the control operation to switch the bus switches between ON and OFF also enables priority (safety) data to be transferred reliably. Ordinary data can also be transferred compatibly with a conventional bus.
Another advantage is that adding only the bus switches and the switch control unit without multiplexing the bus, masters, and salves can also implement a safe, reliable bus system.
Next, an example of a method for diagnosing a bus switch sticking condition in a bus system in a sixth embodiment of the present invention will be described.
A master (A) 306 contains a data register 341 that holds data, and a master (B) 307, a slave (A) 308, and a slave (B) 309 also contain data registers 342, 343, and 344, respectively. Those data registers 341-344 are interconnected via a register access unit 315 contained in the switch diagnosis unit 313 so that they can access each other via the bus 305. The register access unit 315 writes specified data to, and reads data from, the data registers 341-344.
A diagnostic mode register 345 contained in the switch diagnosis unit 313 is a two-bit register. Changing the value of the diagnostic mode register 345 changes the value of the switch diagnostic mode signal (swd) 373. The value of 1 of the low-order bit of the switch diagnostic mode signal (swd) 373 indicates the switch diagnostic processing mode in which a check is made if the bus switch is in a sticking condition, while the value of 0 indicates the normal operation mode.
In the switch diagnostic mode, the value of the high-order bit of the switch diagnostic mode signal (swd) 373 is directly output to bus switch control signals (swc) 325-328.
The value of the two bits of the switch diagnostic mode signal (swd) 373 is 11 in
Conversely, if the data written immediately before is not read but different data or an arbitrary value is read, it is determined that the bus switch 331 sticks to the OFF state. Therefore, this read/write operation can avoid a situation in which data cannot be transferred due to a failure in the master (A) 306 and the system is endangered.
In this way, this embodiment can diagnose that the bus switch 331 of the master (A) 306 does not stick to the OFF state but is correctly in the ON state.
The bus switches 332-334 of the master (B) 307, slave (A) 308, and slave (B) 309 can also be diagnosed in the same way to check whether or not the switch sticks to the OFF state.
Next,
Conversely, if the data written immediately before is read, it is determined that the bus switch 332 sticks to the ON state. As a result, this read/write operation can avoid a situation in which another failure in the master (B) 307 adversely affects the bus 305.
In this way, this embodiment can diagnose that the bus switch 332 of the master (B) 307 does not stick to the ON state but is correctly in the OFF state.
The bus switches 331, 333, and 334 of the master (A) 306, slave (A) 308, and slave (B) 309 can also be diagnosed in the same way to check whether or not the switch sticks to the ON state.
After the bus system power is turned on, start processing 441 is performed first and, before normal processing is started, switch diagnostic processing 442 is performed. The switch diagnostic processing refers to the processing for checking if the bus switch sticks to the ON state and to the OFF state as described in
If a bus switch sticking failure is detected in the switch diagnostic processing 442-444, the processing is terminated abnormally and a notification is sent to the system to avoid a dangerous situation.
According to another embodiment of the present invention described above, the diagnosis can detect a potential failure that may be caused when a bus switch sticks, increasing the reliability of the bus system and reducing the possibility that the whole system is endangered.
Although the switch diagnostic mode signal (swd) 373 is represented by the 2-bit line in this embodiment, it is also possible to provide the signal into two: the diagnostic mode switching signal and diagnostic data signal.
Although the means is disclosed in the embodiment for detecting a bus switch failure by writing to and reading from a data register, the diagnostic communication path of the communication path diagnostic device, disclosed in JP-A-2006-139634, may also be used to detect a bus switch sticking failure.
Next, the following describes the structure of a bus switch used in the bus system of the present invention.
In this configuration, the bus switch is implemented by controlling the value of the control signal 402 in such a way that the MOS switch is set to ON to set the bus switch to ON and that the MOS switch is set to OFF to set the bus switch to OFF.
This selector 405, in which a control signal 406 causes one of an input (A) 407 and an input (B) 408 to be transmitted to an output 409, is configured by connecting one of the input (A) 407 and the input (B) 408 to a master or a slave and by connecting the output 409 to the bus.
The input not connected to the master is set to a high impedance state. In this configuration, the bus switch is implemented by controlling the value of the control signal 406 in such a way that the input to which the master is connected is selected to set the bus switch to ON and that the high impedance input is selected to set the bus switch to OFF.
In this tri-state buffer 450, the value of a control signal 451 determines whether the value of an input 452 is output to an output 453 or high impedance is output to the output 453. This tri-state buffer 450 is configured by connecting the input 452 to a master or a slave and by connecting the output 453 to the bus.
In this configuration, the bus switch is implemented by controlling the value of the control signal 451 in such a way that the value of the input 452 is output to the output 453 to set the bus switch to ON and that the high impedance is output to the output 453 to set the bus switch to OFF.
The use of a widely used general-purpose transistor cell as the bus switch as described above allows the bus switch to be implemented relatively easily and at a low cost.
The following describes examples of applications of the bus system according to the present invention.
Basically, the power generation plant 410 is started as follows. A command entered from the control terminal 412 causes the I/O control signal to be sent from the plant control unit 415 to the I/O control unit 416 via the bus 418. This I/O control signal starts the I/O device 413 that starts the power generation plant 410. Therefore, rather than the display control unit 417, the plant control unit 415 and the I/O control unit 416 perform the basic function to control the power generation plant 410. Therefore, the I/O control signal, which flows through the bus 418, must be highly reliable. This I/O control signal is the first data having high reliability described above.
On the other hand, the display control unit 417 monitors display data flowing through the bus 418 and displays necessary information on the control monitor 414. Therefore, this monitor-related data, which is auxiliary function data described above for the power generation plant 410, corresponds to the second data.
To apply the present invention to the power generation plant 410, the bus system is configured in which the plant control unit 415 corresponds to the master (A) 301 in
If the display control unit 417 fails in this application example, the display of the control monitor 414 is disturbed or erased. However, even if the display is erased, the operation of the power generation plant 410 is not affected and so the power generation should be continued. It is only required that a monitor failure can be corrected at a later time by replacing the display control unit 417 or the control monitor 414 when the plant is stopped.
To allow the control signal to be output to the power generation plant 410, the bus switches 331 and 333 are set to ON and the bus switch 334 is set to OFF as shown in the figure. Therefore, this configuration prevents the data in the bus 418 from being disturbed by a failure in the display control unit 417 and from the value of the I/O control signal from being changed unintentionally. This means that this configuration ensures the correct I/O control operation, avoids the worst situation in which the power generation plant cannot be controlled, and increases the reliability of the power plant system.
Note that, for the car 420, a command for the steering wheel and the brake is more important than a command for the engine. That is, a command for the engine corresponds to the second (ordinary) data of the present invention, and a command for the steering wheel and the brake corresponds to the first data transfer necessary for maintaining the safety operation of the system.
During the period when the brake pedal 429 is pressed and the brake command is active, the switch control unit 311 controls the bus switches so that the fuel injection command from the accelerator pedal 422 is inhibited. That is, bus switches 611-615 for the brake and the bus switches 621-623 for the steering wheel are always ON, and bus switches 631-632 for the accelerator are set to OFF during the period when the brake pedal 429 is pressed and the brake command is active.
Even if the value of the acceleration signal (fuel injection command) is garbled and the speed changes unintentionally when the engine ECU 424 fails, the driver can press the brake pedal 429 to stop the car correctly for maintaining the safety of the car system.
Even if the engine ECU 424 fails and incorrect data flowing through the in-vehicle network 421 disturbs the operation, the driver can press the brake pedal 429 to disconnect the engine ECU 424 from the in-vehicle network 421 by means of the corresponding bus switch 432 as shown in the figure. This configuration avoids a brake failure due to a garbled brake signal and an improper steering due to a garbled steering signal, and ensures the safety of the car system.
The internal configuration of a mobile phone 430 is that a telephone processing unit 432, a voice input unit 433, a music function unit 434, and a television function unit 435 are connected via a communication bus 431.
When the mobile phone 430 is used as a telephone that is the basic function, the telephone processing unit 432 and the voice input unit 433 start the operation. In this case, the switch control unit 311 sets the bus switches 611 and 612 to ON, and sets the other bus switches 621 and 622 to OFF. In this state, voices entered from a microphone 436 are converted to radio waves and are transmitted to a telephone at the other end of the line via an antenna 437 and a base station. Radio waves from the telephone at the other end of the line, sent from a base station, are received and converted to voices and are output to the user via a speaker 438.
When other auxiliary functions of the mobile phone are used, the switch control unit 311 sets all bus switches 611, 612, 621, and 622 to ON.
First, when the music function is used, the music function unit 434 starts the operation and reproduces favorite music from the music data stored in the mobile phone via the bus switch 621 and the communication bus 431, and outputs the reproduced music from the headphone speaker 438. Next, when the television function is used, the television function unit 435 starts the operation, converts the radio waves received from the bus switch 622 via the communication bus 431 into videos and sounds, and outputs them to a liquid crystal monitor 439 and the (headphone) speaker 438.
Even if the music function unit 434 or the television function unit 435 fails, the configuration described above minimizes the failure to such a degree that the sound or the display is disturbed or the sound is not heard.
However, if a failure in the music function unit 434 or the television function unit 435 causes incorrect data to flow into the communication bus 431, there is a possibility that the failure affects the telephone function that is the core function, prevents a correct telephone call from being made, and disables the telephone function itself. To avoid this situation, the bus switches 611 and 612 related to the communication are set to ON and the bus switches 621 and 622 related to the music function unit 434 and the television function unit 435 are set to OFF during a telephone call, as shown in the figure, to prevent the telephone function from being disturbed.
The bus system of the present invention is applicable not only to the power generation plant, the car, or the multi-function mobile phone such as those shown in
It should be further understood by those skilled in the art that although the foregoing description has been made on embodiments of the invention, the invention is not limited thereto and various changes and modifications may be made without departing from the spirit of the invention and the scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2006-180649 | Jun 2006 | JP | national |
2006-237710 | Sep 2006 | JP | national |