WO2011027489A1 - System clock monitoring device and motor control system - Google Patents

System clock monitoring device and motor control system Download PDF

Info

Publication number
WO2011027489A1
WO2011027489A1 PCT/JP2010/002885 JP2010002885W WO2011027489A1 WO 2011027489 A1 WO2011027489 A1 WO 2011027489A1 JP 2010002885 W JP2010002885 W JP 2010002885W WO 2011027489 A1 WO2011027489 A1 WO 2011027489A1
Authority
WO
WIPO (PCT)
Prior art keywords
expected value
unit
frequency
frequency change
request signal
Prior art date
Application number
PCT/JP2010/002885
Other languages
French (fr)
Japanese (ja)
Inventor
木元勝斗
藤阪孝誠
今村勝幸
Original Assignee
パナソニック株式会社
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Publication of WO2011027489A1 publication Critical patent/WO2011027489A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K5/00Manipulating of pulses not covered by one of the other main groups of this subclass
    • H03K5/19Monitoring patterns of pulse trains

Definitions

  • the present invention relates to a system clock monitoring apparatus that is mounted on a system driven by a system clock and monitors a system clock frequency abnormality using a clock of a system different from the system clock as a monitoring clock.
  • the present invention also relates to a motor control system equipped with such a system clock monitoring device.
  • a monitoring clock that is different from the system clock that drives the system is prepared, and the number of pulses of the system clock is counted within a certain period (monitoring period) specified by this monitoring clock.
  • a certain period monitoring period specified by this monitoring clock.
  • FIG. 14 is a configuration diagram of a system clock monitoring device in the above-described prior art.
  • the CPU and peripheral circuit 18 operate using the system clock CK11 as a clock source.
  • the monitoring clock CK12 is a clock of a different system from the system clock CK11.
  • the count unit 12 is supplied with a system clock CK11 and a monitoring clock CK12, and the counting unit 12 counts the number of pulses PN11 of the system clock CK11 for each monitoring period defined by the monitoring clock CK12.
  • the comparison unit 16 compares the count result output from the count unit 12 (referred to as the pulse number PN11 of the system clock CK11) with the expected value Ex11 read from the storage unit 13, and if they do not match, the abnormality detection signal Sa (frequency) Is output to the CPU and peripheral circuit 18.
  • the CPU and the peripheral circuit 18 that have received the abnormality detection signal Sa execute a predetermined safe operation.
  • 15 and 16 are timing charts showing the monitoring operation of the system clock monitoring device of FIG.
  • the monitoring operation involves counting the number of pulses of the system clock CK11 and comparing the expected value.
  • the normal system clock monitoring operation will be described with reference to FIG.
  • the monitoring operation is turned on, pulses of the system clock CK11 are counted in one cycle period of the monitoring clock CK12. This pulse number PN11 is compared with the expected value Ex11.
  • the system clock frequency change is monitored during system operation to detect a frequency abnormality.
  • the above-mentioned conventional technique is used to change the frequency of the system clock. It is determined that the frequency is abnormal. Anomaly detection is not desired because it is a change in the frequency of the system clock during normal operation on the system. Nevertheless, since the abnormality detection occurs, it is necessary to temporarily stop the clock monitoring function. However, once the clock monitoring function is stopped when the clock is set or the mode is changed, the clock frequency abnormality cannot be monitored, and the safety of the system is lowered.
  • the expected value should be changed as well as changing the system clock frequency in this way.
  • the comparison unit that compares the number of pulses and the expected value, there may be a difference between the timing when the number of pulses after the frequency change is recognized and the timing when the expected value after the change is recognized. In such a case, the expected value changes in time, and the comparison result in the comparison unit becomes inconsistent, and an abnormality detection signal is unexpectedly output.
  • the present invention was created in view of such circumstances, and its main purpose is to increase the clock monitoring accuracy and improve the safety of the system.
  • the present invention solves the above-described problems by including the following configuration.
  • the present invention is a count unit, a comparison unit, a frequency change unit, and a frequency change determination unit having the following functions.
  • the count unit sets a monitoring cycle based on a monitoring clock of a system different from the system clock, and then counts the number of pulses of the system clock for each monitoring cycle.
  • the comparison unit compares the count result of the count unit at the end of the monitoring period with an expected value, and if the comparison result indicates a mismatch between the count result and the expected value, an abnormality detection indicating an abnormality in the frequency of the system clock Output a signal.
  • the abnormality detection signal is used for ensuring the safety of the system.
  • the frequency changing unit generates the system clock based on a system clock source, and changes the frequency of the system clock according to a frequency change request signal.
  • the frequency change determination unit confirms the reception of the frequency change request signal by the frequency change unit and the change of the system clock frequency by the frequency change unit based on the received frequency change request signal.
  • An expected value change instruction signal for instructing the change of the expected value to a value corresponding to the frequency is output.
  • the expected value changing unit changes the expected value according to the expected value change instruction signal.
  • the condition adjustment unit controls the count unit, the comparison unit, the frequency change unit, or the expected value change unit so that no mismatch occurs between the count result and the expected value immediately after receiving the frequency change request signal.
  • the condition adjustment unit makes a difference between the timing at which the number of pulses after the frequency change is recognized and the timing at which the expected value after the change is recognized. This avoids the inconvenience that an abnormality detection signal is output.
  • the condition adjusting unit adjusts the operating conditions so that there is no discrepancy between the number of pulses and the expected value immediately after receiving the frequency change request signal of the system clock. In other words, when the frequency change request signal is received, “the frequency change unit immediately changes the frequency of the system clock” and “the frequency change determination unit immediately outputs an expected value change instruction signal” and “the comparison unit has a monitoring cycle.
  • the condition adjustment unit cancels the condition adjustment processing when the monitoring cycle at the time of reception of the frequency change request signal ends and shifts to the next monitoring cycle.
  • the condition adjustment unit when the condition adjustment unit is provided and the system clock frequency change request signal resulting from the change of the operation mode or the transition to the low consumption mode is received, the number of pulses immediately after that and the expected value are obtained. Since the operating conditions are adjusted so that mismatch does not occur, it is possible to avoid a situation where the comparator makes a mismatch determination and outputs an abnormality detection signal due to a timing difference between the change in the number of pulses and the expected value change. Can do. Thereby, it is not necessary to substantially stop the clock monitoring function, and it is possible to continuously ensure the safety of the system.
  • FIG. 1 is a diagram showing a basic configuration of a system clock monitoring apparatus according to each embodiment of the present invention.
  • FIG. 2 is a configuration diagram of a system in which the system clock monitoring apparatus according to Embodiment 1 of the present invention is mounted.
  • FIG. 3 is a timing chart during normal operation of the system clock monitoring apparatus according to the first embodiment of the present invention.
  • FIG. 4 is a configuration diagram of a system in which the system clock monitoring apparatus according to the second embodiment of the present invention is mounted.
  • FIG. 5 is a timing chart during normal operation of the system clock monitoring apparatus according to the second embodiment of the present invention.
  • FIG. 6 is a timing chart when an abnormality is detected in the system clock monitoring apparatus according to the second embodiment of the present invention.
  • FIG. 1 is a diagram showing a basic configuration of a system clock monitoring apparatus according to each embodiment of the present invention.
  • FIG. 2 is a configuration diagram of a system in which the system clock monitoring apparatus according to Embodiment 1 of the present invention is mounted.
  • FIG. 7 is a configuration diagram of a system in which the system clock monitoring apparatus according to the third embodiment of the present invention is mounted.
  • FIG. 8 is a timing chart during normal operation of the system clock monitoring apparatus according to the third embodiment of the present invention.
  • FIG. 9 is a configuration diagram of a system in which the system clock monitoring apparatus according to the fourth embodiment of the present invention is mounted.
  • FIG. 10 is a timing chart during normal operation of the system clock monitoring apparatus according to the fourth embodiment of the present invention.
  • FIG. 11 is a configuration diagram of a motor control system according to the fifth embodiment of the present invention.
  • FIG. 12 is a timing chart during normal operation of the motor control terminal of the inverter control microcomputer according to the fifth embodiment of the present invention.
  • FIG. 13 is a timing chart when an abnormality is detected in the motor control terminal of the inverter control microcomputer according to the fifth embodiment of the present invention.
  • FIG. 14 is a block diagram of a system clock monitoring device in the prior art.
  • FIG. 15 is a timing chart at the time of normal operation of the system clock monitoring device in the prior art.
  • FIG. 16 is a timing chart when an abnormality is detected in the system clock monitoring device in the prior art.
  • condition adjustment unit to adjust the operating conditions so that there is no discrepancy between the number of pulses immediately after that and the expected value when there is a request to change the frequency of the system clock”.
  • the expected value is adjusted to the number of pulses of the system clock after the frequency change.
  • the expected value is not limited to a single value. Good.
  • the condition adjusting unit includes the counting unit and the frequency changing unit,
  • the count unit is configured to output a frequency change permission signal to the frequency change unit when detecting the end of the monitoring period based on the count of the monitoring clock,
  • the frequency change unit receives the frequency change request signal
  • the frequency change unit holds the frequency change of the system clock until the frequency change enable signal is input, and receives the frequency change enable signal and performs a system clock frequency change process. It is configured to be effective.
  • the count result (number of pulses) at the end of the monitoring cycle has changed from the previous value.
  • the expected value has not been changed. In this case, there is a possibility that a mismatch occurs between the count result and the expected value, and then an abnormality detection signal is unexpectedly output.
  • the frequency change unit Even if the frequency change unit receives the frequency change request signal, the frequency change unit temporarily postpones the frequency change process based on the request until the end of the monitoring cycle.
  • the condition adjustment process of effective postponement of the frequency change request process is performed, the number of pulses in the monitoring period is the same as that before the request.
  • the comparison unit the determination of coincidence is continued in the comparison between the number of pulses performed at the end of the monitoring period and the expected value, and no abnormality detection signal is unexpectedly output.
  • the frequency change request process is activated at the end of the monitoring cycle, and the frequency of the system clock is changed.
  • the frequency change determination unit that has confirmed this outputs an expected value change instruction signal to the expected value change unit.
  • the postponement until the end of the monitoring cycle is a point here, but for checking the end of the monitoring cycle, it is preferable to make the count unit for inputting the monitoring clock function.
  • the detection of the end of the monitoring period by the count unit is transmitted to the frequency change unit as a frequency change permission signal, and the frequency change process based on the frequency change request signal that the frequency change unit that has received the frequency change permission signal has suspended until then. It should be effective.
  • the condition adjustment unit includes the count unit and the comparison unit,
  • the counting unit is configured to immediately end the monitoring cycle when receiving a frequency change request signal and immediately shift to the next monitoring cycle,
  • the comparison unit temporarily stops the comparison between the count result and the expected value in the monitoring period when the frequency change request signal is received, and restarts the comparison when the next monitoring period is started. It is configured.
  • the comparison process at the end of the cycle is stopped. That is, the monitoring cycle is terminated immediately after receiving the frequency change request signal, and the process immediately shifts to the next monitoring cycle.
  • the system clock frequency can be changed without delay.
  • the frequency change is the initial period of the monitoring period next to the monitoring period when the frequency change request signal is received.
  • the expected value is also changed at the initial stage. Since the comparison process between the number of pulses and the expected value is stopped in the monitoring period when the frequency change request signal is received, there is no mismatch and, naturally, no abnormality detection signal is output. In the monitoring period next to the monitoring period when the frequency change request signal is received, the number of pulses counted increases with time.
  • the number of pulses matches the expected value after the change at the end of the cycle, and no abnormality detection signal is output. If the operation is abnormal, the number of pulses at the end of the cycle is An anomaly detection signal is output because it does not match the expected value after the change.
  • the frequency change request signal of the system clock when the frequency change request signal of the system clock is received, the frequency of the system clock is immediately changed. Therefore, after ensuring the quick response of the frequency change process to the frequency change request signal, the system clock frequency can be continuously monitored even immediately after the system clock is changed to ensure the safety of the system.
  • condition adjustment unit is an expected value before change before receiving a frequency change request signal as the expected value in the monitoring period when receiving a frequency change request signal.
  • an expected value range in which one of the post-change expected values corresponding to the post-change frequency instructed by the frequency change request signal is an upper limit value and the other is a lower limit value, and the frequency change request signal is received.
  • the expected value is changed to the changed expected value when the monitoring period is shifted to the next monitoring period.
  • the condition adjustment unit includes the expected value change unit and the comparison unit
  • the expected value changing unit corresponds to the expected value in the monitoring period when receiving an expected value change instruction signal, the expected value before change before receiving the frequency change request signal, and the changed frequency instructed by the frequency change request signal.
  • the expected value is transferred to the monitoring cycle next to the monitoring cycle when the frequency change request signal is received.
  • the comparison unit compares the count result of the count unit at the end of the monitoring period with the expected value range, and in the comparison result, the count result is within the expected value range. If it is out of range, the abnormality detection signal is output.
  • the frequency change unit When receiving the frequency change request signal, the frequency change unit immediately accepts the request signal and immediately changes the frequency of the system clock. Since the frequency of the system clock is changed, the number of pulses in the monitoring period is different from the previous number of pulses. Adjustment may be made so that the expected value matches the number of pulses, but it is difficult to grasp how much the number of pulses changes. Therefore, the expected value is changed with a certain width. Assuming that the expected value corresponding to the frequency related to the frequency change request signal is the expected value after change, the newly set expected value has a range from the expected value before change to the expected value after change. This is the expected value range. The magnitude relationship between the expected value before change and the expected value after change depends on the situation at that time. When the frequency is increased, the range is [expected value before change to expected value after change], and when the frequency is decreased, the range is [expected value after change to expected value before change].
  • the number of pulses will fall within the expected value range with the range from the expected value before the change to the expected value after the change at the end of the monitoring period.
  • the count result obtained by counting the system clocks coincides with the expected value. If it is out of the expected value range, an abnormality detection signal is output.
  • the comparison of the number of pulses to the expected value range is only for the monitoring period at the time when the frequency change request signal S1 is received, and the expected value changing unit is expected when the period shifts to the next monitoring period. Change the value to the expected value after the change.
  • condition adjusting unit uses the expected value in the monitoring period when receiving the frequency change request signal as the frequency change request. After setting the value calculated based on the count result of the counting unit at the time of receiving the signal, and when shifting to the monitoring cycle next to the monitoring cycle at the time of receiving the frequency change request signal, the expected value is changed to the frequency change request. There is an aspect in which it is configured to change the value according to the signal.
  • Adjusting the expected value so that it matches the number of pulses corresponding to the timing at which the frequency change request signal was received means that when the system clock frequency change request signal is received, the number of pulses immediately after that and the expected value Is an example of adjusting the operation condition so that no mismatch occurs.
  • the condition adjustment unit includes the count unit and the expected value change unit
  • the counting unit is configured to end the monitoring cycle and immediately shift to the next monitoring cycle when receiving the frequency change request signal
  • the expected value change unit receives the expected value change instruction signal
  • the expected value in the monitoring period at the time of receiving the frequency change request signal is used as a count result of the count unit at the time when the frequency change request signal is received.
  • the expected value is changed to a value corresponding to the frequency change request signal when the monitoring period is shifted to the next monitoring period. Yes.
  • the number of pulses can be determined.
  • the matching is performed so as to match the number of pulses, and the expected value is temporarily adjusted.
  • the expected value which is a comparison standard and must be kept at a constant value, is adjusted to the number of pulses that change from the expected value.
  • the number of pulses is matched with the expected value (that is, a mismatch between the number of pulses immediately after receiving the frequency change request signal and the expected value may occur. Avoid output of abnormality detection signals.
  • the frequency of the system clock can be continuously continued without stopping the clock monitoring function even when a frequency change request signal resulting from a change in the operation mode or transition to the low power consumption mode is received. Monitoring becomes possible. In addition, when the frequency change request signal is received, the frequency of the system clock is changed immediately. Therefore, it is possible to ensure the safety of the system while ensuring quick response of the frequency change to the frequency change request signal. It becomes possible. Further, more accurate system clock monitoring can be performed as compared with the case of temporarily stopping the comparison in the case of (b) and the case of expanding the expected value of (c).
  • the period of substantial system clock monitoring in the case of (b) is the next monitoring period, and in the case of (c), it is the monitoring period when the frequency change request signal S1 is received. There is a little accuracy.
  • the case of (d) in addition to instantaneous switching of the system clock frequency, immediate system clock monitoring in the monitoring cycle at the time when the frequency change request signal S1 is received is realized.
  • the motor control system includes: A motor, An inverter circuit having a switching element for controlling the supply current of the motor; The system clock monitoring device according to claim 1, wherein the switching element is controlled so that the motor is in a safe state when a clock frequency abnormality occurs. Is provided.
  • each component of the frequency changing unit, the counting unit, the frequency change determining unit, the expected value changing unit, the comparing unit, and the condition adjusting unit is configured by hardware, and each step or routine in software You may comprise. Or you may comprise by the combination of hardware and software.
  • FIG. 1 is a basic configuration diagram of a system clock monitoring apparatus which is common to the embodiments of the present invention.
  • This system clock monitoring device includes a frequency changing unit 1, a counting unit 2, a frequency change determining unit 4, an expected value changing unit 5, a comparing unit 6, and a condition adjusting unit 7.
  • the frequency changing unit 1 generates the system clock CK1 from the system clock source CS, and changes the frequency of the system clock CK1 according to the frequency change request signal S1.
  • the count unit 2 is supplied with a system clock CK1 and a monitoring clock CK2 of a system different from the system clock CK1.
  • the counting unit 2 counts the number of pulses PN of the system clock CK1 in the monitoring period T1 based on the monitoring clock CK2.
  • the frequency change determination unit 4 outputs an expected value change instruction signal S2 when it is confirmed that the frequency change request signal S1 is present and the frequency change unit 1 has changed the frequency of the system clock CK1.
  • the expected value changing unit 5 changes the expected value Ex to an expected value corresponding to the changed frequency based on the reception of the expected value change instruction signal S2 from the frequency change determining unit 4.
  • the comparison unit 6 compares the count result (the number of pulses PN of the system clock CK1) supplied from the count unit 2 with the expected value Ex supplied from the expected value changing unit 5 and the comparison result. If they do not match, an active abnormality detection signal Sa (indicating frequency abnormality) is output.
  • the condition adjustment unit 7 receives the frequency change request signal S1 of the system clock CK1, the condition adjustment unit 7 adjusts the operating condition so that there is no mismatch between the number of pulses PN immediately after that and the expected value Ex.
  • the expected value changing unit 5 determines the expected value Ex given to the comparing unit 6 as follows: Obtained from an external storage device in which a correspondence table between the frequency of the system clock CK1 and the expected value is stored, -Obtained from a built-in memory in which a correspondence table having the same configuration as the correspondence table is stored. Configured as follows.
  • the count unit 2 and the comparison unit 6 function during normal operation without the system clock frequency change request signal S1, and the frequency change determination unit 4, the expected value change unit 5, and the condition adjustment unit 7 are substantially suspended. State.
  • the frequency changing unit 1 generates a system clock CK1 having a basic operating frequency based on the system clock source CS.
  • the count unit 2 receives a system clock CK1 and a monitoring clock CK2.
  • the count unit 2 counts the number of pulses of the system clock CK1 every monitoring period T1 defined by the monitoring clock CK2.
  • the comparison unit 6 compares the count result of the count unit 2 (the count result of the number of pulses in the monitoring period T, hereinafter referred to as the pulse number PN) and the expected value Ex every monitoring period T1.
  • the abnormality detection signal Sa (indicating presence or absence of frequency abnormality) output from the count unit 2 remains inactive.
  • the pulse number PN increases or decreases from its normal value, the pulse number PN does not match the expected value Ex.
  • the comparison unit 6 activates the abnormality detection signal Sa and outputs it to a CPU and peripheral circuits (not shown).
  • the CPU or peripheral circuit that has received the active abnormality detection signal Sa performs a predetermined safe operation.
  • condition adjustment unit 7 When the condition adjustment unit 7 receives the frequency change request signal S1, the condition adjustment unit 7 becomes active, and in the monitoring period T1 x when the frequency change request signal S1 of the system clock is received, the frequency change unit 1 or the count unit 2 or The operating condition is adjusted by controlling the frequency change discriminating unit 4, the expected value changing unit 5 or the comparing unit 6. Specifically, the operating conditions of each unit are adjusted so that there is no discrepancy between the number of pulses PN immediately after the frequency change request signal S1 and the expected value Ex. When the monitoring period T1 x ends and the process proceeds to the next monitoring period T1 x + 1 , the condition adjustment unit 7 cancels the operation condition adjustment process.
  • each of the plurality of configurations is the first to fourth embodiments of the present invention.
  • FIG. 2 is a configuration diagram of the system 100 in which the system clock monitoring device that performs the operation condition adjustment processing of the first embodiment is mounted.
  • the present embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the counting unit 2 and the frequency changing unit 1. That is, it corresponds to the above (a) [condition relaxation by effective postponement of the frequency change request signal of the system clock].
  • FIG. 2 the same reference numerals as those in FIG.
  • the system 100 includes a storage unit 3 in addition to the configuration of FIG.
  • the storage unit 3 stores an expected value Ex for the number of pulses PN of the system clock CK1.
  • the storage unit 3 there are a plurality of patterns for the frequency transition of the system clock CK 1, and expected values Ex corresponding to these transition patterns exist.
  • the storage unit 3 holds the plurality of expected values Ex in the form of a table, and the storage unit 3 switches the expected value Ex to be output based on the control from the expected value change unit 5.
  • the system 100 further includes a CPU and a peripheral circuit 8.
  • the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value change unit 5 newly reads the expected value Ex corresponding to the frequency of the system clock CK1 after the change from the storage unit 3, and the old expected value The value Ex is updated with the new expected value Ex. After that, the updated expected value Ex is output to the comparison unit 6.
  • the CPU and peripheral circuit 8 are driven using the system clock CK1 output from the frequency changing unit 1 as a clock source.
  • the CPU and the peripheral circuit 8 output a frequency change request signal S1 to the frequency change unit 1 when receiving an instruction to change the frequency of the system clock CK1 due to a change in the operation mode or a shift to the low consumption mode.
  • the CPU and peripheral circuit 8 also provides the frequency change request signal S1 to the frequency change determination unit 4 and the count unit 2.
  • the frequency changing unit 1 generates the system clock CK1 based on the system clock source CS, and supplies the generated system clock CK1 to the CPU and the peripheral circuit 8.
  • the frequency change unit 1 receives the frequency change request signal S1 from the CPU and the peripheral circuit 8, -Until the active frequency change permission signal S3 is supplied from the count unit 2, the frequency change of the system clock CK1 is suspended (postponed), When the active frequency change permission signal S3 is received, the frequency change of the system clock CK1 is made effective. It is configured as follows.
  • the count unit 2 When receiving the frequency change request signal S1 from the CPU and the peripheral circuit 8, the count unit 2 is configured to output an active frequency change permission signal S3 to the frequency change unit 1 in synchronization with the end detection of the monitoring period T1. ing. Note that the end of the monitoring cycle T1 is detected based on the count of the monitoring clock CK2.
  • the comparison unit 6 outputs an active abnormality detection signal Sa to the CPU and the peripheral circuit 8 when detecting a frequency abnormality of the system clock CK1 based on the comparison between the pulse number PN and the expected value Ex.
  • the storage unit 3 may be configured with an internal memory, an external memory, or an external recording medium. Other configurations are the same as the basic configuration common to the above-described embodiments (FIG. 1), and thus the description thereof is omitted.
  • a frequency change request signal S1 is supplied,
  • the count unit 2 detects the end of the monitoring cycle T1 in the monitoring clock CK2 by counting the clock CK2. When the two conditions are satisfied, the frequency changing process of the system clock CK1 by the frequency changing unit 1 is performed.
  • the frequency change request signal S1 is supplied to the frequency change unit 1, the count unit 2, and the frequency change determination unit 4. Even when the frequency changing unit 1 receives the frequency change request signal S1, the frequency changing unit 1 does not immediately change the frequency of the system clock CK1. This is because the frequency change permission signal S3 is not active. Even when the count unit 2 receives the frequency change request signal S1, it does not immediately output the active frequency change permission signal S3, but after receiving the frequency change request signal S1, the monitoring cycle T1 has further reached its end. The count unit 2 outputs an active frequency change permission signal S3 only after detecting this.
  • the number of pulses PN of the system clock CK1 counted by the count unit 2 is sequentially incremented as time elapses.
  • the comparison unit 2 compares the pulse number PN with the expected value Ex.
  • the count unit 2 When the end of the monitoring cycle T1 is reached, the count unit 2 outputs an active frequency change permission signal S3 to the frequency change unit 1.
  • the frequency changing unit 1 that has received the frequency change request signal S1 at the timing t1 activates the frequency changing function when receiving the active frequency change permission signal S3. That is, simultaneously with the transition to the next monitoring cycle of the monitoring cycle at the time when the frequency change request signal S1 is received (timing t2), the frequency changing unit 1 changes the frequency of the system clock CK1 by the frequency change request signal S1. Change to frequency. Simultaneously with the transition to the next monitoring cycle, the pulse number PN is reset and returned to 0, and the count unit 2 starts counting up again.
  • the frequency change determination unit 4 When the frequency of the system clock CK1 is changed after shifting to the next monitoring cycle, this is confirmed by the frequency change determination unit 4.
  • the frequency change determination unit 4 confirms the frequency change of the system clock CK1, it outputs an expected value change instruction signal S2.
  • the expected value changing unit 5 that has received the expected value change instruction signal S2 searches the storage unit 3 according to the information indicated by the expected value change instruction signal S2 immediately after the timing t2, reads the corresponding new expected value Ex, This is given to the comparison unit 6.
  • the comparison unit 6 does not output an active abnormality detection signal Sa.
  • Such a determination is based on the following state assumption. That is, in this situation, the comparison results agree with each other, although the frequency of the system clock CK1 has changed, but this frequency change is within the design assumption due to the change of the operation mode or the shift to the low consumption mode. It is not an abnormal frequency change. Based on this situation assumption, the comparison unit 6 does not output an active abnormality detection signal Sa.
  • the frequency change process of the system clock CK1 is postponed until the timing t2 is reached in the period from the timing t1 to the timing t2.
  • Such a postponement of the frequency change is a postponement with a very short time length, and the frequency change is immediately implemented in the next monitoring period. For this reason, the temporary stop of the clock monitoring function does not substantially occur, and the safety of the system due to the temporary stop of the clock monitoring function does not occur.
  • the timing t2 at which the frequency of the system clock CK1 is actually changed is slightly delayed from the timing t1 at which the frequency change request signal S1 is received.
  • the second embodiment described below further improves the responsiveness.
  • FIG. 4 is a configuration diagram of a system 200 in which a system clock monitoring device that performs the operation condition adjustment processing of the second embodiment is mounted.
  • the present embodiment corresponds to the condition adjusting unit 7 in FIG. 1 realized by the cooperation of the counting unit 2 and the comparison unit 6. In other words, this corresponds to the above-mentioned [condition relaxation by stopping the comparison process] of (b).
  • the same reference numerals as those in FIGS. 1 and 2 indicate the same components, and detailed description thereof will be omitted.
  • the system 200 does not supply the frequency change request signal S1 from the CPU and the peripheral circuit 8 to the count unit 2. Further, the frequency change permission signal S3 is not supplied from the count unit 2 to the frequency change unit 1. Instead of supplying these signals, a frequency change request signal S1 is supplied from the CPU and peripheral circuit 8 to the comparison unit 6.
  • the expected value change instruction signal S2 output from the frequency change determination unit 4 is supplied to the count unit 2 together with the expected value change unit 5.
  • the count unit 2 ends the monitoring cycle T1 at the time of receiving the frequency change request signal S1 immediately after receiving the request signal S1, and immediately shifts to the next monitoring cycle. It is configured.
  • the comparison unit 6 When the comparison unit 6 receives the frequency change request signal S1 from the CPU and the peripheral circuit 8, the comparison unit 6 temporarily stops the comparison operation at the monitoring period T1 when the frequency change request signal S1 is received, and shifts to the next monitoring period. It is configured to return the comparison operation to active. Since other configurations are the same as those in the first embodiment, description thereof is omitted.
  • FIG. 5 shows the operation during normal operation.
  • the CPU and the peripheral circuit 8 send the frequency change request signal S1 due to the change of the operation mode or the shift to the low consumption mode. Suppose that it outputs.
  • the frequency change request signal S1 is supplied to the frequency change unit 1, the frequency change determination unit 4, and the comparison unit 6.
  • the frequency change unit 1 When the frequency change unit 1 receives the frequency change request signal S1, the frequency change unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 at a timing t4 immediately after that. In this respect, unlike the first embodiment, the response is high. When the frequency of the system clock CK1 is changed, this is confirmed by the frequency change determination unit 4, and the frequency change determination unit 4 directs the active expected value change instruction signal S2 to the count unit 2 and the expected value change unit 5. Output.
  • the counting unit 2 Upon receiving the active expected value change instruction signal S2, the counting unit 2 ends the monitoring cycle T1 at the time of receiving the active expected value change instruction signal S2 immediately after receiving the signal S2, and immediately shifts to the next monitoring cycle. To do.
  • the comparison unit 6 that has received the frequency change request signal S1 from the CPU and the peripheral circuit 8 has the number of pulses PN and the expected value from the count unit 2 at the end of the monitoring period T1 that has been forcibly terminated (immediately before timing t4).
  • the expected value change unit 5 that has received the expected value change instruction signal S2 from the frequency change determination unit 4 searches the storage unit 3 according to the information superimposed on the expected value change instruction signal S2 immediately after the timing t4, and The new expected value Ex to be read is read out and given to the comparison unit 6.
  • the comparison unit 5 can maintain the accuracy of the comparison operation after the timing t4 while continuing the comparison operation.
  • the active abnormality detection signal Sa is not unnecessarily output after timing t4 (for example, timing t5).
  • the comparison operation in the comparison unit 6 is temporarily stopped only during the monitoring period T1 when the frequency change request signal S1 is supplied, and the comparison operation is immediately performed in the next monitoring period. Since the operation is resumed, the temporary stop of the clock monitoring function does not substantially occur, and the safety of the system does not deteriorate.
  • the frequency change request signal S1 of the system clock CK1 is received, the frequency of the system clock CK1 is immediately changed, so that quick response of frequency change to the frequency change request signal S1 can be ensured.
  • FIG. 6 shows an operation in the case where the system clock CK1 is abnormal in frequency and the system runs away in the second embodiment.
  • a system runaway has occurred under the following conditions.
  • the CPU and peripheral circuit 8 output the frequency change request signal S1 resulting from the change of the operation mode or the shift to the low consumption mode.
  • the frequency change request signal S1 itself does not become normal. That is, the frequency changing unit 1 cannot correctly change the frequency of the system clock CK1 to the target frequency indicated by the change request signal S1. Therefore, the frequency change determination unit 4 does not output the expected value change instruction signal S2 to the count unit 2 and the expected value change unit 5 (timing t8). Since the expected value change instruction signal S2 is not output, the count unit 2 ends the monitoring cycle T1 at the time of receiving the frequency change request signal S1 immediately after receiving the frequency change request signal S1, unlike the case of FIG. Such control cannot be performed. Therefore, the count unit 2 continues to count the number of pulses PN of the system clock CK1 in which the frequency is abnormal until the end of the monitoring period T1. In FIG.
  • the comparison processing in the comparison unit 6 performed at the end of the monitoring cycle T1 does not match, and an active abnormality detection signal Sa is output to the CPU and the peripheral circuit 8.
  • the CPU and the peripheral circuit 8 that have received the active abnormality detection signal Sa execute a predetermined safe operation.
  • the frequency change of the system clock CK1 is based on the system clock frequency change request signal S1 caused by the change of the operation mode or the transition to the low consumption mode, the abnormality of the system clock CK1 is not detected. Anomaly detection is reliably performed when the change is caused by runaway. Thus, in this embodiment, the monitoring accuracy of the frequency fluctuation of the system clock CK1 is maintained high while the responsiveness is maintained.
  • FIG. 7 is a configuration diagram of a system 300 equipped with a system clock monitoring apparatus according to the third embodiment of the present invention.
  • the present embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the expected value change unit 5 and the comparison unit 6. That is, it corresponds to the above-mentioned (c) [Relaxing conditions by expanding the expected value range].
  • the same reference numerals as those in FIGS. 1 and 4 indicate the same components, and detailed description thereof will be omitted.
  • the CPU and the peripheral circuit 8 do not supply the frequency change request signal S1 to the comparison unit 6. Further, the frequency change determination unit 4 does not supply the expected value change instruction signal S2 to the count unit 2. Instead of supplying these signals, the frequency change determination unit 4 supplies the expected value change instruction signal S2 to the comparison unit 6.
  • the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value change unit 5 sets the expected value range Er as an expected value in the monitoring cycle T1 at the time when the frequency change request signal S1 is received. When the next monitoring cycle of the monitoring cycle T1 at the time when the change request signal S1 is received, the expected value range Er is changed to the expected value Ex2 in the next monitoring cycle.
  • the expected value Ex2 after change and the expected value Ex1 before change corresponding to the frequency indicated by the frequency change request signal S1 are used as expected values.
  • the expected value range Er (Ex1 to Ex2 or Ex2 to Ex1) is set, and when the frequency change request signal S1 is received and the process shifts to the next monitoring cycle of the monitoring cycle T1, the expected value range Er is further expected after the change. Change to value Ex2.
  • the counting unit 2 supplies the monitoring period T1 to the expected value changing unit 5 in order to notify the expected value changing unit 5 that it has shifted to the next monitoring cycle.
  • the comparison unit 6 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the comparison unit 6 counts the result of the count unit 2 (the pulse of the system clock CK1) at the end of the monitoring period T1 when the frequency change request signal S1 is received. The number PN) is compared with the expected value range Er. In this comparison, when it is detected that the number of pulses PN is out of the expected value range Er, the comparison unit 6 outputs an active abnormality detection signal Sa.
  • the point of performing such a comparison operation is different from the second embodiment. Since other configurations are the same as those in the second embodiment, description thereof is omitted.
  • FIG. 8 shows the operation during normal operation.
  • the frequency change request signal S1 is sent from the CPU and the peripheral circuit 8 due to the change of the operation mode, the shift to the low consumption mode, or the like. Suppose that it is output.
  • the frequency change request signal S1 is supplied to the frequency change unit 1 and the frequency change determination unit 4.
  • the frequency change unit 1 When the frequency change unit 1 receives the frequency change request signal S1, the frequency change unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 (timing t11). When the frequency of the system clock CK1 is changed, the frequency change determination unit 4 detects this. When detecting the frequency change, the frequency change determination unit 4 supplies the expected value change instruction signal S2 to the expected value change unit 5 and the comparison unit 6.
  • the expected value change unit 5 that has received the expected value change instruction signal S2 from the frequency change determination unit 4 searches the storage unit 3 in accordance with the information indicated by the expected value change instruction signal S2, and reads and reads the corresponding new expected value Ex. Based on the new expected value Ex, the expected value range Er and the changed expected value Ex2 are set. Specifically, the expected value changing unit 5 sets the changed expected value Ex2 by updating the old expected value Ex with the read new expected value Ex. Further, the expected value before change (old expected value Ex) is set to the expected value Ex1 before change, and the expected value range Er including the changed expected value Ex2 and the expected value Ex1 before change (Ex1 to Ex2 or Ex2 to Ex1) Set.
  • the expected value changing unit 5 gives the expected value range Er to the comparing unit 6.
  • the magnitude relationship between the pre-change expected value Ex1 and the post-change expected value Ex2 varies depending on the situation at that time. That is, when the frequency fluctuates upward, the expected value range Er becomes [Ex1 to Ex2], and when the frequency fluctuates downward, the expected value range Er becomes [Ex2 to Ex1]. Here, the expected value range Er ⁇ [4 to 9].
  • the comparison unit 6 when the comparison unit 6 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the comparison unit 6 count results (number of pulses PN) at the end of the monitoring period T1 when the frequency change request signal S1 is received. ) Is compared with the expected value range Er. In this comparison, if it is determined that the number of pulses PN is outside the expected value range Er, the comparison unit 6 switches its operation state in the monitoring period T1 to the output operation state of the abnormality detection signal Sa.
  • the number of pulses PN of the system clock CK1 counted by the counting unit 2 is incremented as 5 ⁇ 6, and at the stage when the end of the monitoring cycle T1 is reached.
  • the number PN 7.
  • the frequency of the system clock CK1 fluctuated in the monitoring period T1
  • this frequency fluctuation is an expected frequency fluctuation due to a change in the operation mode, a shift to the low consumption mode, and the like, and is not an abnormal frequency fluctuation. . Therefore, there is no need to output an active abnormality detection signal Sa.
  • the expected value changing unit 5 replaces the expected value range Er with the frequency
  • the present embodiment performs condition relaxation by expanding the expected value range.
  • the frequency change of the system clock CK1 is postponed in the first embodiment.
  • the comparison operation was paused.
  • the frequency is changed immediately and the comparison process is performed at a predetermined timing. Therefore, in the third embodiment, the temporary stop of the clock monitoring function does not substantially occur, and the frequency of the system clock CK1 can be continuously monitored, and the safety of the system is ensured.
  • the comparison unit 6 outputs an active abnormality detection signal Sa to the CPU and peripheral circuit 8.
  • the range may be expanded a little more, or conversely The width may be narrowed.
  • the expected value range Er ⁇ [4-9] Er ⁇ [5-9] and Er ⁇ [6-9] may be set as the expected value range Er
  • Er ⁇ [3-9] and Er ⁇ [2-9] may be set as the expected value range Er. That is, the expected value range Er may be adjusted as appropriate according to the operating environment.
  • the monitoring cycle at the time of receiving the frequency change request signal S1 is shortened (the monitoring cycle at the time when the frequency change request signal S1 is received at the timing t4 in FIG. 5 ends), but the third embodiment Then, such a cycle shortening does not occur, and the change of the expected value Ex must be delayed correspondingly.
  • the expected value Ex can be changed quickly.
  • FIG. 9 is a configuration diagram of a system 400 equipped with a system clock monitoring apparatus according to the fourth embodiment of the present invention.
  • This embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the count unit 2 and the expected value change unit 5. That is, it corresponds to the above (d) [conditional relaxation by adjusting the expected value for temporary alignment].
  • the same reference numerals as those in FIGS. 1 and 4 indicate the same components, and detailed description thereof will be omitted.
  • the CPU and peripheral circuit 8 do not supply the frequency change request signal S1 to the comparison unit 6. Instead of this signal supply, the count unit 2 supplies the monitoring clock count value TN to the expected value changing unit 5.
  • the count unit 2 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the count unit 2 ends the monitoring cycle T1 at the time of reception immediately after reception, and immediately shifts to the next monitoring cycle.
  • the count unit 2 includes a monitoring cycle counter that counts the monitoring clock CK2 as a clock source, and gives the monitoring clock count value TN by the monitoring cycle counter to the expected value changing unit 5.
  • the expected value change unit 5 When the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value in the monitoring period T1 when the frequency change request signal S1 is received is the reception timing of the frequency change request signal S1. The expected value is adjusted to match the number of pulses PN corresponding to. That is, the expected value changing unit 5 calculates the expected value Ex by substituting the monitoring clock count value TN supplied from the counting unit 2 into the following arithmetic expression (1), and the expected value obtained by the calculation process Ex is given to the comparison unit 6.
  • the arithmetic expression (1) has an expression structure considering that the initial values of the number of pulses PN of the system clock CK1 and the monitoring clock count value TN are zero.
  • the expected value changing unit 5 adjusts the expected value Ex according to the number of pulses PN corresponding to the reception timing of the frequency change request signal S1.
  • the expected harmony Ex is adjusted so as to always coincide with the pulse number PN corresponding to the reception timing of the frequency change request signal S1 as a result of the scheduled harmonization by the arithmetic expression (1).
  • the expected value changing unit 5 changes the expected value Ex to an expected value corresponding to the frequency change request signal S1 at the time of transition to the next monitoring period of the monitoring period T1 when the frequency change request signal S1 is received. It is configured.
  • FIG. 10 shows the operation during normal operation. It is assumed that the CPU and the peripheral circuit 8 output the frequency change request signal S1 at the timing t13.
  • the timing t13 is an arbitrary timing included in the monitoring cycle T1 set by the counting unit 2 based on the monitoring clock CK2, and the frequency change request signal S1 is changed to an operation mode or a transition to a low consumption mode. It is assumed that the signal indicates a frequency change request based on an expected frequency variation caused by the above.
  • the frequency change request signal S1 is supplied to the frequency change unit 1 and the frequency change determination unit 4.
  • the frequency changing unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 at timing t14.
  • the frequency change determination unit 4 outputs the expected value change instruction signal S2 toward the count unit 2 and the expected value change unit 5. To do.
  • the count unit 2 that has received the expected value change instruction signal S2 outputs the monitoring clock count value TN by the monitoring period counter to the expected value change unit 5, and immediately thereafter clears the monitoring clock count value TN. Then, counting of a new monitoring cycle T1 is started.
  • the expected value changing unit 5 that has received the expected value change instruction signal S2 is expected in the monitoring cycle T2 in which the frequency of the system clock CK1 has been changed based on the monitoring clock count value TN supplied from the counting unit 2.
  • the value Ex is calculated by calculation and given to the comparison unit 6.
  • the comparison unit at this timing is adjusted.
  • the comparison process of 6 (comparison process of the number of pulses PN and the expected value Ex) always matches, and the active abnormality detection signal Sa is not output.
  • the pulse number PN and the expected value Ex always match.
  • the active abnormality detection signal Sa is not output.
  • the frequency of the system clock CK1 has changed, this is due to a change in the operation mode, a shift to the low consumption mode, or the like, so there is no need to output the active abnormality detection signal Sa.
  • the comparison unit 6 Outputs an abnormality detection signal Sa to the CPU and peripheral circuit 8.
  • the system clock frequency is continuously monitored even when the system clock frequency change request signal S1 resulting from the change of the operation mode or the shift to the low consumption mode is received. System security is ensured.
  • the system clock frequency change request signal S1 is received, the system clock frequency and the expected value are immediately changed, so that a quick response of the frequency change process and the expected value change process to the frequency change request signal S1. It is possible to ensure the safety of the system while ensuring the safety.
  • the expected value table is stored in the storage unit 3 and the expected value changing unit 5 reads out the corresponding expected value Ex from the storage unit 3.
  • the change unit 5 may be configured to calculate the expected value Ex according to the frequency of the system clock after the frequency change by calculation. In this case, the expected value storage unit 3 is not required.
  • FIG. 11 is a configuration diagram of a motor control system that is widely used in industrial and household appliances.
  • the motor control system of FIG. 11 includes an AC power source 21, a converter circuit 22, an inverter circuit 23, a switching element (IGBT element) 24 constituting the inverter circuit 23, an inverter control microcomputer 25, and a three-phase motor 26.
  • IGBT Insulated Gate Bipolar Transistor
  • IGBT Insulated Gate Bipolar Transistor
  • the inverter control microcomputer 25 is equipped with the system clock monitoring device A having any one of the configurations of the first to fourth embodiments, and controls the three-phase motor 26.
  • the converter circuit 22 converts the output of the AC power source 21 into a DC power source and supplies it to the inverter circuit 23.
  • the inverter control microcomputer 25 controls the switching element 24 in the inverter circuit 23 by using six output terminals [U-phase output (U1, U2), V-phase output (V1, V2), W-phase output (W1, W2)].
  • U1, U2 V-phase output
  • V1, V2 V-phase output
  • W1 W2 W-phase output
  • FIG. 12 is a timing chart showing the operation of each output terminal of the inverter control microcomputer 25 in a normal state.
  • the U-phase output (U1, U2), the V-phase output (V1, V2), and the W-phase output (W1, W2) each have a pair of outputs. These outputs operate so that both the + side and ⁇ side switching elements 24 are not active (the control signal is H). This is because if both the + side and ⁇ side switching elements 24 become active, a through current flows through the entire system and the system may be destroyed.
  • FIG. 13 is a timing chart showing the operation of each output terminal of the inverter control microcomputer 25 and the abnormality detection signal Sa at the time of abnormality.
  • the system clock monitoring device can be used effectively in the inverter control system of the three-phase motor.
  • the system clock monitoring device of the present invention is widely useful in fields where safety of various semiconductor products is required because it can constantly monitor the system clock that is the backbone of the system.

Abstract

A comparison unit compares an expected value with a count result at an end of a monitoring period of a counter for counting the number of pulses of a system clock for each monitoring period. If the comparison result shows a mismatch between the count result and the expected value, the comparison unit outputs an anomaly detection signal. The frequency modification unit modifies the frequency of the system clock according to a frequency modification request signal. A frequency modification determination unit, upon confirmation of receipt of the frequency modification request signal and modification of the system clock frequency, outputs an expected value modification instruction signal for instructing modification of the expected value to a value corresponding to the system clock frequency after modification. The condition adjustment unit controls each unit so that a mismatch between the count value and the expected value does not occur immediately after receipt of the frequency modification request signal.

Description

システムクロック監視装置およびモータ制御システムSystem clock monitoring device and motor control system
 本発明は、システムクロックによって駆動されるシステムに搭載されるもので、システムクロックとは別系統のクロックを監視用クロックとしてシステムクロックの周波数異常を監視するシステムクロック監視装置に関する。また、そのようなシステムクロック監視装置を搭載したモータ制御システムに関する。 The present invention relates to a system clock monitoring apparatus that is mounted on a system driven by a system clock and monitors a system clock frequency abnormality using a clock of a system different from the system clock as a monitoring clock. The present invention also relates to a motor control system equipped with such a system clock monitoring device.
 システムクロック監視装置として、システムを駆動するシステムクロックとは別系統の監視用クロックを用意し、この監視用クロックで規定される一定期間(監視周期)内にシステムクロックのパルス数をカウントし、これを期待値(正常動作に対応するパルス数)と比較することによりシステムクロックの周波数異常を判定するものが知られている(例えば特許文献1参照)。 As a system clock monitoring device, a monitoring clock that is different from the system clock that drives the system is prepared, and the number of pulses of the system clock is counted within a certain period (monitoring period) specified by this monitoring clock. Is known that compares the expected value (the number of pulses corresponding to normal operation) to determine the frequency anomaly of the system clock (see, for example, Patent Document 1).
 図14は、上記従来技術におけるシステムクロック監視装置の構成図である。CPU及び周辺回路18はシステムクロックCK11をクロックソースにして動作する。監視用クロックCK12はシステムクロックCK11とは別系統のクロックである。カウント部12には、システムクロックCK11と監視用クロックCK12とが供給されており、カウント部12は、監視用クロックCK12で規定される監視周期毎にシステムクロックCK11のパルス数PN11をカウントする。比較部16は、カウント部12から出力されるカウント結果(システムクロックCK11のパルス数PN11という)を、記憶部13から読み出した期待値Ex11と比較し、両者が不一致になると異常検出信号Sa(周波数異常を示す)をCPU及び周辺回路18に出力する。異常検出信号Saを受信したCPU及び周辺回路18は、所定の安全動作を実行する。 FIG. 14 is a configuration diagram of a system clock monitoring device in the above-described prior art. The CPU and peripheral circuit 18 operate using the system clock CK11 as a clock source. The monitoring clock CK12 is a clock of a different system from the system clock CK11. The count unit 12 is supplied with a system clock CK11 and a monitoring clock CK12, and the counting unit 12 counts the number of pulses PN11 of the system clock CK11 for each monitoring period defined by the monitoring clock CK12. The comparison unit 16 compares the count result output from the count unit 12 (referred to as the pulse number PN11 of the system clock CK11) with the expected value Ex11 read from the storage unit 13, and if they do not match, the abnormality detection signal Sa (frequency) Is output to the CPU and peripheral circuit 18. The CPU and the peripheral circuit 18 that have received the abnormality detection signal Sa execute a predetermined safe operation.
 図15、図16は図14のシステムクロック監視装置の監視動作を示すタイミングチャートである。監視動作は、システムクロックCK11のパルス数カウントと期待値比較とを伴う。まず、通常時のシステムクロック監視動作を図15を参照して説明する。ここでは期待値Ex11(=9)の場合を例にして説明する。監視動作がオンになると、監視用クロックCK12の1サイクル期間においてシステムクロックCK11のパルスがカウントされる。このパルス数PN11が期待値Ex11と比較される。通常動作時ではパルス数PN11は期待値Ex11と同一になる(PN11=Ex11=9)となるため、異常検出信号Saは出力されず、正常動作を続ける。 15 and 16 are timing charts showing the monitoring operation of the system clock monitoring device of FIG. The monitoring operation involves counting the number of pulses of the system clock CK11 and comparing the expected value. First, the normal system clock monitoring operation will be described with reference to FIG. Here, the case of the expected value Ex11 (= 9) will be described as an example. When the monitoring operation is turned on, pulses of the system clock CK11 are counted in one cycle period of the monitoring clock CK12. This pulse number PN11 is compared with the expected value Ex11. During normal operation, the number of pulses PN11 is the same as the expected value Ex11 (PN11 = Ex11 = 9), so the abnormality detection signal Sa is not output and normal operation continues.
 次に、異常時の動作を図16を参照して説明する。監視周期の途中(タイミングt21)で何らかの原因によりシステムクロックCK11の周波数が不測に減少したとする。さらには、システムクロックCK11の周波数減少も監視用クロックCK12の1サイクル期間内にシステムクロックCK11のパルスが5回カウントされたとする。このパルス数PN11(=5)は期待値Ex11(=9)と不一致となるため(PN11≠Ex11)、システムクロックCK11の周波数について異常検出信号Saが出力される。CPU及び周辺回路18は、異常検出信号Saを受けてシステムを停止または待機させて安全な状態にする。 Next, the operation at the time of abnormality will be described with reference to FIG. It is assumed that the frequency of the system clock CK11 is unexpectedly decreased due to some cause in the middle of the monitoring cycle (timing t21). Furthermore, it is assumed that the frequency of the system clock CK11 is also decreased five times within one cycle of the monitoring clock CK12. Since the number of pulses PN11 (= 5) does not match the expected value Ex11 (= 9) (PN11 ≠ Ex11), the abnormality detection signal Sa is output for the frequency of the system clock CK11. In response to the abnormality detection signal Sa, the CPU and the peripheral circuit 18 stop or wait for the system to be in a safe state.
特開平4-326410号公報JP-A-4-326410
 上記の従来技術においては、システムの動作中にシステムクロックの周波数変化を監視し、周波数異常を検知する。しかしながら、動作モードの変更や低消費モードへの移行など、システムクロックの周波数をシステム上の通常動作の中で変更する場合にも、上記の従来技術では、そのシステムクロックの周波数の変更のために周波数異常であると判断してしまう。システム上の通常動作の中でのシステムクロックの周波数の変更であるので、異常検出は望むところではない。それにもかかわらず、異常検出が生じてしまうことから、クロック監視機能を一旦停止する必要が生じる。ところが、クロック設定またはモード変更時にクロック監視機能を一旦停止させるとなると、クロック周波数異常を監視できない状態となって、システムの安全性が低下してしまう。 In the above prior art, the system clock frequency change is monitored during system operation to detect a frequency abnormality. However, even when the system clock frequency is changed during normal operation on the system, such as when changing the operation mode or shifting to the low-consumption mode, the above-mentioned conventional technique is used to change the frequency of the system clock. It is determined that the frequency is abnormal. Anomaly detection is not desired because it is a change in the frequency of the system clock during normal operation on the system. Nevertheless, since the abnormality detection occurs, it is necessary to temporarily stop the clock monitoring function. However, once the clock monitoring function is stopped when the clock is set or the mode is changed, the clock frequency abnormality cannot be monitored, and the safety of the system is lowered.
 そこで、システムクロックの周波数を変更する要求が発生すれば、それに応じて期待値を自動的に変更する構成が考えられる。このような構成を採用すれば、周波数変更後でもパルス数が期待値と一致するようになるため、システム上の通常動作時での周波数変更であっても不測に異常検出信号が出力される、といった不都合は回避される。 Therefore, when a request to change the frequency of the system clock is generated, a configuration in which the expected value is automatically changed according to the request can be considered. By adopting such a configuration, even after the frequency change, the number of pulses will match the expected value, so even if the frequency is changed during normal operation on the system, an abnormal detection signal is unexpectedly output. Such inconvenience is avoided.
 このようにシステムクロックの周波数を変更するとともに期待値も変更すれば良いと考えられる。ところが、パルス数と期待値とを比較する比較部において、周波数変更後のパルス数が認識されるタイミングと、変更後の期待値が認識されるタイミングとの間にずれが生じる場合がある。そのような場合には、期待値の変更が間に合わなって比較部での比較結果に不一致が生じてしまって不測に異常検出信号が出力されてしまう。 It is considered that the expected value should be changed as well as changing the system clock frequency in this way. However, in the comparison unit that compares the number of pulses and the expected value, there may be a difference between the timing when the number of pulses after the frequency change is recognized and the timing when the expected value after the change is recognized. In such a case, the expected value changes in time, and the comparison result in the comparison unit becomes inconsistent, and an abnormality detection signal is unexpectedly output.
 本発明は、このような事情に鑑みて創作されたものであって、クロック監視精度を上げてシステムの安全性を向上させることを主たる目的とする。 The present invention was created in view of such circumstances, and its main purpose is to increase the clock monitoring accuracy and improve the safety of the system.
 (1)本発明は、次のような構成を備えることで上記の課題を解決する。本発明は、次のような機能を有するカウント部と比較部と周波数変更部と周波数変更判別部である。カウント部は、システムクロックとは別系統の監視用クロックに基づいて監視周期を設定したうえで、前記システムクロックのパルス数を前記監視周期毎にカウントする。 (1) The present invention solves the above-described problems by including the following configuration. The present invention is a count unit, a comparison unit, a frequency change unit, and a frequency change determination unit having the following functions. The count unit sets a monitoring cycle based on a monitoring clock of a system different from the system clock, and then counts the number of pulses of the system clock for each monitoring cycle.
 比較部は、前記監視周期終端における前記カウント部のカウント結果を期待値と比較し、その比較結果が前記カウント結果と前記期待値との不一致を示すと、前記システムクロックの周波数異常を示す異常検出信号を出力する。異常検出信号はシステムの安全性確保のために使用される。 The comparison unit compares the count result of the count unit at the end of the monitoring period with an expected value, and if the comparison result indicates a mismatch between the count result and the expected value, an abnormality detection indicating an abnormality in the frequency of the system clock Output a signal. The abnormality detection signal is used for ensuring the safety of the system.
 周波数変更部は、システムクロックソースに基づいて前記システムクロックを生成するとともに、周波数変更要求信号に応じて前記システムクロックの周波数を変更する。 The frequency changing unit generates the system clock based on a system clock source, and changes the frequency of the system clock according to a frequency change request signal.
 周波数変更判別部は、前記周波数変更部による前記周波数変更要求信号の受信と、受信した前記周波数変更要求信号に基づいた前記周波数変更部によるシステムクロック周波数の変更とを確認すると、変更後のシステムクロック周波数に対応する値への前記期待値の変更を指示する期待値変更指示信号を出力する。 The frequency change determination unit confirms the reception of the frequency change request signal by the frequency change unit and the change of the system clock frequency by the frequency change unit based on the received frequency change request signal. An expected value change instruction signal for instructing the change of the expected value to a value corresponding to the frequency is output.
 期待値変更部は、前記期待値変更指示信号に応じて前記期待値を変更する。 The expected value changing unit changes the expected value according to the expected value change instruction signal.
 条件調整部は、周波数変更要求信号受信直後において前記カウント結果と前記期待値とに不一致が生じないように、前記カウント部または前記比較部または周波数変更部または期待値変更部を制御する。 The condition adjustment unit controls the count unit, the comparison unit, the frequency change unit, or the expected value change unit so that no mismatch occurs between the count result and the expected value immediately after receiving the frequency change request signal.
 条件調整部は、周波数変更後のパルス数が認識されるタイミングと変更後の期待値が認識されるタイミングとの間にずれが生じて比較部でパルス数と期待値とが不一致となって不測に異常検出信号が出力されてしまうという不都合を回避するものである。条件調整部は、システムクロックの周波数変更要求信号の受信直後において、パルス数と期待値とに不一致が生じることがないように動作条件を調整するものである。つまり、周波数変更要求信号を受信した際に、「周波数変更部がシステムクロックの周波数を直ちに変更し」かつ「周波数変更判別部が期待値変更指示信号を直ちに出力し」かつ「比較部が監視周期終端で周波数変更後のシステムクロックのパルス数を変更後の期待値と比較する」という一連の動作条件についてそのいずれかを調整することを通じて、「周波数変更要求の直後のパルス数と期待値とに不一致が生じる」といったことが起こらないように構成する。条件調整部は、前記周波数変更要求信号の受信時点の監視周期が終了して次の監視周期に移行すると、その条件調整処理を解除する。 The condition adjustment unit makes a difference between the timing at which the number of pulses after the frequency change is recognized and the timing at which the expected value after the change is recognized. This avoids the inconvenience that an abnormality detection signal is output. The condition adjusting unit adjusts the operating conditions so that there is no discrepancy between the number of pulses and the expected value immediately after receiving the frequency change request signal of the system clock. In other words, when the frequency change request signal is received, “the frequency change unit immediately changes the frequency of the system clock” and “the frequency change determination unit immediately outputs an expected value change instruction signal” and “the comparison unit has a monitoring cycle. By adjusting one of the series of operating conditions of `` Compare the number of system clock pulses after frequency change at the end with the expected value after change '' to `` Set the number of pulses immediately after the frequency change request and the expected value '' It is configured so that “a mismatch does not occur” does not occur. The condition adjustment unit cancels the condition adjustment processing when the monitoring cycle at the time of reception of the frequency change request signal ends and shifts to the next monitoring cycle.
 本発明によれば、パルス数変化のタイミングと期待値変更のタイミングとの間にずれが生じるような事態が生じても、そのずれによる不一致判定で異常検出信号が出力されてしまうといった事態を、条件調整部の動作により回避することが可能となる。 According to the present invention, even if a situation occurs where there is a deviation between the timing of the change in the number of pulses and the timing of the expected value change, a situation where an abnormality detection signal is output in the mismatch determination due to the deviation, This can be avoided by the operation of the condition adjustment unit.
 本発明によれば、条件調整部を設け、動作モードの変更や低消費モードへの移行などに起因するシステムクロックの周波数変更要求信号を受信した際に、その直後のパルス数と期待値とに不一致が生じることがないように動作条件を調整するので、パルス数変化と期待値変更にタイミングずれが生じることで比較部が不一致判定を行って異常検出信号を出力する、といった事態を回避することができる。これにより、クロック監視機能を実質的に停止させる必要がなくなり、継続的にシステムの安全性を確保することが可能となる。 According to the present invention, when the condition adjustment unit is provided and the system clock frequency change request signal resulting from the change of the operation mode or the transition to the low consumption mode is received, the number of pulses immediately after that and the expected value are obtained. Since the operating conditions are adjusted so that mismatch does not occur, it is possible to avoid a situation where the comparator makes a mismatch determination and outputs an abnormality detection signal due to a timing difference between the change in the number of pulses and the expected value change. Can do. Thereby, it is not necessary to substantially stop the clock monitoring function, and it is possible to continuously ensure the safety of the system.
図1は本発明の各実施の形態のシステムクロック監視装置の基本構成を示す図である。FIG. 1 is a diagram showing a basic configuration of a system clock monitoring apparatus according to each embodiment of the present invention. 図2は本発明の実施の形態1におけるシステムクロック監視装置を搭載したシステムの構成図である。FIG. 2 is a configuration diagram of a system in which the system clock monitoring apparatus according to Embodiment 1 of the present invention is mounted. 図3は本発明の実施の形態1におけるシステムクロック監視装置の正常動作時のタイミングチャートである。FIG. 3 is a timing chart during normal operation of the system clock monitoring apparatus according to the first embodiment of the present invention. 図4は本発明の実施の形態2におけるシステムクロック監視装置を搭載したシステムの構成図である。FIG. 4 is a configuration diagram of a system in which the system clock monitoring apparatus according to the second embodiment of the present invention is mounted. 図5は本発明の実施の形態2におけるシステムクロック監視装置の正常動作時のタイミングチャートである。FIG. 5 is a timing chart during normal operation of the system clock monitoring apparatus according to the second embodiment of the present invention. 図6は本発明の実施の形態2におけるシステムクロック監視装置の異常検出時のタイミングチャートである。FIG. 6 is a timing chart when an abnormality is detected in the system clock monitoring apparatus according to the second embodiment of the present invention. 図7は本発明の実施の形態3におけるシステムクロック監視装置を搭載したシステムの構成図である。FIG. 7 is a configuration diagram of a system in which the system clock monitoring apparatus according to the third embodiment of the present invention is mounted. 図8は本発明の実施の形態3におけるシステムクロック監視装置の正常動作時のタイミングチャートである。FIG. 8 is a timing chart during normal operation of the system clock monitoring apparatus according to the third embodiment of the present invention. 図9は本発明の実施の形態4におけるシステムクロック監視装置を搭載したシステムの構成図である。FIG. 9 is a configuration diagram of a system in which the system clock monitoring apparatus according to the fourth embodiment of the present invention is mounted. 図10は本発明の実施の形態4におけるシステムクロック監視装置の正常動作時のタイミングチャートである。FIG. 10 is a timing chart during normal operation of the system clock monitoring apparatus according to the fourth embodiment of the present invention. 図11は本発明の実施の形態5におけるモータ制御システムの構成図である。FIG. 11 is a configuration diagram of a motor control system according to the fifth embodiment of the present invention. 図12は本発明の実施の形態5におけるインバータ制御用マイコンのモータ制御端子の正常動作時のタイミングチャートである。FIG. 12 is a timing chart during normal operation of the motor control terminal of the inverter control microcomputer according to the fifth embodiment of the present invention. 図13は本発明の実施の形態5におけるインバータ制御用マイコンのモータ制御端子の異常検出時のタイミングチャートである。FIG. 13 is a timing chart when an abnormality is detected in the motor control terminal of the inverter control microcomputer according to the fifth embodiment of the present invention. 図14は従来技術におけるシステムクロック監視装置の構成図である。FIG. 14 is a block diagram of a system clock monitoring device in the prior art. 図15は従来技術におけるシステムクロック監視装置の正常動作時のタイミングチャートである。FIG. 15 is a timing chart at the time of normal operation of the system clock monitoring device in the prior art. 図16は従来技術におけるシステムクロック監視装置の異常検出時のタイミングチャートである。FIG. 16 is a timing chart when an abnormality is detected in the system clock monitoring device in the prior art.
 上記の〔課題を解決するための手段〕の項で述べた条件緩和について、その態様には次のようないくつかのものがある。 The following are some of the aspects of the condition relaxation described in the above section [Means for Solving the Problems].
 条件調整部の機能は、「システムクロックの周波数変更要求があったとき、その直後のパルス数と期待値とに不一致が生じることがないように動作条件を調整する」ことである。 The function of the condition adjustment unit is “to adjust the operating conditions so that there is no discrepancy between the number of pulses immediately after that and the expected value when there is a request to change the frequency of the system clock”.
 (a)周波数変更要求信号S1を受信した時点における監視周期では、周波数変更要求信号を受信したにもかかわらず、システムクロックの周波数変更は行われず、ネクスト監視周期(周波数変更要求信号を受信した時点における監視周期の次の監視周期)に移行して初めてシステムクロックの周波数変更と期待値変更とが行われる。このようにすれば、「パルス数と期待値とに不一致が生じることがない」ことを、周波数変更要求信号S1を受信した時点における監視周期で実現できる。 (A) In the monitoring cycle when the frequency change request signal S1 is received, the frequency of the system clock is not changed even though the frequency change request signal is received, and the next monitoring cycle (the time when the frequency change request signal is received) The system clock frequency change and expected value change are not made until the monitoring period next to the monitoring period in FIG. In this way, “there is no mismatch between the number of pulses and the expected value” can be realized in the monitoring cycle at the time when the frequency change request signal S1 is received.
 (b)周波数変更要求信号S1を受信した時点における監視周期では比較部によるパルス数と期待値の比較を停止することで、「パルス数と期待値とに不一致が生じることがない」ことを、周波数変更要求信号S1を受信した時点における監視周期で実現できる。 (B) In the monitoring cycle at the time when the frequency change request signal S1 is received, by stopping the comparison of the number of pulses and the expected value by the comparison unit, “no mismatch between the number of pulses and the expected value does not occur” This can be realized in the monitoring cycle at the time when the frequency change request signal S1 is received.
 (c)周波数変更要求信号S1を受信した時点の監視周期において、期待値の方を周波数変更後のシステムクロックのパルス数に合わせ込むように調整すれば、「パルス数と期待値とに不一致が生じることがない」ことを、周波数変更要求信号S1を受信した時点における監視周期で実現できる。この場合に、期待値に幅を持たせることにより、不一致を生じさせない上で余裕を生じさせれば、システムクロックの周波数異常の程度が大きくても、「パルス数と期待値とに不一致が生じることがない」ことを実現しやすい。 (C) In the monitoring cycle when the frequency change request signal S1 is received, if the expected value is adjusted to match the number of pulses of the system clock after the frequency change, “the number of pulses does not match the expected value. It can be realized in the monitoring cycle at the time when the frequency change request signal S1 is received. In this case, if there is a margin in the expected value without causing a discrepancy, the discrepancy between the number of pulses and the expected value will occur even if the degree of system clock frequency abnormality is large. It is easy to realize that there is nothing.
 (d)上記の(c)と同様に期待値の方を周波数変更後のシステムクロックのパルス数に合わせ込むのであるが、期待値に幅をもたせずに、単一の値の期待値としてもよい。 (D) Similar to (c) above, the expected value is adjusted to the number of pulses of the system clock after the frequency change. However, the expected value is not limited to a single value. Good.
 以下、順次に詳しく説明する。 Hereafter, details will be explained in order.
 (a)システムクロックの周波数変更要求の実効延期化による条件緩和
 上記(1)の構成において、前記条件調整部は、前記システムクロックの周波数変更要求信号を受信したときに、前記周波数変更部において、前記監視周期終端まで前記周波数変更要求信号に基づき周波数変更処理を延期し、前記監視周期終端またはその近傍で前記システムクロックの周波数変更を実行するように構成されているという態様がある。
(A) Condition relaxation by effective postponement of system clock frequency change request In the configuration of (1) above, when the condition adjustment unit receives the system clock frequency change request signal, There is an aspect in which the frequency change process is postponed based on the frequency change request signal until the end of the monitoring period, and the frequency change of the system clock is executed at or near the end of the monitoring period.
 これを別言すれば、上記(1)の構成において、
 前記条件調整部は、前記カウント部と前記周波数変更部をから構成され、
 前記カウント部は、前記監視用クロックのカウントに基づいて前記監視周期終端を検出すると、周波数変更許可信号を前記周波数変更部に出力するように構成され、
 前記周波数変更部は、前記周波数変更要求信号を受信すると、前記周波数変更許可信号の入力があるまでは前記システムクロックの周波数変更を保留し、前記周波数変更許可信号を受信するとシステムクロック周波数変更処理を実効化するように構成されている。
In other words, in the configuration of (1) above,
The condition adjusting unit includes the counting unit and the frequency changing unit,
The count unit is configured to output a frequency change permission signal to the frequency change unit when detecting the end of the monitoring period based on the count of the monitoring clock,
When the frequency change unit receives the frequency change request signal, the frequency change unit holds the frequency change of the system clock until the frequency change enable signal is input, and receives the frequency change enable signal and performs a system clock frequency change process. It is configured to be effective.
 システムクロックの周波数が直ちに変更されるとなると、監視周期終端におけるカウント結果(パルス数)は従前の値から変化してしまっている。一方、期待値の変更は未達成である。そうすると、カウント結果と期待値とに不一致が生じる可能性があり、そうすると不測に異常検出信号が出力されてしまう。 If the frequency of the system clock is changed immediately, the count result (number of pulses) at the end of the monitoring cycle has changed from the previous value. On the other hand, the expected value has not been changed. In this case, there is a possibility that a mismatch occurs between the count result and the expected value, and then an abnormality detection signal is unexpectedly output.
 周波数変更部が周波数変更要求信号を受信しても、周波数変更部は、その要求に基づく周波数変更処理を一時的に監視周期終端まで延期する。この周波数変更要求処理の実効延期化という条件調整処理が実施されると、その監視周期でのパルス数は要求前と同じだけのものになる。すると、比較部において監視周期終端で行われるパルス数と期待値との比較において一致判断が継続され、不測に異常検出信号が出力されることはない。監視周期終端で周波数変更要求処理が実効化され、システムクロックの周波数が変更されるとともに、これを確認した周波数変更判別部が期待値変更指示信号を期待値変更部に出力し、期待値変更部は比較部に与える期待値を周波数変更後のシステムクロック周波数に対応した期待値に変更する。このシステムクロックの周波数の変更は続く監視周期の初期に行われ、期待値の変更も続く監視周期の初期に行われる。これら2つの変更に少しのタイミングのずれがあっても、カウント結果と期待値との比較が行われる監視周期終端では問題とはならず、周波数変更後のシステムクロックのカウント結果は期待値と一致する。 Even if the frequency change unit receives the frequency change request signal, the frequency change unit temporarily postpones the frequency change process based on the request until the end of the monitoring cycle. When the condition adjustment process of effective postponement of the frequency change request process is performed, the number of pulses in the monitoring period is the same as that before the request. Then, in the comparison unit, the determination of coincidence is continued in the comparison between the number of pulses performed at the end of the monitoring period and the expected value, and no abnormality detection signal is unexpectedly output. The frequency change request process is activated at the end of the monitoring cycle, and the frequency of the system clock is changed. The frequency change determination unit that has confirmed this outputs an expected value change instruction signal to the expected value change unit. Changes the expected value given to the comparator to an expected value corresponding to the system clock frequency after the frequency change. The change in the frequency of the system clock is performed at the beginning of the subsequent monitoring cycle, and the expected value is also changed at the beginning of the subsequent monitoring cycle. Even if there is a slight difference in timing between these two changes, there is no problem at the end of the monitoring cycle when the count result is compared with the expected value, and the system clock count result after the frequency change matches the expected value. To do.
 なお、ここで監視周期終端までの延期がポイントになっているが、監視周期終端をチェックするについては、監視用クロックを入力するカウント部を機能させるのがよい。カウント部による監視周期終端の検出を周波数変更許可信号として周波数変更部へ伝え、その周波数変更許可信号を受け取った周波数変更部がそれまで保留してあった周波数変更要求信号に基づいた周波数変更処理を実効化すればよい。 Note that the postponement until the end of the monitoring cycle is a point here, but for checking the end of the monitoring cycle, it is preferable to make the count unit for inputting the monitoring clock function. The detection of the end of the monitoring period by the count unit is transmitted to the frequency change unit as a frequency change permission signal, and the frequency change process based on the frequency change request signal that the frequency change unit that has received the frequency change permission signal has suspended until then. It should be effective.
 上記構成によれば、システムクロックの監視周期の途中でシステムクロックの周波数変更要求信号が発行された場合に、クロック監視機能は実質的に停止する必要がなく、継続的にシステムの安全性を確保することが可能となる。 According to the above configuration, when a system clock frequency change request signal is issued in the middle of the system clock monitoring cycle, the clock monitoring function does not need to be substantially stopped and the system safety is continuously secured. It becomes possible to do.
 (b)比較処理停止による条件緩和
 上記(1)の構成において、前記条件調整部は、前記周波数変更要求信号を受信すると、前記比較部による前記カウント結果と前記期待値との比較を停止させるとともに前記カウント部における現時点での監視周期を終了させて直ちに次の監視周期に移行させるように構成されている、という態様がある。
(B) Condition relaxation by stop of comparison processing In the configuration of (1), when the condition adjustment unit receives the frequency change request signal, the condition adjustment unit stops comparing the count result and the expected value by the comparison unit. There is an aspect in which the current monitoring cycle in the counting unit is terminated and immediately shifted to the next monitoring cycle.
 これを別言すれば、上記(1)の構成において、
 前記条件調整部は、前記カウント部と前記比較部とから構成され、
 前記カウント部は、周波数変更要求信号受信時の前記監視周期を終了させて直ちに次の監視周期に移行するように構成され、
 前記比較部は、周波数変更要求信号受信時の前記監視周期では、前記カウント結果と前記期待値との比較を一時的に停止したうえで、次の監視周期に移行すると前記比較を再開するように構成されている。
In other words, in the configuration of (1) above,
The condition adjustment unit includes the count unit and the comparison unit,
The counting unit is configured to immediately end the monitoring cycle when receiving a frequency change request signal and immediately shift to the next monitoring cycle,
The comparison unit temporarily stops the comparison between the count result and the expected value in the monitoring period when the frequency change request signal is received, and restarts the comparison when the next monitoring period is started. It is configured.
 周波数変更要求信号受信時の監視周期では、その周期終端での比較処理を停止するようにする。つまり、その監視周期を周波数変更要求信号を受信した直後に終了させてしまい、直ちに次の監視周期へと移行する。システムクロックの周波数は遅滞なく変更する。その周波数変更は、周波数変更要求信号を受信した時点における監視周期の次の監視周期の初期ということになる。周波数変更を行う次の監視周期では、その初期に期待値の変更も行われる。周波数変更要求信号受信時の監視周期ではパルス数と期待値との比較処理を停止するのであるから、不一致とはならず、当然に、異常検出信号は出力されない。周波数変更要求信号受信時の監視周期の次の監視周期では、時間経過とともにカウントするパルス数が増加していく。動作が正常であれば、その周期の終了時点でパルス数が変更後の期待値と一致するに至り異常検出信号の出力はなく、動作が異常であれば、その周期の終了時点でパルス数が変更後の期待値と不一致となって異常検出信号が出力される。 比較 In the monitoring cycle when the frequency change request signal is received, the comparison process at the end of the cycle is stopped. That is, the monitoring cycle is terminated immediately after receiving the frequency change request signal, and the process immediately shifts to the next monitoring cycle. The system clock frequency can be changed without delay. The frequency change is the initial period of the monitoring period next to the monitoring period when the frequency change request signal is received. In the next monitoring cycle in which the frequency is changed, the expected value is also changed at the initial stage. Since the comparison process between the number of pulses and the expected value is stopped in the monitoring period when the frequency change request signal is received, there is no mismatch and, naturally, no abnormality detection signal is output. In the monitoring period next to the monitoring period when the frequency change request signal is received, the number of pulses counted increases with time. If the operation is normal, the number of pulses matches the expected value after the change at the end of the cycle, and no abnormality detection signal is output.If the operation is abnormal, the number of pulses at the end of the cycle is An anomaly detection signal is output because it does not match the expected value after the change.
 上記構成によれば、システムクロックの周波数変更要求信号を受信すると、システムクロックの周波数を直ちに変更するものであるので、周波数変更要求信号に対する周波数変更処理の迅速応答性を確保しながら、周波数変更後のシステムクロックに対して変更直後からでもシステムクロックの周波数の監視を継続して、システムの安全性を確保することが可能となる。 According to the above configuration, when the frequency change request signal of the system clock is received, the frequency of the system clock is immediately changed. Therefore, after ensuring the quick response of the frequency change process to the frequency change request signal, The system clock frequency can be continuously monitored even immediately after the system clock is changed to ensure the safety of the system.
 (c)期待値幅拡張による条件緩和
 上記(1)の構成において、前記条件調整部は、周波数変更要求信号受信時の前記監視周期における前記期待値として、周波数変更要求信号受信前における変更前期待値と、周波数変更要求信号で指示された変更後周波数に対応する変更後期待値とのうちの一方を上限値とし他方を下限値とする期待値範囲を設定したうえで、前記周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記変更後期待値に変更するように構成されている、という態様がある。
(C) Condition relaxation by expanding expected value range In the configuration of (1) above, the condition adjustment unit is an expected value before change before receiving a frequency change request signal as the expected value in the monitoring period when receiving a frequency change request signal. And an expected value range in which one of the post-change expected values corresponding to the post-change frequency instructed by the frequency change request signal is an upper limit value and the other is a lower limit value, and the frequency change request signal is received. There is a mode in which the expected value is changed to the changed expected value when the monitoring period is shifted to the next monitoring period.
 これを別言すれば、上記(1)の構成において、前記条件調整部は、前記期待値変更部と前記比較部とから構成され、
 前記期待値変更部は、期待値変更指示信号受信時の前記監視周期における前記期待値として、周波数変更要求信号受信前における変更前期待値と、周波数変更要求信号で指示された変更後周波数に対応する変更後期待値とのうちの一方を上限値とし他方を下限値とする期待値範囲を設定したうえで、前記周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記変更後期待値に変更するように構成され、
 前記比較部は、周波数変更要求信号受信時の前記監視周期では、当該監視周期終端における前記カウント部のカウント結果を前記期待値範囲と比較し、その比較結果において前記カウント結果が前記期待値範囲の範囲外であることを示すと、前記異常検出信号を出力するように構成されている。
In other words, in the configuration of (1) above, the condition adjustment unit includes the expected value change unit and the comparison unit,
The expected value changing unit corresponds to the expected value in the monitoring period when receiving an expected value change instruction signal, the expected value before change before receiving the frequency change request signal, and the changed frequency instructed by the frequency change request signal. After setting the expected value range in which one of the expected values after change is an upper limit value and the other is a lower limit value, the expected value is transferred to the monitoring cycle next to the monitoring cycle when the frequency change request signal is received. Is changed to the expected value after the change,
In the monitoring period when the frequency change request signal is received, the comparison unit compares the count result of the count unit at the end of the monitoring period with the expected value range, and in the comparison result, the count result is within the expected value range. If it is out of range, the abnormality detection signal is output.
 周波数変更要求信号受信時において、周波数変更部がその要求信号を直ちに受け付け、システムクロックの周波数を直ちに変更するものとする。システムクロックの周波数を変更したのであるから、その監視周期におけるパルス数は、従前のパルス数とは異なることになる。このパルス数に対して期待値の方を合わせるように調整すればよいが、パルス数がどの程度変化するかは捉えにくい。そこで、ある幅をもたせる状態にして期待値を変更する。周波数変更要求信号にかかわる周波数に対応する期待値を変更後期待値とすると、新たに設定する期待値は、変更前期待値から変更後期待値までの幅をもったものとなる。これが期待値範囲である。変更前期待値と変更後期待値との大小関係は、その時々の状況による。周波数を上昇変更するときは、〔変更前期待値~変更後期待値〕の範囲となり、周波数を下降変更するときは、〔変更後期待値~変更前期待値〕の範囲となる。 When receiving the frequency change request signal, the frequency change unit immediately accepts the request signal and immediately changes the frequency of the system clock. Since the frequency of the system clock is changed, the number of pulses in the monitoring period is different from the previous number of pulses. Adjustment may be made so that the expected value matches the number of pulses, but it is difficult to grasp how much the number of pulses changes. Therefore, the expected value is changed with a certain width. Assuming that the expected value corresponding to the frequency related to the frequency change request signal is the expected value after change, the newly set expected value has a range from the expected value before change to the expected value after change. This is the expected value range. The magnitude relationship between the expected value before change and the expected value after change depends on the situation at that time. When the frequency is increased, the range is [expected value before change to expected value after change], and when the frequency is decreased, the range is [expected value after change to expected value before change].
 このような期待値幅拡張による条件緩和を行っておけば、監視周期終端ではパルス数は変更前期待値から変更後期待値までの幅をもった期待値範囲内に収まることになり、周波数変更後のシステムクロックをカウントしたカウント結果は、期待値と一致する。期待値範囲を外れておれば、異常検出信号が出力される。 If conditions are relaxed by expanding the expected value range, the number of pulses will fall within the expected value range with the range from the expected value before the change to the expected value after the change at the end of the monitoring period. The count result obtained by counting the system clocks coincides with the expected value. If it is out of the expected value range, an abnormality detection signal is output.
 パルス数に対する比較基準を期待値範囲とするのは、周波数変更要求信号S1を受信した時点における監視周期だけの一時的なものであって、ネクスト監視周期に移行すれば、期待値変更部は期待値を変更後期待値に変更する。 The comparison of the number of pulses to the expected value range is only for the monitoring period at the time when the frequency change request signal S1 is received, and the expected value changing unit is expected when the period shifts to the next monitoring period. Change the value to the expected value after the change.
 以上のように、動作モードの変更や低消費モードへの移行などに起因する周波数変更要求信号を受信した場合に、クロック監視機能を停止することなく継続してシステムクロックの周波数の監視を行うことが可能になる。しかも、周波数変更要求信号を受信した場合に、システムクロックの周波数を直ちに変更するものであるので、周波数変更要求信号に対する周波数変更信号の迅速応答性を確保することが可能となる。さらに、周波数変更直後のシステムクロック周波数に切り替え時において一時的な周波数の変動(揺らぎ)があって監視周期終端でのパルス数のカウント結果に揺らぎが生じることがあっても、比較対象を幅のある期待値範囲としているので、不一致判定による異常検出信号の出力は防止され、システムの安全性を確保することが可能となる。ちなみに、(b)の場合の実質的なシステムクロック監視はネクスト監視周期においてであって若干遅れる。これに対して(c)の場合は、周波数変更要求信号S1を受信した時点における監視周期での即時のシステムクロック監視が実現される。 As described above, when a frequency change request signal resulting from a change in operating mode or transition to a low-consumption mode is received, the system clock frequency is continuously monitored without stopping the clock monitoring function. Is possible. In addition, when the frequency change request signal is received, the frequency of the system clock is immediately changed, so that it is possible to ensure quick response of the frequency change signal to the frequency change request signal. Furthermore, even if there is a temporary frequency fluctuation (fluctuation) when switching to the system clock frequency immediately after the frequency change and fluctuations may occur in the count result of the number of pulses at the end of the monitoring period, Since the expected value range is set, the output of the abnormality detection signal due to the mismatch determination is prevented, and the safety of the system can be ensured. Incidentally, the substantial system clock monitoring in the case of (b) is slightly delayed in the next monitoring cycle. On the other hand, in the case of (c), immediate system clock monitoring in the monitoring cycle at the time when the frequency change request signal S1 is received is realized.
 (d)臨時的すり合わせのための期待値の調整による条件緩和
 上記(1)の構成において、前記条件調整部は、周波数変更要求信号受信時の前記監視周期における前記期待値を、前記周波数変更要求信号を受信した時点における前記カウント部のカウント結果に基づいて算定される値に設定したうえで、周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記周波数変更要求信号に応じた値に変更するように構成されている、という態様がある。
(D) Condition relaxation by adjustment of expected value for temporary alignment In the configuration of (1) above, the condition adjusting unit uses the expected value in the monitoring period when receiving the frequency change request signal as the frequency change request. After setting the value calculated based on the count result of the counting unit at the time of receiving the signal, and when shifting to the monitoring cycle next to the monitoring cycle at the time of receiving the frequency change request signal, the expected value is changed to the frequency change request. There is an aspect in which it is configured to change the value according to the signal.
 期待値を調整して、周波数変更要求信号を受信したタイミングに対応するパルス数に一致するようにすることは、「システムクロックの周波数変更要求信号を受信したとき、その直後のパルス数と期待値とに不一致が生じることがないように動作条件を調整する」ことの一例である。 Adjusting the expected value so that it matches the number of pulses corresponding to the timing at which the frequency change request signal was received means that when the system clock frequency change request signal is received, the number of pulses immediately after that and the expected value Is an example of adjusting the operation condition so that no mismatch occurs.
 これを別言すれば、上記(1)の構成において、
 前記条件調整部は、前記カウント部と前記期待値変更部とから構成され、
 前記カウント部は、前記周波数変更要求信号を受信すると前記監視周期を終了させて直ちに次の監視周期に移行するように構成され、
 前記期待値変更部は、前記期待値変更指示信号を受信すると、周波数変更要求信号受信時の前記監視周期における前記期待値を、前記周波数変更要求信号を受信した時点における前記カウント部のカウント結果に基づいて算定される値に設定したうえで、周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記周波数変更要求信号に応じた値に変更するように構成されている。
In other words, in the configuration of (1) above,
The condition adjustment unit includes the count unit and the expected value change unit,
The counting unit is configured to end the monitoring cycle and immediately shift to the next monitoring cycle when receiving the frequency change request signal,
When the expected value change unit receives the expected value change instruction signal, the expected value in the monitoring period at the time of receiving the frequency change request signal is used as a count result of the count unit at the time when the frequency change request signal is received. After setting to a value calculated on the basis of the frequency change request signal, the expected value is changed to a value corresponding to the frequency change request signal when the monitoring period is shifted to the next monitoring period. Yes.
 周波数変更要求信号受信時の監視周期において、その周波数変更要求信号のタイミング(位相)が分かれば、パルス数も分かる。このパルス数に一致するようにすり合わせを行い、期待値を臨時的に調整する。つまり、比較基準であって本来は一定値に守らなくてはならないのが当然である期待値について、それを変化するパルス数の方に期待値の方から合わせるようにする。このような期待値の臨時的なすり合わせの調整という条件調整処理により、パルス数を期待値に一致させることとし(つまり、周波数変更要求信号受信直後のパルス数と期待値とに不一致が生じることがないようにし)、異常検出信号の出力を避ける。 If the timing (phase) of the frequency change request signal is known in the monitoring cycle when the frequency change request signal is received, the number of pulses can be determined. The matching is performed so as to match the number of pulses, and the expected value is temporarily adjusted. In other words, the expected value, which is a comparison standard and must be kept at a constant value, is adjusted to the number of pulses that change from the expected value. By such a condition adjustment process of adjusting the expected value temporarily, the number of pulses is matched with the expected value (that is, a mismatch between the number of pulses immediately after receiving the frequency change request signal and the expected value may occur. Avoid output of abnormality detection signals.
 上記構成によれば、動作モードの変更や低消費モードへの移行などに起因する周波数変更要求信号を受信した場合であっても、クロック監視機能を停止することなく、継続してシステムクロックの周波数監視が可能になる。しかも、周波数変更要求信号を受信した場合に、システムクロックの周波数を直ちに変更するものであるので、周波数変更要求信号に対する周波数変更の迅速応答性を確保しながら、システムの安全性を確保することが可能となる。さらに、(b)の場合の比較を一時的に停止するものや(c)の期待値を広げるものに比べて、より正確なシステムクロック監視が行える。ちなみに、(b)の場合の実質的なシステムクロック監視を行う期間はネクスト監視周期となり、(c)の場合は、周波数変更要求信号S1を受信した時点における監視周期となるが、期待値に幅があり精度がやや落ちる。これに対して(d)の場合は、システムクロック周波数の瞬時切り替えに加えて、周波数変更要求信号S1を受信した時点における監視周期での即時のシステムクロック監視が実現される。 According to the above configuration, the frequency of the system clock can be continuously continued without stopping the clock monitoring function even when a frequency change request signal resulting from a change in the operation mode or transition to the low power consumption mode is received. Monitoring becomes possible. In addition, when the frequency change request signal is received, the frequency of the system clock is changed immediately. Therefore, it is possible to ensure the safety of the system while ensuring quick response of the frequency change to the frequency change request signal. It becomes possible. Further, more accurate system clock monitoring can be performed as compared with the case of temporarily stopping the comparison in the case of (b) and the case of expanding the expected value of (c). Incidentally, the period of substantial system clock monitoring in the case of (b) is the next monitoring period, and in the case of (c), it is the monitoring period when the frequency change request signal S1 is received. There is a little accuracy. On the other hand, in the case of (d), in addition to instantaneous switching of the system clock frequency, immediate system clock monitoring in the monitoring cycle at the time when the frequency change request signal S1 is received is realized.
 さらに本発明によるモータ制御システムは、
 モータと、
 前記モータの供給電流制御用のスイッチング素子を有するインバータ回路と、
 クロック周波数異常発生時において前記モータが安全な状態になるように、前記スイッチング素子を制御する請求項1のシステムクロック監視装置と、
 を備える。
Furthermore, the motor control system according to the present invention includes:
A motor,
An inverter circuit having a switching element for controlling the supply current of the motor;
The system clock monitoring device according to claim 1, wherein the switching element is controlled so that the motor is in a safe state when a clock frequency abnormality occurs.
Is provided.
 なお、本明細書において、周波数変更部、カウント部、周波数変更判別部、期待値変更部、比較部および条件調整部の各構成要素は、ハードウェアで構成するほか、ソフトウェアにおける個々のステップまたはルーチンで構成してもよい。あるいは、ハードウェアとソフトウェアの組み合わせで構成してもよい。 In this specification, each component of the frequency changing unit, the counting unit, the frequency change determining unit, the expected value changing unit, the comparing unit, and the condition adjusting unit is configured by hardware, and each step or routine in software You may comprise. Or you may comprise by the combination of hardware and software.
 以下、本発明にかかわるシステムクロック監視装置の複数の実施の形態を図面を参照して詳細に説明する。 Hereinafter, a plurality of embodiments of a system clock monitoring apparatus according to the present invention will be described in detail with reference to the drawings.
 [各実施の形態の基本構成]
 まず、各実施の形態において共通となる基本構成を説明する。図1は本発明の各実施の形態で共通となるシステムクロック監視装置の基本構成図である。このシステムクロック監視装置は、周波数変更部1とカウント部2と周波数変更判別部4と期待値変更部5と比較部6と条件調整部7とを備える。
[Basic configuration of each embodiment]
First, a basic configuration common to the embodiments will be described. FIG. 1 is a basic configuration diagram of a system clock monitoring apparatus which is common to the embodiments of the present invention. This system clock monitoring device includes a frequency changing unit 1, a counting unit 2, a frequency change determining unit 4, an expected value changing unit 5, a comparing unit 6, and a condition adjusting unit 7.
 周波数変更部1はシステムクロックソースCSからシステムクロックCK1を生成するもので、周波数変更要求信号S1に応じてシステムクロックCK1の周波数を変更する。カウント部2にはシステムクロックCK1とこのシステムクロックCK1とは別系統の監視用クロックCK2とが供給される。カウント部2は監視用クロックCK2に基づいた監視周期T1においてシステムクロックCK1のパルス数PNをカウントする。周波数変更判別部4は周波数変更要求信号S1がありかつ周波数変更部1においてシステムクロックCK1の周波数が変更されたことを確認したときに期待値変更指示信号S2を出力する。期待値変更部5は周波数変更判別部4からの期待値変更指示信号S2の受信に基づいて期待値Exを変更後の周波数に対応した期待値に変更する。比較部6はカウント部2から供給される監視周期T1の終端ごとのカウント結果(システムクロックCK1のパルス数PN)と期待値変更部5から供給される期待値Exとを比較し、その比較結果が不一致となるとアクティブな異常検出信号Sa(周波数異常を示す)を出力する。条件調整部7はシステムクロックCK1の周波数変更要求信号S1を受信すると、その直後のパルス数PNと期待値Exとに不一致が生じることがないように動作条件を調整する。 The frequency changing unit 1 generates the system clock CK1 from the system clock source CS, and changes the frequency of the system clock CK1 according to the frequency change request signal S1. The count unit 2 is supplied with a system clock CK1 and a monitoring clock CK2 of a system different from the system clock CK1. The counting unit 2 counts the number of pulses PN of the system clock CK1 in the monitoring period T1 based on the monitoring clock CK2. The frequency change determination unit 4 outputs an expected value change instruction signal S2 when it is confirmed that the frequency change request signal S1 is present and the frequency change unit 1 has changed the frequency of the system clock CK1. The expected value changing unit 5 changes the expected value Ex to an expected value corresponding to the changed frequency based on the reception of the expected value change instruction signal S2 from the frequency change determining unit 4. The comparison unit 6 compares the count result (the number of pulses PN of the system clock CK1) supplied from the count unit 2 with the expected value Ex supplied from the expected value changing unit 5 and the comparison result. If they do not match, an active abnormality detection signal Sa (indicating frequency abnormality) is output. When the condition adjustment unit 7 receives the frequency change request signal S1 of the system clock CK1, the condition adjustment unit 7 adjusts the operating condition so that there is no mismatch between the number of pulses PN immediately after that and the expected value Ex.
 なお期待値変更部5は、比較部6に与える期待値Exを、
・システムクロックCK1の周波数と期待値との対応テーブルが格納された外部の記憶装置から得る、
・上記対応テーブルと同様の構成を有する対応テーブルが格納された内蔵メモリから得る、
ように構成される。
The expected value changing unit 5 determines the expected value Ex given to the comparing unit 6 as follows:
Obtained from an external storage device in which a correspondence table between the frequency of the system clock CK1 and the expected value is stored,
-Obtained from a built-in memory in which a correspondence table having the same configuration as the correspondence table is stored.
Configured as follows.
 以下、本実施の形態のシステムクロック監視装置の動作を説明する。 Hereinafter, the operation of the system clock monitoring apparatus of this embodiment will be described.
 (通常動作時)
 システムクロックの周波数変更要求信号S1がない通常動作時に機能するのはカウント部2と比較部6とであり、周波数変更判別部4、期待値変更部5、および条件調整部7は実質的に休止状態である。周波数変更部1は、システムクロックソースCSに基づいて基本動作周波数のシステムクロックCK1を生成する。カウント部2には、システムクロックCK1と監視用クロックCK2とが入力される。カウント部2は、監視用クロックCK2で規定される監視周期T1毎に、システムクロックCK1のパルス数をカウントする。比較部6は、監視周期T1毎に、カウント部2のカウント結果(その監視周期Tにおけるパルス数のカウント結果であって、以下、パルス数PNという)と期待値Exとを比較する。通常動作時では両者は一致するため、カウント部2が出力する異常検出信号Sa(周波数異常に有無を示す)はインアクティブのままである。システムクロックCK1に周波数異常が生じてパルス数PNがその正常値から増減変動すると、パルス数PNが期待値Exと一致しなくなる。このことを検知した比較部6は、異常検出信号Saをアクティブにして図示しないCPUや周辺回路へ出力する。アクティブな異常検出信号Saを受信したCPUや周辺回路は、所定の安全動作を実行する。
(Normal operation)
The count unit 2 and the comparison unit 6 function during normal operation without the system clock frequency change request signal S1, and the frequency change determination unit 4, the expected value change unit 5, and the condition adjustment unit 7 are substantially suspended. State. The frequency changing unit 1 generates a system clock CK1 having a basic operating frequency based on the system clock source CS. The count unit 2 receives a system clock CK1 and a monitoring clock CK2. The count unit 2 counts the number of pulses of the system clock CK1 every monitoring period T1 defined by the monitoring clock CK2. The comparison unit 6 compares the count result of the count unit 2 (the count result of the number of pulses in the monitoring period T, hereinafter referred to as the pulse number PN) and the expected value Ex every monitoring period T1. Since both coincide with each other during normal operation, the abnormality detection signal Sa (indicating presence or absence of frequency abnormality) output from the count unit 2 remains inactive. When a frequency abnormality occurs in the system clock CK1 and the pulse number PN increases or decreases from its normal value, the pulse number PN does not match the expected value Ex. Upon detecting this, the comparison unit 6 activates the abnormality detection signal Sa and outputs it to a CPU and peripheral circuits (not shown). The CPU or peripheral circuit that has received the active abnormality detection signal Sa performs a predetermined safe operation.
 (システムクロック周波数変更時)
 動作モードの変更や低消費モードへの移行などに起因するシステムクロックの周波数変更要求が発生して周波数変更要求S1がアクティブになると、それに基づいて周波数変更判別部4、期待値変更部5、および条件調整部7が動作状態に移行する。
(When changing the system clock frequency)
When a frequency change request for the system clock is generated due to a change in the operation mode, a shift to a low consumption mode, or the like, and the frequency change request S1 becomes active, the frequency change determination unit 4, the expected value change unit 5, and The condition adjustment unit 7 shifts to an operating state.
 条件調整部7は、周波数変更要求信号S1を受信すると、自身がアクティブになるとともに、システムクロックの周波数変更要求信号S1を受信した時点の監視周期T1において、周波数変更部1またはカウント部2または周波数変更判別部4または期待値変更部5または比較部6を制御して動作条件を調整する。具体的には、周波数変更要求信号S1の直後のパルス数PNと期待値Exとに不一致が生じないように各部の動作条件が調整される。監視周期T1が終了して次の監視周期T1x+1に移行すると、条件調整部7は当該動作条件調整処理を解除する。 When the condition adjustment unit 7 receives the frequency change request signal S1, the condition adjustment unit 7 becomes active, and in the monitoring period T1 x when the frequency change request signal S1 of the system clock is received, the frequency change unit 1 or the count unit 2 or The operating condition is adjusted by controlling the frequency change discriminating unit 4, the expected value changing unit 5 or the comparing unit 6. Specifically, the operating conditions of each unit are adjusted so that there is no discrepancy between the number of pulses PN immediately after the frequency change request signal S1 and the expected value Ex. When the monitoring period T1 x ends and the process proceeds to the next monitoring period T1 x + 1 , the condition adjustment unit 7 cancels the operation condition adjustment process.
 上記動作条件調整処理を実施する構成は複数あり、それら複数の構成それぞれが本発明の実施の形態1~4である。 There are a plurality of configurations for performing the operation condition adjustment processing, and each of the plurality of configurations is the first to fourth embodiments of the present invention.
 (実施の形態1)
 図2は実施の形態1の動作条件調整処理を実施するシステムクロック監視装置が搭載されたシステム100の構成図である。本実施の形態は、図1における条件調整部7を、カウント部2と周波数変更部1との協働によって実現するものに相当する。つまり、上記の(a)の[システムクロックの周波数変更要求信号の実効延期化による条件緩和]に対応している。図2において、図1におけるのと同じ符号は同一構成要素を指しているので、詳しい説明は省略する。
(Embodiment 1)
FIG. 2 is a configuration diagram of the system 100 in which the system clock monitoring device that performs the operation condition adjustment processing of the first embodiment is mounted. The present embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the counting unit 2 and the frequency changing unit 1. That is, it corresponds to the above (a) [condition relaxation by effective postponement of the frequency change request signal of the system clock]. In FIG. 2, the same reference numerals as those in FIG.
 システム100は、図1の構成に加えて、記憶部3を備える。記憶部3はシステムクロックCK1のパルス数PNに対する期待値Exを格納している。記憶部3には、システムクロックCK1の周波数の遷移には複数のパターンがあり、それら遷移パターンに対応する期待値Exがそれぞれ存在する。記憶部3にはそれら複数の期待値Exをテーブル形態で保持しており、記憶部3は、期待値変更部5からの制御に基づいて、出力する期待値Exを切り替える。 The system 100 includes a storage unit 3 in addition to the configuration of FIG. The storage unit 3 stores an expected value Ex for the number of pulses PN of the system clock CK1. In the storage unit 3, there are a plurality of patterns for the frequency transition of the system clock CK 1, and expected values Ex corresponding to these transition patterns exist. The storage unit 3 holds the plurality of expected values Ex in the form of a table, and the storage unit 3 switches the expected value Ex to be output based on the control from the expected value change unit 5.
 システム100は、さらにCPU及び周辺回路8を備える。期待値変更部5は、周波数変更判別部4から期待値変更指示信号S2を受け取ると、変更後のシステムクロックCK1の周波数に対応する期待値Exを新たに記憶部3から読み出して、旧の期待値Exを新の期待値Exで更新する。そのうえで、更新後の期待値Exを比較部6に出力する。CPU及び周辺回路8は周波数変更部1から出力されるシステムクロックCK1をクロックソースにして駆動される。 The system 100 further includes a CPU and a peripheral circuit 8. When the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value change unit 5 newly reads the expected value Ex corresponding to the frequency of the system clock CK1 after the change from the storage unit 3, and the old expected value The value Ex is updated with the new expected value Ex. After that, the updated expected value Ex is output to the comparison unit 6. The CPU and peripheral circuit 8 are driven using the system clock CK1 output from the frequency changing unit 1 as a clock source.
 CPU及び周辺回路8は、動作モードの変更や低消費モードへの移行などに起因するシステムクロックCK1の周波数変更の指示を受け付けると、周波数変更要求信号S1を周波数変更部1に出力する。CPU及び周辺回路8は、周波数変更要求信号S1を周波数変更判別部4とカウント部2にも与える。周波数変更部1は、システムクロックソースCSに基づいてシステムクロックCK1を生成したうえで、生成したシステムクロックCK1をCPU及び周辺回路8に供給する。 The CPU and the peripheral circuit 8 output a frequency change request signal S1 to the frequency change unit 1 when receiving an instruction to change the frequency of the system clock CK1 due to a change in the operation mode or a shift to the low consumption mode. The CPU and peripheral circuit 8 also provides the frequency change request signal S1 to the frequency change determination unit 4 and the count unit 2. The frequency changing unit 1 generates the system clock CK1 based on the system clock source CS, and supplies the generated system clock CK1 to the CPU and the peripheral circuit 8.
 周波数変更部1は、CPU及び周辺回路8から周波数変更要求信号S1を受信すると、
・カウント部2からアクティブな周波数変更許可信号S3が供給されるまではシステムクロックCK1の周波数変更を保留(延期)したうえで、
・アクティブな周波数変更許可信号S3を受信すると、システムクロックCK1の周波数変更を実効化する、
ように構成されている。
When the frequency change unit 1 receives the frequency change request signal S1 from the CPU and the peripheral circuit 8,
-Until the active frequency change permission signal S3 is supplied from the count unit 2, the frequency change of the system clock CK1 is suspended (postponed),
When the active frequency change permission signal S3 is received, the frequency change of the system clock CK1 is made effective.
It is configured as follows.
 カウント部2は、CPU及び周辺回路8から周波数変更要求信号S1を受信すると、監視周期T1の終端検出に同期して、アクティブな周波数変更許可信号S3を周波数変更部1に出力するように構成されている。なお、監視周期T1の終端検出は、監視用クロックCK2のカウントに基づいて実施される。 When receiving the frequency change request signal S1 from the CPU and the peripheral circuit 8, the count unit 2 is configured to output an active frequency change permission signal S3 to the frequency change unit 1 in synchronization with the end detection of the monitoring period T1. ing. Note that the end of the monitoring cycle T1 is detected based on the count of the monitoring clock CK2.
 比較部6は、パルス数PNと期待値Exとの比較に基づいてシステムクロックCK1の周波数異常を検出すると、アクティブな異常検出信号SaをCPU及び周辺回路8に出力する。 The comparison unit 6 outputs an active abnormality detection signal Sa to the CPU and the peripheral circuit 8 when detecting a frequency abnormality of the system clock CK1 based on the comparison between the pulse number PN and the expected value Ex.
 なお、記憶部3としては、内部メモリで構成するほか、外部メモリ、外部記録媒体で構成してもよい。その他の構成については、前述した各実施の形態共通の基本構成(図1)と同様であるので説明を省略する。 The storage unit 3 may be configured with an internal memory, an external memory, or an external recording medium. Other configurations are the same as the basic configuration common to the above-described embodiments (FIG. 1), and thus the description thereof is omitted.
 以上の構成を備えることにより、
・周波数変更要求信号S1が供給される、
・カウント部2が監視用クロックCK2における監視周期T1の終端をクロックCK2のカウントによって検出する、
 という二つの条件を満たすと、周波数変更部1によるシステムクロックCK1の周波数変更処理が実施される。
By having the above configuration,
A frequency change request signal S1 is supplied,
The count unit 2 detects the end of the monitoring cycle T1 in the monitoring clock CK2 by counting the clock CK2.
When the two conditions are satisfied, the frequency changing process of the system clock CK1 by the frequency changing unit 1 is performed.
 次に、上記のように構成された実施の形態1のシステムクロック監視装置の動作を図3のタイミングチャートに従って説明する。以下の説明では、カウント部2から入力される監視用クロックCK2に基づいて設定される監視周期T1内のタイミングt1において、動作モードの変更や低消費モードへの移行などに起因する周波数変更要求信号S1が、CPU及び周辺回路8から出力された場合を想定している。 Next, the operation of the system clock monitoring apparatus of the first embodiment configured as described above will be described with reference to the timing chart of FIG. In the following description, the frequency change request signal resulting from the change of the operation mode, the shift to the low consumption mode, or the like at the timing t1 within the monitoring cycle T1 set based on the monitoring clock CK2 input from the count unit 2 It is assumed that S1 is output from the CPU and peripheral circuit 8.
 周波数変更要求信号S1は周波数変更部1とカウント部2と周波数変更判別部4とに供給される。周波数変更部1は、周波数変更要求信号S1を受け取っても、直ちにはシステムクロックCK1の周波数変更は行わない。それは、周波数変更許可信号S3がアクティブになっていないからである。カウント部2は、周波数変更要求信号S1を受け取っても、直ちにはアクティブな周波数変更許可信号S3を出力せず、周波数変更要求信号S1を受信した後、さらに監視周期T1がその終端に到達したことを検知して初めてカウント部2はアクティブな周波数変更許可信号S3を出力する。周波数変更要求信号S1の入力があった監視周期T1において、カウント部2によってカウントされるシステムクロックCK1のパルス数PNが時間経過に伴って順次にインクリメントされていく。監視周期T1の終端に達すると、比較部2においてパルス数PNが期待値Exと比較される。ここでは、パルス数PN=9、期待値Ex=9であって両者は一致しており、アクティブな異常検出信号Saは出力されない。 The frequency change request signal S1 is supplied to the frequency change unit 1, the count unit 2, and the frequency change determination unit 4. Even when the frequency changing unit 1 receives the frequency change request signal S1, the frequency changing unit 1 does not immediately change the frequency of the system clock CK1. This is because the frequency change permission signal S3 is not active. Even when the count unit 2 receives the frequency change request signal S1, it does not immediately output the active frequency change permission signal S3, but after receiving the frequency change request signal S1, the monitoring cycle T1 has further reached its end. The count unit 2 outputs an active frequency change permission signal S3 only after detecting this. In the monitoring period T1 when the frequency change request signal S1 is input, the number of pulses PN of the system clock CK1 counted by the count unit 2 is sequentially incremented as time elapses. When the end of the monitoring period T1 is reached, the comparison unit 2 compares the pulse number PN with the expected value Ex. Here, the number of pulses PN = 9 and the expected value Ex = 9, which are the same, and the active abnormality detection signal Sa is not output.
 監視周期T1の終端に達すると、カウント部2はアクティブな周波数変更許可信号S3を周波数変更部1に出力する。タイミングt1で周波数変更要求信号S1を受信した周波数変更部1は、アクティブな周波数変更許可信号S3を受信すると、周波数変更機能をアクティブにする。すなわち、周波数変更要求信号S1を受信した時点における監視周期のネクスト監視周期に移行すると同時に(タイミングt2)、周波数変更部1はシステムクロックCK1の周波数を、周波数変更要求信号S1によって変更要求された目標周波数に変更する。ネクスト監視周期に移行すると同時に、パルス数PNがリセットされて0に戻り、カウント部2は再びカウントアップを開始する。 When the end of the monitoring cycle T1 is reached, the count unit 2 outputs an active frequency change permission signal S3 to the frequency change unit 1. The frequency changing unit 1 that has received the frequency change request signal S1 at the timing t1 activates the frequency changing function when receiving the active frequency change permission signal S3. That is, simultaneously with the transition to the next monitoring cycle of the monitoring cycle at the time when the frequency change request signal S1 is received (timing t2), the frequency changing unit 1 changes the frequency of the system clock CK1 by the frequency change request signal S1. Change to frequency. Simultaneously with the transition to the next monitoring cycle, the pulse number PN is reset and returned to 0, and the count unit 2 starts counting up again.
 ネクスト監視周期に移行してシステムクロックCK1の周波数が変更されると、そのことが周波数変更判別部4によって確認される。周波数変更判別部4はシステムクロックCK1の周波数変更を確認すると、期待値変更指示信号S2を出力する。期待値変更指示信号S2を受信した期待値変更部5は、タイミングt2の直後において、期待値変更指示信号S2が示す情報に従って記憶部3を検索し、該当する新たな期待値Exを読み出して、それを比較部6に与える。ここでは、期待値Ex=4に更新設定されたと仮定して、説明を続行する。 When the frequency of the system clock CK1 is changed after shifting to the next monitoring cycle, this is confirmed by the frequency change determination unit 4. When the frequency change determination unit 4 confirms the frequency change of the system clock CK1, it outputs an expected value change instruction signal S2. The expected value changing unit 5 that has received the expected value change instruction signal S2 searches the storage unit 3 according to the information indicated by the expected value change instruction signal S2 immediately after the timing t2, reads the corresponding new expected value Ex, This is given to the comparison unit 6. Here, the description will be continued on the assumption that the update value is set to the expected value Ex = 4.
 時間経過に伴って、カウント部2がカウントするシステムクロックCK1のパルス数PNは、0→1→2→3のようにインクリメントされ、監視周期(ネクスト監視周期)の終端に達した段階でパルス数PN=4となる。これが比較部6において期待値Ex=4と比較される。この場合、両者は一致するので、比較部6はアクティブな異常検出信号Saを出力しない。このような判断は次のような状態想定に基づいている。すなわち、この状況において比較結果が一致するのは、システムクロックCK1の周波数は変化したものの、この周波数変化は動作モードの変更や低消費モードへの移行などに起因した設計想定内のものであって異常な周波数変化ではない。このような状況想定に基づいて、比較部6はアクティブな異常検出信号Saを出力しない。 As the time elapses, the pulse number PN of the system clock CK1 counted by the counting unit 2 is incremented as 0 → 1 → 2 → 3, and the number of pulses reaches the end of the monitoring period (next monitoring period). PN = 4. This is compared with the expected value Ex = 4 in the comparison unit 6. In this case, since both match, the comparison unit 6 does not output an active abnormality detection signal Sa. Such a determination is based on the following state assumption. That is, in this situation, the comparison results agree with each other, although the frequency of the system clock CK1 has changed, but this frequency change is within the design assumption due to the change of the operation mode or the shift to the low consumption mode. It is not an abnormal frequency change. Based on this situation assumption, the comparison unit 6 does not output an active abnormality detection signal Sa.
 以上のように、アクティブな周波数変更要求信号S1を受信した監視周期T1において、タイミングt1からタイミングt2までの期間では、タイミングt2に到達するまでシステムクロックCK1の周波数変更処理が延期されるが、このような周波数変更の延期は極めて短い時間長での延期であって、ネクスト監視周期では直ちに周波数変更が実効化される。そのため、クロック監視機能の一旦停止は実質的に起こらず、クロック監視機能の一旦停止に起因したシステムの安全性の低下は生じない。 As described above, in the monitoring period T1 when the active frequency change request signal S1 is received, the frequency change process of the system clock CK1 is postponed until the timing t2 is reached in the period from the timing t1 to the timing t2. Such a postponement of the frequency change is a postponement with a very short time length, and the frequency change is immediately implemented in the next monitoring period. For this reason, the temporary stop of the clock monitoring function does not substantially occur, and the safety of the system due to the temporary stop of the clock monitoring function does not occur.
 なお、図3の動作例でネクスト監視周期以降の監視周期T1のいずれかにおいてシステムクロックCK1に周波数異常が発生した場合、比較部6は周波数異常が発生した周期の終端においてパルス数PNと期待値Ex=4との不一致を検知することになる。そのような状態になれば比較部6は、CPU及び周辺回路8に異常検出信号Saを出力する。 In the operation example of FIG. 3, when a frequency abnormality occurs in the system clock CK1 in any of the monitoring periods T1 after the next monitoring period, the comparison unit 6 determines the number of pulses PN and the expected value at the end of the period in which the frequency abnormality has occurred. A mismatch with Ex = 4 is detected. In such a state, the comparison unit 6 outputs an abnormality detection signal Sa to the CPU and the peripheral circuit 8.
 本実施の形態によれば、システムクロックCK1の監視周期T1の途中でシステムクロックの周波数変更要求が発行された(周波数変更要求信号S1を受信した)場合に、クロック監視機能は実質的に停止する必要がなく、継続的にシステムの安全性を確保することができる。 According to the present embodiment, when a system clock frequency change request is issued (receives the frequency change request signal S1) during the monitoring period T1 of the system clock CK1, the clock monitoring function is substantially stopped. There is no need, and the safety of the system can be ensured continuously.
 なお、上述した実施の形態1では周波数変更要求信号S1を受信したタイミングt1に対して実際にシステムクロックCK1の周波数を変更するタイミングt2がわずかではあるが遅れる。応答性をさらに向上させたのが次に説明する実施の形態2である。 In the first embodiment described above, the timing t2 at which the frequency of the system clock CK1 is actually changed is slightly delayed from the timing t1 at which the frequency change request signal S1 is received. The second embodiment described below further improves the responsiveness.
 (実施の形態2)
 図4は実施の形態2の動作条件調整処理を実施するシステムクロック監視装置が搭載されたシステム200の構成図である。本実施の形態は、図1における条件調整部7を、カウント部2と比較部6との協働によって実現するものに相当する。つまり、上記の(b)の[比較処理停止による条件緩和]に対応している。図4において、図1、図2におけるのと同じ符号は同一構成要素を指しているので、詳しい説明は省略する。
(Embodiment 2)
FIG. 4 is a configuration diagram of a system 200 in which a system clock monitoring device that performs the operation condition adjustment processing of the second embodiment is mounted. The present embodiment corresponds to the condition adjusting unit 7 in FIG. 1 realized by the cooperation of the counting unit 2 and the comparison unit 6. In other words, this corresponds to the above-mentioned [condition relaxation by stopping the comparison process] of (b). In FIG. 4, the same reference numerals as those in FIGS. 1 and 2 indicate the same components, and detailed description thereof will be omitted.
 システム200(図4)は、システム100(図2)と異なり、CPU及び周辺回路8からカウント部2に周波数変更要求信号S1が供給されない。さらには、カウント部2から周波数変更部1に周波数変更許可信号S3が供給されない。それらの信号供給に替わって、CPU及び周辺回路8から比較部6に周波数変更要求信号S1が供給される。周波数変更判別部4から出力される期待値変更指示信号S2は期待値変更部5とともにカウント部2にも供給される。カウント部2は、期待値変更指示信号S2を受信すると、周波数変更要求信号S1を受信した時点における監視周期T1を要求信号S1の受信直後に終了させたうえで、直ちにネクスト監視周期に移行するように構成されている。 Unlike the system 100 (FIG. 2), the system 200 (FIG. 4) does not supply the frequency change request signal S1 from the CPU and the peripheral circuit 8 to the count unit 2. Further, the frequency change permission signal S3 is not supplied from the count unit 2 to the frequency change unit 1. Instead of supplying these signals, a frequency change request signal S1 is supplied from the CPU and peripheral circuit 8 to the comparison unit 6. The expected value change instruction signal S2 output from the frequency change determination unit 4 is supplied to the count unit 2 together with the expected value change unit 5. Upon receiving the expected value change instruction signal S2, the count unit 2 ends the monitoring cycle T1 at the time of receiving the frequency change request signal S1 immediately after receiving the request signal S1, and immediately shifts to the next monitoring cycle. It is configured.
 比較部6は、CPU及び周辺回路8から周波数変更要求信号S1を受信すると、周波数変更要求信号S1を受信した時点における監視周期T1での比較動作を一時的に停止し、ネクスト監視周期に移行すると比較動作をアクティブに戻すように構成されている。その他の構成については、上記の実施の形態1と同様であるので説明を省略する。 When the comparison unit 6 receives the frequency change request signal S1 from the CPU and the peripheral circuit 8, the comparison unit 6 temporarily stops the comparison operation at the monitoring period T1 when the frequency change request signal S1 is received, and shifts to the next monitoring period. It is configured to return the comparison operation to active. Since other configurations are the same as those in the first embodiment, description thereof is omitted.
 次に、上記のように構成された実施の形態2のシステムクロック監視装置の動作を図5のタイミングチャートに従って説明する。図5は正常動作時の動作を示している。 Next, the operation of the system clock monitoring apparatus of the second embodiment configured as described above will be described with reference to the timing chart of FIG. FIG. 5 shows the operation during normal operation.
 カウント部2が入力した監視用クロックCK2によって生成する監視周期T1のタイミングt3において、動作モードの変更や低消費モードへの移行などに起因して、CPU及び周辺回路8が周波数変更要求信号S1を出力したとする。この周波数変更要求信号S1は周波数変更部1と周波数変更判別部4と比較部6とに供給される。 At the timing t3 of the monitoring cycle T1 generated by the monitoring clock CK2 input by the count unit 2, the CPU and the peripheral circuit 8 send the frequency change request signal S1 due to the change of the operation mode or the shift to the low consumption mode. Suppose that it outputs. The frequency change request signal S1 is supplied to the frequency change unit 1, the frequency change determination unit 4, and the comparison unit 6.
 周波数変更部1は、周波数変更要求信号S1を受信すると、その直後のタイミングt4において、システムクロックCK1の周波数を周波数変更要求信号S1で指示された周波数に変更する。この点は実施の形態1とは異なり、応答性の高いものとなっている。システムクロックCK1の周波数が変更されると、そのことが周波数変更判別部4によって確認され、周波数変更判別部4はアクティブな期待値変更指示信号S2をカウント部2と期待値変更部5とに向けて出力する。 When the frequency change unit 1 receives the frequency change request signal S1, the frequency change unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 at a timing t4 immediately after that. In this respect, unlike the first embodiment, the response is high. When the frequency of the system clock CK1 is changed, this is confirmed by the frequency change determination unit 4, and the frequency change determination unit 4 directs the active expected value change instruction signal S2 to the count unit 2 and the expected value change unit 5. Output.
 アクティブな期待値変更指示信号S2を受信したカウント部2は、そのアクティブな期待値変更指示信号S2を受信した時点における監視周期T1を信号S2受信直後に終了させて、直ちにネクスト監視周期へと移行する。 Upon receiving the active expected value change instruction signal S2, the counting unit 2 ends the monitoring cycle T1 at the time of receiving the active expected value change instruction signal S2 immediately after receiving the signal S2, and immediately shifts to the next monitoring cycle. To do.
 一方、CPU及び周辺回路8から周波数変更要求信号S1を受信した比較部6は、強制終了させられた監視周期T1の終端(タイミングt4の直前)では、カウント部2からのパルス数PNと期待値変更部5からの期待値Exとの比較処理を一時的に停止する。このとき、期待値Ex=9であり、かつ実測したパルス数PN=5である場合、両者は不一致になるが、上述したように比較処理を行わないので、アクティブな異常検出信号Saが出力されることはない。 On the other hand, the comparison unit 6 that has received the frequency change request signal S1 from the CPU and the peripheral circuit 8 has the number of pulses PN and the expected value from the count unit 2 at the end of the monitoring period T1 that has been forcibly terminated (immediately before timing t4). The comparison process with the expected value Ex from the changing unit 5 is temporarily stopped. At this time, if the expected value Ex = 9 and the actually measured number of pulses PN = 5, they are inconsistent, but the comparison process is not performed as described above, so that an active abnormality detection signal Sa is output. Never happen.
 また、周波数変更判別部4から期待値変更指示信号S2を受信した期待値変更部5は、タイミングt4の直後において、期待値変更指示信号S2に重畳された情報に従って記憶部3を検索し、該当する新たな期待値Exを読み出し、それを比較部6に与える。ここでは、期待値Ex=4が記憶部3から読み出されたうえで、この期待値Ex=4によって比較部5の期待値Exが更新される。 Further, the expected value change unit 5 that has received the expected value change instruction signal S2 from the frequency change determination unit 4 searches the storage unit 3 according to the information superimposed on the expected value change instruction signal S2 immediately after the timing t4, and The new expected value Ex to be read is read out and given to the comparison unit 6. Here, after the expected value Ex = 4 is read from the storage unit 3, the expected value Ex of the comparison unit 5 is updated by the expected value Ex = 4.
 時間経過に伴って、カウント部2がカウントするシステムクロックCK1のパルス数PNは、0→1→2→3のようにインクリメントされ、ネクスト監視周期の終端に達した段階(タイミングt5)のパルス数が、比較部6において期待値Ex=4と比較される。図5のタイムチャートではパルス数PN=4であって、両者は一致するので、比較部5はアクティブな異常検出信号Saを出力しない。つまり、タイミングt5では、直前にシステムクロックCK1の周波数が変化するが、これは動作モードの変更や低消費モードへの移行などに起因する想定内の周波数変動であって異常変動ではない。本実施の形態では、タイミングt4において期待値Exを更新することで、比較部5は、比較動作を継続させながらタイミングt4以降における比較動作の精度を維持することが可能となる。その結果、タイミングt4以降(例えば、タイミングt5)において、アクティブな異常検出信号Saが不要に出力されることがなくなる。 As the time elapses, the pulse number PN of the system clock CK1 counted by the counting unit 2 is incremented as 0 → 1 → 2 → 3, and the number of pulses at the stage of reaching the end of the next monitoring cycle (timing t5) Is compared with the expected value Ex = 4 in the comparison unit 6. In the time chart of FIG. 5, since the number of pulses PN = 4 and they match, the comparison unit 5 does not output an active abnormality detection signal Sa. That is, at the timing t5, the frequency of the system clock CK1 changes immediately before, but this is an expected frequency fluctuation caused by a change in the operation mode, a shift to the low consumption mode, and the like, and not an abnormal fluctuation. In the present embodiment, by updating the expected value Ex at the timing t4, the comparison unit 5 can maintain the accuracy of the comparison operation after the timing t4 while continuing the comparison operation. As a result, the active abnormality detection signal Sa is not unnecessarily output after timing t4 (for example, timing t5).
 以上のように、比較部6における比較動作が一時的に停止されるのは、周波数変更要求信号S1が供給された監視周期T1のみのきわめてわずかな時間であり、ネクスト監視周期では比較動作が直ちに再開されるので、クロック監視機能の一旦停止は実質的に起こらず、システムの安全性の低下は生じない。加えて、システムクロックCK1の周波数変更要求信号S1を受信した場合に、システムクロックCK1の周波数を直ちに変更するので、周波数変更要求信号S1に対する周波数変更の迅速応答性を確保することができる。 As described above, the comparison operation in the comparison unit 6 is temporarily stopped only during the monitoring period T1 when the frequency change request signal S1 is supplied, and the comparison operation is immediately performed in the next monitoring period. Since the operation is resumed, the temporary stop of the clock monitoring function does not substantially occur, and the safety of the system does not deteriorate. In addition, when the frequency change request signal S1 of the system clock CK1 is received, the frequency of the system clock CK1 is immediately changed, so that quick response of frequency change to the frequency change request signal S1 can be ensured.
 図6は実施の形態2においてシステムクロックCK1の周波数異常が発生し、システムが暴走した場合の動作を示している。この場合、次のような条件の基でシステム暴走が発生したと仮定する。
・タイミングt7に先行するタイミングt6からシステムクロックCK1に周波数異常が発生していたところ、
・タイミングt7において、CPU及び周辺回路8が、動作モードの変更や低消費モードへの移行などに起因する周波数変更要求信号S1を出力した。
FIG. 6 shows an operation in the case where the system clock CK1 is abnormal in frequency and the system runs away in the second embodiment. In this case, it is assumed that a system runaway has occurred under the following conditions.
When a frequency abnormality has occurred in the system clock CK1 from the timing t6 preceding the timing t7,
At timing t7, the CPU and peripheral circuit 8 output the frequency change request signal S1 resulting from the change of the operation mode or the shift to the low consumption mode.
 このような条件下でシステム暴走が発生した場合、周波数変更要求信号S1自体が正常なものにならない。すなわち、周波数変更部1は、システムクロックCK1の周波数を変更要求信号S1で指示された目標の周波数に正しく変更することができない。したがって、周波数変更判別部4は期待値変更指示信号S2をカウント部2と期待値変更部5とに出力しない(タイミングt8)。期待値変更指示信号S2が出力されないので、カウント部2は、図5の場合と異なり、周波数変更要求信号S1を受信した時点における監視周期T1を、周波数変更要求信号S1を受信した直後に終了させるといった制御を行うことができない。そのため、カウント部2は、その監視周期T1の終端まで、周波数異常となったシステムクロックCK1のパルス数PNをカウントし続ける。図6では監視周期T1の終端であるタイミングt9において、パルス数PN=7となる。システムクロックCK1に異常がなければ、タイミングt9におけるパルス数PNは、PN=4となって、期待値Ex=4と一致するはずが、システムクロックCK1に異常が生じている場合では期待値Ex=4に一致しない。図6では、(パルス数PN=7)≠(期待値Ex=4)となっている。 When the system runaway occurs under such conditions, the frequency change request signal S1 itself does not become normal. That is, the frequency changing unit 1 cannot correctly change the frequency of the system clock CK1 to the target frequency indicated by the change request signal S1. Therefore, the frequency change determination unit 4 does not output the expected value change instruction signal S2 to the count unit 2 and the expected value change unit 5 (timing t8). Since the expected value change instruction signal S2 is not output, the count unit 2 ends the monitoring cycle T1 at the time of receiving the frequency change request signal S1 immediately after receiving the frequency change request signal S1, unlike the case of FIG. Such control cannot be performed. Therefore, the count unit 2 continues to count the number of pulses PN of the system clock CK1 in which the frequency is abnormal until the end of the monitoring period T1. In FIG. 6, the number of pulses PN = 7 at timing t9, which is the end of the monitoring period T1. If there is no abnormality in the system clock CK1, the number of pulses PN at timing t9 is PN = 4 and should match the expected value Ex = 4. However, when the system clock CK1 has an abnormality, the expected value Ex = Does not match 4. In FIG. 6, (pulse number PN = 7) ≠ (expected value Ex = 4).
 また、タイミングt9の直後でも期待値変更指示信号S2が出力されないので、期待値変更部5は期待値Ex=4の変更を行わない。その結果、監視周期T1の終端で行われる比較部6での比較処理は不一致となり、アクティブな異常検出信号SaがCPU及び周辺回路8に向けて出力される。アクティブな異常検出信号Saを受信したCPU及び周辺回路8は所定の安全動作を実行する。 Further, since the expected value change instruction signal S2 is not output immediately after the timing t9, the expected value changing unit 5 does not change the expected value Ex = 4. As a result, the comparison processing in the comparison unit 6 performed at the end of the monitoring cycle T1 does not match, and an active abnormality detection signal Sa is output to the CPU and the peripheral circuit 8. The CPU and the peripheral circuit 8 that have received the active abnormality detection signal Sa execute a predetermined safe operation.
 システムクロックCK1の周波数変更が動作モードの変更や低消費モードへの移行などに起因するシステムクロックの周波数変更要求信号S1に基づくものであるときは異常検出が行われないものの、システムクロックCK1の周波数変更が暴走に起因するものであるときは確実に異常検出が行われる。このように、本実施の形態では、応答性が保持された状態で、システムクロックCK1の周波数変動の監視精度が高く維持されている。 When the frequency change of the system clock CK1 is based on the system clock frequency change request signal S1 caused by the change of the operation mode or the transition to the low consumption mode, the abnormality of the system clock CK1 is not detected. Anomaly detection is reliably performed when the change is caused by runaway. Thus, in this embodiment, the monitoring accuracy of the frequency fluctuation of the system clock CK1 is maintained high while the responsiveness is maintained.
 実施の形態2では応答性が高いものの、一時的ではあるが比較動作を停止している。さらなる信頼性向上を図ったのが、次に説明する実施の形態3である。 In the second embodiment, although the responsiveness is high, the comparison operation is temporarily stopped. The third embodiment which will be described next is designed to further improve the reliability.
 (実施の形態3)
 図7は本発明の実施の形態3におけるシステムクロック監視装置を搭載したシステム300の構成図である。
(Embodiment 3)
FIG. 7 is a configuration diagram of a system 300 equipped with a system clock monitoring apparatus according to the third embodiment of the present invention.
 本実施の形態は、図1における条件調整部7を、期待値変更部5と比較部6との協働によって実現するものに相当する。つまり、前述した(c)の[期待値幅拡張による条件緩和]に対応している。図7において、図1、図4におけるのと同じ符号は同一構成要素を指しているので、詳しい説明は省略する。 The present embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the expected value change unit 5 and the comparison unit 6. That is, it corresponds to the above-mentioned (c) [Relaxing conditions by expanding the expected value range]. In FIG. 7, the same reference numerals as those in FIGS. 1 and 4 indicate the same components, and detailed description thereof will be omitted.
 実施の形態2(図4)とは異なり、CPU及び周辺回路8が比較部6に周波数変更要求信号S1を供給しない。また、周波数変更判別部4がカウント部2に期待値変更指示信号S2を供給しない。これらの信号供給に代わって、周波数変更判別部4が比較部6に期待値変更指示信号S2を供給する。期待値変更部5は、周波数変更判別部4から期待値変更指示信号S2を受信すると、周波数変更要求信号S1を受信した時点の監視周期T1における期待値として期待値範囲Erを設定し、さらに周波数変更要求信号S1を受信した時点における監視周期T1のネクスト監視周期になると、期待値範囲Erをネクスト監視周期における期待値Ex2に変更する。具体的には、周波数変更要求信号S1を受信した時点における監視周期T1では、期待値として、周波数変更要求信号S1で指示された周波数に対応する変更後期待値Ex2と変更前期待値Ex1とを含む期待値範囲Er(Ex1~Ex2またはEx2~Ex1)を設定し、さらに、周波数変更要求信号S1を受信した時点における監視周期T1のネクスト監視周期に移行すると、期待値範囲Erをさらに変更後期待値Ex2に変更する。 Unlike the second embodiment (FIG. 4), the CPU and the peripheral circuit 8 do not supply the frequency change request signal S1 to the comparison unit 6. Further, the frequency change determination unit 4 does not supply the expected value change instruction signal S2 to the count unit 2. Instead of supplying these signals, the frequency change determination unit 4 supplies the expected value change instruction signal S2 to the comparison unit 6. When the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value change unit 5 sets the expected value range Er as an expected value in the monitoring cycle T1 at the time when the frequency change request signal S1 is received. When the next monitoring cycle of the monitoring cycle T1 at the time when the change request signal S1 is received, the expected value range Er is changed to the expected value Ex2 in the next monitoring cycle. Specifically, in the monitoring cycle T1 when the frequency change request signal S1 is received, the expected value Ex2 after change and the expected value Ex1 before change corresponding to the frequency indicated by the frequency change request signal S1 are used as expected values. The expected value range Er (Ex1 to Ex2 or Ex2 to Ex1) is set, and when the frequency change request signal S1 is received and the process shifts to the next monitoring cycle of the monitoring cycle T1, the expected value range Er is further expected after the change. Change to value Ex2.
 カウント部2は、ネクスト監視周期に移行したことを期待値変更部5に告知するために、期待値変更部5に監視周期T1を供給する。比較部6は、周波数変更判別部4から期待値変更指示信号S2を受信すると、周波数変更要求信号S1を受信した時点における監視周期T1の終端において、カウント部2のカウント結果(システムクロックCK1のパルス数PN)を期待値範囲Erと比較する。この比較においてパルス数PNが期待値範囲Erの範囲外となったことを検知すると、比較部6は、アクティブな異常検出信号Saを出力する。このような比較動作を行う点が実施の形態2と異なっている。その他の構成については、実施の形態2と同様であるので説明を省略する。 The counting unit 2 supplies the monitoring period T1 to the expected value changing unit 5 in order to notify the expected value changing unit 5 that it has shifted to the next monitoring cycle. When the comparison unit 6 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the comparison unit 6 counts the result of the count unit 2 (the pulse of the system clock CK1) at the end of the monitoring period T1 when the frequency change request signal S1 is received. The number PN) is compared with the expected value range Er. In this comparison, when it is detected that the number of pulses PN is out of the expected value range Er, the comparison unit 6 outputs an active abnormality detection signal Sa. The point of performing such a comparison operation is different from the second embodiment. Since other configurations are the same as those in the second embodiment, description thereof is omitted.
 次に、上記のように構成された実施の形態3のシステムクロック監視装置の動作を図8のタイミングチャートに従って説明する。図8は正常動作時の動作を示している。カウント部2が監視用クロックCK2に基づいて生成する監視周期T1のタイミングt10において、動作モードの変更や低消費モードへの移行などに起因して、CPU及び周辺回路8から周波数変更要求信号S1が出力されたとする。周波数変更要求信号S1は周波数変更部1と周波数変更判別部4とに供給される。 Next, the operation of the system clock monitoring apparatus of the third embodiment configured as described above will be described with reference to the timing chart of FIG. FIG. 8 shows the operation during normal operation. At timing t10 of the monitoring cycle T1 that the count unit 2 generates based on the monitoring clock CK2, the frequency change request signal S1 is sent from the CPU and the peripheral circuit 8 due to the change of the operation mode, the shift to the low consumption mode, or the like. Suppose that it is output. The frequency change request signal S1 is supplied to the frequency change unit 1 and the frequency change determination unit 4.
 周波数変更部1は、周波数変更要求信号S1を受信すると、システムクロックCK1の周波数を周波数変更要求信号S1で指示された周波数に変更する(タイミングt11)。システムクロックCK1の周波数が変更されると、そのことを周波数変更判別部4が検知する。周波数変更判別部4は、周波数変更を検知すると、期待値変更指示信号S2を期待値変更部5と比較部6とに供給する。 When the frequency change unit 1 receives the frequency change request signal S1, the frequency change unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 (timing t11). When the frequency of the system clock CK1 is changed, the frequency change determination unit 4 detects this. When detecting the frequency change, the frequency change determination unit 4 supplies the expected value change instruction signal S2 to the expected value change unit 5 and the comparison unit 6.
 周波数変更判別部4から期待値変更指示信号S2を受信した期待値変更部5は、期待値変更指示信号S2が示す情報に従って記憶部3を検索し、該当する新たな期待値Exを読み出し、読み出した新たな期待値Exに基づいて、期待値範囲Erと変更後期待値Ex2とを設定する。具体的には、期待値変更部5は、読み出した新たな期待値Exで旧の期待値Exを更新することで、変更後期待値Ex2を設定する。さらには、変更前の期待値(旧の期待値Ex)を変更前期待値Ex1とし、変更後期待値Ex2と変更前期待値Ex1とを含む期待値範囲Er(Ex1~Ex2またはEx2~Ex1)を設定する。 The expected value change unit 5 that has received the expected value change instruction signal S2 from the frequency change determination unit 4 searches the storage unit 3 in accordance with the information indicated by the expected value change instruction signal S2, and reads and reads the corresponding new expected value Ex. Based on the new expected value Ex, the expected value range Er and the changed expected value Ex2 are set. Specifically, the expected value changing unit 5 sets the changed expected value Ex2 by updating the old expected value Ex with the read new expected value Ex. Further, the expected value before change (old expected value Ex) is set to the expected value Ex1 before change, and the expected value range Er including the changed expected value Ex2 and the expected value Ex1 before change (Ex1 to Ex2 or Ex2 to Ex1) Set.
 期待値変更部5は、期待値範囲Erを比較部6に与える。変更前期待値Ex1と変更後期待値Ex2との間の大小関係は、その時々の状況によって変動する。すなわち、周波数が上昇変動するときは、期待値範囲Erは〔Ex1~Ex2〕となり、周波数が下降変動するときは、期待値範囲Erは〔Ex2~Ex1〕となる。ここでは、期待値範囲Er≡〔4~9〕となる。 The expected value changing unit 5 gives the expected value range Er to the comparing unit 6. The magnitude relationship between the pre-change expected value Ex1 and the post-change expected value Ex2 varies depending on the situation at that time. That is, when the frequency fluctuates upward, the expected value range Er becomes [Ex1 to Ex2], and when the frequency fluctuates downward, the expected value range Er becomes [Ex2 to Ex1]. Here, the expected value range Er≡ [4 to 9].
 一方、比較部6は、周波数変更判別部4から期待値変更指示信号S2を受信すると、周波数変更要求信号S1を受信した時点における監視周期T1の終端でのカウント部2のカウント結果(パルス数PN)を期待値範囲Erと比較する。この比較において、パルス数PNが期待値範囲Erの範囲外であると判定すれば、比較部6は、監視周期T1における自身の動作状態を異常検出信号Saの出力動作状態に切り替える。 On the other hand, when the comparison unit 6 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the comparison unit 6 count results (number of pulses PN) at the end of the monitoring period T1 when the frequency change request signal S1 is received. ) Is compared with the expected value range Er. In this comparison, if it is determined that the number of pulses PN is outside the expected value range Er, the comparison unit 6 switches its operation state in the monitoring period T1 to the output operation state of the abnormality detection signal Sa.
 監視周期T1においてタイミングt10以降、時間経過に伴って、カウント部2がカウントするシステムクロックCK1のパルス数PNは、5→6のようにインクリメントされ、監視周期T1の終端に達した段階で、パルス数PN=7となる。監視周期T1の終端におけるカウント結果(パルス数PN=7)が比較部6において期待値範囲Er≡〔4~9〕と比較される。この場合、パルス数PN=7は、期待値範囲Er≡〔4~9〕の範囲内に入っているので、比較部6はアクティブな異常検出信号Saを出力しない。これは次のような知見に基づいている。すなわち、監視周期T1においてシステムクロックCK1の周波数が変動したが、この周波数変動は動作モードの変更や低消費モードへの移行などに起因した想定内の周波数変動であって、異常な周波数変動ではない。したがって、アクティブな異常検出信号Saを出力する必要がない。 After the timing t10 in the monitoring cycle T1, with the passage of time, the number of pulses PN of the system clock CK1 counted by the counting unit 2 is incremented as 5 → 6, and at the stage when the end of the monitoring cycle T1 is reached. The number PN = 7. The count result (number of pulses PN = 7) at the end of the monitoring period T1 is compared with the expected value range Er≡ [4 to 9] in the comparison unit 6. In this case, since the number of pulses PN = 7 is within the expected value range Er≡ [4 to 9], the comparison unit 6 does not output an active abnormality detection signal Sa. This is based on the following findings. That is, the frequency of the system clock CK1 fluctuated in the monitoring period T1, but this frequency fluctuation is an expected frequency fluctuation due to a change in the operation mode, a shift to the low consumption mode, and the like, and is not an abnormal frequency fluctuation. . Therefore, there is no need to output an active abnormality detection signal Sa.
 監視周期T1の終端における上述した周波数変動判断(想定内変動であるとの判断)が行われたうえでネクスト監視周期に移行すると、期待値変更部5は、期待値範囲Erに代えて、周波数変更後のシステムクロック周波数に対応した変更後期待値Ex2=4を比較部6に供与する。 When the above-described frequency fluctuation determination (determination that the fluctuation is within the assumption) is performed at the end of the monitoring period T1 and the process proceeds to the next monitoring period, the expected value changing unit 5 replaces the expected value range Er with the frequency The changed expected value Ex2 = 4 corresponding to the changed system clock frequency is provided to the comparison unit 6.
 以上のように、本実施の形態は、期待値幅拡張による条件緩和を行うものである。動作モードの変更や低消費モードへの移行などに起因するシステムクロックの周波数変更要求信号S1を受信した場合、実施の形態1では、システムクロックCK1の周波数変更を延期し、実施の形態2では、比較動作を一時停止していた。これに対して、実施の形態3では、周波数変更を直ちに行いかつ比較処理を所定のタイミングで行っている。そのため、実施の形態3では、クロック監視機能の一旦停止は実質的に起こらず、継続してシステムクロックCK1の周波数の監視が可能となってシステムの安全性が確保される。しかも、システムクロックCK1の周波数変更要求信号S1を受信すると、直ちにシステムクロックCK1の周波数を変更するものであるので(タイミングt10,t11参照)、周波数変更要求信号S1に対する周波数変更処理の迅速な応答性を確保しながら、システムの安全性を確保することが可能となる。 As described above, the present embodiment performs condition relaxation by expanding the expected value range. When the system clock frequency change request signal S1 due to the change of the operation mode, the transition to the low consumption mode, or the like is received, the frequency change of the system clock CK1 is postponed in the first embodiment. The comparison operation was paused. On the other hand, in the third embodiment, the frequency is changed immediately and the comparison process is performed at a predetermined timing. Therefore, in the third embodiment, the temporary stop of the clock monitoring function does not substantially occur, and the frequency of the system clock CK1 can be continuously monitored, and the safety of the system is ensured. In addition, when the frequency change request signal S1 of the system clock CK1 is received, the frequency of the system clock CK1 is immediately changed (see timings t10 and t11), so that the quick response of the frequency change process to the frequency change request signal S1. It is possible to ensure the safety of the system while ensuring the above.
 なお、図8の動作例では、ネクスト監視周期以降の各監視周期T1においてシステムクロックCK1に周波数異常が発生していずれかの周期終端でパルス数PNが期待値Ex=4と一致しなくなれば、比較部6はCPU及び周辺回路8にアクティブな異常検出信号Saを出力する。 In the operation example of FIG. 8, if a frequency abnormality occurs in the system clock CK1 in each monitoring period T1 after the next monitoring period, and the number of pulses PN does not coincide with the expected value Ex = 4 at the end of any period, The comparison unit 6 outputs an active abnormality detection signal Sa to the CPU and peripheral circuit 8.
 また、期待値範囲Er(Ex1~Ex2またはEx2~Ex1)については、Ex1を変更前期待値、Ex2を変更後期待値とすることに代えて、もう少し幅を広げてもよいし、あるいは逆に幅を狭くしてもよい。上記の例でいうと、期待値範囲Er≡〔4~9〕に代えて、
Er≡〔5~9〕やEr≡〔6~9〕を期待値範囲Erとしてもよいし、Er≡〔3~9〕やEr≡〔2~9〕を期待値範囲Erとしてもよい。すなわち、期待値範囲Erは動作環境に応じて適宜に調整すればよい。
In addition, regarding the expected value range Er (Ex1 to Ex2 or Ex2 to Ex1), instead of setting Ex1 to the expected value before change and Ex2 to the expected value after change, the range may be expanded a little more, or conversely The width may be narrowed. In the above example, instead of the expected value range Er≡ [4-9]
Er≡ [5-9] and Er≡ [6-9] may be set as the expected value range Er, and Er≡ [3-9] and Er≡ [2-9] may be set as the expected value range Er. That is, the expected value range Er may be adjusted as appropriate according to the operating environment.
 実施の形態3では、周波数変更後の期待値Ex=4への変更がタイミングt12であり、これは周波数変更要求信号S1を受信した時点における監視周期の終端に相当する。実施の形態2では、周波数変更要求信号S1の受信時点における監視周期が短縮されていたが(図5のタイミングt4で周波数変更要求信号S1を受信した時点における監視周期は終了)、実施の形態3ではそのような周期短縮は生じず、期待値Exの変更はその分遅くならざるを得ない。期待値Exの変更の早期化を図るのが次に説明する実施の形態4である。 In the third embodiment, the change to the expected value Ex = 4 after the frequency change is timing t12, which corresponds to the end of the monitoring cycle at the time when the frequency change request signal S1 is received. In the second embodiment, the monitoring cycle at the time of receiving the frequency change request signal S1 is shortened (the monitoring cycle at the time when the frequency change request signal S1 is received at the timing t4 in FIG. 5 ends), but the third embodiment Then, such a cycle shortening does not occur, and the change of the expected value Ex must be delayed correspondingly. In the fourth embodiment described below, the expected value Ex can be changed quickly.
 (実施の形態4)
 図9は本発明の実施の形態4におけるシステムクロック監視装置を搭載したシステム400の構成図である。本実施の形態は、図1における条件調整部7を、カウント部2と期待値変更部5との協働によって実現するものに相当する。つまり、上記の(d)の[臨時的すり合わせのための期待値の調整による条件緩和]に対応している。図9において、図1、図4におけるのと同じ符号は同一構成要素を指しているので、詳しい説明は省略する。
(Embodiment 4)
FIG. 9 is a configuration diagram of a system 400 equipped with a system clock monitoring apparatus according to the fourth embodiment of the present invention. This embodiment corresponds to the condition adjustment unit 7 in FIG. 1 realized by the cooperation of the count unit 2 and the expected value change unit 5. That is, it corresponds to the above (d) [conditional relaxation by adjusting the expected value for temporary alignment]. In FIG. 9, the same reference numerals as those in FIGS. 1 and 4 indicate the same components, and detailed description thereof will be omitted.
 実施の形態2(図4)とは異なり、CPU及び周辺回路8は比較部6に周波数変更要求信号S1を供給しない。この信号供給に代わって、カウント部2が期待値変更部5に監視用クロックカウント値TNを供給する。カウント部2は、周波数変更判別部4から期待値変更指示信号S2を受信すると、受信時点における監視周期T1を受信直後に終了させ、そのうえで直ちにネクスト監視周期に移行するように構成されている。カウント部2は、監視用クロックCK2をクロックソースとしてカウントする監視周期カウンタを有しており、監視周期カウンタによる監視用クロックカウント値TNを期待値変更部5に付与するようになっている。 Unlike the second embodiment (FIG. 4), the CPU and peripheral circuit 8 do not supply the frequency change request signal S1 to the comparison unit 6. Instead of this signal supply, the count unit 2 supplies the monitoring clock count value TN to the expected value changing unit 5. When the count unit 2 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the count unit 2 ends the monitoring cycle T1 at the time of reception immediately after reception, and immediately shifts to the next monitoring cycle. The count unit 2 includes a monitoring cycle counter that counts the monitoring clock CK2 as a clock source, and gives the monitoring clock count value TN by the monitoring cycle counter to the expected value changing unit 5.
 期待値変更部5は、周波数変更判別部4から期待値変更指示信号S2を受信すると、周波数変更要求信号S1を受信した時点の監視周期T1における期待値が、その周波数変更要求信号S1の受信タイミングに対応するパルス数PNに一致するように、当該期待値を調整するように構成されている。すなわち、期待値変更部5は、カウント部2から供給される監視用クロックカウント値TNを次の演算式(1)に代入することで期待値Exを算出し、当該算出処理により得られる期待値Exを比較部6に付与する。 When the expected value change unit 5 receives the expected value change instruction signal S2 from the frequency change determination unit 4, the expected value in the monitoring period T1 when the frequency change request signal S1 is received is the reception timing of the frequency change request signal S1. The expected value is adjusted to match the number of pulses PN corresponding to. That is, the expected value changing unit 5 calculates the expected value Ex by substituting the monitoring clock count value TN supplied from the counting unit 2 into the following arithmetic expression (1), and the expected value obtained by the calculation process Ex is given to the comparison unit 6.
 監視用クロックCK2の周波数がシステムクロックCK1の周波数の2倍であるすると、演算式(1)は、
  Ex={(TN+1)/2}-1 …(1)
となる。TN=3を演算式(1)に代入すると、Ex={(3+1)/2}-1=2-1=1となる。演算式(1)は、システムクロックCK1のパルス数PNと監視用クロックカウント値TNとの初期値が0であることを考慮した式構造となっている。
When the frequency of the monitoring clock CK2 is twice the frequency of the system clock CK1, the arithmetic expression (1) is
Ex = {(TN + 1) / 2} -1 (1)
It becomes. Substituting TN = 3 into equation (1) yields Ex = {(3 + 1) / 2} -1 = 2-1 = 1. The arithmetic expression (1) has an expression structure considering that the initial values of the number of pulses PN of the system clock CK1 and the monitoring clock count value TN are zero.
 なお、演算式(1)をさらに一般式にすると次のようになる。すなわち、監視用クロックCK2の周波数f2 がシステムクロックCK1の周波数f1 のk倍(k=f2 /f1)であるとすると、演算式(1)は、
  Ex={(TN+1)/k}-1 …(1)’
となり、さらには、
  Ex={(TN+1)/(f2 /f1 )}-1 …(1)’’
となる。
It should be noted that the arithmetic expression (1) is further generalized as follows. That is, assuming that the frequency f2 of the monitoring clock CK2 is k times the frequency f1 of the system clock CK1 (k = f2 / f1), the equation (1) is
Ex = {(TN + 1) / k} −1 (1) ′
And then
Ex = {(TN + 1) / (f2 / f1)}-1 (1) ''
It becomes.
 このようにして、期待値変更部5は、周波数変更要求信号S1の受信タイミングに対応するパルス数PNに応じた期待値Exの調整を実施するようになっている。上記の例では、周波数変更要求信号S1の受信タイミングに対応するパルス数PNはPN=1であるが、これに合わせ込むようにEx=1を算出している。これにより、演算式(1)による予定調和が施される結果、期待値Exは、その周波数変更要求信号S1の受信タイミングに対応するパルス数PNに必ず一致するように調整される。 In this way, the expected value changing unit 5 adjusts the expected value Ex according to the number of pulses PN corresponding to the reception timing of the frequency change request signal S1. In the above example, the pulse number PN corresponding to the reception timing of the frequency change request signal S1 is PN = 1, but Ex = 1 is calculated so as to match this. As a result, the expected harmony Ex is adjusted so as to always coincide with the pulse number PN corresponding to the reception timing of the frequency change request signal S1 as a result of the scheduled harmonization by the arithmetic expression (1).
 また、期待値変更部5は、周波数変更要求信号S1を受信した時点における監視周期T1のネクスト監視周期に移行した時点で期待値Exを周波数変更要求信号S1に応じた期待値に変更するように構成されている。 In addition, the expected value changing unit 5 changes the expected value Ex to an expected value corresponding to the frequency change request signal S1 at the time of transition to the next monitoring period of the monitoring period T1 when the frequency change request signal S1 is received. It is configured.
 次に、実施の形態4のシステムクロック監視装置の動作を図10のタイミングチャートに従って説明する。図10は正常動作時の動作を示している。タイミングt13において、CPU及び周辺回路8が周波数変更要求信号S1を出力したとする。ここで、タイミングt13は、監視用クロックCK2に基づいてカウント部2によって設定される監視周期T1に含まれる任意のタイミングであり、周波数変更要求信号S1は動作モードの変更や低消費モードへの移行などに起因する想定内の周波数変動に基づいた周波数変更要求を指示する信号であるとする。 Next, the operation of the system clock monitoring apparatus according to the fourth embodiment will be described with reference to the timing chart of FIG. FIG. 10 shows the operation during normal operation. It is assumed that the CPU and the peripheral circuit 8 output the frequency change request signal S1 at the timing t13. Here, the timing t13 is an arbitrary timing included in the monitoring cycle T1 set by the counting unit 2 based on the monitoring clock CK2, and the frequency change request signal S1 is changed to an operation mode or a transition to a low consumption mode. It is assumed that the signal indicates a frequency change request based on an expected frequency variation caused by the above.
 周波数変更要求信号S1は周波数変更部1と周波数変更判別部4とに供給される。周波数変更部1は、周波数変更要求信号S1を受信すると、タイミングt14において、システムクロックCK1の周波数を周波数変更要求信号S1で指示された周波数に変更する。システムクロックCK1の周波数が変更されると、そのことが周波数変更判別部4によって確認され、周波数変更判別部4は期待値変更指示信号S2をカウント部2と期待値変更部5とに向けて出力する。 The frequency change request signal S1 is supplied to the frequency change unit 1 and the frequency change determination unit 4. When receiving the frequency change request signal S1, the frequency changing unit 1 changes the frequency of the system clock CK1 to the frequency indicated by the frequency change request signal S1 at timing t14. When the frequency of the system clock CK1 is changed, this is confirmed by the frequency change determination unit 4, and the frequency change determination unit 4 outputs the expected value change instruction signal S2 toward the count unit 2 and the expected value change unit 5. To do.
 期待値変更指示信号S2を受信したカウント部2は、監視周期カウンタによる監視用クロックカウント値TNを期待値変更部5に向けて出力したうえで、その直後に監視用クロックカウント値TNをクリアして新たな監視周期T1のカウントを開始する。 The count unit 2 that has received the expected value change instruction signal S2 outputs the monitoring clock count value TN by the monitoring period counter to the expected value change unit 5, and immediately thereafter clears the monitoring clock count value TN. Then, counting of a new monitoring cycle T1 is started.
 一方、期待値変更指示信号S2を受信した期待値変更部5は、カウント部2から供給される監視用クロックカウント値TNに基づいて、システムクロックCK1の周波数変更が行われた監視周期T2における期待値Exを演算によって算出して比較部6に付与する。 On the other hand, the expected value changing unit 5 that has received the expected value change instruction signal S2 is expected in the monitoring cycle T2 in which the frequency of the system clock CK1 has been changed based on the monitoring clock count value TN supplied from the counting unit 2. The value Ex is calculated by calculation and given to the comparison unit 6.
 前述したように期待値Exが周波数変更要求信号S1の受信タイミングに対応するパルス数PNに一致するように、演算式(1)を用いて期待値Exが調整されるため、このタイミングにおける比較部6の比較処理(パルス数PNと期待値Exとの比較処理)は必ず一致するようになり、アクティブな異常検出信号Saは出力されない。 As described above, since the expected value Ex is adjusted using the arithmetic expression (1) so that the expected value Ex matches the pulse number PN corresponding to the reception timing of the frequency change request signal S1, the comparison unit at this timing is adjusted. The comparison process of 6 (comparison process of the number of pulses PN and the expected value Ex) always matches, and the active abnormality detection signal Sa is not output.
 周波数変更要求信号S1の供給タイミングにおける監視周期の次に位置するネクスト監視周期では、その周期の開始とともに期待値Exがシステムクロックの周波数変更要求信号S1に対応した期待値に変更される(Ex=3)。これにより、ネクスト監視周期におけるパルス数PNと期待値Exとの比較処理では、パルス数PNと期待値Exとが必ず一致するようになる。その結果、アクティブな異常検出信号Saは出力されない。システムクロックCK1の周波数が変化したが、これは動作モードの変更や低消費モードへの移行などに起因するものであるので、アクティブな異常検出信号Saを出力する必要がない。 In the next monitoring period positioned next to the monitoring period at the supply timing of the frequency change request signal S1, the expected value Ex is changed to an expected value corresponding to the frequency change request signal S1 of the system clock (Ex = 3). Thereby, in the comparison process between the pulse number PN and the expected value Ex in the next monitoring cycle, the pulse number PN and the expected value Ex always match. As a result, the active abnormality detection signal Sa is not output. Although the frequency of the system clock CK1 has changed, this is due to a change in the operation mode, a shift to the low consumption mode, or the like, so there is no need to output the active abnormality detection signal Sa.
 図10の動作例でネクスト監視周期以降の各監視周期T1においてシステムクロックCK1に周波数異常が発生し、周期終端でのパルス数PNが期待値Ex=3と一致しないようになれば、比較部6はCPU及び周辺回路8に対して異常検出信号Saを出力することになる。 In the operation example of FIG. 10, if a frequency abnormality occurs in the system clock CK1 in each monitoring period T1 after the next monitoring period, and the number of pulses PN at the end of the period does not coincide with the expected value Ex = 3, the comparison unit 6 Outputs an abnormality detection signal Sa to the CPU and peripheral circuit 8.
 本実施形態によれば、動作モードの変更や低消費モードへの移行などに起因するシステムクロックの周波数変更要求信号S1を受信した場合であっても、継続してシステムクロックの周波数の監視を行うことが可能になり、システムの安全性が確保される。しかも、システムクロックの周波数変更要求信号S1を受信した場合に、システムクロックの周波数と期待値とを直ちに変更するものであるので、周波数変更要求信号S1に対する周波数変更処理や期待値変更処理の迅速応答性を確保しながら、システムの安全性を確保することが可能となる。 According to the present embodiment, the system clock frequency is continuously monitored even when the system clock frequency change request signal S1 resulting from the change of the operation mode or the shift to the low consumption mode is received. System security is ensured. In addition, when the system clock frequency change request signal S1 is received, the system clock frequency and the expected value are immediately changed, so that a quick response of the frequency change process and the expected value change process to the frequency change request signal S1. It is possible to ensure the safety of the system while ensuring the safety.
 なお、上述した各実施形態では、期待値テーブルを記憶部3に格納し、期待値変更部5が記憶部3から該当する期待値Exを読み出すようにしているが、これに代えて、期待値変更部5が演算により周波数変更後のシステムクロックの周波数に応じて期待値Exを算出するように構成してもよい。この場合、期待値の記憶部3は不要となる。 In each of the above-described embodiments, the expected value table is stored in the storage unit 3 and the expected value changing unit 5 reads out the corresponding expected value Ex from the storage unit 3. The change unit 5 may be configured to calculate the expected value Ex according to the frequency of the system clock after the frequency change by calculation. In this case, the expected value storage unit 3 is not required.
 (実施の形態5)
 本実施の形態はモータ制御システムに関するものである。図11は産業用途、家電用途に幅広く採用されているモータ制御システムの構成図である。図11のモータ制御システムは、AC電源21と、コンバータ回路22と、インバータ回路23と、インバータ回路23を構成するスイッチング素子(IGBT素子)24と、インバータ制御用マイコン25と、3相モータ26とを備える。IGBT(Insulated Gate Bipolar Transistor)は絶縁ゲート型バイポーラトランジスタのことである。
(Embodiment 5)
The present embodiment relates to a motor control system. FIG. 11 is a configuration diagram of a motor control system that is widely used in industrial and household appliances. The motor control system of FIG. 11 includes an AC power source 21, a converter circuit 22, an inverter circuit 23, a switching element (IGBT element) 24 constituting the inverter circuit 23, an inverter control microcomputer 25, and a three-phase motor 26. Is provided. IGBT (Insulated Gate Bipolar Transistor) is an insulated gate bipolar transistor.
 インバータ制御用マイコン25は、実施の形態1~4のいずれかの構成のシステムクロック監視装置Aを搭載し、3相モータ26のコントロールを行う。 The inverter control microcomputer 25 is equipped with the system clock monitoring device A having any one of the configurations of the first to fourth embodiments, and controls the three-phase motor 26.
 コンバータ回路22がAC電源21の出力を直流電源に変換し、インバータ回路23に供給する。インバータ制御用マイコン25は、6本の出力端子[U相出力(U1,U2)、V相出力(V1,V2)、W相出力(W1,W2)]によりインバータ回路23におけるスイッチング素子24を制御することで、3相モータ26の電流制御を行う。これにより、3相モータ26の回転方向及び回転スピードが制御される。 The converter circuit 22 converts the output of the AC power source 21 into a DC power source and supplies it to the inverter circuit 23. The inverter control microcomputer 25 controls the switching element 24 in the inverter circuit 23 by using six output terminals [U-phase output (U1, U2), V-phase output (V1, V2), W-phase output (W1, W2)]. Thus, the current control of the three-phase motor 26 is performed. Thereby, the rotation direction and rotation speed of the three-phase motor 26 are controlled.
 図12は正常時のインバータ制御用マイコン25の各出力端子の動作を示すタイミングチャートである。U相出力(U1,U2)、V相出力(V1,V2)、W相出力(W1,W2)はそれぞれ対になる出力を有する。これら出力は、+側と-側のスイッチング素子24がともにアクティブ(制御信号がH)にならないように動作している。それは、+側と-側のスイッチング素子24がともにアクティブになると、システム全体に貫通電流が流れシステムを破壊しかねないからである。 FIG. 12 is a timing chart showing the operation of each output terminal of the inverter control microcomputer 25 in a normal state. The U-phase output (U1, U2), the V-phase output (V1, V2), and the W-phase output (W1, W2) each have a pair of outputs. These outputs operate so that both the + side and − side switching elements 24 are not active (the control signal is H). This is because if both the + side and − side switching elements 24 become active, a through current flows through the entire system and the system may be destroyed.
 図13は異常時のインバータ制御用マイコン25の各出力端子及び異常検出信号Saの動作を示すタイミングチャートである。クロック周波数の異常によりインバータ制御用マイコン25の命令制御に異常が生じ、U相出力(U1,U2)がともにアクティブになる区間が生じると(タイミングt15)、貫通電流が発生してしまう。しかしながら、そのような命令制御の異常が生じた場合、インバータ制御用マイコン25に搭載しているシステムクロック監視装置AがシステムクロックCK0の周波数の異常を検知して、CPU及び周辺回路8に異常検出信号Saを出力する。CPU及び周辺回路8は、異常検出信号Saを受信するとインバータ制御用マイコン25の6本の出力端子を強制的に安全な状態に変更することで、貫通電流の発生を防止する。 FIG. 13 is a timing chart showing the operation of each output terminal of the inverter control microcomputer 25 and the abnormality detection signal Sa at the time of abnormality. When an abnormality occurs in the instruction control of the inverter control microcomputer 25 due to an abnormality in the clock frequency, and there is a section in which both U-phase outputs (U1, U2) are active (timing t15), a through current is generated. However, when such an instruction control abnormality occurs, the system clock monitoring device A installed in the inverter control microcomputer 25 detects an abnormality in the frequency of the system clock CK0 and detects an abnormality in the CPU and the peripheral circuit 8. The signal Sa is output. When receiving the abnormality detection signal Sa, the CPU and the peripheral circuit 8 forcibly change the six output terminals of the inverter control microcomputer 25 to a safe state, thereby preventing the occurrence of a through current.
 以上のように本実施形態によれば、3相モータのインバータ制御のシステムにてシステムクロック監視装置を有効に使用できる。 As described above, according to this embodiment, the system clock monitoring device can be used effectively in the inverter control system of the three-phase motor.
 本発明のシステムクロック監視装置は、システムの基幹部であるシステムクロックを常時的に監視可能であるため、各種半導体製品の安全性が求められる分野に広く有用である。 The system clock monitoring device of the present invention is widely useful in fields where safety of various semiconductor products is required because it can constantly monitor the system clock that is the backbone of the system.
 1 周波数変更部
 2 カウント部
 3 記憶部
 4 周波数変更判別部
 5 期待値変更部
 6 比較部
 7 条件調整部
 8 CPU及び周辺回路
 100,200,300,400 システムクロック監視装置搭載のシステム
 A システムクロック監視装置
 CS システムクロックソース
 CK1 システムクロック
 CK2 監視用クロック
 Ex 期待値
 Ex1 上限期待値
 Ex2 下限期待値
 Er 期待値範囲
 PN パルス数
 S1 周波数変更要求信号
 S2 期待値変更指示信号
 S3 周波数変更許可信号
 Sa 異常検出信号
 T1 監視周期
 TN 監視用クロックカウント値
DESCRIPTION OF SYMBOLS 1 Frequency change part 2 Count part 3 Memory | storage part 4 Frequency change discrimination | determination part 5 Expected value change part 6 Comparison part 7 Condition adjustment part 8 CPU and peripheral circuit 100,200,300,400 System A system clock monitor mounting Device CS System clock source CK1 System clock CK2 Monitoring clock Ex Expected value Ex1 Upper limit expected value Ex2 Lower limit expected value Er Expected value range PN number of pulses S1 Frequency change request signal S2 Expected value change instruction signal S3 Frequency change permission signal Sa Abnormality detection signal T1 monitoring cycle TN monitoring clock count value

Claims (10)

  1.  システムクロックとは別系統の監視用クロックに基づいて監視周期を設定したうえで、前記システムクロックのパルス数を前記監視周期毎にカウントするカウント部と、
     前記監視周期終端における前記カウント部のカウント結果を期待値と比較し、その比較結果が前記カウント結果と前記期待値との不一致を示すと、前記システムクロックの周波数異常を示す異常検出信号を出力する比較部と、
     システムクロックソースに基づいて前記システムクロックを生成するとともに、周波数変更要求信号に応じて前記システムクロックの周波数を変更する周波数変更部と、
     前記周波数変更部による前記周波数変更要求信号の受信と、受信した前記周波数変更要求信号に基づいた前記周波数変更部によるシステムクロック周波数の変更とを確認すると、変更後のシステムクロック周波数に対応する値への前記期待値の変更を指示する期待値変更指示信号を出力する周波数変更判別部と、
     前記期待値変更指示信号に応じて前記期待値を変更する期待値変更部と、
     前記周波数変更要求信号受信直後において前記カウント結果と前記期待値とに不一致が生じないように、前記カウント部または前記比較部または周波数変更部または期待値変更部を制御する条件調整部と、
     を備えるシステムクロック監視装置。
    After setting a monitoring cycle based on a monitoring clock of a system different from the system clock, a counting unit that counts the number of pulses of the system clock for each monitoring cycle;
    The count result of the count unit at the end of the monitoring period is compared with an expected value, and if the comparison result indicates a mismatch between the count result and the expected value, an abnormality detection signal indicating an abnormality in the frequency of the system clock is output. A comparison unit;
    Generating a system clock based on a system clock source, and changing a frequency of the system clock in response to a frequency change request signal; and
    When the reception of the frequency change request signal by the frequency change unit and the change of the system clock frequency by the frequency change unit based on the received frequency change request signal are confirmed, the value corresponds to the system clock frequency after the change. A frequency change determination unit that outputs an expected value change instruction signal for instructing change of the expected value of
    An expected value changing unit that changes the expected value in response to the expected value change instruction signal;
    A condition adjustment unit that controls the count unit or the comparison unit, the frequency change unit, or the expected value change unit so that no mismatch occurs between the count result and the expected value immediately after receiving the frequency change request signal;
    A system clock monitoring device comprising:
  2.  前記条件調整部は、前記周波数変更要求信号の受信に基づいた前記周波数変更部によるシステムクロック周波数の変更を、周波数変更要求信号受信時の前記監視周期の終端またはその近傍時点まで延期させるように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjusting unit is configured to postpone the change of the system clock frequency by the frequency changing unit based on the reception of the frequency change request signal to the end of the monitoring cycle at the time of receiving the frequency change request signal or a time close thereto. Being
    The system clock monitoring device according to claim 1.
  3.  前記条件調整部は、前記カウント部と前記周波数変更部とから構成され、
     前記カウント部は、前記監視用クロックのカウントに基づいて前記監視周期終端を検出し、前記監視周期終端を検出すると周波数変更許可信号を前記周波数変更部に出力するように構成され、
     前記周波数変更部は、前記周波数変更要求信号と前記周波数変更許可信号との両信号を受信すると、前記システムクロック周波数変更処理を実効化するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjusting unit includes the counting unit and the frequency changing unit,
    The counting unit is configured to detect the monitoring period end based on the count of the monitoring clock, and to output a frequency change permission signal to the frequency changing unit when the monitoring period end is detected,
    The frequency changing unit is configured to enable the system clock frequency changing process when receiving both the frequency change request signal and the frequency change permission signal.
    The system clock monitoring device according to claim 1.
  4.  前記条件調整部は、前記周波数変更要求信号を受信すると、前記比較部による前記カウント結果と前記期待値との比較を停止させるとともに前記カウント部における現時点での監視周期を終了させて直ちに次の監視周期に移行させるように構成されている、
     請求項1のシステムクロック監視装置。
    When the condition adjustment unit receives the frequency change request signal, the condition adjustment unit stops the comparison between the count result by the comparison unit and the expected value and immediately ends the current monitoring cycle in the count unit and immediately performs the next monitoring. Configured to transition to a period,
    The system clock monitoring device according to claim 1.
  5.  前記条件調整部は、前記カウント部と前記比較部とから構成され、
     前記カウント部は、周波数変更要求信号受信時の前記監視周期を終了させて直ちに次の監視周期に移行するように構成され、
     前記比較部は、周波数変更要求信号受信時の前記監視周期では、前記カウント結果と前記期待値との比較を一時的に停止したうえで、次の監視周期に移行すると前記比較を再開するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjustment unit includes the count unit and the comparison unit,
    The counting unit is configured to immediately end the monitoring cycle when receiving a frequency change request signal and immediately shift to the next monitoring cycle,
    The comparison unit temporarily stops the comparison between the count result and the expected value in the monitoring period when the frequency change request signal is received, and restarts the comparison when the next monitoring period is started. It is configured,
    The system clock monitoring device according to claim 1.
  6.  前記条件調整部は、周波数変更要求信号受信時の前記監視周期における前記期待値として、周波数変更要求信号受信前における変更前期待値と、周波数変更要求信号で指示された変更後周波数に対応する変更後期待値とのうちの一方を上限値とし他方を下限値とする期待値範囲を設定したうえで、周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記変更後期待値に変更するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjustment unit, as the expected value in the monitoring period at the time of receiving a frequency change request signal, an expected value before change before receiving the frequency change request signal and a change corresponding to the changed frequency instructed by the frequency change request signal After setting an expected value range in which one of the post-expected values is an upper limit value and the other is a lower limit value, the expected value is changed when a transition is made to the monitoring cycle next to the monitoring cycle when the frequency change request signal is received. After configured to change to the expected value,
    The system clock monitoring device according to claim 1.
  7.  前記条件調整部は、前記期待値変更部と前記比較部とから構成され、
     前記期待値変更部は、期待値変更指示信号受信時の前記監視周期における前記期待値として、周波数変更要求信号受信前における変更前期待値と、周波数変更要求信号で指示された変更後周波数に対応する変更後期待値とのうちの一方を上限値とし他方を下限値とする期待値範囲を設定したうえで、前記周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を変更後期待値に変更するように構成され、
     前記比較部は、周波数変更要求信号受信時の前記監視周期では、当該監視周期終端における前記カウント部のカウント結果を前記期待値範囲と比較し、その比較結果において前記カウント結果が前記期待値範囲の範囲外であることを示すと、前記異常検出信号を出力するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjustment unit includes the expected value change unit and the comparison unit,
    The expected value changing unit corresponds to the expected value in the monitoring period when receiving an expected value change instruction signal, the expected value before change before receiving the frequency change request signal, and the changed frequency instructed by the frequency change request signal. After setting the expected value range in which one of the expected values after change is an upper limit value and the other is a lower limit value, the expected value is transferred to the monitoring cycle next to the monitoring cycle when the frequency change request signal is received. Is configured to change to the expected value after
    In the monitoring period when the frequency change request signal is received, the comparison unit compares the count result of the count unit at the end of the monitoring period with the expected value range, and in the comparison result, the count result is within the expected value range. It is configured to output the abnormality detection signal when indicating that it is out of range,
    The system clock monitoring device according to claim 1.
  8.  前記条件調整部は、周波数変更要求信号受信時の前記監視周期における前記期待値を、前記周波数変更要求信号を受信した時点における前記カウント部のカウント結果に基づいて算定される値に設定したうえで、周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記周波数変更要求信号に応じた値に変更するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjustment unit sets the expected value in the monitoring cycle at the time of receiving the frequency change request signal to a value calculated based on the count result of the count unit at the time of receiving the frequency change request signal. The expected value is changed to a value corresponding to the frequency change request signal when the frequency change request signal is received and the monitoring period is shifted to the next monitoring period.
    The system clock monitoring device according to claim 1.
  9.  前記条件調整部は、前記カウント部と前記期待値変更部とから構成され、
     前記カウント部は、前記周波数変更要求信号を受信すると前記監視周期を終了させて直ちに次の監視周期に移行するように構成され、
     前記期待値変更部は、前記期待値変更指示信号受信すると、周波数変更要求信号受信時の前記監視周期における前記期待値を、前記周波数変更要求信号を受信した時点における前記カウント部のカウント結果に基づいて算定される値に設定したうえで、周波数変更要求信号受信時の監視周期の次の監視周期に移行すると前記期待値を前記周波数変更要求信号に応じた値に変更するように構成されている、
     請求項1のシステムクロック監視装置。
    The condition adjustment unit includes the count unit and the expected value change unit,
    The counting unit is configured to end the monitoring cycle and immediately shift to the next monitoring cycle when receiving the frequency change request signal,
    When the expected value change unit receives the expected value change instruction signal, the expected value change unit receives the expected value in the monitoring period when the frequency change request signal is received, based on the count result of the count unit at the time when the frequency change request signal is received. The expected value is changed to a value corresponding to the frequency change request signal when the monitoring period is shifted to the next monitoring period when the frequency change request signal is received. ,
    The system clock monitoring device according to claim 1.
  10.  モータと、
     前記モータの供給電流制御用のスイッチング素子を有するインバータ回路と、
     クロック周波数異常発生時において前記モータが安全な状態になるように、前記スイッチング素子を制御する請求項1のシステムクロック監視装置と、
     を備えるモータ制御システム。
    A motor,
    An inverter circuit having a switching element for controlling the supply current of the motor;
    The system clock monitoring device according to claim 1, wherein the switching element is controlled so that the motor is in a safe state when a clock frequency abnormality occurs.
    A motor control system comprising:
PCT/JP2010/002885 2009-09-01 2010-04-21 System clock monitoring device and motor control system WO2011027489A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009201198 2009-09-01
JP2009-201198 2009-09-01

Publications (1)

Publication Number Publication Date
WO2011027489A1 true WO2011027489A1 (en) 2011-03-10

Family

ID=43649049

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/002885 WO2011027489A1 (en) 2009-09-01 2010-04-21 System clock monitoring device and motor control system

Country Status (1)

Country Link
WO (1) WO2011027489A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110998339A (en) * 2017-08-02 2020-04-10 高通股份有限公司 On-chip frequency monitoring

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH088889A (en) * 1994-06-22 1996-01-12 Matsushita Electric Ind Co Ltd External synchronization device
JPH0876877A (en) * 1994-09-06 1996-03-22 Fujitsu Ltd Circuit for detecting abnormal oscillation
JP2006011704A (en) * 2004-06-24 2006-01-12 Fujitsu Ltd Clock switching circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH088889A (en) * 1994-06-22 1996-01-12 Matsushita Electric Ind Co Ltd External synchronization device
JPH0876877A (en) * 1994-09-06 1996-03-22 Fujitsu Ltd Circuit for detecting abnormal oscillation
JP2006011704A (en) * 2004-06-24 2006-01-12 Fujitsu Ltd Clock switching circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110998339A (en) * 2017-08-02 2020-04-10 高通股份有限公司 On-chip frequency monitoring

Similar Documents

Publication Publication Date Title
CN109217740B (en) System and method for synchronizing switching signals
EP2436116B1 (en) Pwm synchronization of switched mode power converters
US8476860B2 (en) Electric power converter
US9116184B2 (en) System and method for verifying the operating frequency of digital control circuitry
JP5901926B2 (en) PWM output device and motor drive device
US7971076B2 (en) Circuitry and method for monitoring a supply voltage
US8311169B2 (en) Automatic frequency monitoring circuit, electronic device, automatic frequency monitoring method, and automatic frequency monitoring program
JP5267055B2 (en) Power supply voltage output circuit
JP2002251227A (en) Clock monitoring circuit, data processor and data processing system
KR100958811B1 (en) Delay locked loop circuit
WO2011027489A1 (en) System clock monitoring device and motor control system
US8638154B2 (en) System clock monitoring apparatus and motor control system
JP2018182859A (en) Vehicle controller
KR20220119178A (en) Load abnormality detecting circuit for inverter
US9843188B2 (en) Method to select optimal synchronization source in a multiple uninterruptible power supply system
JP2004357465A (en) Power supply
JP2014154043A (en) Electronic control device and information processor
US10969819B2 (en) Security control and method for operating a security control
JP2000253689A (en) Motor controller and its synchronizing method
WO2011052112A1 (en) System clock monitoring device, and motor control system
JP2004187492A (en) Semiconductor device and control method
JPWO2018037523A1 (en) Power converter
JP2015005198A (en) Clock abnormality detector
JP2005049312A (en) Clocking device
JP2019124508A (en) Rotation angle detector

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10813444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10813444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP