Pausing instruction execution

By combining approximate set membership query and confirmation circuits, the debugging process is optimized, the problem of low efficiency in managing debugging interruption points and observation points is solved, and high-efficiency debugging performance and circuit optimization are achieved.

CN123165618APending Publication Date: 2026-11-24ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580031121.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-19
Filing Date
2025-04-04
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

During debugging, adding multiple pause points can cause the circuit to become larger or the debugging process to be slower. Existing technologies struggle to efficiently manage a large number of breakpoints and watchpoints.

Method used

An approximate set membership query is used to initially determine whether to pause the instruction stream. A precise check is only performed after confirmation by the confirmation circuit. The processing flow is optimized by combining speculative execution and memoization techniques.

Benefits of technology

It achieves improved debugging efficiency, reduced processing latency and circuit size, and maintains high-performance debugging while supporting a large number of breakpoints and watchpoints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123165618A_ABST
    Figure CN123165618A_ABST
Patent Text Reader

Abstract

A data processing apparatus is provided, comprising storage circuitry for storing data values ​​derived from a plurality of memory addresses associated with an instruction stream. A membership query circuitry performs an approximate set membership query against the data value at a memory address associated with the current instruction in the instructions, and, in response to an affirmative approximate set membership query, issues a memory address to a confirmation circuit. A pause circuitry pauses the execution of the instruction stream by the processing circuitry in response to at least one condition, the at least one condition including an affirmative indication from the confirmation circuitry that the memory address is one of a plurality of memory addresses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data processing, such as data processing during debugging. Background Technology

[0002] During debugging, it may be desirable to have many pause points (breakpoints or watchpoints). However, adding several such pause points can be problematic and may result in a larger circuit or slower debugging. Summary of the Invention

[0003] According to one example, a data processing apparatus is provided, comprising: a storage circuit configured to store data values ​​derived from a plurality of memory addresses associated with an instruction stream; a membership query circuit configured to perform an approximate set membership query for the data value at a memory address associated with a current instruction in the instruction, and, in response to an affirmative approximate set membership query, issue the memory address to a confirmation circuit; and a pause circuit configured to pause the execution of the instruction stream by the processing circuit in response to the satisfaction of at least one condition, the at least one condition including an affirmative indication from the confirmation circuit that the memory address is one of the plurality of memory addresses.

[0004] According to one example, a method is provided, the method comprising: storing data values ​​derived from a plurality of memory addresses associated with an instruction stream; performing an approximate set membership query for the data value of a memory address associated with a current instruction in the instruction, and issuing the memory address to a confirmation circuit in response to the approximate set membership query being affirmative; and suspending the execution of the instruction stream by a processing circuit in response to the satisfaction of at least one condition, the at least one condition including an affirmative indication from the confirmation circuit that the memory address is one of the plurality of memory addresses.

[0005] According to one example, a non-transitory computer-readable medium for manufacturing a data processing apparatus for storing computer-readable code is provided. The data processing apparatus includes: storage circuitry configured to store data values ​​derived from a plurality of memory addresses associated with an instruction stream; membership query circuitry configured to perform an approximate set membership query for the data value at a memory address associated with a current instruction in the instruction stream, and, in response to an affirmative approximate set membership query, issue the memory address to a confirmation circuitry; and a pause circuitry configured to pause the execution of the instruction stream by the processing circuitry in response to the satisfaction of at least one condition, the at least one condition including an affirmative indication from the confirmation circuitry that the memory address is one of the plurality of memory addresses.

[0006] According to one example, a system is provided, comprising: a data processing apparatus according to any one of claims 1 to 16, the data processing apparatus being implemented in at least one packaged chip; at least one system component; and a board, wherein the at least one packaged chip and the at least one system component are assembled on the board.

[0007] According to one example, a chip-containing product is provided, which includes the system of claim 19, wherein the system is assembled on an additional board together with at least one other product component. Attached Figure Description

[0008] The invention will be further described by way of example only, with reference to embodiments illustrated in the accompanying drawings, wherein:

[0009] Figure 1 The apparatus is illustrated according to some examples;

[0010] Figure 2 An example of a pipelined verification circuit is shown;

[0011] Figure 3 This illustrates an example of how approximate set membership queries might work;

[0012] Figure 4 This illustrates how to use a confirmation circuit to test for correct set membership;

[0013] Figure 5 A flowchart is shown that allows for further improvements to the performed checks;

[0014] Figure 6A This illustrates one way to improve the previously described process using page tables;

[0015] Figure 6B Examples are shown that allow the use of multiple data values;

[0016] Figure 6C An example of dynamically constructing the data value 34 is shown;

[0017] Figure 7 An example of using speculative execution is illustrated, which can be used to improve execution when querying a confirmation circuit, which is typically slow.

[0018] Figure 8 A flowchart that can be used for memoization is shown; and

[0019] Figure 9 A flowchart illustrating the overall process of data processing based on some examples is shown; and

[0020] Figure 10 The device is shown located on one chip or distributed across two or more chips. Detailed Implementation

[0021] Before discussing the implementation scheme with reference to the accompanying drawings, the following description of the implementation scheme is provided.

[0022] A data processing apparatus is provided, comprising: a storage circuit configured to store data values ​​derived from a plurality of memory addresses associated with an instruction stream; a membership query circuit configured to perform an approximate set membership query for the data value of a memory address associated with a current instruction in the instructions, and, in response to an affirmative approximate set membership query, issue a memory address to an acknowledgment circuit; and a pause circuit configured to pause the execution of the instruction stream by the processing circuit in response to the satisfaction of at least one condition, the at least one condition including an affirmative indication from the acknowledgment circuit that the memory address is one of a plurality of memory addresses.

[0023] This technique recognizes that, for example in a debug system, it might be desirable to pause instruction flow execution based on the memory address associated with one instruction in the instruction set. However, checking every memory address associated with each instruction against a list of “pause” addresses can be problematic. Specifically, checking each address serially is very time-consuming and significantly slows down instruction flow execution since such checks may have to be performed for every instruction. On the other hand, allowing all checks to occur in parallel would result in an extremely large circuit size. This technique addresses this problem by using an approximate set membership lookup. A set membership lookup is approximate, not perfect (i.e., whether a particular address is in the set of “pause” addresses). It will indicate whether the address is (a) not in the set or (b) likely to be in the set. If the address is not in the set, execution can continue. If the address is likely to be in the set, a more thorough / accurate set membership lookup can be performed using verification circuitry. This is particularly convenient because, although a more thorough / accurate set membership lookup performed by verification circuitry may be slow, this is generally not a problem if the instruction is the one that caused the pause. Furthermore, if the correct matching query is only executed infrequently, it may be irrelevant even if it is run unnecessarily (i.e., for addresses that are not actually in the paused address set). Importantly, set membership queries can be designed to both limit the theoretical probability of false positives (the query result is returned as possibly in the set, even though it was never previously added) and execute faster than a more accurate check performed by the confirmation circuit, even for a large set. Moreover, it can be performed on large sets without requiring significant circuitry. Therefore, in general, this allows for a pause when any address in a large set of addresses is encountered. Note that the term "affirmative" in this context refers to the meaning of affirmation in the context of an approximate set membership query and indicates the opposite of a negative result. It does not assign any element of determinism, and in fact, an approximate set membership query may not indicate determinism with an affirmative result. That is, an affirmative result may be "possible," unlike a negative result "no."

[0024] In some examples, memory addresses include the program counter values ​​of those instructions that set breakpoints. A breakpoint is a point in a program where the programmer expects execution to pause, for example, to allow analysis of the system's state, such as the values ​​held by specific variables. Therefore, the memory address associated with an instruction can include the program counter value of the specific instruction to be stopped. The program counter value is a memory address because it is the location in memory where the specific instruction is stored.

[0025] In some examples, a memory address includes a location within memory where an instruction with a watchpoint set for makes a data access request. A watchpoint can be set for a specific variable, which will cause the program to pause execution when the variable changes (or more likely, when one or more conditions set for the variable are met, such as when the variable exceeds a threshold). Here, the memory address associated with the instruction can be the memory address accessed (e.g., read or written) by that instruction, where the memory address corresponds to the location in memory where the variable is stored.

[0026] In some examples, the data processing apparatus includes a verification circuit configured to store additional data values ​​indicating multiple memory addresses. This data value may, for example, be a list of memory addresses to be suspended. In this example, the verification circuit includes hardware that performs a verification check.

[0027] In some examples, in response to an affirmative approximate set membership query, the membership query circuit is configured to signal to the acknowledgment circuit; and the signal receiving routine at the acknowledgment circuit is configured to determine whether the memory address is among multiple memory addresses. In these examples, the acknowledgment circuit may take the form of a processing circuit that executes software (the signal receiving routine) to perform the acknowledgment of set membership.

[0028] In some examples, at least one of the membership query circuitry and the confirmation circuitry is configured to return a negative result in response to a memory address being below a lower limit, indicating that the memory address is not a memory address within a memory address set. A further check that can be performed is whether the memory address is below the lower limit. This reduces the need to perform approximate set membership queries or confirmation checks from the confirmation circuitry, and at least one of the membership query circuitry and the confirmation circuitry may therefore not actually perform any checks. Furthermore, this limit can be used to provide control over data values. Specifically, if it is known that a memory address will not be in a large region of the memory space that will not be used, this can be handled by a range check rather than using the data value. Therefore, the data value will only have to span a smaller address space, which makes it possible to improve the accuracy of approximate set membership queries, provided it is generated appropriately. For example, bits in the address space that will never contain any memory address can be ignored when generating and querying data values. Therefore, the lower limit can be the bottom or top of a page.

[0029] In some examples, at least one of the membership query circuit and the acknowledgment circuit is configured to return a negative result in response to a memory address being above the upper limit, indicating that the memory address is not a memory address within a memory address set. As explained above, by checking the boundaries of the memory address, checks that might otherwise be performed (i.e., performed by the acknowledgment circuit or the membership query circuit) can be reduced, and the accuracy of data values ​​when performing approximate set membership queries can be potentially improved. As explained above, the upper limit can be the bottom or top of a page.

[0030] In some examples, at least one of the membership query circuit and the confirmation circuit is configured to return a negative result based on memory page metadata of the memory address, indicating that the memory address is not a memory address within a memory address set. In some examples, the output of the confirmation circuit and / or the membership query circuit is affected by memory pages containing memory addresses.

[0031] In some examples, the data processing apparatus includes page table circuitry configured to store multiple page table entries, wherein each page table entry is configured to store an indication of whether a corresponding memory page contains one of the memory addresses in the memory address set. One way to associate a page with an approximate membership set query and / or a membership query is to store data in a page table. A page table entry typically relates to a memory page, which itself may cover multiple memory addresses. Within the page table entry, a bit may be provided to indicate whether the page contains one of the memory addresses in the memory address set. For example, a value "1" may indicate that the page does indeed contain the address covered by the data value, while "0" may indicate otherwise. In this way, further confirmation that a particular address may be among multiple memory addresses can be provided without performing a full membership test. For example, if an approximate set membership query indicates that a memory address could be one of multiple addresses, the relevant memory page can be checked before the query confirmation circuitry (which can be time-consuming). If the page table entry of a page containing a memory address indicates that the page does not contain a memory address that is a memory address among memory addresses, then no acknowledgment circuit is needed; otherwise, the acknowledgment circuit can be queried with greater confidence that the memory address is a memory address among memory addresses.

[0032] In some examples, the data processing apparatus includes: page table circuitry configured to store a plurality of page table entries, wherein a membership query circuitry is configured to perform an approximate set membership query for a plurality of data values, including data values; and the page table entries include a hint indicating that an approximate set membership query will be performed on the set of data values ​​for a memory address. Therefore, each page table entry may include an indicator that provides a hint about which data value should be used for the approximate set membership query. This can be implemented, for example, as a bit field indicating which data value(s) should be used for the approximate set membership query. This allows the accuracy of the approximate set membership query to be extended by reducing the number of entries within each data value.

[0033] In some examples, the data processing apparatus includes an update circuit configured to store the results of one or both of a membership query circuit and a confirmation circuit for one of the page tables in response to the execution of an instruction corresponding to a page table in the page table. Thus, the update circuit can be used to indicate the results of approximate membership queries and / or membership queries, allowing such analysis to be performed in advance. This reduces the impact of set membership queries performed using the confirmation circuit, which indicate that a memory address is not a memory address for which execution should be paused. Since the membership check is time-consuming, performing it at a time when it may have little impact on processing and storing the results for later use can help improve processing throughput. The results of these membership checks can be stored, for example, in page table entries, such that if an address in a particular page is determined to return a positive result (from an approximate membership query and / or membership query), that page is updated.

[0034] In some examples, in response to a memory address being sent to the acknowledgment circuit, the data processing device is configured to enter a speculative operating mode, in which instructions following the current instruction in the instruction set are speculatively executed until a response is received from the acknowledgment circuit. As already noted, the acknowledgment circuit may require time to provide an answer to a set membership query—that is, to confirm (in a deterministic manner) whether the memory address is one of the memory addresses that would cause a pause in execution. Therefore, speculative execution of subsequent instructions can begin instead of terminating execution until the query is resolved. If the result is that the memory address is not one of the memory addresses that would cause a pause in execution, there is almost no performance penalty—the speculative execution instructions simply need to be submitted. However, if the memory address is determined to be one of the addresses that would indeed cause a pause in execution, then execution will pause in any case, and the fact that subsequent instructions have not been executed is not harmful.

[0035] In some examples, the data processing device is configured to perform a rollback on those instructions that have been speculatively executed, following the current instruction in the instruction set, in response to a confirmation circuit determining that the memory address is a memory address within a memory address set. In the case of speculative execution, determining that a pause should have occurred would have resulted in a rollback, causing the speculatively executed instructions not to actually be executed.

[0036] In some examples, the data processing apparatus includes cache circuitry, wherein at least one of a membership lookup circuitry and a confirmation circuitry is configured to, in response to a cache miss, determine whether a given memory address is in a plurality of memory addresses whose contents are stored in the cache circuitry. The cache can be, for example, an instruction cache. In this case, a cache miss typically requires fetching additional instructions into the cache so that they can be decoded and executed, and this usually indicates a processing gap. Therefore, this provides the opportunity to perform approximate set membership looksup and / or set membership looksup without negatively impacting processing performance. Alternatively, the cache can be a data cache, wherein filling the data cache (in response to a miss) results in testing the addresses of the data in the cache to determine whether they are in addresses where a pause should (potentially) be invoked.

[0037] In some examples, cache circuitry is configured to store indications of whether a given memory address lies within multiple memory addresses. Therefore, set membership can be indicated for each instruction at a convenient time, without requiring a (approximate) set membership lookup at execution time. Alternatively, membership (or approximate membership) can be computed in advance, and the indications of membership can be stored in a cache, making such (approximate) membership readily available at execution time, thus reducing any processing latency.

[0038] In some examples, the data processing apparatus includes a loading circuit configured to replace a data value in a membership query circuit with a subset of bits of a memory address. This allows a data value to be loaded, and an approximate set membership to be established for that new value. This enables the storage and use of multiple distinct data values, which in itself means that each data value can be encoded using a smaller number of memory addresses. Therefore, the chance that the approximate set membership query will indicate that an address is one of multiple addresses when the address is not one of multiple addresses can be reduced.

[0039] In some examples, the membership query circuit is configured to use at least one of a Bloom filter, a Cuckoo filter, an XOR filter, or a decision tree. A decision tree may not be a complete decision tree, meaning it doesn't provide a definitive answer about whether a memory address is within multiple memory addresses. Instead, it provides some—but not all—information about set membership. For example, it might indicate that a given memory address is not in the set or might be in the set. In other examples, it might indicate that a given memory address is in the set or might be in the set. The same applies to Bloom filters, Cuckoo filters, and XOR filters; the details of which will be known to those skilled in the art.

[0040] The specific implementation scheme will now be described with reference to the accompanying drawings.

[0041] Figure 1 An apparatus 2 is illustrated according to some examples. The apparatus includes a production line 6. Note that the specific components of the production line are irrelevant here, and Figure 1 The representations shown are provided by way of example only. Within the pipeline, instructions are fetched by fetch circuit 8 and decoded into one or more control signals by decode circuit 12. Renaming may optionally occur at rename circuit 14 to remove spurious data dependencies, and then issue circuit 16 queues control signals corresponding to instructions to be executed by one or more execution circuits 18. In this example, the execution circuits include an arithmetic logic unit 20 for performing arithmetic and logical operations, a pair of floating-point units 22, 24 for performing floating-point operations, a branch unit 26 for performing branch operations, and a load / store unit 28 for accessing memory (not shown). The execution unit 18 illustrated here is merely an example, and other or additional units may exist, and some units may be omitted. The write-back circuit 30 is then responsible for appropriately writing the data back (e.g., back to a register).

[0042] Figure 1Source code 4, which can be executed on device 2, is also illustrated. The nature of the example code is not important, but in this case, it outputs prime numbers in ascending order, along with the sum of the prime numbers encountered so far. While developing this code, the programmer might want to debug it—for example, if the program behaves contrary to its intended behavior. This can be done in two ways: by setting a breakpoint 40 (indicated by an asterisk in the source code) and an observation point (indicated by an underscore in the source code). A breakpoint pauses the execution of the program, allowing the current state of the system to be examined. For example, the value of a specific variable can be examined. An observation point pauses the execution of the program when the specified variable changes (or potentially when it changes to a given value, within a specific range, etc.). In both cases, the user is able to step through the program approximately one instruction at a time to see how the state of the system changes after each instruction is executed. Therefore, both observation points and breakpoints are associated with memory addresses. In the case of a breakpoint, the memory address is the program counter address (e.g., a virtual address) of the instruction with the breakpoint. In the case of an observation point, the memory address is the memory address associated with the variable.

[0043] Programmers may expect to be able to set a large number of breakpoints and watchpoints. In practice, this can be achieved by completely emulating the program in software, but this is slow and resource-intensive. However, problems arise when there are a large number of breakpoints / watchpoints in the case of a hardware debugger. Specifically, at the time of each instruction execution, it is necessary to compare the program counter value with the breakpoint list to see if execution should pause. This can potentially be achieved by checking the breakpoint list serially. However, this will result in a long delay at the time of each instruction execution. Alternatively, each breakpoint in the breakpoint list can be checked simultaneously in parallel. However, this requires a large amount of hardware. In each case, the slowness or circuit size is affected by the maximum number of possible breakpoints rather than the number of breakpoints actually used. Therefore, even with a small number of breakpoints, the program will be debugged slowly or still require a large circuit. These difficulties can be mitigated by allowing only a small number of breakpoints, but this is inconvenient for debugging. A similar situation applies to watchpoints. Specifically, each memory access will also be tested to see if the accessed address is a variable in a specified variable list. This again requires either serial checking (slow) or parallel checking (large circuit size). More complex data structures can also be used, such as performing tree-like comparisons on sorted arrays. However, in practice, this can still be time-consuming and requires storing memory addresses in a specific way, which can make adding and deleting such addresses both time-consuming and cumbersome.

[0044] The inventors of this technology have recognized that one way to solve this problem is to perform an initial approximation check, which generates an initial estimate of whether an address will cause a pause. Only if this check passes is a confirmation check performed (e.g., serially). This reduces the number of slowdown scenarios.

[0045] In the current example, the approximate check (approximate set membership check) is implemented by the approximate membership query circuit 32. This circuit 32 maintains data values ​​34 derived from the complete set of memory addresses 38 from which a pause is to be performed. The check is approximate in the sense that it does not return an explicit yes / no. Instead, one of the results it returns is "possible." For example, a positive result might be "possible," while a negative result might be "no." Therefore, it can be determined that the address should not cause a pause (allowing execution to continue). If the approximate membership query circuit 32 indicates that a given address is likely one of the addresses from which a pause should occur, this can be confirmed via the confirmation circuit 36 ​​for one or more values ​​38 that provide an explicit answer. Importantly, the approximate membership query circuit 32 is able to provide results much faster than the confirmation circuit 36, thus significantly reducing any slowdown.

[0046] The confirmation circuit 36 ​​can take many different forms. Figure 1 In this example, the verification circuit is shown as dedicated hardware that can form part of a hardware debugger. However, in other examples, the verification circuit 36 ​​can take the form of software, for example, that executes within pipeline 6.

[0047] A pause circuit 40 is provided that suspends pipeline execution in response to an affirmative indication from the confirmation circuit 36. This can take the form of a simple flag indicating, for example, whether an instruction should be issued to the execution unit. In some embodiments, the pause circuit 40 can pause the entire pipeline. Of course, other techniques will be known to those skilled in the art.

[0048] In practice, a pause can also depend on other parameters. That is, in addition to the instruction being the one that should cause a pause, further requirements may be needed. For example, in some cases, a pause can be conditional on the value of a variable.

[0049] Figure 2 An example of the confirmation circuit 36 ​​in the form of pipeline 6 is shown. An exception is signaled when the approximate membership query circuit 32 provides a positive result, indicating that a given address is likely one of the addresses that should cause a pause. This then leads to a call to interrupt service routine 100, which (in software) determines whether the address is one of the addresses that should cause a pause. Figure 2In the example, the check performed is whether the current program counter value is in the breakpoint list. However, it will be understood that the full interrupt service routine will also verify whether the address currently being accessed is an observation point among the specified observation points. In either case, if the explicit check returns a positive result, the call is paused; otherwise, the indication from the approximate membership query circuitry is a false alarm, and execution should resume.

[0050] For completeness, it will be understood that this operation does not need to be performed at the operating system level, and the process can instead be primarily (or entirely) performed in user space. For example, a signal can be sent to a debugger (running in user space) to perform a software check on whether a pause should be invoked.

[0051] Figure 3 An example of how approximate set membership queries might work is shown. Figure 3 The example shown uses a Bloom filter. However, other techniques such as cuckoo filters, XOR filters, and even decision trees can be used to provide approximate set membership query results. It will also be understood that there are multiple ways to implement a Bloom filter, and... Figure 3 A specific example is shown.

[0052] exist Figure 3 This example implements several hash functions. For ease of observation, in this example, the first hash filter returns only the last hexadecimal digit of the address, and the second hash filter returns only the second-to-last hexadecimal digit of the address. Those skilled in the art will understand that these particular hash functions are not necessarily ideal, but are provided for comprehension purposes.

[0053] For a given address to be added to the Bloom filter, each hash function operates on the memory address. Therefore, this returns two hashes. For example, in the case of address 0x14AC, it returns hashes "C" and "A". These hashes are then logically ORed with the data value 34 representing the Bloom filter to provide the corrected Bloom filter data value 34'. In this example, it can be seen that in the corrected data value 34', the bits at indices 10 (A) and 12 (C) have been padded.

[0054] In the next step, address 0xE730 is added. In this case, the hash is 0 and E, so these bits are logically ORed with the latest version of the data value 34' representing the Bloom filter to provide a further modified Bloom filter data value 34'', where each of the bits at indices 0, 3, 10, and 12 has been marked.

[0055] To test membership, the same hash function is applied to the queried data value. For example, querying address 0x92CF produces hashes F and C. The bit at index F(15) is not marked in the Bloom filter data value 34'', so the value definitely does not exist in the Bloom filter. Conversely, data value 0xE730 (which was previously added) produces hashes 0 and 3. Both bits are present, so the value may exist within the Bloom filter data value 34''. As another example, data value 0x29A3 produces hashes 3 and A. The positions of both bits are marked in the Bloom filter, so address 0x29A3 may exist. In fact, it is not (this is not an address among the added addresses), demonstrating that the Bloom filter does not provide determinism when providing positive results.

[0056] This also indicates that a confirmation check should be performed to verify that the data value is part of the membership set. However, since hashing an approximate membership set can be performed much faster than testing each address against a list of addresses, the number of cases requiring an exact membership test can be significantly reduced.

[0057] The number of false positives can be improved by appropriately selecting the hash function (and the number of hash functions) and by choosing the size of the Bloom filter data value (34''). For example, a 768-bit filter using 16 different hash functions might expect a false positive rate of 9.5E-14 when the filter contains 8 elements, and still only expects a false positive rate of 0.098 when the filter contains 96 elements.

[0058] Other approximate set membership operations can also be selected, such as the cuckoo filter, XOR filter, and decision tree.

[0059] Figure 4 The following example illustrates how to use the verification circuit 36 ​​to test for correct set membership. In this example, having been notified that the approximate set membership query returned a positive result (“probably”), it is necessary to compare the address with memory address 38 to determine if the suspicious address is one of address 38. In this example, address 0x92CF is tested against the list (containing 0x14AC, 0xE730, and 0x92CF), and a hit occurs at this latter address. Therefore, a pause should occur.

[0060] The check via verification circuit 38 can be improved by using cache 300. In this example, breakpoint cache 300 stores recently used breakpoints under the assumption that recently used breakpoints may be used again soon. Therefore, in parallel with check verification circuit 36, breakpoint cache 300 can also be checked to see if the incoming address matches the recently used address. In other embodiments, breakpoint cache 300 is checked before check verification circuit 36. Also in other embodiments, cache 300 stores watchpoints. In other embodiments, a separate cache is used to store watchpoints to limit breakpoint replacements. Note that in most cases, cache 300 is expected to be smaller and faster than check verification circuit 38.

[0061] Figure 5 Flowchart 400 is shown, illustrating further improvements in the performed checks. Specifically, it is recognized that upper and lower thresholds can be provided to “definite” the checks performed. For example, if the known data value 34 does not contain any address within a specific space, or if the known list of memory addresses does not contain any address within a specific space (e.g., below the lower limit or above the upper limit), a check can be performed to avoid having to check the data value or perform verification using verification circuitry 36.

[0062] At step 402, a new memory address is received. This could be because the address is the address of a new instruction being executed, or because it is related to a memory address being accessed. In either case, at step 404, it is determined whether the address is below a lower threshold. If so, execution continues at step 406 because neither the Bloom filter nor the list of addresses 38 can cover the memory address. If the address is not below the lower threshold, at step 408, it is determined whether the address is above an upper threshold. If so, execution continues at step 410 because the address cannot be one of the addresses that would cause a pause. Otherwise, at step 412, an approximate set membership query is performed as previously discussed. If, at step 414, the query result is not affirmative (e.g., if the result is "No"), execution continues at step 416. Otherwise, if the result is affirmative (e.g., the result is "Possibly"), at step 418, a full set membership query is performed using acknowledgment circuit 36. If the query result is affirmative (e.g., "Yes"), execution pauses at step 424. Otherwise, the result is "No", so execution continues at step 422.

[0063] Figure 6A This illustrates one way to improve the previously described process using page tables. Figure 6AIn page table 504, each entry contains an add bit (H) that indicates whether the corresponding page contains a breakpoint or the address of an object that serves as an observation point. As an additional check—before querying the approximate membership query circuit 32 or before querying the confirmation circuit 36—the page table entry is checked to see if this bit is set (e.g., 1). If not, no further check is required because it is known that the current address to be queried is not the address where a pause should be invoked.

[0064] In this example, an update circuit 500 is also provided. This allows for "memorization," in which approximate set membership queries and actual set membership queries are pre-executed before the instructions are executed and stored in page table entries.

[0065] Figure 6B An example is shown that allows multiple data values. Specifically, in Figure 6B In the table, each page table entry indicates which data value should be used for a query related to that specific page. Figure 6B The page table provides a four-bit value that allows selection of up to 15 different data values. However, a simpler implementation uses only the position of each bit to indicate which data value to use. That is, 0001 indicates the first data value, 0010 indicates the second data value, and so on. The value "0000" is reserved for "no data value," i.e., because the page does not contain any breakpoints or observation points. Regardless of the encoding used, the loading circuit 502 is then provided to update the data value 34 in the approximate membership query circuit 32 with the data value selected according to the page table entry.

[0066] It should be understood that by providing multiple different data values ​​that can be swapped in / out, the number of entries stored within each data value (i.e., the number of breakpoints / observations per data value) can be reduced. In this way, the number of false alarm instances can be reduced, that is, the number of times the acknowledgment circuit 36 ​​is queried for addresses where a pause should not occur.

[0067] Figure 6C An example of dynamically constructing data value 34 is illustrated. In this example, each page table entry contains its own data value used for an address within that page. Each data value is generated using the same set of hash functions and has a Bloom filter of the same length. Therefore, they can be logically ORed together. Data value 34 can then be constructed by logically ORing together all data values ​​associated with a memory page, such as instructions in an instruction cache.

[0068] In this example, the instruction cache may contain instructions associated with page 0xEF14, which also contains memory accesses to addresses in page 0x2197. Therefore, the data values ​​can be logically ORed together to produce a combined Bloom filter 00111110. This is then provided by load circuitry 502 as updated data value 34 for executing instructions in instruction cache 10. Since it is (at least) impossible to hit a breakpoint on an instruction not in instruction cache 10, the data value can be limited to the currently executing address.

[0069] Note that if the breakpoint or watchpoint changes, instruction cache 10 will be flushed (or at least, the comment will be reset to "1").

[0070] Note that in many of the above cases, the memory addresses 38 used by the verification circuit 36 ​​can also be dynamically loaded. Specifically, the verification circuit 36 ​​can store a subset of addresses, rather than the complete list of addresses 38, where the loading circuit 502 is configured, for example, to load those addresses used to generate replacement data values ​​into the verification circuit 36. This can help improve the speed of the verification circuit 36.

[0071] Figure 7 An example of using speculative execution is illustrated, which can be used to improve execution when querying acknowledgment circuit 36, which is typically slow. At step 602, an instruction is received. At step 604, it is determined whether the approximate set membership query is affirmative. If yes, then at step 606, speculative mode is activated, and a query is sent to the acknowledgment circuit to determine whether the address in question is one of the addresses that should cause a pause. The process then proceeds to step 610, where the flow also proceeds if the approximate set membership query is negative. At step 610, it is determined whether speculative mode is active—whether due to recent activation or prior activation. If speculative mode is active, then at step 612, the current instruction is executed speculatively. Otherwise, at step 614, the instruction is executed non-speculatively. In either case, at step 618, it is determined whether a result has been received from the acknowledgment circuit. If no, the process returns to step 602 to obtain the next instruction. If yes, speculative mode ends at step 618. The process then determines whether the result is positive. If not, the process simply returns to step 602, since the execution should not cause a pause. Therefore, any speculatively executed instructions are committable—they are speculatively executed in an appropriate manner. Otherwise, at step 622, a rollback occurs by flushing the pipeline, thus "undoing" the speculative execution of instructions that should not have occurred. A pause then occurs at step 624.

[0072] As described above, when the confirmation circuit is queried, subsequent instructions are executed speculatively. Therefore, if the result is no pause, there is almost no processing time loss. Conversely, if a pause is to occur (which can be determined after some time due to the relatively slow nature of confirmation circuit 36), the pipeline can be simply refreshed. Since a pause would have been necessary, no processing time is lost.

[0073] Notice, Figure 7 The flowchart 600 shown does not directly represent the operation of the circuit, but rather the overall behavior of the system. In practice, the steps shown in flowchart 600 can actually be distributed across many different systems (and even run independently).

[0074] Figure 8 A flowchart 700 that can be used for memoization is shown. At step 702, all instructions (e.g., in the instruction cache) are initialized, for example, with "1". At step 704, the next instruction is fetched, and at step 706, it is determined whether the annotation is "0". If so, it has been previously determined that the instruction is not a breakpoint / observation point, so the instruction is simply executed at step 708. The process then returns to step 704, where the next instruction is fetched. Otherwise, if the annotation is not 0 (e.g., is 1), then at step 710, approximate set membership is tested. If this is not affirmative at step 712, then the annotation is updated to "0" at step 714, and the flow proceeds to step 708, where the instruction is executed. If the result is affirmative, then at step 716, full set membership is checked. If the result is not affirmative, the flow proceeds to step 714, where the annotation is updated to "0". Otherwise, a pause occurs at step 720 (and the annotation remains "1").

[0075] In this way, over time, the comments reflect whether the instruction was determined to be an observation point / breakpoint (1) or not (0). Instead of performing a formal check every time, the comments are checked. If the comments are provided, for example, in instruction cache 10, this can be determined much faster than checking the data value 34 every time.

[0076] Figure 9A flowchart 800 illustrating the overall process of data processing based on some examples is shown. At step 802, data values ​​are stored. These data values ​​are derived from addresses where a pause should occur (e.g., breakpoints and points where the observed data values ​​might change). At step 804, the next instruction is obtained. Then, at step 806, an approximate set membership query is performed. The approximate set membership query can be performed quickly but only provides an initial estimate of whether the address is in the set of breakpoints / observations. That is, it returns, for example, "possibly" or "no," rather than "yes" or "no." If the result is "no," the instruction is executed at step 810. If the result is "possibly," confirmation is sought from the confirmation circuit at step 812. This check is expected to take longer, but the frequency of false alarms (where hits occur in the approximate set membership query but not in the confirmation circuit) is expected to be low. Therefore, this slow query is expected to occur primarily in cases where a pause would occur anyway. After the query is sent to the confirmation circuit at step 812, the result is checked at step 814. If the result is "No", meaning the address is not the address where a pause should occur, then the instruction is executed at step 810. Otherwise, a pause occurs at step 816.

[0077] Therefore, it can be seen that it can support a large number of breakpoints / watchpoints, while still allowing for fast debugging using hardware.

[0078] The concepts described herein can be embodied in computer-readable code used to manufacture devices embodying the described concepts. For example, the computer-readable code can be used in one or more stages of the semiconductor design and manufacturing process, including the electronic design automation (EDA) stage, to manufacture integrated circuits that include devices embodying these concepts. The aforementioned computer-readable code can additionally or alternatively enable the definition, modeling, simulation, verification, and / or testing of devices embodying the concepts described herein.

[0079] For example, computer-readable code used to manufacture a device embodying the concepts described herein can be embodied in code that defines the hardware description language (HDL) representation of these concepts. For instance, the code can define register-transfer level (RTL) abstractions of one or more logic circuits to define a device embodying these concepts. The code can define HDL representations of one or more logic circuits embodying the device using Verilog, SystemVerilog, Chisel, or VHDL (Very High Speed ​​Integrated Circuit Hardware Description Language), as well as intermediate representations such as FIRRTL. Computer-readable code can provide definitions of concepts or other behavioral representations of concepts embodying the concepts using system-level modeling languages ​​such as SystemC and SystemVerilog, which can be interpreted by a computer to enable simulation, functional and / or formal verification and testing of the concepts.

[0080] Additionally or alternatively, computer-readable code may define a low-level description of an integrated circuit component embodying the concepts described herein, such as one or more netlists or integrated circuit layout definitions, including representations such as GDSII. Other computer-readable representations of one or more netlists or integrated circuit components may be generated by applying one or more logic synthesis processes to the RTL representation to generate definitions for manufacturing devices embodying the present invention. Alternatively or additionally, one or more logic synthesis processes may generate a bitstream from the computer-readable code to be loaded into a field-programmable gate array (FPGA) to configure the FPGA to embody the described concepts. The FPGA may be deployed for the purpose of verifying and testing the concepts prior to manufacturing integrated circuits, or the FPGA may be deployed directly in a product.

[0081] Computer-readable code may include a mixture of code representations for manufacturing apparatus, such as one or more of RTL representations, netlist representations, or other computer-readable definitions used in the semiconductor design and manufacturing process for manufacturing apparatus embodying the present invention. Alternatively or additionally, the concept may be defined in a combination of computer-readable definitions used in the semiconductor design and manufacturing process for manufacturing apparatus and computer-readable code defining instructions that will be executed by the defined apparatus once manufactured.

[0082] Such computer-readable code can be set in any known transient computer-readable medium (such as wired or wireless transmission of code over a network) or non-transitory computer-readable medium such as semiconductors, disks, or optical discs. Integrated circuits made using computer-readable code may include components such as one or more of the following: a central processing unit, a graphics processing unit, a neural processing unit, a digital signal processor, or other components that embody the concept independently or collectively.

[0083] The concepts described herein can be specifically embodied in systems including at least one packaged chip. The previously described devices are implemented in this at least one packaged chip (either in a specific chip of the system or distributed across more than one packaged chip). At least one packaged chip is assembled on a board along with at least one system component. Chip-containing products may include systems assembled on a separate board along with at least one other product component. The system or chip-containing product may be assembled into a housing or onto a structural support (such as a frame or blade).

[0084] like Figure 10As shown, one or more packaged chips 900 are manufactured by a semiconductor chip manufacturer, wherein the devices described above are implemented on a single chip or distributed across two or more chips. In some examples, the chip product 900 manufactured by the semiconductor chip manufacturer can be provided as a semiconductor package comprising a protective housing (e.g., made of metal, plastic, glass, or ceramic) housing the semiconductor device implementing the aforementioned devices, and connectors such as pads, solder balls, or pins for connecting the semiconductor device to an external environment. Where more than one chip 900 is provided, these chips can be provided as separate integrated circuits (as separate packages), or they can be packaged by a semiconductor provider into a multi-chip semiconductor package (e.g., using an interposer, or by using three-dimensional integration to provide a multi-layer chip product comprising two or more vertically stacked integrated circuit layers).

[0085] In some examples, a collection of chiplets (i.e., small modular chips with specific functions) can be referred to as a chip in itself. Chipslets can be individually packaged in semiconductor packages and / or packaged together with other chiplets in multi-chiplet semiconductor packages (e.g., using an interposer, or by using three-dimensional integration to provide multi-layer chiplet products comprising two or more vertically stacked integrated circuit layers).

[0086] One or more packaged chips 900 are assembled on a board 902 together with at least one system component 904 to provide system 906. For example, the board may include a printed circuit board. The board substrate may be made of any of a variety of materials, such as plastic, glass, ceramic, or flexible substrate materials such as paper, plastic, or textile materials. At least one system component 904 includes one or more external components that are not part of the one or more packaged chips 900. For example, at least one system component 904 may include any one or more of the following: another packaged chip (e.g., supplied by a different manufacturer or manufactured at a different process node), an interface module, a resistor, a capacitor, an inductor, a transformer, a diode, a transistor, and / or a sensor.

[0087] A chip-containing product 916 is manufactured, comprising a system 906 (including a board 902, one or more chips 900, and at least one system component 904) and one or more product components 912. Product components 912 include one or more additional components that are not part of system 906. As an example, in a non-exhaustive list, one or more product components 912 may include user input / output devices such as keypads, touchscreens, microphones, speakers, displays, haptic devices, etc.; wireless communication transmitters / receivers; sensors; actuators for actuating mechanical motion; thermal control devices; additional packaged chips; interface modules; resistors; capacitors; inductors; transformers; diodes; and / or transistors. System 906 and one or more product components 912 may be assembled onto an additional board 914.

[0088] Plate 902 or another plate 914 may be disposed on or within the equipment housing or other structural support (e.g., frame or blade) to provide a product that can be handled by a user and / or intended for operational use by personnel or company.

[0089] System 906 or chip-containing product 916 can be at least one of the following: end-user product, machine, medical device, computing or telecommunications infrastructure product, or automated control system. For example, as a non-exhaustive list, a chip-containing product can be any of the following: telecommunications equipment, mobile phone, tablet computer, laptop computer, computer, server (e.g., rack server or blade server), infrastructure equipment, networking equipment, vehicle or other automotive product, industrial machine, consumer device, smart card, credit card, smart glasses, avionics equipment, robotic equipment, camera, television, smart TV, DVD player, set-top box, wearable device, home appliance, smart meter, medical device, heating / lighting control equipment, sensor, and / or control system for controlling public infrastructure equipment (such as smart highways or traffic lights).

[0090] While exemplary embodiments of the 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 various changes, additions, and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention as defined by the appended claims. For example, features of the dependent claims can be combined with features of the independent claims in various ways without departing from the scope of the invention.

Claims

1. A data processing apparatus, the data processing apparatus comprising: A storage circuit configured to store data values ​​derived from a plurality of memory addresses associated with an instruction stream; A membership query circuit is configured to perform an approximate set membership query for the data value of a memory address associated with the current instruction in the instruction, and, in response to the approximate set membership query being affirmative, to issue the memory address to a confirmation circuit. and A pause circuit is configured to pause the execution of the instruction stream by the processing circuit in response to the satisfaction of at least one condition, the at least one condition including a positive indication from the confirmation circuit that the memory address is one of the plurality of memory addresses.

2. The data processing apparatus according to claim 1, wherein The memory address includes the program counter values ​​of those instructions in the instruction set with breakpoints.

3. The data processing apparatus according to any one of claims 1 to 2, wherein The memory address includes a location within the memory where a data access request is made by the instruction that sets an observation point thereon.

4. The data processing apparatus according to any one of claims 1 to 3, wherein the data processing apparatus comprises: The confirmation circuit, wherein The confirmation circuit is configured to store additional data values ​​indicating the plurality of memory addresses.

5. The data processing apparatus according to any one of claims 1 to 3, wherein In response to an affirmative membership query of the approximate set, the membership query circuit is configured to send a signal to the confirmation circuit; and The signal receiving routine at the confirmation circuit is configured to determine whether the memory address is among the plurality of memory addresses.

6. The data processing apparatus according to any one of claims 1 to 5, wherein At least one of the membership query circuit and the confirmation circuit is configured to return a negative result in response to the memory address being below a lower limit, the negative result indicating that the memory address is not one of the memory addresses.

7. The data processing apparatus according to any one of claims 1 to 6, wherein At least one of the membership query circuit and the confirmation circuit is configured to return a negative result in response to the memory address being higher than the upper limit, the negative result indicating that the memory address is not one of the memory addresses.

8. The data processing apparatus according to any one of claims 1 to 8, wherein At least one of the membership query circuit and the confirmation circuit is configured to return a negative result based on the memory page metadata of the memory address, the negative result indicating that the memory address is not a memory address among the memory addresses.

9. The data processing apparatus according to claim 8, wherein the data processing apparatus comprises: Page table circuitry configured to store a plurality of page table entries, wherein each page table entry is configured to store an indication of whether a corresponding memory page contains one of the memory addresses.

10. The data processing apparatus according to claim 8, wherein the data processing apparatus comprises: Page table circuitry, configured to store multiple page table entries, wherein The membership query circuit is configured to perform the approximate set membership query for multiple data values ​​including the data value; and The page table entry includes a prompt indicating that the set of multiple data values ​​will be subjected to an approximate set membership query for the set of multiple data values ​​for the memory address.

11. The data processing apparatus according to any one of claims 8 to 9, wherein the data processing apparatus comprises: An update circuit is configured to store the result of one or both of the membership query circuit and the confirmation circuit for the page table in response to the execution of an instruction corresponding to one of the page tables in the page table.

12. The data processing apparatus according to the preceding claim, wherein... In response to issuing the memory address to the acknowledgment circuit, the data processing device is configured to enter a speculative operation mode, in which instructions following the current instruction in the instructions are speculatively executed until a response is received from the acknowledgment circuit.

13. The data processing apparatus according to claim 12, wherein The data processing device is configured to perform a rollback on those instructions that have been speculatively executed after the current instruction in the instruction, in response to the confirmation circuit determining that the memory address is one of the memory addresses.

14. The data processing apparatus according to any one of claims 1 to 13, wherein the data processing apparatus comprises: Cache circuit, in which At least one of the membership query circuit and the confirmation circuit is configured to determine whether a given memory address is in the plurality of memory addresses in response to a cache miss, the contents of the given memory address being stored in the cache circuit.

15. The data processing apparatus according to claim 14, wherein The cache circuit is configured to store an indication of whether the given memory address is among the plurality of memory addresses.

16. The data processing apparatus according to any one of claims 1 to 15, wherein the data processing apparatus comprises: A loading circuit configured to replace the data value in the membership query circuit based on a subset of bits of the memory address.

17. A method, the method comprising: Stores data values ​​derived from multiple memory addresses associated with the instruction stream; An approximate set membership query is performed on the data value of the memory address associated with the current instruction in the instruction, and in response to a positive approximate set membership query, the memory address is sent to the confirmation circuit; and The execution of the instruction stream by the processing circuitry is suspended in response to the satisfaction of at least one condition, the at least one condition including a positive indication from the confirmation circuitry that the memory address is one of the plurality of memory addresses.

18. A non-transitory computer-readable medium for manufacturing a data processing apparatus that stores computer-readable code, the data processing apparatus comprising: A storage circuit configured to store data values ​​derived from a plurality of memory addresses associated with an instruction stream; A membership query circuit is configured to perform an approximate set membership query for the data value of a memory address associated with the current instruction in the instruction, and, in response to the approximate set membership query being affirmative, to issue the memory address to a confirmation circuit. and A pause circuit is configured to pause the execution of the instruction stream by the processing circuit in response to the satisfaction of at least one condition, the at least one condition including a positive indication from the confirmation circuit that the memory address is one of the plurality of memory addresses.

19. A system comprising: The data processing apparatus according to any one of claims 1 to 16 is implemented in at least one packaged chip; At least one system component; and board, among which The at least one packaged chip and the at least one system component are assembled on the board.

20. A chip-containing product, said chip-containing product comprising the system according to claim 19, wherein... The system is assembled on an additional board along with at least one other product component.