Circuit detection method and data detection circuit
By regularly reading and calculating the data of the detected module in the data detection circuit to determine the fault status, the problem of increased space and power consumption caused by hardware verification is solved, and efficient and accurate data detection and storage integrity are achieved.
Patent Information
- Application Number
- CN202010455249.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-05-26
AI Technical Summary
Existing data verification methods usually perform ECC or Parity detection through hardware, resulting in increased space occupied and power consumption of the on-chip system.
By arranging the data detection module and the detected module in the data detection circuit, the data to be detected is periodically read from the storage area corresponding to the data storage address of the detected module, and the calculation is performed using the preset calculation method corresponding to the detected module. , the operation results are obtained to determine the fault status, avoiding the need to add hardware for data verification.
It saves the space occupied by the on-chip system and greatly reduces the power consumption. At the same time, it achieves timely and accurate detection of the tested module, meets the requirements of functional safety, and ensures the integrity of the stored data.
Smart Images

Figure CN111613264B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electronic circuits, and in particular to a circuit detection method and a data detection circuit. Background Art
[0002] In the current system-on-chip design, the clock system is very complex, which affects the integrity of the data in the system's memory and registers. According to the requirements of functional safety, it is necessary to ensure the integrity of the system's storage content and the integrity of the system's register configuration. The memory and registers can usually be verified using methods such as ECC and Parity. Summary of the invention
[0003] Embodiments of the present disclosure provide a circuit detection method, a data detection circuit, and an electronic device.
[0004] An embodiment of the present disclosure provides a circuit detection method, which includes: if the current time point reaches a preset detection time period, based on the data storage address of the detected module, reading the data to be detected corresponding to the detected module from the storage area corresponding to the data storage address; using a preset calculation method corresponding to the detected module to calculate the data to be detected to obtain a first calculation result; based on the first calculation result and the preset calculation result corresponding to the data storage address, determining the fault state of the detected module.
[0005] According to another aspect of the embodiments of the present disclosure, a data detection circuit is provided, which includes: a data detection module and a detected module, wherein the data detection module is used to: if the current time point reaches a preset detection time period, based on the data storage address of the detected module, read the data to be detected from the detected module; use a preset calculation method corresponding to the detected module to operate on the data to be detected to obtain a first operation result; and determine the fault state of the detected module based on the first operation result and the preset operation result corresponding to the data storage address.
[0006] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a data detection module, a detected module, and a memory for storing processor executable instructions; the data detection module is used to read the executable instructions from the memory and execute the instructions to implement the above-mentioned circuit detection method.
[0007] Based on the circuit detection method, data detection circuit and electronic device provided by the above-mentioned embodiments of the present disclosure, the data to be detected is read from the storage area corresponding to the data storage address of the detected module at regular intervals, and then the preset calculation method corresponding to the detected module is used to calculate the data to be detected to obtain a first calculation result, and finally the first calculation result is compared with the preset calculation result corresponding to the data storage address to determine the fault state of the detected module. Since the fault state of the data to be detected is determined by the first calculation result obtained by the preset calculation method, there is no need to perform data verification by adding hardware, which saves the space occupied by the on-chip system and can also greatly reduce the power consumption of the on-chip system. In addition, since the data to be detected in the storage area corresponding to the data storage address of the detected module is read at regular intervals and the data to be detected can accurately represent the real information of the detected module, the present disclosure can detect the detected module in a timely and accurate manner, thereby meeting the requirements of functional safety and ensuring the integrity of the stored data about the detected module.
[0008] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0010] Figure 1 is an exemplary structural diagram of a data detection circuit provided by an exemplary embodiment of the present disclosure.
[0011] Figure 2 is an exemplary structural diagram of a data detection circuit provided by another exemplary embodiment of the present disclosure.
[0012] Figure 3 It is a schematic diagram of selecting a preset operation result from a preset operation result selection subunit of a data detection circuit according to an embodiment of the present disclosure.
[0013] Figure 4 is an exemplary structural diagram of a timer of a data detection circuit according to an embodiment of the present disclosure.
[0014] Figure 5 It is a flowchart of a circuit detection method provided by an exemplary embodiment of the present disclosure.
[0015] Figure 6 It is a flowchart of a circuit detection method provided by another exemplary embodiment of the present disclosure.
[0016] Figure 7 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0018] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0019] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0020] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0021] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0022] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0023] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0024] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0025] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0026] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0027] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0028] Application Overview
[0029] Existing data verification methods usually use hardware to perform ECC, Parity and other tests. However, using hardware to detect will increase the space occupied by the on-chip system, and each data access requires verification, which will increase additional power consumption.
[0030] Exemplary Data Detection Circuit
[0031] Figure 1 An exemplary block diagram 100 of a data detection circuit to which embodiments of the present disclosure may be applied is shown.
[0032] like Figure 1 As shown, the data detection circuit may include a data detection module 101 and a detected module 102. The detected module 102 is a hardware device for storing data. Optionally, the detected module 102 may include but is not limited to at least one of the following: a register, an internal memory, and an external memory. As an example, the register may include an instruction register, a pointer register, etc. The internal memory may include SRAM, ROM, etc. The external memory may include DDR, SD, eMMC, etc.
[0033] The data detection module 101 can read data from the detected module 102 and detect the read data. The data detection module 101 may include hardware devices such as a timer, a comparator, and an operation unit.
[0034] In this embodiment, the data detection module 101 may perform the following steps:
[0035] First, if the current time point reaches the preset detection time period, the data to be detected is read from the detected module 102 based on the data storage address of the detected module 102 .
[0036] Specifically, it can be determined whether the current time point reaches the detection time period based on a timing device included in the above-mentioned data detection circuit or a timing device connected to the above-mentioned data detection circuit. Among them, the timing device can be a timer, a counter, a clock, etc. As an example, the preset detection time period can be 1 minute, 1 hour, 1 day, etc., that is, data is detected once per detection time period. The data storage address of the detected module 102 can be pre-set, for example, an address list is pre-set, and the detected module 102 can read the data to be detected from the corresponding storage area in the detected module 102 according to the data storage address included in the address list.
[0037] Then, the preset calculation method corresponding to the detected module 102 is used to calculate the data to be detected to obtain a first calculation result.
[0038] The number of the detected modules 102 may be one or more, and each detected module 102 corresponds to a preset calculation method. Generally, the preset calculation method can be embodied in a corresponding algorithm code, that is, the above-mentioned data detection circuit may include a code storage unit, and the data detection module 101 executes the code stored in the code storage unit to complete the calculation. The above-mentioned preset calculation method may include but is not limited to at least one of the following algorithms: CRC8, CRC12, CRC16, CRC32, CRC-CCITT, MD4, MD5, SHA-1, SHA-256, etc.
[0039] Finally, based on the first operation result and the preset operation result corresponding to the data storage address, the fault state of the detected module 102 is determined.
[0040] Among them, each data storage address can correspond to a preset operation result, and the preset operation result is the result obtained by pre-calculating the data to be detected corresponding to the data storage address using the corresponding preset calculation method, that is, the preset operation result is an accurate result. Usually, the data detection module 101 can compare whether the first operation result is the same as the preset operation result. If they are the same, it means that the data stored in the corresponding storage space is correct, that is, the detected module 102 has not failed, and information indicating that no failure has occurred (such as the number "1") can be output at this time. Otherwise, it means that the detected module 102 has failed, and information indicating that a failure has occurred (such as the number "0") can be output at this time.
[0041] The data detection circuit provided by the above-mentioned embodiment of the present disclosure sets a data detection module and a detected module in the data detection circuit. The data detection module periodically reads the data to be detected from the storage area corresponding to the data storage address of the detected module, and then uses the preset calculation method corresponding to the detected module to operate on the data to be detected to obtain a first operation result. Finally, the first operation result is compared with the preset operation result corresponding to the data storage address to determine the fault state of the detected module. Therefore, there is no need to perform data verification by adding hardware, which saves the space occupied by the on-chip system and can also greatly reduce the power consumption of the on-chip system. In addition, since the data to be detected in the storage area corresponding to the data storage address of the detected module is read periodically and the data to be detected can accurately represent the real information of the detected module, the present disclosure can detect the detected module in a timely and accurate manner, thereby meeting the requirements of functional safety and ensuring the integrity of the stored data on the detected module.
[0042] In some optional implementations, such as Figure 2 As shown, the data detection module 101 may include a timer 1011 , a calculation unit 1012 , and a data positioning unit 1013 .
[0043] The timer 1011 is used to set the detection time period of the data detection module 101 and count the time. When the counted time reaches the detection time period, it outputs a detection signal for instructing the calculation unit 1012 to perform data detection. The detection signal can be a signal in various forms, such as a digital signal, a level signal, etc.
[0044] The data location unit 1013 is used to set the data storage address of the data to be detected. The data storage address is used to represent the location of the storage space storing the above-mentioned data to be detected in the detected module 102. The number of data storage addresses can be at least one. As an example, each data storage address can include the starting address, the ending address and the address to be excluded of the storage space.
[0045] The calculation unit 1012 is used to read the data to be detected from the detected module 102 based on the data storage address when the above detection signal is detected. Then, the data to be detected is calculated using a preset calculation method corresponding to the detected module 102 to obtain a first calculation result. Finally, based on the first calculation result and the preset calculation result corresponding to the data storage address, the fault state of the detected module 102 is determined.
[0046] This implementation method can use different hardware to perform different operations by setting a timer, a calculation unit and a data positioning unit in the data detection module 101, thereby improving the efficiency of data detection.
[0047] In some optional implementations, such as Figure 2 As shown, the calculation unit 1012 includes a preset operation result selection subunit 10121, an algorithm subunit 10122, and an operation result comparator 10123.
[0048] The algorithm subunit 10122 is used to obtain the data storage address from the data location unit when a detection signal is detected, extract the data to be detected from the detected module according to the data storage address, and use the preset calculation method corresponding to the detected module 102 to calculate the data to be detected to obtain a first calculation result.
[0049] The preset operation result selection subunit 10121 is used to select the preset operation result corresponding to the data storage address. Figure 3 As shown, it shows a schematic diagram of selecting a preset operation result from the preset operation result selection subunit 10121 according to the data storage address. The preset operation result selection subunit 10121 may include a preset operation result register group (including R1-R M ) and a selector, the selector selects a corresponding preset operation result register from the preset operation result register group according to the data storage address (for example, generates a selection signal as shown in the figure according to the data storage address), and extracts the preset operation result from the selected preset operation result register.
[0050] The operation result comparator 10123 is used to determine the fault state of the detected module 102 based on the first operation result and the preset operation result. Figure 2 As shown, the first operation result output by the algorithm subunit 10122 and the preset operation result are input to the operation result comparator 10123, and the operation result comparator 10123 compares whether the first operation result and the preset operation result are the same, and outputs a fault status signal representing the fault status of the detected module 102.
[0051] This implementation method can output a signal representing the fault status of the detected module 102 by setting a preset calculation result selection subunit 10121, an algorithm subunit 10122, and a calculation result comparator 10123 in the calculation unit, thereby using multiple hardwares to cooperate with each other to help improve the efficiency of data detection.
[0052] In some optional implementations, such as Figure 2As shown, the data location unit includes a data storage address list 10131, and the algorithm subunit is further used to read the data to be detected from the storage area corresponding to each storage address in the storage address list in the detected module 102 according to the data storage address list 10131. Among them, the data storage address list 10131 can store multiple data storage addresses in advance, and the algorithm subunit can read the data to be detected from the detected module 102 in sequence and perform operations according to the list. By adopting the data storage address list, this implementation method can enable the algorithm subunit to sequentially extract multiple data to be detected for detection, thereby improving the efficiency of data detection.
[0053] In some optional implementations, such as Figure 4 As shown, the timer 1011 includes a counter 10111, a pre-designed numerical register 10112 and a counter comparator 10113. The counter comparator 10113 is used to compare whether the count value of the counter 10111 is the same as the pre-designed numerical register 10112. If they are the same, a detection signal is output to the calculation unit. The counting method of the counter 10111 can be sequential or reverse. The counter 10111 counts at a certain rate, and when a certain value is reached, it is restored to the initial value. As an example, the counter 10111 can count sequentially from 0, and when the count value reaches the above-mentioned pre-designed numerical value (for example, 10000), a detection signal is output.
[0054] Since the present implementation uses the counter 10111, the pre-designed value register and the counting comparator to realize timing, the accuracy of timing can be improved, which helps to improve the accuracy of data detection.
[0055] In some optional implementations, the algorithm subunit is also used to control the computing unit to enter a dormant state when the detection of the data to be detected is completed. When the computing unit enters the dormant state, the power consumption of the computing unit can be reduced, thereby reducing the power consumption of the entire data detection circuit. Usually, if the current time reaches the above-mentioned detection time period, the computing unit exits the dormant state, and the data detection circuit starts to perform data detection. Based on this, the detection signal output in the above-mentioned optional implementation can be used as a wake-up signal to cause the computing unit to exit the dormant state.
[0056] Exemplary Methods
[0057] Figure 5 is a flow chart of a circuit detection method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied in Figure 1 The data detection circuit shown, specifically, Figure 1 The data detection module 101 shown can perform the following steps:
[0058] Step 501: if the current time point reaches the preset detection time period, based on the data storage address of the detected module, read the to-be-detected data corresponding to the detected module from the storage area corresponding to the data storage address.
[0059] In this embodiment, the data detection module 101 can determine whether the current time point reaches the detection time period based on a timing device included in the data detection circuit or a timing device connected to the data detection circuit. The timing device can be, for example, Figure 2 The timer 1011, counter, clock, etc. shown in the figure. As an example, the preset detection time period can be 1 minute, 1 hour, 1 day, etc., that is, data is detected once in each detection time period. Figure 1 The data storage address of the detected module 102 shown may be preset, for example, a pre-set address list, and the detected module 102 may read the data to be detected from the corresponding storage area in the detected module 102 according to the data storage address included in the address list.
[0060] Step 502: Calculate the data to be detected by using a preset calculation method corresponding to the module to be detected to obtain a first calculation result.
[0061] In this embodiment, the data detection module 101 can use a preset calculation method corresponding to the detected module 102 to perform calculations on the data to be detected to obtain a first calculation result. Among them, the number of the detected modules 102 can be one or more, and each detected module 102 corresponds to a preset calculation method. Generally, the preset calculation method can be embodied in a corresponding algorithm code, that is, the above-mentioned data detection circuit can include a code storage unit, and the data detection module 101 executes the code stored in the code storage unit to complete the calculation. The above-mentioned preset calculation method may include but is not limited to at least one of the following algorithms: CRC8, CRC12, CRC16, CRC32, CRC-CCITT, MD4, MD5, SHA-1, SHA-256, etc.
[0062] Step 503: Determine the fault state of the detected module based on the first operation result and the preset operation result corresponding to the data storage address.
[0063] In this embodiment, the data detection module 101 can determine the fault state of the detected module 102 based on the first operation result and the preset operation result corresponding to the data storage address. Each data storage address can correspond to a preset operation result, and the preset operation result is the result obtained by pre-calculating the data to be detected corresponding to the data storage address using the corresponding preset calculation method, that is, the preset operation result is an accurate result. Usually, the data detection module 101 can compare whether the first operation result is the same as the preset operation result. If they are the same, it means that the data stored in the corresponding storage space is correct, that is, the detected module 102 has not failed, and information indicating that no failure has occurred (such as the number "1") can be output at this time. Otherwise, it means that the detected module 102 has failed, and information indicating that a failure has occurred (such as the number "0") can be output at this time.
[0064] In some optional implementations, the data detection module 101 may determine whether the current time point reaches the detection time period based on the following steps:
[0065] First, determine the magnitude relationship between the count value currently used to record the detection time period and the pre-designed value. The count value can be implemented by software counting or hardware counting. As an example, the data monitoring module can include a hardware counter, which can periodically count at a certain rate.
[0066] Then, if the magnitude relationship indicates that the count value is the same as the pre-designed value, it is determined that the current time point reaches the detection time period. As an example, when counting is performed by the above hardware counter, when the hardware counter count value reaches the pre-designed value, the hardware counter count value can be restored to the initial value.
[0067] This implementation determines whether the detection time period has been reached by periodically counting, which can improve the timing accuracy.
[0068] In some optional implementations, the above step 501 may include the following sub-steps:
[0069] First, determine the data storage address list corresponding to the detected module 102. The data storage address list may be pre-set in the data detection module 101, or may be set in other hardware that is communicatively connected to the data detection module 101. The data storage address list may pre-store multiple data storage addresses.
[0070] Then, the data to be detected is read in sequence from the storage area corresponding to each storage address in the storage address list.
[0071] This implementation method uses a data storage address list to sequentially extract multiple data to be detected for detection, thereby improving the efficiency of data detection.
[0072] In some optional implementations, the data detection module 101 may also enter a dormant state in response to the completion of the detection of the data to be detected, and restart the timing of the detection time period. Usually, after the detection of the data to be detected is completed, the data detection module 101 enters a dormant state, and restarts the timing of the detection time period, and when the next timing reaches a new detection time period, the above steps 501 to 503 are re-executed. This implementation can reduce the power consumption of the hardware by entering a dormant state after the detection of the data to be detected is completed.
[0073] The method provided by the above-mentioned embodiments of the present disclosure reads the data to be detected from the storage area corresponding to the data storage address of the detected module at regular intervals, then uses the preset calculation method corresponding to the detected module to calculate the data to be detected to obtain a first calculation result, and finally compares the first calculation result with the preset calculation result corresponding to the data storage address to determine the fault state of the detected module. Since the fault state of the data to be detected is determined by the first calculation result obtained by the preset calculation method, there is no need to perform data verification by adding hardware, which saves the space occupied by the on-chip system and can also greatly reduce the power consumption of the on-chip system. In addition, since the data to be detected in the storage area corresponding to the data storage address of the detected module is read at regular intervals, and the data to be detected can accurately represent the real information of the detected module, the present disclosure can detect the detected module in a timely and accurate manner, thereby meeting the requirements of functional safety and ensuring the integrity of the stored data about the detected module.
[0074] Further references Figure 6 , shows a flow chart of another embodiment of the circuit detection method. Figure 6 As shown in the above Figure 5 Based on the illustrated embodiment, step 502 may include the following steps:
[0075] Step 5021, determine the type of the module being detected.
[0076] In this embodiment, the data detection module 101 may determine the type of the detected module 102. As an example, the type of the detected module 102 may include but is not limited to at least one of the following: a register, an internal memory, and an external memory.
[0077] Step 5022: Determine a preset calculation method corresponding to the detected module based on the type of the detected module.
[0078] In this embodiment, the data detection module 101 may determine the preset calculation method corresponding to the detected module 102 based on the type of the detected module 102. Each type corresponds to a preset calculation method.
[0079] Step 5023, performing calculation on the data to be detected based on a preset calculation method to obtain a first calculation result.
[0080] In this embodiment, the data detection module 101 can perform calculations on the data to be detected based on a preset calculation method to obtain a first calculation result.
[0081] Above Figure 6 The method provided in the corresponding embodiment can detect various modules to be detected differently by determining the type of the module to be detected and using a preset calculation method corresponding to the type to perform operations, thereby improving the pertinence and accuracy of data detection.
[0082] Exemplary Electronic Devices
[0083] Below, reference Figure 7 The electronic device 700 according to an embodiment of the present disclosure is described as follows. The electronic device 700 may include a data detection module 701 and a detected module 702, and the detected module 702 may be a memory of various types.
[0084] The electronic device 700 can be various electronic devices, including but not limited to embedded chips, boards based on embedded chips, smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers and desktop computers, etc.
[0085] The data detection module 701 may include a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 700 to perform desired functions.
[0086] In one example, the electronic device 700 may further include: an input device 703 and an output device 704, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0087] For example, the input device 703 may be a mouse, a keyboard, a touch panel, a microphone, or other device for inputting various types of data.
[0088] The output device 704 can output various information to the outside, including information used to characterize the fault status of the detected module 702. The output device 704 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0089] Of course, to simplify, Figure 7 Only some of the components related to the present disclosure in the electronic device 700 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 700 may also include any other appropriate components.
[0090] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0091] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0092] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0093] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0094] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0095] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0096] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A circuit detection method, comprising: If the current time point reaches the preset detection time period, based on the data storage address of the detected module, read the to-be-detected data corresponding to the detected module from the storage area corresponding to the data storage address; Using a preset calculation method corresponding to the detected module, the data to be detected is calculated to obtain a first calculation result; Determine the fault state of the detected module based on the first operation result and a preset operation result corresponding to the data storage address, wherein the preset operation result is a result obtained by performing an operation on the data to be detected corresponding to the data storage address in advance using the corresponding preset calculation method, and the preset operation result is stored in a preset operation result register corresponding to the data storage address in a preset operation result register group outside the detected module; The method of using a preset calculation method corresponding to the detected module to calculate the data to be detected to obtain a first calculation result includes: Determine the type of the detected module, where the type of the detected module includes at least one of the following: a register, an internal memory, and an external memory; Determining a preset calculation method corresponding to the detected module based on the type of the detected module; The data to be detected is calculated based on the preset calculation method to obtain a first calculation result.
2. The method according to claim 1, wherein: The method further comprises: Determine the magnitude relationship between the count value currently used to record the detection time period and a pre-designed value; If the magnitude relationship indicates that the count value is the same as the pre-designed value, it is determined that the current time point reaches the detection time period.
3. The method according to claim 1, wherein: The step of reading the to-be-detected data corresponding to the detected module from the storage area corresponding to the storage address based on the data storage address of the detected module comprises: Determine a data storage address list corresponding to the detected module; The data to be detected is read sequentially from the storage area corresponding to each storage address in the storage address list.
4. A data detection circuit, comprising: A data detection module and a detected module, wherein the data detection module is used to: If the current time point reaches the preset detection time period, based on the data storage address of the detected module, read the data to be detected from the detected module; Using a preset calculation method corresponding to the detected module, the data to be detected is calculated to obtain a first calculation result, including: determining a type of the detected module, the type of the detected module including at least one of the following: a register, an internal memory, and an external memory; determining a preset calculation method corresponding to the detected module based on the type of the detected module; and calculating the data to be detected based on the preset calculation method to obtain a first calculation result; Based on the first operation result and the preset operation result corresponding to the data storage address, the fault state of the detected module is determined, wherein the preset operation result is a result obtained by pre-operating the data to be detected corresponding to the data storage address using the corresponding preset calculation method, and the preset operation result is stored in a preset operation result register corresponding to the data storage address in a preset operation result register group in the data detection module.
5. The circuit according to claim 4, wherein: The data detection module includes a timer, a calculation unit, and a data positioning unit; The timer is used to set the detection time period of the data detection module and count the time, and when the counted time reaches the detection time period, output a detection signal for instructing the calculation unit to perform data detection; The data locating unit is used to set the data storage address of the data to be detected; The calculation unit is used to read the data to be detected from the detected module based on the data storage address when the detection signal is detected; use a preset calculation method corresponding to the detected module to calculate the data to be detected to obtain a first calculation result; and determine the fault state of the detected module based on the first calculation result and a preset calculation result corresponding to the data storage address.
6. The circuit according to claim 5, wherein: The calculation unit includes a preset operation result register group, an algorithm subunit, and an operation result comparator, wherein: The algorithm subunit is used for obtaining a data storage address from the data location unit when the detection signal is detected, extracting the data to be detected from the detected module according to the data storage address, and calculating the data to be detected using a preset calculation method corresponding to the detected module to obtain a first calculation result; The preset operation result selection subunit is used to select the preset operation result corresponding to the data storage address; The operation result comparator is used to determine the fault state of the detected module based on the first operation result and the preset operation result.
7. The circuit according to claim 6, wherein: The data locating unit includes a data storage address list, and the algorithm subunit is further used to read the data to be detected from the storage area corresponding to each storage address in the storage address list in the detected module according to the data storage address list.
8. An electronic device, comprising: A data detection module, a detected module, and a memory for storing instructions executable by the processor; The data detection module is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-3 above.
