On-chip protection device and method and chip
By designing the state machine protection circuit and key signal protection circuit on the chip, the problem of the state machine running away when the chip is abnormal is solved, ensuring system stability and control signal reliability.
Patent Information
- Application Number
- CN202411812411.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-10
AI Technical Summary
When the system clock abnormality occurs in existing chips, the state machine may run away, causing the chip system to be unstable, and the stability of the key control signals is difficult to ensure.
An on-chip protection device is designed, including a state machine protection circuit and a critical signal protection circuit. Before the state machine executes the target state, the state machine protection circuit makes the protection validity judgment through pre-configured verification rules to ensure that the state machine is executed normally when the protection is valid; when the key signal protection circuit controls the specified key signals related to the state machine are valid to prevent unnecessary control signals from being generated.
It effectively solves the system instability problem caused by the state machine running off when the system clock is abnormal or the chip is powered off, ensures the stability of the key control signals, and ensures the normal and reliable function of the chip when the system is abnormal or disturbed.
Smart Images

Figure CN119806877A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to an on-chip protection device, method and chip. Background Art
[0002] When an abnormality occurs in the system clock of an existing chip, such as abnormal jitter or glitches, a metastable state may occur due to the failure to meet the internal timing of the chip, causing the chip state machine to run away. If a certain state is entered incorrectly, a corresponding erroneous control signal will be generated, causing the entire chip system to be abnormal or even damage the entire machine. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide an on-chip protection device, method and chip, which can solve the problem that the state machine may run abnormally due to clock abnormalities or chip power-off, resulting in chip system instability, solve the stability problem of key control signals, and ensure that the chip functions normally and reliably when the system is abnormal or interfered.
[0004] An on-chip protection device provided in an embodiment of the present application is applied to a chip, and the device includes a state machine protection circuit and a key signal protection circuit;
[0005] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0006] The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0007] In some embodiments, in the on-chip protection device, the state machine protection circuit is pre-configured with a verification rule corresponding to a target state of the chip's state machine;
[0008] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and to determine the judgment result of the protection validity, specifically for:
[0009] Before the state machine executes the target state based on the target trigger signal, the protection validity judgment circuit in the state machine protection circuit receives a target state protection configuration signal for the target state sent by the state machine;
[0010] The protection validity judgment circuit determines the judgment result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state.
[0011] In some embodiments, in the on-chip protection device, determining the result of the protection effectiveness by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state includes:
[0012] When the target state protection configuration signal is enabled and matches the verification rule corresponding to the target state, the protection validity judgment circuit generates a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is valid;
[0013] When the target state protection configuration signal is not enabled or does not match the verification rule corresponding to the target state, the protection validity judgment circuit does not generate a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is invalid.
[0014] In some embodiments, in the on-chip protection device, after the state machine protection circuit determines the judgment result of the protection effectiveness, if the judgment result of the protection effectiveness is that the state protection is invalid, the state machine does not execute the target state and enters the idle state.
[0015] In some embodiments, in the on-chip protection device, the check rule is a check value, and the check value is a multi-bit sequence.
[0016] In some embodiments, in the on-chip protection device, the critical signal protection circuit receives a specified critical signal output by a state machine protection circuit; when the protection signal is valid, the specified critical signal generated by the state machine protection circuit and sent to the state machine is controlled to be valid.
[0017] In some embodiments, in the on-chip protection device, the critical signal protection circuit includes a protection register and a control register;
[0018] The protection register is used to generate a protection signal and send the protection signal to the control register;
[0019] The control register is used to receive a designated key signal related to the state machine, and when the protection signal is valid, control the designated key signal to be valid, and output the valid designated key signal.
[0020] In some embodiments, in the on-chip protection device, the critical signal protection circuit further includes an enable register and clock gating of the enable register; the enable register is located at a level below the control register;
[0021] The clock gating of the enable register receives the protection signal of the protection register as a gating signal to control whether the clock of the enable register is turned on;
[0022] The enable register receives the valid designated key signal output by the control register, and determines whether to output the designated key signal based on whether the clock is turned on.
[0023] In some embodiments, an on-chip protection method is further provided. The method is applied to a chip. The chip includes the on-chip protection device. The on-chip protection device includes a state machine protection circuit and a key signal protection circuit. The protection method includes:
[0024] The state machine protection circuit performs protection validity judgment based on a target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determines the judgment result of protection validity; if the judgment result of protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0025] The key signal protection circuit generates a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0026] In some embodiments, a chip is further provided, the chip comprising the on-chip protection device, the on-chip protection device comprising a state machine protection circuit and a key signal protection circuit;
[0027] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0028] The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0029] The embodiment of the present application provides an on-chip protection device, method and chip, wherein the on-chip protection device is applied to a chip, and the device includes a state machine protection circuit and a key signal protection circuit; before the state machine executes a target state based on a target trigger signal, the state machine protection circuit performs a protection validity judgment based on a target state protection configuration signal pre-configured for the target state, and determines the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine executes the target state normally and generates an output control signal corresponding to the target state; the key signal protection circuit is used to generate a protection signal, and when the protection signal is valid, controls the state machine related instructions The designated key signal is valid; the designated key signal includes the output control signal of the state machine; the state machine protection circuit switches the uncontrollable state to the IDLE state when the state machine runs away, ensuring that the logic inside the chip does not generate an internal control signal, thereby solving the problem that the state machine may run away abnormally due to clock abnormalities or the chip power-off process, causing the chip system to be unstable; the key signal protection circuit can ensure that when the chip runs away due to system abnormalities and the state machine runs away, the key control signal is locked, and no unnecessary control signal is generated due to system abnormalities, thereby solving the stability of the key control signal and ensuring that the chip functions normally and reliably when the system is abnormal or interfered. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of the structure of the on-chip protection device according to an embodiment of the present application is shown;
[0032] Figure 2 A block diagram showing a state machine protection mechanism is shown;
[0033] Figure 3 The schematic diagram of the protection effectiveness judgment circuit described in the embodiment of the present application is shown;
[0034] Figure 4 A schematic diagram of the structure of the on-chip protection device described in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0036] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0037] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0038] When an abnormality occurs in the system clock of an existing chip, such as abnormal jitter or glitches, a metastable state may occur due to the failure to meet the internal timing of the chip, causing the chip state machine to run away. If a certain state is entered incorrectly, a corresponding erroneous control signal will be generated, causing the entire chip system to be abnormal or even damage the entire machine.
[0039] Based on this, an embodiment of the present application provides an on-chip protection device, method and chip, wherein the on-chip protection device is applied to a chip, and the device includes a state machine protection circuit and a key signal protection circuit; before the state machine executes the target state based on a target trigger signal, the state machine protection circuit performs a protection validity judgment based on a target state protection configuration signal pre-configured for the target state, and determines the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine executes the target state normally and generates an output control signal corresponding to the target state; the key signal protection circuit is used to generate a protection signal, and when the protection signal is valid, controls the state machine related The designated key signal is valid; the designated key signal includes the output control signal of the state machine; the state machine protection circuit switches the uncontrollable state to the IDLE state when the state machine runs away, ensuring that the logic inside the chip does not generate an internal control signal, thereby solving the problem that the state machine may run away abnormally due to clock abnormalities or the chip power-off process, causing the chip system to be unstable; the key signal protection circuit can ensure that when the chip runs away due to system abnormalities and the state machine runs away, the key control signal is locked, and no unnecessary control signal is generated due to system abnormalities, thereby solving the stability of the key control signal and ensuring that the chip functions normally and reliably when the system is abnormal or interfered.
[0040] Please refer to Figure 1 , Figure 1 The schematic diagram of the structure of the on-chip protection device according to the embodiment of the present application is shown; the on-chip protection device 100 is applied to a chip, such as Figure 1 As shown, the device includes a state machine protection circuit 101 and a key signal protection circuit 102;
[0041] The state machine protection circuit 100 is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0042] The key signal protection circuit 102 is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0043] Please refer to Figure 2 , Figure 2 The principle block diagram of the state machine protection mechanism is shown; Figure 2As shown, the normal state of the state machine mainly includes the state jump of IDLE->state 1->state 2...->state n–>IDLE, and the corresponding control signal required to be generated in each state is generated in each state. For example, after executing state 1, control signal 1 is output, after executing state 2, control signal 2 is output, and after executing state n, control signal n is output.
[0044] A protection effectiveness judgment is performed based on a target state protection configuration signal pre-configured for the target state, and a judgment result of the protection effectiveness is determined, wherein the judgment result of the protection effectiveness includes a state protection being effective and a state protection being invalid.
[0045] That is to say, in the embodiment of the present application, a state machine protection circuit is added, that is, the protection of state n (n=1, 2, 3...). The state machine can be executed normally only when this function is turned on normally. Otherwise, it will enter the IDLE idle state and will not execute the corresponding function, thereby solving the problem that the state machine may run abnormally due to clock abnormalities or chip power-off, resulting in chip system instability.
[0046] The state machine protection circuit described in the embodiment of the present application is pre-configured with verification rules corresponding to the target state of the state machine of the chip.
[0047] The verification rule is used to verify that the target state protection configuration signal configured for the target state is valid.
[0048] In some optional embodiments, the state machine protection circuit includes a protection validity judgment circuit, please refer to Figure 3 , Figure 3 A schematic diagram showing the principle of the protection effectiveness judgment circuit described in an embodiment of the present application is shown.
[0049] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and to determine the judgment result of the protection validity, specifically for:
[0050] Before the state machine executes the target state based on the target trigger signal, the protection validity judgment circuit in the state machine protection circuit receives a target state protection configuration signal for the target state sent by the state machine;
[0051] The protection validity judgment circuit determines the judgment result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state.
[0052] Specifically, determining the result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state includes:
[0053] When the target state protection configuration signal is enabled and matches the verification rule corresponding to the target state, the protection validity judgment circuit generates a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is valid;
[0054] When the target state protection configuration signal is not enabled or does not match the verification rule corresponding to the target state, the protection validity judgment circuit does not generate a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is invalid.
[0055] If the result of the protection validity judgment is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0056] After the state machine protection circuit determines the judgment result of the protection effectiveness, if the judgment result of the protection effectiveness is that the state protection is invalid, the state machine does not execute the target state and enters the idle state.
[0057] In some embodiments, the verification rule is a verification value, and the verification value is a multi-bit sequence. The multi-bit sequence can improve the accuracy of validity judgment.
[0058] Assuming the check value is 1 bit, there may be a situation where the check is passed incorrectly, but a multi-bit sequence can avoid this situation.
[0059] Please refer to Figure 3 , the target state protection configuration signal includes state 1 protection configuration signal, state 2 protection configuration signal...state n protection configuration signal, and the protection validity circuit can determine whether a corresponding state protection signal is generated, such as state 1 protection signal and state n protection signal, based on whether the corresponding configured signal is enabled and whether the corresponding key (that is, the check value) is matched; if the corresponding configuration is performed and the key is matched, the corresponding target state protection signal is generated.
[0060] For example, when the state 1 protection configuration signal stat1_cfg == stat1_key1, the state 1 protection signal stat1_prot is generated. Other state protection signals are similar.
[0061] The target state protection configuration signal may be generated by register configuration or by an internal circuit.
[0062] The check value for the target state in the check rule, such as stat1_key, is a special sequence, such as 0x5a5a5a5a.
[0063] Different states in the state machine correspond to different check values.
[0064] In some embodiments, please refer to Figure 4 , Figure 4 The schematic diagram of the structure of the on-chip protection device according to the embodiment of the present application is shown; in the on-chip protection device, the key signal protection circuit includes a protection register 401 and a control register 402;
[0065] The protection register 401 is used to generate a protection signal and send the protection signal to the clock gating of the control register and the enable register;
[0066] The control register 402 is used to receive the designated key signal related to the state machine, and when the protection signal is valid, control the designated key signal to be valid and output the valid designated key signal.
[0067] The critical signal protection circuit further includes an enable register 403 and a clock gating 404 of the enable register 403; the enable register 403 is located at the next level of the control register 402;
[0068] The clock gating 404 of the enabling register 403 receives the protection signal of the protection register 401 as a gating signal to control whether the clock of the enabling register 403 is turned on;
[0069] The enable register 403 receives the valid designated key signal output by the control register 402, and determines whether to output the designated key signal based on whether the clock is turned on.
[0070] The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the specified key signal related to the state machine is controlled to be valid; the specified key signal includes the output control signal of the state machine; please refer to Figure 1 , the key signal protection circuit receives the specified key signal output by the state machine protection circuit; when the protection signal is valid, the specified key signal generated by the state machine protection circuit and sent to the state machine is controlled to be valid.
[0071] The designated key signal is a signal related to the state machine, specifically, including the output control signal of the state machine, the control signal input to the state machine, and the control signal input to the state machine, for example, the control signal input to the state machine by the state machine protection circuit, such as a write signal, a clear signal, etc.
[0072] The designated key signal is a control signal determined according to the business, for example, at least part of the output control signal determined from output control signal 1, output control signal 2 ... output control signal n corresponding to state 1, state 2 ... state n of the state machine.
[0073] Specifically, a protection signal is generated through a register or an internal circuit, so that the Q end of the protect reg generates an r_prot signal; when the value of the protection signal is valid (i.e., r_prot=1), the control signal ctrl can generate a ctrl=1 signal in a corresponding state, that is, the control signal ctrl is valid; otherwise, the ctrl=1 signal cannot be generated, that is, the control signal ctrl is invalid.
[0074] Furthermore, the generated protection signal r_prot signal will also serve as the gating signal of the clock of the next-level enable register ctrlenable reg to control whether the clock of the lower-level register is turned on; that is, if the protection is not turned on, when the control signal ctrl becomes valid due to system abnormality, the next-level enable register ctrl enable reg can be protected from being affected by controlling the clock gating, thereby ensuring the stability of the chip.
[0075] The control signal ctrl generated in the state machine is sent to the D end of the final enable register (ctrl enable reg), which is equivalent to using two-level registers to perform simple synchronous filtering; this method can solve the metastable problem caused by clock glitches in the system and avoid the erroneous generation of the ctrl_en signal due to system clock abnormalities.
[0076] It should be noted that, to protect the target key signals, more levels of protection may be added, or more levels of registers may be added.
[0077] For the state machine, the output control signal corresponding to the target state will be generated only when the target state of the state machine is judged by the effectiveness of the protection; based on the protection signal of the protection register in the key signal protection circuit, the control signal generated by the state machine is filtered once, and the pulse control signal (such as burrs) erroneously generated when the state machine runs away will be locked, and no unnecessary control signal will be generated due to system abnormalities; further, the protection signal will also serve as the gating signal of the enable register clock of the next level. When the output control signal becomes valid due to system abnormalities, the enable register of the next level can be protected from being affected by controlling the clock gating, thereby ensuring the stability inside the chip, thereby fully ensuring the stable operation of the state machine.
[0078] Based on the same inventive concept, an on-chip protection method corresponding to the on-chip protection device is also provided in the embodiment of the present application. Since the principle of solving the problem by the on-chip protection method in the embodiment of the present application is similar to that of the above-mentioned on-chip protection device in the embodiment of the present application, the implementation of the on-chip protection method can refer to the implementation of the on-chip protection device, and the repeated parts will not be repeated.
[0079] In some embodiments, an on-chip protection method is further provided. The method is applied to a chip. The chip includes the on-chip protection device. The on-chip protection device includes a state machine protection circuit and a key signal protection circuit. The protection method includes:
[0080] The state machine protection circuit performs protection validity judgment based on a target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determines the judgment result of protection validity; if the judgment result of protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0081] The key signal protection circuit generates a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0082] In some embodiments, in the on-chip protection method, the state machine protection circuit is pre-configured with a verification rule corresponding to a target state of the chip's state machine;
[0083] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and to determine the judgment result of the protection validity, specifically for:
[0084] Before the state machine executes the target state based on the target trigger signal, the protection validity judgment circuit in the state machine protection circuit receives a target state protection configuration signal for the target state sent by the state machine;
[0085] The protection validity judgment circuit determines the judgment result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state.
[0086] In some embodiments, in the on-chip protection method, determining the result of the protection effectiveness by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state includes:
[0087] When the target state protection configuration signal is enabled and matches the verification rule corresponding to the target state, the protection validity judgment circuit generates a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is valid;
[0088] When the target state protection configuration signal is not enabled or does not match the verification rule corresponding to the target state, the protection validity judgment circuit does not generate a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is invalid.
[0089] In some embodiments, in the on-chip protection method, after the state machine protection circuit determines the judgment result of the protection effectiveness, if the judgment result of the protection effectiveness is that the state protection is invalid, the state machine does not execute the target state and enters the idle state.
[0090] In some embodiments, in the on-chip protection method, the check rule is a check value, and the check value is a multi-bit sequence.
[0091] In some embodiments, in the on-chip protection method, the critical signal protection circuit receives a specified critical signal output by a state machine protection circuit; when the protection signal is valid, the specified critical signal generated by the state machine protection circuit and sent to the state machine is controlled to be valid.
[0092] In some embodiments, in the on-chip protection method, the critical signal protection circuit includes a protection register and a control register;
[0093] The protection register is used to generate a protection signal and send the protection signal to the control register;
[0094] The control register is used to receive a designated key signal related to the state machine, and when the protection signal is valid, control the designated key signal to be valid, and output the valid designated key signal.
[0095] In some embodiments, in the on-chip protection method, the critical signal protection circuit further includes an enable register and clock gating of the enable register; the enable register is located at a level below the control register;
[0096] The clock gating of the enable register receives the protection signal of the protection register as a gating signal to control whether the clock of the enable register is turned on;
[0097] The enable register receives the valid designated key signal output by the control register, and determines whether to output the designated key signal based on whether the clock is turned on.
[0098] Based on the same inventive concept, a chip corresponding to the on-chip protection device is also provided in the embodiment of the present application. Since the principle of solving the problem by the chip in the embodiment of the present application is similar to that of the above-mentioned on-chip protection device in the embodiment of the present application, the implementation of the chip can refer to the implementation of the on-chip protection device, and the repeated parts will not be repeated.
[0099] In some embodiments, a chip is further provided, the chip comprising the on-chip protection device, the on-chip protection device comprising a state machine protection circuit and a key signal protection circuit;
[0100] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state;
[0101] The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
[0102] In some embodiments, in the chip, the state machine protection circuit is pre-configured with a verification rule corresponding to a target state of the state machine of the chip;
[0103] The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and to determine the judgment result of the protection validity, specifically for:
[0104] Before the state machine executes the target state based on the target trigger signal, the protection validity judgment circuit in the state machine protection circuit receives a target state protection configuration signal for the target state sent by the state machine;
[0105] The protection validity judgment circuit determines the judgment result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state.
[0106] In some embodiments, in the chip, determining the result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state includes:
[0107] When the target state protection configuration signal is enabled and matches the verification rule corresponding to the target state, the protection validity judgment circuit generates a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is valid;
[0108] When the target state protection configuration signal is not enabled or does not match the verification rule corresponding to the target state, the protection validity judgment circuit does not generate a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is invalid.
[0109] In some embodiments, in the chip, after the state machine protection circuit determines the judgment result of protection effectiveness, if the judgment result of protection effectiveness is that the state protection is invalid, the state machine does not execute the target state and enters the idle state.
[0110] In some embodiments, in the chip, the verification rule is a verification value, and the verification value is a multi-bit sequence.
[0111] In some embodiments, in the chip, the critical signal protection circuit receives a specified critical signal output by a state machine protection circuit; when the protection signal is valid, the specified critical signal generated by the state machine protection circuit and sent to the state machine is controlled to be valid.
[0112] In some embodiments, in the chip, the key signal protection circuit includes a protection register and a control register;
[0113] The protection register is used to generate a protection signal and send the protection signal to the control register;
[0114] The control register is used to receive a designated key signal related to the state machine, and when the protection signal is valid, control the designated key signal to be valid, and output the valid designated key signal.
[0115] In some embodiments, in the chip, the critical signal protection circuit further includes an enable register and clock gating of the enable register; the enable register is located at the next level of the control register;
[0116] The clock gating of the enable register receives the protection signal of the protection register as a gating signal to control whether the clock of the enable register is turned on;
[0117] The enable register receives the valid designated key signal output by the control register, and determines whether to output the designated key signal based on whether the clock is turned on.
[0118] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0119] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0122] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An on-chip protection device, characterized in that: Applied to a chip, the device includes a state machine protection circuit and a key signal protection circuit; The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state; The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
2. The on-chip protection device according to claim 1, characterized in that: The state machine protection circuit is pre-configured with a verification rule corresponding to the target state of the state machine of the chip; The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and to determine the judgment result of the protection validity, specifically for: Before the state machine executes the target state based on the target trigger signal, the protection validity judgment circuit in the state machine protection circuit receives a target state protection configuration signal for the target state sent by the state machine; The protection validity judgment circuit determines the judgment result of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state.
3. The on-chip protection device according to claim 2, characterized in that: The determining of the protection validity by judging whether the target state protection configuration signal is enabled and whether it matches the verification rule corresponding to the target state includes: When the target state protection configuration signal is enabled and matches the verification rule corresponding to the target state, the protection validity judgment circuit generates a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is valid; When the target state protection configuration signal is not enabled or does not match the verification rule corresponding to the target state, the protection validity judgment circuit does not generate a target state protection signal for the target state, and determines that the judgment result of the protection validity is that the state protection is invalid.
4. The on-chip protection device according to claim 1, 2 or 3, characterized in that: After the state machine protection circuit determines the judgment result of the protection effectiveness, if the judgment result of the protection effectiveness is that the state protection is invalid, the state machine does not execute the target state and enters the idle state.
5. The on-chip protection device according to claim 2, characterized in that: The verification rule is a verification value, and the verification value is a multi-bit sequence.
6. The on-chip protection device according to claim 1, characterized in that: The key signal protection circuit receives a designated key signal output by a state machine protection circuit; when the protection signal is valid, the designated key signal generated by the state machine protection circuit and sent to the state machine is controlled to be valid.
7. The on-chip protection device according to claim 1 or 6, characterized in that: The key signal protection circuit includes a protection register and a control register; The protection register is used to generate a protection signal and send the protection signal to the control register; The control register is used to receive a designated key signal related to the state machine, and when the protection signal is valid, control the designated key signal to be valid, and output the valid designated key signal.
8. The on-chip protection device according to claim 7, characterized in that: The critical signal protection circuit further includes an enable register and a clock gating of the enable register; the enable register is located at a level below the control register; The clock gating of the enable register receives the protection signal of the protection register as a gating signal to control whether the clock of the enable register is turned on; The enable register receives the valid designated key signal output by the control register, and determines whether to output the designated key signal based on whether the clock is turned on.
9. An on-chip protection method, characterized in that: The method is applied to a chip, the chip includes the on-chip protection device, the on-chip protection device includes a state machine protection circuit and a key signal protection circuit; the protection method includes: The state machine protection circuit performs protection validity judgment based on a target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determines the judgment result of protection validity; if the judgment result of protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state; The key signal protection circuit generates a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
10. A chip, characterized in that: The chip includes the on-chip protection device, and the on-chip protection device includes a state machine protection circuit and a key signal protection circuit; The state machine protection circuit is used to determine the protection validity based on the target state protection configuration signal pre-configured for the target state before the state machine executes the target state based on the target trigger signal, and determine the judgment result of the protection validity; if the judgment result of the protection validity is that the state protection is valid, the state machine normally executes the target state and generates an output control signal corresponding to the target state; The key signal protection circuit is used to generate a protection signal. When the protection signal is valid, the designated key signal related to the state machine is controlled to be valid; the designated key signal includes the output control signal of the state machine.
Citation Information
Patent Citations
Anti-single particle irradiating method and anti-single particle irradiating system based on frame data processing
CN102306213A
Method for preventing single event upset of FPGA
CN103530196A
Integrated circuit microprocessor with programmable memory access interface types and related method
CN1139238A
Battery protection chip and multi-delay clock chain multiplexing circuit and method thereof
CN114448398A
Method and device for automatically adjusting control parameters of configuration memory in FPGA (Field Programmable Gate Array)
CN115809023A