Checksum Generation

The checksum generation circuit addresses the challenge of diagnosing hard-to-reach internal states by generating and exposing checksums, enhancing diagnostic coverage and reducing development time and overhead in software test libraries.

JP7590809B2Active Publication Date: 2024-11-27ARM LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2019232415
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-01-15
Filing Date
2019-12-24
Publication Date
2024-11-27
Estimated Expiration
2039-12-24

AI Technical Summary

Technical Problem

Existing diagnostic techniques struggle to efficiently cover hard-to-reach internal states in data processing devices, leading to increased development time and overhead in software test libraries, especially for safety-critical applications.

Method used

Incorporating a checksum generation circuit that generates a checksum based on internal states stored in control storage elements, making these states accessible to diagnostic control agents, thereby reducing the need for extensive code coverage and overhead.

Benefits of technology

Enhances diagnostic coverage of hard-to-reach internal states without significant additional circuit overhead, improving the efficiency and effectiveness of software test libraries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007590809000001
    Figure 0007590809000001
  • Figure 0007590809000002
    Figure 0007590809000002
  • Figure 0007590809000003
    Figure 0007590809000003
Patent Text Reader

Abstract

To provide an apparatus with a checksum generating circuitry.SOLUTION: An apparatus has: a processing circuitry 2 to perform data processing in response to instructions; at least one control storage element 74 to store an internal state for controlling operation of the processing circuitry; and a checksum generating circuitry 70 to generate a checksum based on at least one item of the internal state stored in the at least one control storage element 74. The checksum is stored in a diagnostic storage location 72 from which information is accessible to a diagnostic control agent (e.g., software executed on the processing circuitry and / or an external device). This makes design of software test libraries for detecting hardware faults more efficient.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present technology relates to the field of data processing. [Background technology]

[0002] A data processing apparatus may have processing circuitry that performs data processing in response to instructions. The apparatus may also include at least one control storage element that stores internal state for controlling the operation of the processing circuitry. Some such control storage elements may store state that does not directly affect the processing results produced in response to a particular instruction, but may affect the performance achieved when the instruction is processed. Summary of the Invention

[0003] At least some examples provide an apparatus including a processing circuit that performs data processing in response to instructions; at least one control storage element that stores internal state for controlling operation of the processing circuit; and a checksum generation circuit that receives at least one item of internal state stored in said at least one control storage element following processing of a sequence of instructions by the processing circuit and generates a checksum based on the at least one item of internal state, the checksum generation circuit being configured to store said checksum in a diagnostic memory location where information is accessible to a diagnostic control agent, the diagnostic control agent including at least one of software executing on the processing circuit and an external device.

[0004] At least some examples provide a method for diagnostic testing of a device including a processing circuit that performs data processing in response to instructions and at least one control storage element that stores internal state for controlling operation of the processing circuit, the method including the steps of controlling a checksum generation circuit of the device to generate a checksum based on at least one item of internal state stored in the at least one control storage element following processing of a series of instructions by the processing circuit, reading the checksum generated by the checksum generation circuit from a diagnostic memory location accessible to a diagnostic control agent, the diagnostic control agent including at least one of the processing circuit and software executing on an external device, and comparing the checksum read from the diagnostic memory location to a target value to determine whether an event of interest has occurred during processing of the series of instructions by the processing circuit.

[0005] A computer program may be provided to the control device to execute the above-mentioned method. The computer program may be stored in a storage medium. The storage medium may be a non-transitory storage medium.

[0006] Further aspects, features and advantages of the present technology will become apparent from the following description of examples, read in conjunction with the accompanying drawings. [Brief description of the drawings]

[0007] [Figure 1] FIG. 1 illustrates a schematic diagram of an example of a data processing device; [Diagram 2] FIG. 1 illustrates an example of an apparatus having a checksum generation circuit for generating a checksum based on at least one item of internal state. [Diagram 3] FIG. 2 illustrates an example of a checksum generation circuit in more detail. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] For several reasons, it may be useful to provide diagnostic techniques in which information about the functionality of a data processing device is exposed to a diagnostic control agent, such as software running on a processing circuit or an external device. For example, during software development of software intended to run on a particular processor, an external diagnostic device may control a trace module built into the processor to probe aspects of how instructions are executed and identify bugs in the software based on the trace data output by the trace module. Also, once the device is operational in the field, diagnostic means are provided to detect hardware faults that may occur randomly due to aging effects such as electromigration. For example, in some safety-critical applications, it may be desirable to run Software Test Libraries (STLs), also known as Software Built-In Self-Test (SBIST) algorithms, which are run on the processor at boot time or periodically during normal operation to scrub hardware faults, such as gates stuck at 0 or 1.

[0009] It is relatively easy for a diagnostic control agent to detect faults associated with a portion of the processing logic provided to a particular processor, and these faults are visible from the processing results produced by the instructions executed by the processing circuit. However, there may be other elements that store internal state to control the operation of the processing circuit, but are much more difficult to cover with diagnostic algorithms. For example, when developing software code for a software test library, it is relatively easy and cost-effective to write tests that cover a certain portion of the logic (e.g., around 60%), but it becomes increasingly difficult and expensive to increase the coverage to reach 70-80% of the logic. Thus, a large portion of the software development time in developing a software test library may be spent probing this hard-to-reach state. And even if such a hard-to-reach state can be covered, the number of instructions required for the algorithm designed to probe errors in that state may be very large (e.g., many iterations of code loops and time-based measurements are required to probe for errors that may be caused by hardware faults). The need for longer test algorithms increases the latency associated with running the software test library, for example, increasing the period during which the device is not used for testing, and also increases the memory overhead of storing the test code.

[0010] In the techniques described below, a processing device includes a checksum generation circuit that receives at least one item of internal state stored in at least one control storage element following processing of a sequence of instructions by the processing circuit. The checksum generation circuit generates a checksum based on the received at least one item of internal state. The checksum is stored in a diagnostic storage location from which a diagnostic control agent can access the information. The diagnostic control agent may be software executing on the processing circuit and / or an external device.

[0011] Thus, elements of internal state that are difficult to reach with traditional diagnostic methods can be probed with a checksum generation circuit in hardware, and the checksum can be exposed to an external device or to software acting as a diagnostic control agent. By generating a checksum based on the internal state, rather than directly exposing the internal state, the overhead associated with performing error checking on a potentially large amount of internal state can be reduced. The checksum effectively acts as a digest of one or more items of internal state that are passed to the checksum generation circuit to reduce the number of bits that the diagnostic control agent needs to check.

[0012] The checksum generation circuitry therefore allows for an increase in the amount of processing logic that can be covered by a diagnostic scheme without requiring a lot of additional circuit overhead, which can be particularly useful for enhancing the coverage of a software test library for the reasons discussed above.

[0013] In some implementations, the checksum generation circuitry may be specific to a particular item of internal state, so there is no facility to apply the checksum generation circuitry to multiple types of internal state.

[0014] In other instances, the checksum generation circuitry may be able to receive multiple items of internal state from several different control storage elements, thereby allowing for increased coverage of the diagnostic scheme.

[0015] When multiple items of internal state are provided to the checksum generation circuitry, one approach is to generate a checksum based on each of those items, with no ability to select which particular subset of those items to use in calculating the checksum.

[0016] However, it may be useful to provide the checksum generation circuit with a selector that selects at least one item of internal state (from which a checksum will be generated) from among two or more items of internal state received from a number of control storage elements. The selector may select the at least one item of internal state based on a selection control signal that is set by the diagnostic control agent or that is automatically generated based on configuration information set by the diagnostic control agent. This allows the diagnostic control agent to generate a checksum using a particular item of internal state so that it can focus on errors in a particular area of ​​the processing logic for a particular test or investigation. This may allow the location of the error to be more precisely identified.

[0017] In one example, the select control signal may be derived from a select control value stored in a software writeable register, which is useful in supporting the software test library mentioned above, which can write to the software writeable register to select an item of internal state to use in generating a checksum, and then run some tests, capture the correspondingly generated checksum in a diagnostic memory location, read the value from the diagnostic memory location and compare it to an expected value to determine if there was a failure.

[0018] In some examples, the checksum generation circuitry may control whether to update the checksum in response to at least one item of internal state based on a checksum update enable signal set by the diagnostic control agent or generated based on configuration information set by the diagnostic control agent. This allows the diagnostic control agent to configure whether the checksum generation circuitry is active or to specify when the checksum is updated. Again, the checksum update enable signal may be asserted by a circuit that controls the update enable signal based on writes to a software writeable register. When the checksum update enable signal is deasserted, the previous value of the checksum may be retained in the diagnostic memory location without being updated.

[0019] In one example, the diagnostic memory location may be software accessible, accessible by software executed by the processing circuit. This allows the checksum to be readable by software executed by the processing circuit, such as the software test library described above. It may be considered unconventional to expose a checksum generated based on internal state to software in this way. Some systems may already have a checksum generator to protect against transient faults (such as single event disruptions due to cosmic rays or particle strikes), but this is typically used to detect the occurrence of such faults and silently correct the fault in a manner transparent to the software so that processing can continue as if the fault had not occurred. This is quite different from the checksum generators described above, where checksums derived from many internal states are made accessible to software executing on the processing circuit, which may help support more efficient software test libraries that do not require large code sizes to be able to probe for errors in some hard to reach parts of the processing circuit logic.

[0020] In another example, the diagnostic memory location may include a trace buffer used by the trace circuit to store trace data indicative of characteristics of data processing performed by the processing circuit or events occurring during data processing performed by the processing circuit.

[0021] To aid in software development, it may be useful for a processor to include an on-chip trace module that monitors data processing by the processing circuitry and outputs trace packets that indicate particular events that occurred during processing. For example, the trace packets provide trace information that allows a trace analyzer to reconstruct the exact sequence of instructions executed by the processing circuitry when executing the software of a given application. For example, the trace packets may indicate information regarding the outcome of a conditional branch, the occurrence of an exception or interrupt, or data addresses that were accessed.

[0022] By outputting checksums derived from many internal control states in the trace buffer, the trace analyzer can be provided with visibility into events not directly visible from the instruction trace itself, such as performance loss caused by a particular control buffer becoming full. Also, checksums can be derived from specific combinations of items of internal state (internal state from different storage elements, or a sequence of values ​​of internal state from the same storage element captured at different times), allowing more complex combinations of events to be identified from the checksum values, which are analyzed differently than other trace data. This can be useful for setting trace trigger events that trigger diagnostic actions (e.g., switching to debug mode, starting or stopping output of trace data from the trace buffer to an external device) when a particular pattern of trace data is identified. By providing checksums in the trace buffer, the trace trigger events can be conditioned on the checksum satisfying a particular condition (e.g. matching a particular value of interest), allowing more flexibility in supporting additional trigger conditions. This improves the trace analyzer's ability to investigate what is happening when a particular software program is executed.

[0023] The output of the checksum to the trace buffer may be performed in addition to outputting the checksum to the software accessible registers described above, or in some embodiments, only one of the software accessible registers and the trace buffer may be used as the diagnostic memory location to which the checksum is output by the checksum generation circuitry.

[0024] In some implementations, the checksum generation circuit may generate a new value for the checksum using a checksum function that depends on the previous value of the checksum and at least one item of the internal state. Thus, the checksum function may be a cyclic function where the latest value of the checksum is returned as input to the next checksum calculation. For example, the checksum may use a cyclic redundancy check (CRC) function. This may be useful for generating a checksum that depends on a series of values ​​of the internal state recorded over a period of time, since it is possible to check whether an error exists in any of these values ​​by checking a single value of the final checksum. A cyclic checksum generation function may also be useful when deriving a checksum from multiple pieces of different internal state stored in different storage elements. In this case, a cycle may be performed in which a different item of internal state is selected from each storage element using the selector described above, and a single checksum value is calculated repeatedly each time the checksum update wraps around with the next item of internal state until the final checksum depends on all selected items of the internal state, and errors in these items of state may be detected from whether the final checksum matches the expected result. Again, this simplifies the design of a software test library or tracing infrastructure, as fewer bits of state need to be checked to probe for errors or detect trace trigger events.

[0025] In principle, the checksum generating circuitry may be applied to any item of processor state stored in any storage element of the processor. In practice, however, many storage elements within a processor may already be accessible to a diagnostic control agent, such as registers that can be written to or read by software executing on the processing circuitry and that an external diagnostic device can probe using a debug mode. In practice, therefore, it may be useful to apply the checksum generating circuitry to at least one control storage element, in which internal state is stored, that is not accessible to the diagnostic control agent through any mechanism other than the checksum generating circuitry.

[0026] In particular, at least one item of state of the processor may be the microarchitectural state of the processor. Unlike architectural state that must be provided in the processor to be compatible with a given instruction set architecture and that is typically directly readable / writable by software executing in at least one operational state of the processing circuitry, the microarchitectural state is state that is provided in a particular hardware implementation of the processor and is not directly required by the instruction set architecture supported by the processor. Although the microarchitectural state may affect the execution of instructions, instructions cannot directly read or write that microarchitectural state. Such microarchitectural state may be relatively difficult to probe using traditional diagnostic methods for reasons that may be more difficult to diagnose, as errors in such state storage elements may not necessarily result in erroneous processing results, but may cause a loss of performance.

[0027] Examples of such hard-to-reach control storage elements are: a register hazard circuit for storing register trace information for detecting register hazards between respective instructions processed by the processing circuit; a memory hazard circuit that stores address tracking information for detecting address hazards between each memory access request serviced by the memory system; cache buffers (such as linefill buffers or write-back buffers) that store information about requests waiting to be serviced by the cache, data waiting to be allocated in the cache, or data waiting to be written back to memory; a bus control circuit for storing information regarding bus requests made to the bus; a memory controller for storing information regarding memory access requests made to the memory; It may be either of the following.

[0028] Exposing state from one of the types of control storage elements described above to the checksum generation circuitry and making the checksums accessible in software greatly simplifies the design of software test libraries (STLs) and makes STL algorithms more efficient for probing errors in these elements.

[0029] FIG. 1 illustrates an example of components of a processor core 2. The processor core may include a processing pipeline having several pipeline stages, including a fetch stage 4 for fetching instructions from an instruction cache 6, a decode stage 8 for decoding the fetched instructions to identify which processing operations need to be performed and generating control signals for controlling downstream stages of the pipeline to perform the appropriate processing operations, an issue stage 10 for issuing instructions for execution when required operands are available, an execute stage 12 for executing instructions to perform data processing operations on operands read from registers 14 to generate processing results, and a writeback stage 16 for writing the processing results back to registers 14. It should be understood that this is just one example of a potential pipeline architecture, and other examples may have different configurations of pipeline stages. For example, in an out-of-order processor, there may be a register renaming stage for mapping architectural registers specified by the instruction to physical registers 14 provided in the hardware. The execute stage 12 may also be divided into several execution pipeline stages.

[0030] The execution stage 12 includes a number of execution units including, for example, an arithmetic / logic unit (ALU) 20 for performing arithmetic or logical operations, a floating point unit 22 for performing operations involving data values ​​represented as floating point numbers, and a load / store unit 24 for handling memory access operations for loading data from the memory system into the registers 14 and storing data from the registers 14 into the memory system. The memory system may include an instruction cache 6, a data cache 30 (and potentially further levels of cache), as well as the remainder of a memory system 32, which may be located outside the processor core, such as DRAM units or other forms of memory. It will be appreciated that the particular set of execution units 20, 22, 24 and the particular memory hierarchies 6, 30, 32 shown in FIG. 1 are merely examples.

[0031] As shown in FIG. 1, the processor core may include several control storage elements that store items of internal state used to control processing instructions through the processor pipeline. These may be items of microarchitectural state that are not visible to the software instructions executed by the pipeline (i.e., there is no architectural definition in the instructions of the instruction set architecture supported by the processor that requires writing values ​​to or reading from this microarchitectural state). For example, the instruction cache 6 and the data cache 30 may include one or more buffers for buffering requests made to or by the cache, in addition to the cache store 34 that stores the actual data or instructions. For example, the instruction cache 6 may include a request buffer 36 for buffering fetch requests from the fetch stage 4 to fetch instructions from the cache. The data cache 30 may have a similar request buffer 36 for buffering read or write requests made to the cache by the load / store unit 24. The caches 6, 30 may also have a linefill buffer 38 for buffering data or instructions that have been read from the memory system 32 but are awaiting allocation to the cache store 34. Data cache 30 may also include a write-back buffer 40 that buffers requests for data to be written back to memory 32 .

[0032] Another example of a control storage element is register hazard logic 42, which may be used in issue stage 10 to identify read-after-write (RAW), write-after-read (WAR), or write-after-write (WAW) hazards between instructions waiting in the pipeline. For example, the register hazard logic may have a buffer 44 to track register numbers of registers read from or written to by instructions waiting to be issued for execution. The register hazard logic 42 may prevent a subsequent instruction from reading from or writing to the same register as a previous instruction issued for execution until the previous instruction has completed.

[0033] The load / store unit 24 may also be associated with memory hazard logic 46 for detecting data hazards between respective memory access instructions that specify the same address. For example, the memory hazard logic 46 may include a store buffer 48 that tracks addresses of store instructions for which store requests have not yet been issued to the memory system, so that if a subsequent load instruction to the same address occurs, the load can be processed using the data value stored in response to the store instruction, and if a subsequent store instruction to the same address of a previous store occurs, the data values ​​stored in memory of the two store instructions can be combined into a single request to memory. The memory hazard logic may also be used to ensure that memory access requests are processed in the proper order.

[0034] As shown in FIG. 2, the processor core 2 may be included within a larger data processing system and used with an external memory 52. ​​The core 2 may access the memory via a bus unit 54 and a memory controller 56. Although FIG. 2 shows only a single processor core 2 in the system 50, in other examples this may be a multiprocessor system with two or more processor cores communicating via the bus unit 54 and accessing a shared memory 52. ​​Other master devices such as display controllers, graphics processing units, etc. may also be coupled to the bus unit, and the bus unit 54 may also control access to other slave devices such as peripherals. As shown in FIG. 2, there may be further items of internal control state within the bus unit 54 or memory controller 56, such as request queues 60, 62, which buffer requests on the bus or to memory, respectively.

[0035] Thus, there may be many parts of the internal state of the entire system that may store values ​​that affect the processing of instructions in the processor core. Such items of internal state may be vulnerable to hardware failures, e.g., aging effects such as electromigration may cause a particular gate to become stuck at a particular value, such as a binary 0 or a binary 1, causing an incorrect value to be stored in a given part of the internal state. For safety-critical applications, it may be useful to provide a software test library (STL) to probe such hardware failures. However, developing an STL capable of probing the types of internal control state listed above is difficult. Typically, it is relatively easy and cost-effective to write tests that cover around 60% of the logic, but achieving 70-80% coverage is very difficult and expensive.

[0036] As shown in Figure 2, processor core 2 may be provided with a checksum generator 70 that functions as a small internal checksum engine. Various units 74 of processor core 2 and the surrounding processing system (e.g., any of elements 36, 38, 40, 42, 46, 60, 62 described above) may expose multiple bits of their internal state to checksum unit 70. A diagnostic control agent (such as STL software running on processor core 2) may select the particular internal state to use to generate a checksum value using checksum generator 70. The checksum value is stored in a software-accessible checksum register 72, from which it may be read by the STL software and compared to an expected value to identify failures of this hard-to-reach state.

[0037] Thus, hard to reach internal state such as control bits for linefill buffers, identifier bits for bus control units, etc. become visible to the test software. This improves coverage and reduces STL code size and development time, because the hard to reach areas can be tested with far fewer instructions than would be possible using alternative techniques that use multiple loops and expensive time-based checks in the STL to probe these items of internal state.

[0038] 3 illustrates the checksum generation logic 70 in more detail. A selector 80 receives several items 82 of internal state from various control store elements 74, as described above. It will be appreciated that in a given implementation, not all of the above control store elements 36, 38, 42, 46, 40, 60, 62 need provide their values ​​to the checksum generator 70 (the control store element 74 may be a subset of these elements or may include other elements). The selector 80 selects one of these state items to be provided to the checksum calculator 84, and this selection is made based on a selection control signal 86 that is set based on a software-writeable selection control register 88. Thus, the STL code can write a control value to the selection control register 88 to specify which item of internal state should be used to calculate the checksum.

[0039] The checksum calculator 84 calculates a new value for the checksum using a cyclic function that depends on the previous value of the checksum 86 and the selected item of the internal state 88 selected by the checksum 80. Any known checksum function may be used, such as a CRC or similar function. The new value of the checksum is written to the checksum register 72. Whether the checksum register 72 is updated or not depends on a checksum enable signal 90, which again depends on a software-writeable register 92 accessible to software executing on the processor 2. For example, writing to a particular bit of the software-writeable register 92 may trigger the checksum enable signal to be asserted or deasserted depending on the value written to that bit. The checksum register 72 may be implemented as an asynchronously updated register, where each time the checksum enable signal 90 is asserted the checksum value is updated based on the result of applying the checksum function 84 to the previous value of the checksum and the currently selected item of the internal state 89 provided by the selector. Alternatively, the checksum register 72 may be a synchronous register such that when the checksum enable signal 90 is asserted, each rising edge (or each falling edge) of the clock signal triggers the next update of the checksum register, while when the enable signal 90 is deasserted, the register holds its current state regardless of clock pulses of the clock signal.

[0040] Therefore, development of software testing libraries can be greatly simplified by providing a checksum generator in hardware to expose to software a checksum derived from one or more internal states.

[0041] In certain applications, the checksum generator can be used to increase the coverage of the register hazard logic 42, which analyzes the processor pipeline for register hazards and responds to detected hazards by either stalling the pipeline or by transferring data from producer to consumer instructions. Two types of faults can occur in such hazard logic. First, there may be a fault where the hazard logic erroneously determines that there is no hazard, when in fact there is a hazard, for example due to a stuck-on-zero or stuck-on-one error occurring in a storage element of the register tracking buffer 44. The second type of fault may be where the hazard logic 42 erroneously determines that there is a hazard, when in fact there is no hazard. The first type of fault is relatively easy to detect in the STL, since it leads to data corruption. It can be detected using a software-based algorithm for calculating checksums, which are relatively easy and cost-effective to include in the STL. However, the second type of faults are much harder to detect with an STL because, unless a complete deadlock occurs, these faults only cause a slight performance degradation that can be difficult to time and check, since several other factors come into play, such as cache misses. For the second type of faults, the above technique with a checksum generator can be used to expose the internal state of the hazard logic 42 to checksum test hardware. A small piece of code can be executed to identify false hazards by checking that the checksum derived from the register tracking data does not match the expected checksum. This therefore increases the coverage of the second type of faults and may reduce the code size to probe the first type of faults. This can be a significant advantage.For example, in the case of an STL designed to protect against hardware faults in a particular processor design that did not have the checksum generation circuitry 70 described above and that only covered the first type of fault (which caused data corruption) and ignored the second type of fault (which only caused performance degradation), the STL was only able to achieve about 50% coverage of the register hazard logic 42, despite a large portion of the code base being dedicated to it. By including the checksum generation infrastructure 70 in the processor design, coverage of the first type of fault requires much less code, and greater coverage of the second type of fault is also possible. This is just one example, and similar benefits can be obtained by using the checksum generator 70 to examine other items of internal state as described above.

[0042] 2, another way of exposing the checksums generated by the checksum generation circuit 70 to a diagnostic control agent may be to provide the checksums in a trace buffer 100 that may be used by a trace module 102 that monitors the operation of the processor core for diagnostic reasons. A trace module 102 may be provided to aid in software development such that the trace module 102 monitors the operation of the core and outputs trace packets to the trace buffer 100. The trace packets provide information about events that occurred when a given piece of software was executed. For example, the trace data may record information that allows the exact (instruction-by-instruction) sequence of instructions that were executed, for example by tracking the outcome of conditional branches in the executed instructions, and / or the occurrence of exceptions. The trace module may also record data addresses or other information that were accessed. Typically, the trace module is not concerned with the items of microarchitectural state 74 described above that relate to the control infrastructure in the processing circuitry, since these are not expected to reflect program bugs. However, exposing the checksums to the trace buffer may detect certain combinations of events that may help the trace module to take some action when a particular event pattern is detected. Data from trace buffer 100 may be accessible to an external diagnostic device, for example, by reading it via an externally accessible output port. Similarly, an external diagnostic device may configure configuration registers in the trace module to configure settings such as defining trace trigger events to detect and configuring the type of information to be captured in trace buffer 100. Thus, trace buffer 100 is another example of a diagnostic memory location to which checksum generator 70 writes generator checksums and makes them accessible to a diagnostic control agent. While FIG. 2 shows an example in which checksums are written to both checksum register 72 and trace buffer 100, it will be appreciated that other examples may provide only one of these two options.

[0043] In this application, the term "configured to" is used to mean that elements of an apparatus have a configuration that allows them to perform a defined operation. In this context, "configuration" refers to an arrangement or method of interconnection of hardware or software. For example, an apparatus may have dedicated hardware that provides the defined operation, or a processor or other processing device may be programmed to perform the function. "Configured to" does not imply that the apparatus elements need to be modified in any way to provide the defined operation.

[0044] Although exemplary embodiments of the present invention have been described in detail herein with reference to the accompanying drawings, it should be understood that the invention is not limited to those precise embodiments, and that various changes and modifications can be effected therein by those skilled in the art without departing from the scope and spirit of the present invention as defined by the appended claims. [Explanation of symbols]

[0045] 2 processor cores 4. Fetch Stage 6 Instruction Cache 8 Decoding Stage 10 Publication Stage 12 Execution Stage 14 Physical Registers 16 Light Backstage 20 Arithmetic / Logic Unit (ALU) 22 Floating Point Unit 24 Load / Store Units 30 Data Cache 32 Memory System 34 Cache storage 36 Request buffer, control storage element 38 Linefill buffer, control storage element 40 Write-back buffer, control storage element 42 Register hazard logic, control memory element 44 Register Tracking Buffer 46 Memory Hazard Logic, Control Memory Element 48 Store Buffer 50 Systems 52 External memory, shared memory 54 Bath unit 56 Memory Controller 60 Request queue, control storage element 62 Request queue, control storage element 70 Checksum Generator 72 Checksum Register 74 Microarchitectural state, control storage elements, and units 80 selector, checksum 82 Internal state items 84 Checksum function, checksum calculator 86 Checksum, selection control signal 88 Selection control register, internal state 89 Internal State 90 Checksum enable signal 92 Software Writable Registers 100 trace buffers 102 Trace Module

Claims

1. a processing circuit for performing data processing in response to instructions; at least one control storage element for storing an internal state for controlling operation of said processing circuitry, said internal state being a microarchitectural state that is not readable or writable by software executing on said processing circuitry; a checksum generation circuit that receives at least one item of internal state stored in said at least one control storage element following processing of a sequence of instructions by said processing circuit, and that generates a checksum based on said at least one item of internal state; An apparatus comprising: The checksum generation circuitry is configured to store the checksum generated based on the at least one item of internal state in a diagnostic memory location accessible to a diagnostic control agent, the diagnostic control agent including at least one of the software executing on the processing circuitry and an external diagnostic device.

2. the checksum generation circuit includes a selector for selecting at least one item of internal state from a plurality of items of internal state received from a plurality of control storage elements; the selector is configured to select at least one item of the internal state based on a selection control signal set by the diagnostic control agent or generated based on configuration information set by the diagnostic control agent.

2. The apparatus of claim 1.

3. 3. The apparatus of claim 2, wherein the select control signal is derived from a select control value stored in a software-writeable register.

4. 4. The apparatus of claim 1, wherein the checksum generation circuit is configured to control whether to update the checksum in response to at least one item of the internal state based on a checksum update enable signal set by the diagnostic control agent or generated based on configuration information set by the diagnostic control agent.

5. 5. The apparatus of claim 4, further comprising circuitry for asserting the checksum update enable signal in response to a write to a software writeable register.

6. 6. Apparatus according to claim 1, wherein the diagnostic memory location comprises a software accessible register accessible to software executed by the processing circuitry.

7. a trace circuit for monitoring data processing by said processing circuit and outputting to a trace buffer trace data indicative of characteristics of, or events occurring during, said data processing performed by said processing circuit; The apparatus of claim 1 , wherein the diagnostic memory location includes the trace buffer.

8. 8. The apparatus of claim 1, wherein the checksum generation circuitry is configured to generate a new value for the checksum using a checksum function that depends on a previous value of the checksum and at least one item of the internal state.

9. 9. An apparatus as claimed in claim 1, wherein the internal state stored in the at least one control storage element is inaccessible to the diagnostic control agent.

10. The at least one control memory element comprises: a register hazard circuit for storing register trace information for detecting register hazards between respective instructions processed by said processing circuit; a memory hazard circuit that stores address tracking information for detecting address hazards between respective memory access requests serviced by the memory system; a cache buffer for storing information regarding requests waiting to be serviced by the cache, data waiting to be allocated to the cache, or data waiting to be written back to memory; a bus control circuit for storing information regarding bus requests made to the bus; a memory controller for storing information regarding memory access requests made to the memory; 10. The apparatus according to claim 1 , further comprising at least one of:

11. 1. A method for diagnostic testing of a device including a processing circuit for performing data processing in response to instructions, and at least one control storage element for storing internal state for controlling operation of the processing circuit, the internal state being micro-architectural state not readable or writable by software executed on the processing circuit, comprising: The method comprises: controlling a checksum generation circuit of said apparatus to generate a checksum based on at least one item of internal state stored in said at least one control storage element following processing of a sequence of instructions by said processing circuit; reading, by a diagnostic control agent, the checksum generated by the checksum generation circuitry based on the at least one item of internal state from a diagnostic memory location accessible to the diagnostic control agent, the diagnostic control agent including at least one of the software executing on the processing circuitry and an external diagnostic device; comparing the checksum read from the diagnostic memory location to a target value to determine whether an event of interest occurred during the processing of the sequence of instructions by the processing circuit; The method includes:

12. 12. The method of claim 11, further comprising the step of selecting the at least one item of internal state from among a plurality of items of internal state stored in a plurality of control storage elements of the device based on selection control information set by the diagnostic control agent.

13. A computer program for controlling an apparatus to carry out the method according to any one of claims 11 and 12.

14. The computer program of claim 13 , wherein the computer program comprises a Software Test Library (STL) program.

15. A storage medium storing a computer program according to any one of claims 13 and 14.

Citation Information

Patent Citations

  • Method and device for computing incremental checksums

    US20020095642A1

  • Using type bits to track storage of ECC and predecode bits in a level two cache

    US20020199151A1

  • Error protection

    US20170075760A1

  • Register read / write ordering

    US20170083326A1

  • Methods, systems and apparatus for functional safety implementation

    US20190250969A1