GB2389931A - Selective generation of trace elements - Google Patents

Selective generation of trace elements Download PDF

Info

Publication number
GB2389931A
GB2389931A GB0229009A GB0229009A GB2389931A GB 2389931 A GB2389931 A GB 2389931A GB 0229009 A GB0229009 A GB 0229009A GB 0229009 A GB0229009 A GB 0229009A GB 2389931 A GB2389931 A GB 2389931A
Authority
GB
United Kingdom
Prior art keywords
trace
architectural state
derivable
instruction
recipient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB0229009A
Other versions
GB0229009D0 (en
GB2389931B (en
Inventor
Andrew Brookfield Swaine
David James Williamson
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ARM Ltd
Original Assignee
ARM Ltd
Advanced Risc Machines Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from GB0213149A external-priority patent/GB2389432B/en
Application filed by ARM Ltd, Advanced Risc Machines Ltd filed Critical ARM Ltd
Priority to GB0514709A priority Critical patent/GB2413418B/en
Publication of GB0229009D0 publication Critical patent/GB0229009D0/en
Priority to US10/452,904 priority patent/US7197671B2/en
Priority to JP2003195368A priority patent/JP4225851B2/en
Publication of GB2389931A publication Critical patent/GB2389931A/en
Application granted granted Critical
Publication of GB2389931B publication Critical patent/GB2389931B/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2268Logging of test results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/348Circuit details, i.e. tracer hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/81Threshold

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to the generation of trace elements within a data processing apparatus having one or more components whose behaviour is to be traced. A trace module is disclosed which is operable to trace changes in a subset of architectural state of a data processing apparatus with which the trace module is coupled. The trace module comprises a trace generation unit operable to receive input signals from one or more components of the data processing apparatus indicative of a change in the subset of architectural state and to generate from one or more of the input signals a number of trace elements indicative of the change so as to enable a recipient of the trace elements to subsequently reconstruct the subset of architectural state. The trace module also comprises a table maintained by the trace generation unit to identify architectural state derivable from previously generated trace elements, the trace generation unit referencing the table in order to determine which trace elements to generate during the trace generation. By providing a table which identifies architectural state which is derivable from previously generated trace elements, the number of trace elements that need to be generated is significantly reduced. This reduction is achieved because the table provides a record of the architectural state which has already been provided to the recipient. Knowing the architectural state which has already been provided to the recipient enables the trace generation unit to determine whether changes in architectural state can be derived by the recipient. Accordingly, the trace generation unit can refer to the table and only those trace elements relating to changes in architectural state which are not derivable by the recipient need be generated. Hence, if the trace generation unit determines that the recipient is able to derive architectural state then no trace elements relating to those changes need be generated. Also disclosed is a system which traces program counter values and generates data trace elements and branch trace elements in dependence on whether a recipient can reconstruct trace elements from generated trace elements.

Description

GB 2389931 A continuation (72) I nventor(s): (58) Field of Search:
Andrew Brookfield Swaine UK CL (Edition V) G4A
David James Williamson INT CL7 G06F Other: ONLINE: WPI, EPODOC, PAJ, INSPEC (74) Agent and/or Address for Service: D Young & Co 21 New Fetter Lane, LONDON, EC4A 1 DA, United Kingdom
( 1 238993 1
GENERATION OF TRACE ELEMENTS WITHIN
A DATA PROCESSING APPARATUS
Field of the Invention
s The present invention relates to the generation of trace elements within a data processing apparatus having one or more components whose behaviour is to be traced.
Background of the Invention
Tracing the activity of a data processing system whereby a stream of trace elements is generated including data representing the step-by-step activity within the 0 system is a highly useful tool in system development. However, with the general move towards more deeply embedded processor cores, it becomes more difficult to track the architectural state of the processor core (such as the contents of registers, the values stored at particular memory locations or tle status of various buses, paths, lines, flags or modules within processor core or to which the processor core is coupled) via 5 externally accessible pins. Accordingly, as well as off-chip tracing mechanisms for capturing and analysing trace data, increased amounts of tracing functionality are being placed on-chip. An example of such on-chip tracing mechanisms is the Embedded Trace Macrocell (ETM) provided by ARM Limited, Cambridge, England, in association with various of their ARM processors.
So Such tracing mechanisms produce in real time a stream of trace elements representing activities of the data processing system that are desired to be traced. This trace stream can then subsequently be used to facilitate debugging of sequences of processing instructions being executed by the data processing system.
It is known to provide tracing mechanisms incorporating trigger points that serve 25 to control the tracing operation, such as starting or stopping tracing upon access to a particular register, memory address, data value. Such mechanisms are very useful for diagnosing specific parts of a system or types of behaviour.
Typically, when the trace is first triggered, the values of all items of architectural state which may need to be reconstructed are traced as a number of trace elements.
30 Typically, the stream of trace elements that is generated by the ETM is buffered prior to output for subsequent analysis. Such a trace buffer is able to store a finite amount of information and requires a dedicated data bus which has a finite bandwidth
over which the elements to be buffered can be received. The trace buffer is generally arranged to store information in a wrap-around manner, i.e. once the trace buffer is full, new data is typically arranged to overwrite the oldest data stored therein. It has been found that the bandwidth of the dedicated data bus limits the rate at which information 5 can be stored in the trace buffer.
Typically, a trace analysing tool is provided which then receives the trace elements from the trace buffer when desired; e.g. once the trace has completed. The trace analysing tool can then reconstruct critical components of the architectural state of the processor core using the stream of trace elements stored in the trace buffer. The lo trace analysing tool can therefore reconstruct the behaviour of the processor core based on the trace elements.
As data processing systems increase in power and complexity, it is clear that the amount of architectural state and its rate of change will increase. Hence, in order to reliably reconstruct the architectural state it will be appreciated that there is potentially a very large volume of trace elements that need to be traced.
However, there is a problem that there is a finite bandwidth over which the trace elements to be buffered are received and the trace buffer has a finite size. Accordingly, the volume of trace elements that can be buffered, and hence the amount of architectural state that can be reconstructed, is limited.
20 Hence, it is desired to increase the amount of architectural state that can be reconstructed, given a finite bandwidth over which the trace elements to be buffered are received and a finite size of the trace buffer.
Summary of the Invention
Viewed from a first aspect, the present invention provides a trace module 2s operable to trace changes in a subset of architectural state of a data processing apparatus with which the trace module is coupled, the trace module comprising: a trace generation unit operable to receive input signals from one or more components of the data processing apparatus indicative of a change in the subset of architectural state and to generate from one or more of the input signals a number of trace elements indicative of 30 the change so as to enable a recipient of the trace elements to subsequently reconstruct the subset of architectural state; and a table maintained by the trace generation unit to identify architectural state derivable from previously generated trace elements, the
i trace generation unit referencing the table in order to determine which trace elements to generate during the trace generation.
By avoiding the need to generate trace elements for all items of architectural state when tracing begins, and by only tracing the changes in architectural state that 5 are not derivable by the recipient, the amount of architectural state that needs to be generated at any time is significantly reduced compared with prior art approaches.
By providing a table which identifies architectural state which is derivable from previously generated trace elements, the number of trace elements that need to be generated is significantly reduced. This reduction is achieved because the table provides lo a record of the architectural state which has already been provided to the recipient.
Knowing the architectural state which has already been provided to the recipient enables the trace generation unit to determine whether changes in architectural state can be derived or inferred by the recipient. Accordingly, the trace generation unit can refer to the table and only those trace elements relating to changes in architectural state which 15 are not derivable by the recipient need be generated. Hence, if the trace generation unit determines that the recipient is able to derive, infer or calculate architectural state then no trace elements relating to those changes need be generated.
By reducing the number of trace elements that need to be generated, any bandwidth limitations between the trace generation unit and a buffer in which the trace 20 elements are to be stored can be alleviated. Also, because the number of trace elements can be reduced, the size limitation of the trace buffer can also be alleviated and the amount of architectural state that can be traced over the same bandwidth can be increased. Given this increase in the amount of architectural state that can be traced it will be appreciated that the operations of increasingly complex data processing systems 2s can be reliably reconstructed using the same bandwidth.
It will be appreciated that the input signals may take any suitable form which provides the trace generation unit with information relating to the change in architectural state. Also, it will be appreciated that the trace elements may take any suitable form indicative of the change in architectural state which enables the recipient to subsequently 30 reconstruct that change. Furthermore, it will be appreciated that the table may be any arrangement which enables the trace generation unit to determine which trace elements to generate during the trace generation.
f In preferred arrangements, the table is cleared at the beginning of the trace and may be periodically cleared thereafter. This helps to ensure that if any corruption in the trace occurs or if art earlier portion of the trace is lost due to, for example, wrap around occurring in the trace buffer overwriting that earlier portion, then only a portion of the 5 trace may be lost and the subsequent trace will be derivable by a trace analysing tool.
Preferably, the subset of architectural state comprises a number of items of architectural state and the table has one or more entries associated with each item of architectural state, the trace generation unit being operable to make an indication in each entry when the item of architectural state is derivable by the recipient.
lo Each item corresponds to a part of the subset of architectural state. Itemising the architectural state simplifies the maintenance of the table. Whilst a number of entries may be provided for each item of architectural state, preferably each item has just one entry associated therewith. When items of architectural state are derivable by the recipient then an indication is made against the entry associated with those items. The s indication may be in any suitable form, such as, for example, a single bit value where a logical 'O' indicates that the item is not derivable by the recipient and a logical '1' indicates that the item is derivable by the recipient. It will be appreciated that to make such an indication is a relatively straightfonvard process and that the resource overhead required to maintain a table in this form is relatively low.
20 Preferably, in response to the receipt of one or more of the input signals, the trace generation unit is operable to determine whether the change in an item of architectural state is derivable by the recipient by determining whether an indication has been made in each entry associated with that item of architectural state.
Hence, by a simple look-up process in the table, the trace generation unit is able 25 to determine easily whether or not a change in architectural state is derivable by the recipient. Preferably, in response to the receipt of one or more of the input signals, the trace generation unit is operable to determine whether the change in an item of architectural state is derivable by the recipient by determining whether an indication 30 has been made in each entry associated with items of architectural state utilised to effect the change in the item of architectural state.
1 Vat' 1 5 Hence, even if the change in architectural state is not directly derivable by the recipient, the trace generation unit can determine whether the change can be derived by determining whether those items of architectural state which were employed in causing the change are themselves derivable. For example, if architectural state A is 5 changed based on architectural state B and C, then even if A is not derivable because no indication has been made in an entry associated with A, if indications have been made in entries associated with B and C, then the trace generation unit is able to determine that the change in architectural state A is derivable by the recipient. It will be appreciated that because, in many data processing apparatus, a comparatively large i o number of changes in architectural state are dependent upon other items of architectural state, this approach provides a dramatic decrease in the number of trace elements that need to be generated. Given that the number of trace elements that need to be generated is farther reduced, this further alleviates any bandwidth limitations between the trace generation unit and the buffer. It will be appreciated that having an indication that an 5 item of architectural state is derivable prior to a change occurring provides no guarantee that this item of architectural state will be derivable after a change occurs since the determination of whether that item of architectural state is derivable is dependent on establishing whether the items which effect the change are derivable or not. To illustrate this by returning to the above example, if an indication has been made that A is 20 derivable, but no indications have been made for B or C, then A will not be derivable and trace elements will need to be generated for change in A because prior knowledge of A is irrelevant since it will be changed in an indeterminate way, dependent on B and C. Preferably, the trace generation unit is operable to generate a number of trace elements indicative of the change in the item of architectural state not derivable by the 2s recipient and to make an indication in each entry associated with that item of architectural state.
Hence, in the case where it is determined that the recipient will be unable to derive the change in architectural state, the trace generation unit will generate one or more trace elements indicative of that change. It will be appreciated that the trace 30 elements may take any suitable form which enables the recipient to determine the change. The trace generation unit will also make an indication in the entries of the table
_. 2 6
associated with the item of architectural state that has changed to indicate that that item of architectural state is now derivable by the recipient.
Also, in certain circumstances, entries associated with items of architectural state utilised to effect the change in the item of architectural state may be marked as 5 derivable. For example, if architectural state D is copied to E, and D is not derivable, then a trace element indicative of the change to E is generated and the entry in the table associated with E is updated to indicate that E is derivable as before. However, it will be appreciated that then an entry in the table associated with D may also be updated to indicate that D is derivable since D can be inferred from E, just as E can be inferred from lo D. Preferably, each item of architectural state has an architectural state value and the trace generation is operable to generate a number of trace elements indicative of the change in the architectural state value.
Preferably, the change in the architectural state value causes the item of 5 architectural state to have a new value, the trace generation unit being operable to generate a number of trace elements indicative of the new value when the new value is not derivable by the recipient and to make an indication in each entry associated with that item of architectural state.
It will be appreciated that the architectural state of a data processing apparatus 20 may comprise the values of, for example, registers, memory, flip-flops, flags, the status of buses and individual lines or the mode or condition of individual units within the apparatus such as the processor core, bus interface unit, cache, debugging, analysing or profiling logic and the like.
In preferred embodiments, the subset of architectural state comprises the :5 contents of a number of registers and the table has a register entry associated with each of the number of registers.
Hence, the table provides an indication of those registers whose contents are derivable by the recipient.
Preferably, in response to an input signal indicative of a change in the contents of 30 a register to a new value, the trace generation unit is operable to make an indication in each entry associated with that register when the new value is derivable by the recipient.
3 7 It will be appreciated that the change in the register value may be dependent upon the contents of the register itself, one or more other registers or the contents stored in one or more memory locations. If the change in the register value is dependent on the contents of one or more memory locations then, in preferred 5 embodiments, a trace element is generated indicative of that memory location.
Preferably, in response to an input signal indicative of a change in the contents of a register to a new value, the trace generation unit is operable to generate a number of trace elements indicative of the new value when the new value is not derivable by the recipient and to make an indication in each entry associated with that register.
lo Hence, the recipient is provided with an indication of the new value of the register and the table is updated to indicate that the value of that register is now derivable by the recipient.
Preferably, the number of registers include a number of source registers and a number of destination registers and in response to an input signal indicative of a change is in the contents of a destination register to a new value dependent on the contents of one or more of the source registers, the trace generation unit is operable to generate a number of trace elements indicative of the new value when the new value is not derivable by the recipient and to make an indication in each entry associated with the destination register.
20 Hence, even if the contents of a register is not directly derivable by the recipient, the trace generation unit can determine whether the new value can be derived by determining whether the values of the registers or other architectural state upon which the change was made are derivable. For example, consider the operation R4 R2 + R3 (i.e. add the value contained in the register R2 to the value contained 2s in the register R3 and place the result in the register R4), if the table indicates that the value of registers R2 and R3 are not both derivable by the recipient, then trace elements are generated which provides the recipient with resultant value of R4 and the table is annotated to indicate that the value of register R4 is derivable by the recipient. AISO, it will be appreciated that in circumstances where the new value of 30 the destination register is dependent on other architectural state, the trace generation unit can determine whether the new value can be derived by determining whether the values of the other architectural state is derivable by determining whether an
indication has been made in table entries associated with that architectural state, such as, for example, table entries associated with one or more memory addresses or registers. Preferably, the number of registers include a number of source registers and a s number of destination registers and, in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on contents of one or more of the source registers, the trace generation unit is operable to make an indication in each entry associated with the destination register when the new value is derivable by the recipient.
lo Hence, using the same illustrative example as above, if the table indicates that the value of registers R2 and R3 are both derivable by the recipient, then no trace elements need be generated and the table is annotated to indicate that the value of register R4 is derivable by the recipient. Equally, in circumstances where the new value of the destination register is dependent on other architectural state, if the table indicates that the value of that architectural state is derivable by the recipient, then no trace elements need be generated and the table is annotated to indicate that the value of the destination register is derivable by the recipient.
Preferably, the number of registers include a number of destination registers, the architectural state further comprises the contents of a number of memory addresses and, no in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on the contents of one or more of the memory addresses, the trace generation unit is operable to generate a number of trace elements indicative of the one or more memory addresses when the one or more memory addresses are not derivable by the recipient and to make an indication in each entry 25 associated with the one or more memory addresses.
Hence, in addition to the new value being traced, the address which contained that new value may also be traced and an indication made that the contents of that address is now derivable.
Altematively, the number of registers include a number of destination registers, 30 the architectural state further comprises the contents of a number of memory addresses and, in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on the contents of one or more of the memory
addresses, the trace generation unit is operable to make an indication in each entry associated with the one or more memory addresses when the new value is derivable by the recipient.
In preferred embodiments, the subset of architectural state comprises the 5 contents of a number of memory addresses and the table has an address entry associated with each of the number of memory addresses.
Hence, the table provides an indication of those memory addresses whose values are derivable by the recipient. It will be appreciated that the table could be arranged to provide an indication only of those memory addresses whose values are derivable by the lo recipient. Alternatively, the table could be arranged to provide an indication of those memory addresses and registers or other architectural state whose values are derivable by the recipient.
Preferably, in response to an input signal indicative of the contents of a memory address changing to a new value, the trace generation unit is operable to make an IS indication in each address entry associated with that memory address when the new value is derivable by the recipient.
It will be appreciated that the change in the value of the memory may be dependent upon the contents of the memory address itself, one or more other memory addresses or the contents stored in one or more registers.
20 Further, in response to an input signal indicative of the contents of a memory address changing to a new value, the trace generation unit is preferably operable to generate a number of trace elements indicative of the new value when the new value is not derivable by the recipient and to make an indication in each address entry associated with that memory address.
25 Hence, the recipient is provided with an indication of the new value of the memory address and the table is updated to indicate that the value of that address is now derivable by the recipient.
Preferably, in response to an input signal indicative of the contents of a memory address changing to a new value dependent on one or more registers, the trace 30 generation unit is operable to make an indication in each address entry associated with that memory address when the new value is derivable by the recipient.
( P013521GB 10
Preferably, in response to an input signal indicative of the contents of a memory address changing to a new value dependent on one or more registers, the trace generation unit is operable to generate a number of trace elements indicative of the new value when the new value is not derivable by the recipient and to make an 5 indication in each address entry associated with that memory address.
Preferably, in response to an input signal indicative of the contents of a memory address changing to a new value, the trace generation unit is operable to generate a number of trace elements indicative of the memory address when the memory address is not derivable by the recipient and to make an indication in each register entry l o providing that memory address.
In preferred embodiments, the table comprises one or more tables, each having a base address entry associated with a base memory address and an address entry associated with each of a range of memory addresses logically offset from the base address, the trace generation unit being operable to determine, in response to an input is signal indicative of the contents of a memory address changing to a new value, whether the memory address is within one of the ranges and, if so, to make an indication in the address entry associated with that memory address.
Providing a base address and a range of memory addresses offset from that base address enables a logical memory address to be specified with a reduced number of bits 20 which in turn advantageously enables a reduced table size. For example, suppose a memory has 2n entries or logical addresses. If a table was to be provided with an indication of whether each of these entries was derivable then clearly the table would also require 2n entries. However, it is recogrised that it is often the case that a given sequence of processor operations results in memory accesses occurring only in a 2s particular sub-set or range of the memory. Hence, the table is arranged to provide an address entry associated with each of a range of memory addresses. To enable addresses of the whole memory to be specified, a base address is also provided, the range being offset from this base address. Referring back to the above example, assuming a memory having 2n addresses, a table could be provided having a range of 2n'4 entries. Each of 30 these entries can be specified using nl4 bits, and to enable addresses in the whole memory to be specified a base address having 3n/4 bits would need to be provided. It
will be appreciated that the size of the table and range could be selected to suit the particular implementation.
Preferably, the trace generation unit is operable to determine, in response to an input signal indicative of the contents of a memory address changing to a new value, 5 whether the memory address is within one of the ranges and, if not, to clear all address entries in one of the tables, to update the base address entry of that table, to generate a number of trace elements indicative of the new value and to make an indication in the address entry associated with the memory address.
Hence, when a change occurs in the value being stored at a memory address lo outside ofthe range currently covered by a table, a new base address is selected such that the memory address whose value has changed falls within the range provided by the table. Also, all the entries associated with addresses are preferably cleared since these entries now relate to addresses whose values may not be derivable by the recipient and following the generation of the trace elements, an indication is made in the address entry 5 associated with the memory address whose value has changed that the value is derivable by the recipient. Whilst just one table could be provided it will be appreciated that a number of further tables could be provided, each having a base address and covering different regions of the memory. Such an arrangement would have particular utility if the operation being traced involved branching to and from different parts of the memory.
20 Preferably, the base address entry is arranged to store at least part of a logical memory address.
Hence, for any logical memory address, the base address bits could be arranged to fonn the most significant bits (MSBs) of the logical memory address and the address entry bits the least significant bits (LSBs) of the logical memory address. Alternatively, 25 the base address may comprise the MSBs of the logical memory address referred to by the contents of a stack pointer register. It will be appreciated that for some data processing apparatus, utilising the stack pointer register provides a good indication of an efficient location for the base address.
preferred embodiments, entries in said table are cleared periodically.
30 As explained above, this helps to ameliorate the effects of any corruption in the trace.
f In preferred embodiments, the trace generation unit is operable to generate an instruction trace element indicative of an instruction being executed.
The instruction trace element provides the recipient with information relating to the instruction being executed by the data processing apparatus such as, for example, a 5 branch or data processing operation. Providing the recipient with an instruction trace further simplifies the reconstruction of the architectural state by assisting the recipient in determining which instruction is being executed at any particular time and, hence, to which architectural state any trace elements relate.
Preferably, the change in the subset of architectural state causes thedata lo processing apparatus to execute an instruction which is out of sequence and the trace generation unit is operable to generate a trace element indicative of the out of sequence instruction to be executed.
Hence, should an instruction be executed which results in, for example, a branch being performed, then the recipient is provided with an indication of which instruction in 5 the sequence of instructions is to be executed next in order to assist in interpreting trace elements being received.
In preferred embodiments, the recipient is a trace analysing tool and the table identifies the subset of architectural state derivable by the trace analysing tool.
Preferably, the trace analysing tool is provided with an indication of sequential 20 instructions to be executed by the data processing apparatus.
Providing the trace analysing tool with information relating to the instructions being executed by the data processing apparatus, such as for example opcode, simplifies the interpretation of the trace elements provided by the trace generation unit when reconstructing the architectural state. Hence, it will be appreciated that the 25 trace analysing tool effectively models the operation of the processor core.
Accordingly, for example, if the trace analysing tool receives one or more trace elements and is also provided with an indication that an instruction is being executed involving architectural state A, B and C which results in architectural state D being changed, then the trace analysing tool is able to derive that the trace elements will 30 relate to the change in architectural state D.
s 13 Preferably, each sequential instruction has an address associated therewith and the trace generation unit is operable to determine whether an address of the out of sequence instruction is derivable by the trace analysing tool by determining whether an indication has been made in each entry associated with items of architectural state s utilised to effect the change in the item of architectural state which causes the data processing apparatus to execute the out of sequence instruction.
Hence, if the trace analysing tool is able to derive the address of the out of sequence instruction, then no trace elements need be generated indicating the address of the next instruction to be performed.
in Preferably, the table identifies the indication of sequential instructions to be executed by the data processing apparatus.
As mentioned above, it will be appreciated that the table identifying the indication of sequential instructions to be executed may be a separate table or tables.
Also, as mentioned above, the table preferably includes the opcode to be executed by the 5 data processing apparatus.
Preferably, the trace generation unit is operable to determine in response to the input signals indicative of an instruction being executed whether the trace analysing tool is able to determine the instruction being executed by referencing the table and to generate a number of trace elements indicative of the instruction when the instruction 20 is not derivable by the trace analysing tool.
It will be appreciated that typically when a change to a register which is used by the data processing apparatus to determine the address of the next instruction to be executed (such as a so-called program counter) occurs as a result of an indirect branch (indirect branches are branches in the sequence of instructions executed by the data 2s processing apparatus which occur not as a result of the issue of a conventional branch instruction but are due to the manipulation of the program counter by, for example, a load instruction or a move instruction) then a data trace will be issued and a branch trace will be issued. The data trace typically occurs because it is desired to trace the data associated with the load or move instruction (e.g. operand data, result data, etc.). The 30 branch trace also occurs because it is determined that the instruction has resulted in a branch occurring and provides an indication of the address of the next instruction to be executed (i.e. the new program counter value).
( According to a second aspect of the present invention there is provided a trace module operable to trace changes in a program counter value of a data processing apparatus with which the trace module is coupled, the data processing apparatus being arranged to execute a sequence of instructions, the program counter value indicating a 5 next instruction to be executed by the data processing apparatus, the trace module comprising: a trace generation unit operable to receive input signals from one or more components of the data processing apparatus indicative of a current instruction being executed and to selectively generate from the input signals a data trace element indicative of data associated with the current instruction and a branch trace element lo indicative of the change in program counter value, and in the event that the current instruction is an indirect branch instruction which causes a non- sequential change in the program counter value, the trace generation unit being operable to suppress the generation of either the data trace element or the branch trace element, the change in program counter value being derivable from the generated trace element, whereby 15 change in program counter value can be subsequently reconstructed by a recipient of the trace elements from the generated trace element in order to determine the next instruction to be executed by the data processing apparatus.
Recognising that the change in the program counter value can be derived from either of the data trace or the branch trace enables one of these traces to be suppressed 20 thereby reducing the amount of trace generated. In particular, since the data trace element will identify the result data, and in the event of an indirect branch instruction this will identify the new program counter value, the data trace element itself will enable the new program counter value to be derived.
It will be appreciated that knowing the value stored in the program counter 2s enables the recipient to determine the next instruction to be executed by the data processing apparatus. It will also be appreciated that in so-called pipelined data processing apparatus, the program counter may refer to the next instruction to be loaded or passed to any particular pipeline stage (such as any one of a fetch, decode, execute or wnteback stage) or to the next instruction to be fetched by, for example, a prefetch or 30 other unit.
Preferably, the trace generation unit is operable to suppress the generation of the data trace element, the change in program counter value being derivable by the recipient from the branch trace element.
Hence, the need to generate the data trace element is avoided since this 5 information is duplicated by the branch trace element which provides an indication of the new program counter value (i.e. the result data of the indirect branch instruction).
It will be appreciated that suppressing the data trace element reduces the amount of data to be traced.
Alternatively, the trace generation unit is operable to suppress the generation lo of the branch trace element, the change in program counter value being derivable by the recipient from the data trace element.
Hence, the need to generate the branch trace element is avoided since this information is duplicated by the data trace element which provides an indication of the change in value of the program counter. It will be appreciated the suppressing the IS branch trace element reduces the amount of data to be traced.
Preferably, there is provided a table maintained by the trace generation unit to identify whether the change in program counter value is derivable from previously generated trace elements, the trace generation unit referencing the table in order to determine which trace elements to generate during the trace generation.
20 By providing a table which identifies whether the change in program counter value is derivable from previously generated trace elements, the number of trace elements that need to be generated can be significantly reduced. This reduction is achieved because the table provides a record of whether the changed program counter value has already been provided to the recipient. Knowing whether the program counter 25 value has already been provided to the recipient enables the trace generation unit to determine whether changes in the program counter value can be derived or inferred by the recipient. Accordingly, the trace generation unit can refer to the table and only those trace elements relating to changes in the program counter value which are not derivable by the recipient need be generated. Hence, if the trace generation unit determines that so the recipient is able to derive, infer or calculate the program counter value then no trace elements relating to those changes need be generated and any duplication of trace elements can be avoided.
( Preferably, the trace generation unit is operable to suppress the generation of the data trace element and the branch trace element when it is determined that the change in program counter value is derivable by the recipient.
Hence, when it is determined that the change in the value of the program s counter is derivable and the address of the next instruction to be executed is derivable, both the data trace element and the branch trace element may be suppressed since this information derivable by the recipient. It will be appreciated that suppressing the generation of both the data trace element and the branch trace element significantly reduces the amount of trace which is generated.
lo Preferably, the trace generation unit is operable to generate a placeholder indicative of the suppression.
Providing a placeholder gives a convenient indication to the recipient that suppression has occurred because the address of the next instruction to be executed is derivable. 5 Preferably, the trace generation unit generates an instruction trace in response to receipt of the input signals providing an indication that an instruction is being executed by the data processing apparatus.
By providing an indication that an instruction is being executed, a change in the program counter value can be inferred. This is because typically each time an so instruction is executed the program counter will be incremented by a predetermined value such as, for example. 'm' bits such that the program counter is pointing to the address of the next sequential instruction in memory. It will be appreciated that the amount of data required to provide an indication that the program counter has been incremented would be significantly less than the data required to identify the program 25 counter as an item whose value has changed and then to identify that new value.
According to a third aspect of the present invention there is provided a data processing apparatus comprising the trace module according to the first and second aspect of the present invention.
According to a fourth aspect of the present invention there is provided a method 30 of tracing changes in a subset of architectural state of a data processing apparatus, the method comprising the steps of: receiving input signals from one or more components of said data processing apparatus indicative of a change in said subset of architectural state;
( determining which trace elements to generate by referencing a table identifying architectural state derivable from previously generated trace elements; and generating a number of trace elements indicative of said change so as to enable a recipient of said trace elements to subsequently reconstruct said subset of architectural state.
5 According to a fifth aspect of the present invention there is provided a method of tracing changes in a program counter value of a data processing apparatus, the data processing apparatus being arranged to execute a sequence of instructions, the program counter value indicating a next instruction to be executed by the data processing apparatus, the method comprising the steps of: receiving input signals from one or more lo components of the data processing apparatus indicative of a current instruction being executed; selectively generating from the input signals a data trace element indicative of data associated with the current instruction and a branch trace element indicative of the change in program counter value; and in the event that the current instruction is an indirect branch instruction which causes a non-sequential change in the program 5 counter value, suppressing the generation of either the data trace element or the branch trace element, the change in program counter value being derivable from the generated trace element.
According to a sixth aspect of the present invention there is provided a computer program product stored on a computer readable medium operable when 20 executed on a computer to perform the steps of the fourth and fifth aspect of the present invention.
Brief Description of the Drawings
Figure I illustrates a data processing apparatus according to an embodiment of the present invention; 25 Figure 2 illustrates features of the on-chip trace module of Figure 1; Figures 3A to 3E illustrate processing steps performed by the on-chip trace module; and Figures 4A and 4B illustrate example instructions executed by the processor core together with the associated trace elements and table entries generated by the on-chip 30 trace module.
Description of the Embodiments
Figure I schematically illustrates a data processing apparatus 2 providing an on-chip trace module. An integrated circuit 4 includes a microprocessor core 6, a cache memory 8, an on-chip trace module 10 and an on-chip trace buffer 12. It will 5 be appreciated that whilst this illustrative embodiment shows an on-chip trace module and on-chip trace buffer 12, it will be appreciated that the trace module and/or trace buffer could instead be provided separately and coupled with the integrated circuit 4 or processor core 6.
The data processing apparatus 2 has architectural state associated therewith.
0 Typically, some architectural state is associated with each instruction the processor core 6 is executing. Other architectural state will relate to overall operation or status of the processor core or other modules or units to which the processor core 6 or data processing apparatus 2 is coupled. Such architectural state may include the contents of registers, the values stored at particular memory locations or the status of various 5 buses, paths, lines, flags or modules within the data processing apparatus 2 or to which the data processing apparatus 2 is coupled.
A general purpose computer 16 is coupled to the on-chip Mace module 10 and the on-chip trace buffer 12. The general purpose computer 16, operating as a trace analysing tool, and under the control of software being executed thereon, recovers a 20 stream of tracing data which is composed of a number of trace elements. These trace elements are then analysed by the trace analysing tool. The trace elements provide information which is used to reconstruct the architectural state of the data processing apparatus 2. By reconstructing the architectural state of the data processing apparatus 2, the step-by-step activity within the data processing apparatus 2 can be determined 2s which is useful when attempting to debug sequences of processing instructions being executed by the data processing apparatus 2. The trace analysing tool is preferably provided in advance with the sequence of instructions being executed by the processor core 6 which is referred to when reconstructing the architectural state of the data processing apparatus 2.
30 The integrated circuit 4 is connected to an external memory 14 which is accessed when a cache miss occurs within the cache memory 8. It is often the case that the processor core 6 may, during operation, need to access more data processing instructions
r and data than there is actually space for in the external memory 14. For example, the external memory 14 may have a size of 1 MB, whereas the processor core 6 might typically be able to specify 32-bit memory addresses, thereby enabling 4 GB of instructions and data to be specified. Accordingly, all of the instructions and data 5 required by the processor core 6 are stored within external storage 18, for example a hard disk, and then when the processor core 6 is to operate in a particular state of operation, the relevant instructions and data for that state of operation are loaded into the external memory 14. The contents and status of the cache memory 8, the external memory 14 and the external storage 18 are items of architectural state which are often l o necessary to trace in order to accurately reconstruct the operation of the processor core 6.
Within the processor core 6 is provided a register bank 20 containing a number of registers for temporarily storing data. An arithmetic and logic unit (ALU) 22 is also provided for performing various arithmetical or logical operations on the contents of the registers. Following an operation by the ALU 22, the result of the operation may be 5 either recirculated into the register bank 20 via the bus 24 andlor stored ire the cache 8 over the bus 26. The contents and status of the register bank 20 or the status of the ALU 22 or the internal or external buses are also items of architectural state which are often necessary to trace in order to accurately reconstruct the operation of the processor core 6.
Figure 2 is a block diagram illustrating in more detail the components 20 provided within the on-chip trace module 10 of Figure 1. The on-chip trace module lO is arranged to receive over path 105 data indicative of the processing being performed by the processor core 6. With reference to Figure i, this may be received from the buses 24 and 26 connecting the processor core 6, cache 8, and on-chip trace module lO (such data providing an indication of the architectural state of the data 25 processing apparatus 2 such as, for example, indicating instructions and/or data presented to the processor core 6, and data generated by ALU 22 of the processor core 6), along with additional control-type data received directly from the core over bus 28 (also providing an indication of the architectural state of the data processing apparatus 2 such as, for example, an indication that the instruction address is being indexed, an 30 indication that a certain instruction failed its condition codes for some reason, etc).
As will be appreciated by those skilled in the art, in certain embodiments both types
! of data could be passed to the trace module 10 over a single bus between the trace module 10 and the processor core 6 (rather than using multiple buses 24, 26, 28 etc.).
The sync logic 100 is arranged to convert the incoming signals into internal versions of the signals more appropriate for use within the onchip trace module 10.
5 These internal versions are then sent to the trigger 110 and the trace generation logic 120, although it will be appreciated that the trigger 110 and the trace generation logic 120 will not necessarily need to receive the saline signals. Fundamentally, the trigger 110 needs to receive data relating to triggerable events, for example instruction addresses, data values, register accesses or the occurrence of some other architectural lo state. The trace generation logic 120 needs to receive any data that would need to be traced dependent on the enable signals issued by the trigger 110. The trace generation logic 120 is further arranged to receive configuration information over path 125 from the general purpose computer 16, whose contents can be read by the components of the on-chip trace module 10 as required.
5 Whenever the trigger 110 detects events which should give rise to the generation of a trace stream, it sends an enable signal over path 135 to the trace generation logic 120 to turn the trace on and off. The trace generation logic 120 reacts accordingly by outputting the necessary trace elements to the FIFO 130 over paths 145 and 155. It will be appreciated that a variety of enable signals may be 20 provided over path 135, to identify the type of signals which should be traced, for example trace only instructions, trace instructions and data, etc. Typically, the trace signals or trace elements generated by the trace generation logic 120 are classified as being either high priority or low priority. The classification will preferably be maintained within the trace generation block 120, and may be 25 predefined or user programmable. In the embodiment illustrated in Figure 2, the high priority trace elements are those concerning instruction trace, for example trace signals relating to branch addresses, whilst the low priority trace elements are those relating to data trace, such low priority trace elements being able to be lost without losing synchronization. In the absence of any signals being received by the trace 30 generation logic 120 from the FIFO 130, the trace generation logic will be arranged to output appropriate trace data to the FIFO 130 dependent on the enable signals received from the trigger 110 over path 135. This might for example result in both
f instruction trace elements being issued over path 145 and data trace elements being issued over path l SS. It will be appreciated by those skilled in the art that although two distinct paths have been illustrated in Figure 2, both the instruction trace and the data trace signals would typically share connections between the trace generation 5 logic 120 and the FIFO 130.
It has been found that when tracing data in addition to tracing instructions, the data trace elements issued over path lSS can use the majority of the trace port bandwidth from the trace generation logic 120 to the FIFO 130. The trace elements are then drained through a narrow output trace port from the FIFO 130 to the trace 10 buffer 12 via path 150. Typically, any trace elements issued over path 150 to the trace buffer are also accompanied by trace valid signals over path 140 indicating whether the output trace is valid or not. A trace valid signal would typically be set to invalid if the associated trace module has no trace data to issue in that clock cycle.
Since the output bandwidth from the FIFO 130 is typically less than the input 5 bandwidth, there is the potential for the FIFO 130 to overflow, for example in the event of a sustained burst of trace data being issued by the trace generation block 120 As an example, the input trace port can be 4-5 times wider than the output trace port to the trace buffer.
One previously-known way to seek to alleviate this problem was to cause a 20 FIFO filll signal to be issued from the on-chip trace module 10 back to the processor core 6 to cause the processor core 6 to stall temporarily so as to allow the level of trace elements within the FIFO i30 to reduce. However, due to the inherent latency and other issues, this approach has proved to be unreliable, since it was often found that between the time of issuance of the FIFO full signal and the stalling of the 25 processor core 6, sufficient further trace elements were issued representing the activities of the core 6 prior to its stalling that the FIFO 130 had a tendency to overflow in any event.
Another approach to alleviate this problem is described in co-pending US patent application 10/206,829 (filed 29 July 2002, and in turn claiming priority to UK So patent application 0213149.8, filed 7 June 2002) in which a suppression signal is provided which can be issued by the FIFO 130 over path 160 directly to the trace generation logic 120. Preferably, the FIFO 130 is arranged such that once the fullness
of the FIFO 130 reaches a predetermined suppression level, the FIFO 130 is arranged to issue the suppression signal to the trace generation logic 120, this causing the trace generation logic 120 to cease issuing any data trace elements over path 155 whilst the suppression signal is asserted. Whilst this means that the data trace elements are lost, 5 these are considered to be low priority trace elements which can be lost without losing synchronization information. Furthermore, since the data trace typically uses much larger bandwidth than the high priority instruction trace, the suppression of the data trace has been found to often be sufficient to avoid the FIFO 130 becoming full.
When the quantity of trace elements within the FIFO 130 subsequently falls to lo a predetermined restart level, then the FIFO 130 is arranged to de-assert the suppression signal, thereby causing the trace generation block 120 to again begin issuing data trace elements over path 155.
It will be appreciated that the predetermined suppression level and predetermined restart level can be chosen dependent on the implementation.
5 However, by way of example, for a 60 byte FIFO, the predetermined suppression level may be set at 45 bytes (i.e. when the FIFO is 75% full), whereas typically the predetermined restart level will be set at some slightly lower value than 45 bytes to ensure that subsequent to the deassertion of the suppression signal there is still some capacity to increase the amount of trace elements stored within the FIFO without 20 needing to immediately re-assert the suppression signal.
Since the act of merely discarding the data trace elements upon issuance of the suppression signal cannot in all circumstances avoid the FIFO 130 overflowing, the FIFO 130 is able to issue an overflow signal over path 170 when it becomes full, to cause the trace generation logic 120 to stop issuing any trace elements until the 25 overflow signal is de-asserted. In such scenarios, it will be apparent that both high and low priority trace data will be lost, but by appropriate choice of the predetermined suppression level at which the suppression signal is issued, it is envisaged that it would only be on very rare occasions that the overflow signal would need to be issued. 30 Alternatively, in addition to issuing the suppression signal to the trace generation logic 120, the FIFO 130 may also take the additional internal step of only storing instruction trace elements after the suppression signal is asserted (thereby
removing any latency between issuance of the suppression signal and the responding to that suppression signal by the trace generation logic 120).
It will be appreciated that all of these techniques seek to minimise the effects of overflowing in the FIFO 130 by suppressing or stalling the generation of that data or by s allowing certain elements to be lost. It will also be appreciated that losing trace elements is undesirable and that, in some circumstances, stalling the processor may uncharacteristically influence its operation or conceal a potential error or fault.
However, embodiments of the present invention further recognise that if the quantity of trace elements generated in the first place is lower, then the likelihood of any lo overflow downstream of the trace generation logic 120 will be reduced. Accordingly, embodiments of the present invention recognise that there is a degree of redundancy in the trace elements themselves which, if removed, will enable the amount of trace elements generated to be reduced.
The redundancy can occur due to, for example, the repetition of previously 5 generated trace elements. Such repetition can occur when, for example, a trace element is issued which includes architectural state and a subsequent trace element is issued although that particular architectural state has not changed. Given that the architectural state has not changed, embodiments of the present invention recognise that it could have been derived, inferred or implied from previously-generated trace elements. Hence, by 20 deriving the architectural state, the repetition of such previously-generated trace elements can be eliminated, thus reducing the amount of trace elements generated by the trace generation logic 120.
It is also recognised that redundancy can also occur due to, for example,trace elements being generated in response to a change which could have been determined.
2s Such determination is possible when, for example, a trace element is to be issued which includes information relating to a change in architectural state and the architectural state which was used to cause the change has been provided in trace elements generated previously. Given that the architectural state is dependent on previously-generated trace elements, it could have been determined or calculated from those previously-generated 30 trace elements. Hence, the generation of trace elements which can be determined can be eliminated, thus further reducing the amount of trace elements generated by the trace generation logic 120.
Hence, the amount of trace elements generated by trace generation logic 120 can be limited to that which is not derivable by a trace analysing tool. As mentioned above, it will be appreciated that architectural state will be derivable by the trace analysing tool if it has been provided in trace elements issued by the trace generation logic 120 5 previously or can be deduced from those previously provided trace elements.
In order to enable the trace generation logic 120 to determine whether a change in architectural state is derivable by the trace analysing tool, the trace generation logic 120 maintains a record of architectural state for which trace elements have been provided. In this illustrative embodiment, this record is provided in the form of a lo number oftables 180. The tables 180 may comprise a register table, a memory table and an instruction memory table. Also, more than one register table, memory table and instruction memory table may be provided. The provision of than one memory table is particularly suited to situations where subroutines or other sequences of instruction are executed which result in branches to particular regions of memory or where multiple is stacks are created. However, it will be appreciated that the record could take any suitable form and may comprise just one table.
An entry is provided in the tables for each item of architectural state that is to be traced. As will be described in more detail below, an indication is made against that entry when it is determined that the value of that item of architectural state can be 20 derived by the trace analysing tool. Hence, when a change occurs the trace generation logic 120 can reference the entries to determine which items of architectural state are not derivable and to generate trace elements for those items accordingly.
Figures 3A to 3E illustrate processing steps performed by the on-chip trace module 10 when generating trace elements in conjunction with the tables 180. The 25 processing described assumes that a triggerable event has occurred, that trigger 110 has enabled the trace generation logic 120 to generate trace elements and that the instruction in the position in the reference opcode stored in the trace analysing tool has been synchronized with the instruction being executed by the processor core 6. The architectural state which is traced in this illustrative example only includes registers and 30 memory addresses although it will be appreciated that any architectural state may be traced.
t Figure 3A, in overview, illustrates the main steps taken by the trace generation logic 120, once enabled, in the generation of trace elements. The main steps taken in response to receipt of data indicative of an instruction being executed by the processor core 6 are illustrated which involve generating an instruction trace and then performing 5 steps that trace branch instructions and also trace data.
Processing begins at step S10 and proceeds to step S20.
At step S20, the trace generation logic 120 waits for an indication that an instruction is being executed by the processor core 6.
Once the indication is received processing proceeds to step S22 where an lo optional routine of periodic clearing of the tables may be performed. As mentioned previously, such periodic clearing of the tables helps to ensure that if any corruption in the trace occurs then only a portion of the trace may be lost. If corruption occurs then the trace generation logic 120 may assume that some architectural state is derivable by the trace analysing tool whereas in fact this is not the case because either the trace 5 analysing tool did not receive trace elements or the trace elements were corrupted i some way. By clearing the tables it is assumed that no architectural state is derivable by the trace analysing tool which effectively resets the process. Hence, subsequent changes are traced and the tables updated accordingly. If the periodic clearing of tables is to be performed then processing proceeds to step S24 where entries in the tables are cleared.
20 It will be appreciated that all entries in all tables could be cleared or alternatively different tables or portions of tables may be cleared at different times in order to reduce out the number of trace elements that would need to be generated.
Processing then proceeds to step S30 where an instruction trace element is issued to the FIFO 130. The instruction trace element ensures that synchronization is 25 maintained between the opcode being processed by the processor core 6 and the reference opcode stored in the trace analysing tool. The instruction trace, in its simplest form may be merely an indication that the processor core 6 has moved onto the next instruction without necessarily providing any information on what that instruction may be. 30 Thereafter, an optional sequence involving the tracing of the opcodes may be performed, if required, as will be described with reference to Figure 3E below.
( --, 26
At step S40 it is determined whether the instruction being executed relates to a so-called indirect branch. It will be appreciated that indirect branches are branches in the sequence of instructions executed by the processor core 6 which occur not as a result of the issue of a conventional branch instruction but are due to the manipulation of, for 5 example, the program counter.
Tracing Branches When the instruction relates to an indirect branch, a series of steps (S50, S60, S90, S80) are performed which relate to tracing indirect branches. Otherwise, processing proceeds to step S70. Indirect branches are instructions which modify the lo program counter (pc) with reference to some other component of architectural state, making the destination impossible to infer from the opcode. For example, the instruction B #20 (i.e. add the immediate "20" to the contents of the program counter) is an example of a direct branch since the destination is directly derivable from the opcode.
Whereas the instruction ADD pc, pc, rl (i.e. add the contents of the register rl to the 5 program counter and store the result in the program counter) is an example of an indirect branch since the destination is not directly derivable from the opcode but is instead dependent on the contents of the register rl. It will be appreciated that the pc is just another item of architectural state whose value does not need to be traced if it is derivable by the trace analysing tool. However, it will also be appreciated that the pc is 20 one item of architectural state which needs to be derivable by the trace analysing tool to ensure proper synchronization.
If the instruction relates to an indirect branch, then at step S50 it is determined whether the indirect branch involves a load to the pc (i.e. an access from memory whose value is loaded into the program counter).
25 If the indirect branch does involve a load to the pc then processing proceeds to step S60 where it is determined whether an indication has been made in the table entry for the address of the memory location being accessed that the value stored at that memory location is derivable by the trace analysing tool. The memory location being accessed provides a value which indicates the address to which the indirect branch 30 should be made. If an indication has been made in the table, then no trace element needs be generated and processing proceeds to step S70. If no indication has been made in the table, then at step S65 processing stalls until the data associated with the data transfer is
received, thereafter, at step S80, an instruction trace, which indicates that a branch has occurred to a particular address, is issued and processing proceeds to step S70.
If, instead, the indirect branch does not involve a load to the pc (i.e. the instruction does not involve an access from memory, but instead involves accessing one 5 or more registers) then processing proceeds to step S90 where it is determined whether an indication has been made in the table entry for the source register(s) being accessed that the value of that source register(s) is/are derivable by the trace analysing tool. The source register(s) provide a value which indicates the address to which the branch should be made. If such an indication has been made in the table then no trace element needs lo be generated and processing proceeds to step S70. If no indication has been made in the table then at step See, an instruction trace, which indicates that a indirect branch has occurred to a particular address, is issued and processing proceeds to step S70.
As mentioned above, if at step S40 it is determined that the instnction does not relate to an indirect branch then processing proceeds directly to step S70.
5 Hence, for direct branches only an instruction trace need be generated as step S30 since the reference opcode in the trace analysing tool will identify the next instruction to be performed by the processor core 6 and hence the value of the program counter will be derivable which ensures that synchronization is maintained.
When further data is to be traced, a series of steps (S100, S 110, and Figures 3B, 20 3C and 3D) are performed which relate to tracing data associated with instructions such as load, store or data process. Otherwise, processing returns to step S20.
Tracing Data At step S70, it is determined whether there is data to be traced because, for example, the instruction will modify or change architectural state other than or in 25 addition to the program counter, such as a data transfer. If no further data is to be traced then processing proceeds back to step S20. If there is further data to be traced then processing proceeds to step S100 where processing stalls until the data associated with the data transfer is received. Once the data is received processing proceeds to step S110.
At step S 1 10 the type of data transfer is determined.
30 If at step S 1 10 it is determined that the data transfer relates to a load instruction (i.e. an access from memory which is to be stored in a register) then processing proceeds to step S120, as illustrated in Figure 3B.
( If at step S110 it is determined that the data transfer relates to a data process instruction (i.e. an operation on the values contained in one or more source registers, the result of which is to be stored in a destination register) then processing proceeds to step S230, as illustrated in Figure 3C.
5 If at step S 110 it is detennined that the data transfer relates to a store instruction (i.e. an access from a register which is to be stored in memory) then processing proceeds to step S260, as illustrated in Figure 3D.
Load Instructions Figure 3B illustrates the processing steps for tracing a load instruction.
lo At step S120 it is determined whether the contents of the register containing a value corresponding to the address in memory to be accessed is derivable by the trace analysing tool by determining whether an indication has been made in the register table entry associated with that register. It will be appreciated that for some complex addressing modes, the register or registers from which the address in memory is derived 5 must be derivable by the trace analysing tool.
If it is determined that the contents of the register is not derivable because no indication has been made in the register table entry associated with that register then processing proceeds to step S130. At step S130 an address trace is issued and processing then proceeds to step S140. At step S140, the register table entr.,v associated To with the register containing the value corresponding to the address in memory to be accessed is updated to indicate that the contents of the register is derivable by the trace analysing tool. However, as mentioned above, in some complex addressing modes which utilise, for example, multiple registers it may not be possible to determine or even infer the contents of the register or registers in which case no such indication is made :5 against the associated register table entries.
If it is determined that the contents of the register is derivable because an indication has been made in the register table entry associated with that register then no address trace is required and processing proceeds to step S 150.
At step S 150 it is determined whether the contents of the memory address to be 30 accessed is derivable by the trace analysing tool by determining whether an indication has been made in the memory table entry associated with that memory address.
If it is determined that the contents of the memory address to be accessed is not derivable because no indication has been made in the memory table entry associated with that memory address then processing proceeds to step S 160.
At step S160 it is determined whether the load instruction is a load to the 5 program counter which will result in an indirect branch.
If it is determined that the load instruction will result in an indirect branch then no trace element need be generated (because a trace element will have already been generated at step S80) and processing proceeds to step S 170.
If it is determined that the load instruction will not result in an indirect branch lo then a data trace element indicative of the contents of the memory address to be accessed is issued at step S 180 and processing proceeds to step S 170.
At step S170 it is determined whether the memory address to be accessed is within the current range of the memory table.
If it is determined that the memory address to be accessed is not within the 5 current range of the memory table then the raring of the memory table is adjusted at steps Sl90 and S200. At step Sl9O, all entries in the memory table are cleared and at step S200 the memory base address of the memory table is updated and processing proceeds to step S210. An example update of the memory base address will be illustrated in more detail with reference to Figures 4A and 4B below.
20 If it is determined that the memory address to be accessed is within the current range of the memory table then processing proceeds to step S2 10.
At step S210, the entry in the memory table associated with the memory address to be accessed is updated to indicate that the contents of this memory address is derivable by the trace analysing tool and processing proceeds to step S220.
25 However, if at step S150 it is determined that the contents of the memory address to be accessed is derivable because an indication has been made in the memory table entry associated with that memory address then no trace element needs be generated and processing proceeds directly to step S220.
At step S220, the entry in the register table associated with the register into 30 which data is to be loaded is updated to indicate that the content of this register is derivable by the trace analysing tool and processing returns to step S20.
Data Process Instructions
r Figure 3C illustrates the processing steps for tracing a data process instruction.
At step S230 iris determined whether the value(s) of the source register(s) are derivable by the trace analysing tool by determining whether an indication has been made in the register table entry associated with each source register.
s If it is determined that the value of the source register(s) are not derivable because no indication has been made in the register table entries associated with those source registers then processing proceeds to step S235.
At step S235 it is determined whether the data process instruction involves manipulation of the program counter which will result in an indirect branch.
0 If it is determined that the data process instruction will result in an indirect branch then no trace element need be generated (because a trace element will have already been generated at step S80) and processing proceeds to step S250.
If it is determined that the data process instruction will not result in an indirect branch then at step S240 trace element(s) are generated which are indicative of the new value of the destination register and processing proceeds to step S250.
However, if at step S230 it is determined that the value of the source register(s) are derivable because an indication has been made in the register table entries associated with those source registers then no trace elements need be generated and processing proceeds to step S250.
20 At step S250, the entry in the register table associated with the destination register is updated to indicate that the content of this register is derivable by the trace analysing tool and processing returns to step S20.
Store Instructions Figure 3D illustrates the processing steps for tracing a store instruction.
25 At step S260 it is determined whether the contents of the register containing a value corresponding to the address in memory into which data is to be stored is derivable by the trace analysing tool by determining whether an indication has been made in the register table entry associated with that register. It will be appreciated that for some complex addressing modes, the register or registers from which the address in memory 30 is derived must be derivable by the trace analysing tool.
If it is determined that the contents of the register is not derivable because no indication has been made in the register table entry associated with that register then
( P013521GB 31
processing proceeds to step S270. At step S270 an address trace is issued and processing then proceeds to step S280. At step S28O, the rester table entry associated with the register containing the value corresponding to the address in memory into which data is to be stored is updated to indicate that the contents of the register is 5 derivable by the trace analysing tool, and processing proceeds to step S290. However, as mentioned above, in some complex addressing modes which utilise, for example, multiple registers it may not be possible to determine or even infer the contents of the register or registers in which case no such indication is made against the associated register table entries.
0 If it is determined that the contents of the register is derivable because an indication has been made in the register table entry associated with that register then no address trace is required and processing proceeds directly to step S290.
At step S290 it is determined whether the value of the source register is derivable by the trace analysing tool by determining whether an indication has been made in the 5 register table entry associated with that register.
If it is determined that the value of the source register is not derivable because no indication has been made in the register table entry associated with that source register then processing proceeds to step S300. At step S300 a trace element is generated which is indicative of the value of the source register and processing proceeds to step S310. At 20 step S310, the entry in the register table associated with the source register is updated to indicate that the content of this register is derivable by the trace analysing tool and processing proceeds to step S320.
However, if at step S290, it is determined that the value of the source register is derivable because an indication has been made in the register table entry associated with 25 that source register then no trace elements need be generated and processing proceeds directly to step S320.
At step S320 it is determined whether the memory address into which data is to be stored is within the current range of the memory table.
If it is determined that the memory address is not within the current range of the 30 memory table then the range of the memory table is adjusted at steps S330 and S340. At step S330, all entries in the memory table are cleared and at step S340 the memory base address of the memory table is updated and processing proceeds to step S350.
However, if at step S320, it is determined that the memory address into which data is to be stored is within the current range of the memory table then processing proceeds directly to step S350.
At step S350, the entry in the memory table associated with the memory address s into which data is to be stored is updated to indicate that the contents of this memory address is derivable by the trace analysing tool and processing returns to step S20.
Trace Opcodes Figure 3E illustrates an optional series of steps relating to the tracing of opcodes.
As mentioned above, the trace analysing tool stores reference opcodes which are used to 0 interpret the trace elements being generated by the trace generation logic in order to reconstruct the architectural state of the data processing apparatus 2. The position in the opcode within the trace analysing tool is synchronized with the instruction being executed by the processor core 6. If the instruction being executed by the processor core 6 is not included within the reference opcodes in the trace analysing tool then the steps 5 illustrated in Figure 3E advantageously enable that opcode to be traced.
Typically, a separate instruction memory table is provided which provides an indication of the reference opcodes included within the trace analysing tool. This is because instructions and data will typically reside in different portions of memory.
However, it will be appreciated that the same table as that used to provide an indication to of whether a particular memory address is derivable by the trace analysing tool could equally be used.
Hence, at step S360 it is determined whether an instruction being processed by the processor core 6 is derivable by the trace analysing tool by determining whether an indication has been made in the instruction memory table entry associated with the 25 memory address of the instruction.
If it is determined at step S360 that the instruction is not derivable because no indication has been made in the instruction memory table entry associated with the memory address of that instruction then processing proceeds to step S370. At step S370 a trace element is generated indicative of the instruction being processed by the 30 processor core 6 and processing proceeds to step S380.
At step S380 it is determined whether the memory address of the instruction is within the current range of the instruction memory table.
If it is determined at step S380 that the memory address of the instruction is not within the current range of the instruction memory table then the range of the instruction memory table is adjusted at steps S390 and S400. At step S390, all entries in the instruction memory table are cleared and at step S400 the memory base address of the 5 instruction memory table is updated and processing proceeds to step S410.
If it is determined at step S380 that the memory address of the instruction is within the current range of the instruction memory table then processing proceeds directly to step S410.
At step S410, the entry in the instruction memory table associated with the o memory address of the instruction is updated to indicate that this instruction is derivable by the trace analysing tool and processing proceeds to step S40.
However, if it is determined at step S360 that the instruction is derivable because an indication has been made in the instruction memory table entry associated with the memory address of that instruction then processing proceeds directly to step S40.
I s Figures 4A and 4B illustrate example instructions executed by the processor core together with the associated trace elements and table entries generated by the trace generation logic 120 of the on-chip trace module 10.
The following assumes that a triggerable event has occurred, that trigger 110 has enabled the trace generation logic 120 to generate trace elements, that the instruction in 20 the position in the reference opcode stored in the trace analysing tool has been synchronised with the instruction being executed by the processor core 6. Also, the following assumes that all instructions are derivable by the trace analysing tool and that no opcode trace is required. Furthermore, it is assumed that separate register, memory and opcode tables are provided.
25 Where a trace is issued, it is assumed that it will be represented in such a manner that its type, position and any associated values or parameters can be identified using techniques similar to known trace protocols. Such protocols may require placcholders to be inserted where a trace is suppressed due to the change in architectural state with which the trace is associated being derivable.
30 At step S20, the trace generation logic 120 waits to receive an instruction.
( The instruction or opcode LDR rl, [rO] (i.e. load the value stored in the memory address referred to by the contents of rO into rl) is received (as shown at la in Figure 4A). At step S22 it is determined whether the tables are to be cleared. Typically, the 5 clearing occurs following the triggerable event and periodically thereafter. For example, the clearing could be arranged to be performed every 'n' instructions. In this case it is determined that the register and memory tables are to be cleared and at step S24 the entries in those tables are cleared (it will be appreciated, however, that all tables could be cleared or reset if required).
lo At step S30 an instruction trace is issued (as shown at lb in Figure 4A) to maintain opcode synchronization between the processor core 6 and the trace analysing tool. For illustrative purposes, it is assumed that the register rO contains the value "00002000" and the value "act" is stored at the memory address "00002000".
At step S40 it is determined that the instruction is not related to an indirect 5 branch, at step S70 it is determined that the instruction is instead related to a data transfer and at step S100 the trace generation logic 120 waits to receive an indication of the data accessed from memory.
At step SllO it is determined that the instruction is a load instruction and processing proceeds to step S 120.
20 Because all the register tables have been cleared, there is no indication in the register entry for register rO that the contents of this register is derivable by the trace analysing tool and the contents of rO, namely the value "00002000", is traced (as shown at Ic in Figure 4A) at step Sl30. Thereafter, the entry in the register table associated with rO is set (as shown at Id in Figure 4A) because the contents of this register is now 25 derivable by the trace analysing tool.
Because all the memory tables have been cleared, there is no indication in the memory entry for memory address "00002000" that the contents of this address is derivable by the trace analysing tool. Hence, because the load instruction is not an indirect branch the contents of memory address "00002000", namely the value "act" is 30 traced (as shown at I e in Figure 4A) at step S 180.
At step S170, because all the memory tables have been cleared, it is determined that the memory address "00002000" is not within the range of the memory table and at
/ step S200, the memory base address is updated (as shown at If in Figure 4A). The memory base address stores the five most significant bits (MSBs) of the address and at step S2 10, the entry in the memory table associatedwith the memory address is updated (as shown at lg in Figure 4A) to indicate that the content of this memory address is 5 derivable by the trace analysing tool.
At step S220, because the contents of the register rl, namely the value "aa'7, is now derivable by the trace analysing tool, the entry associated with rl is updated in the register table (as shown at lh in Figure 4A) and processing returns to step S20 to await the next instruction.
0 Next, the instruction or opcode ADD r2, rl, #1 (i.e. add the immediate "1" to the value stored in the source register rl and store the result in the destination register r2) is received (as shown at 2a in Figure 4A). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 2b in Figure 4A) to maintain opcode synchronization between the processor 5 core 6 and the trace analysing tool.
At step S40 it is determined that the instruction is not related to an indirect branch, at step S70 it is determined that the instruction is instead related to a data transfer and at step S100 the trace generation logic 120 waits to receive an indication of the data accessed from memory.
20 At step S 110 it is determined that the instruction is a data process instruction and processing proceeds to step S230.
* At step S230 it is determined that the contents of the source register is derivable by the trace analysing tool because an indication has been made in the entry associated with rl in the register table. Hence, no trace element indicative of the contents of r2 25 need be generated. Instead, the entry in the register table associated with r2 is simply updated at step S250 (as shown at 2c in Figure 4A) because the contents of this register is derivable by the trace analysing tool and processing returns to step S20 to await the next instruction.
Next, the instruction or opcode ADD r4, r2, r3 (i.e. add the value stored in the 30 source register r2 to the value stored in the source register r3 and store the result in the destination register r4) is received (as shown at 3a in Figure 4A). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an
( instruction trace is issued (as shown at 3b in Figure 4A) to maintain opcode synchronization between the processor core 6 and the trace analysing tool.
At step S40 it is determined that the instruction is not related to an indirect branch, at step S70 it is determined that the instruction is instead related to a data 5 transfer and at step S100 the trace generation logic 120 waits to receive an indication of the data accessed from memory.
At step S110 it is determined that the instruction is a data process instruction and processing proceeds to step S230.
At step S230 it is determined that the contents of both source registers are not lo derivable by the trace analysing tool because no indication has been made in the entry associated with r3 in the register table. At step S235 it is determined that the instruction does not involve the program counter and so does not involve an indirect branch.
Hence, a trace element indicative of the contents to be stored in r4 is generated at step S240 (as shown at 3c in Figure 4A) and the entry in the register table associated with r4 is is updated at step S250 (as shown at 3d in Figure 4A) because the contents of this register is derivable by the trace analysing tool and processing returns to step S20 to await the next instruction.
Next, the instruction or opcode STR r4, [rO+#4] (i.e. store the contents of the source register r4 into the memory address derived from adding the immediate "4" to the 20 value stored in the memory address register rO) is received (as shown at 4a in Figure 4A). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 4b in Figure 4A) to maintain opcode synchronization between the processor core 6 and the trace analysing tool. 25 At step S40 it is determined that the instruction is not related to an indirect branch, at step S70 it is determined that the instruction is instead related to a data transfer and at step S 100 the trace generation logic 120 processing proceeds to step S 110 since there is no need to wait to receive an indication of the data accessed from memory.
At step SllO it is determined that the instruction is a store instruction and 30 processing proceeds to step S260.
At step S260 it is determined that the contents of the register containing the memory address (rO) and at step S290 it is determined that the contents of the source
! em. 37 register (r4) are both derivable by the trace analysing tool because indications have been made in the entries associated with rO and r4 in the register table. Hence, no trace element indicative of the contents to be stored in the memory address "00002004" need be generated.
5 Also, because the address "00002004" is determined to be within the range of the memory table, the entry in the memory table associated with the address "00002004" is simply updated at step S350 (as shown at 4c in Figure 4A) because the contents of this memory address is derivable by the trace analysing tool and processing returns to step S20 to await the next instruction.
0 Next, the instruction or opcode STR rS, [rO] (i.e. store the contents of the source register rS into the memory address whose value is stored in the memory address register rO) is received (as shown at Sa in Figure 4B). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 5b in Figure 4B) to maintain opcode synchronization between the 5 processor core 6 and the trace analysing tool.
At step S40 it is determined that the instruction is not related to an indirect branch, at step S70 it is determined that the instruction is instead related to a data transfer and at step S 100 the trace generation logic 120 processing proceeds to step S 110 since there is no need to wait to receive an indication of the data accessed from memory.
20 At step SllO it is determined that the instruction is a store instruction and processing proceeds to step S260.
At step S260 it is determined that the contents of the register containing the memory address (rO) is derivable by the trace analysing tool because an indication has been made in the entry associated with rO in the register table. Hence, no trace element 25 indicative of the contents of rO need be generated.
At step S290 it is determined that the contents of the source register (ff) is not derivable by the trace analysing tool because no indication has been made in the entry associated with r5 the register table. Hence, at step S300, a trace element indicative of the contents of r5, namely the value "cc" is generated (as shown at Sc in Figure 4B) and 30 the entry in the register table associated with ff is updated at step S310 to indicate that the contents of this register is derivable by the trace analysing tool (as shown at 5d in Figure 4B).
( Also, because the address "00002000" is determined at step S320 to be within the range of the memory table, the entry in the memory table associated with the address "00002000" is simply updated at step S350 because the contents of this memory address is derivable by the trace analysing tool (although no change is evident since the entry for 5 this memory address has already been set) and processing returns to step S20 to await the next instruction.
Next, the instruction or opcode MOV pc, r6 (i.e. change the value of the program counter to the value stored in the source register r6) is received (as shown at 6a in Figure 4B). At step S22 it is determined that the register and memory tables are not to be lo cleared and at step S30 an instruction trace is issued (as shown at 6b in Figure 4B) to maintain opcode synchronization between the processor core 6 and the trace analysing tool. At step S40 it is detemmined that the instruction is related to an indirect branch, at step S50 that the indirect branch does not involve load from memory to the program 5 counter and at step S90 it is determined that the contents of the source register (r6) is not derivable by the trace analysing tool because no indication has been made in the entry associated with r6 in the register table. Hence, at step See, a trace element indicating a branch to the memory address specified by the contents of r6, namely the value "dd" is generated (as shown at 6c in Figure 4B). Because a branch instruction trace has been 20 issued which specifies the change in the value stored in the program counter the performing a data trace of the contents of the register r6 can be suppressed and processing returns via step S70 to step S20 to await the next instruction. It will be appreciated that as a further step, it is possible to infer the contents of the register r6 and that the entry associated with r6 in the register table could be updated.
2s Next, the instruction or opcode MOV pc, rl (i.e. change the value of the program counter to the value stored in the source register rl) is received (as shown at 7a in Figure 4B). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 7b in Figure 4B) to maintain opcode synchronization between the processor core 6 and the trace analysing 30 tool. At step S40 it is determined that the instruction is related to an indirect branch, at step S50 that the indirect branch does not involve load from memory to the program
counter and at step S90 it is determined that the contents of the source register (rl) is derivable by the trace analysing tool because an indication has been made in the entry associated with rl in the register table. Hence, no trace element indicating a branch to the memory address specified by the contents of rl need be generated because the 5 change in the value of the program counter can be implied. Accordingly, the data trace and the branch instruction trace are suppressed and processing returns via step S70 to step S20 to await the next instruction. As mentioned previously, it would be possible to output a placeholder to indicate to the trace analysing tool that the suppression has occurred. lo Next, the instruction or opcode LDR r2, [rO+#4] (i.e. load into r2 the value stored in the memory address referred to by adding the immediate "4" to the contents of rO) is received (as shown at 8a in Figure 4B). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 8b in Figure 4B) to maintain opcode synchronization between the processor I S core 6 and the trace analysing tool.
At step S40 it is determined that the instruction is not related to an indirect branch, at step S70 it is determined that the instruction is instead related to a data transfer and at step S100 the trace generation logic 120 waits to receive an indication of the data accessed from memory.
20 At step SllO it is determined that the instruction is a load instruction and processing proceeds to step S 120.
At step S120 it is determined that the register containing the memory address (rO) is derivable by the trace analysing tool because there is an indication in the register entry for register rO. Hence, the value of rO does not need to be traced and processing 25 proceeds directly to step S150.
At step S150 it is determined that the contents of the source memory address (00002004) is derivable by the trace analysing tool because there is an indication in the memory entry for memory address "00002004". Hence, the value of the contents of the memory address "00002004", namely "bb", does not need to be traced and processing 30 proceeds directly to step S220.
At step S220 the entry in the memory table associated with the address "00002004" is updated (although no change is evident since the entry for this memory
address has already been set) and processing returns to step S20 to await the next instruction. Next, the instruction or opcode LDR pc, [rO-#4] (i. e. load into the program counter the value stored in the memory address referred to by subtracting the immediate 5 "4" from the contents of rO) is received (as shown at 9a in Figure 4B). At step S22 it is determined that the register and memory tables are not to be cleared and at step S30 an instruction trace is issued (as shown at 9b in Figure 4B) to maintain opcode synchronization between the processor core 6 and the trace analysing tool.
At step S40 it is determined that the instruction is related to an indirect branch.
lo At step S50 it is determined that the instruction involves a load to the program counter and at step S60 that the source address (00001 fib) is not in the memory table because no indication has been made in the entry associated with that address. Hence, at step S65 processing stalls until the data associated with the load is received and at step S80 a trace element indicating that a branch to address "ee" (as shown at 9c in Figure 4B) is issued 5 and processing proceeds to step S70.
At step S70 it is determined that the instruction is related to a data transfer and at step S100 the trace generation logic 120 waits to receive an indication of the data accessed from memory.
At step S110 it is determined that the instruction is a load instruction and to processing proceeds to step S120.
At step Sl20 it is determined that the register containing the memory address (rO) is derivable by the trace analysing tool because there is an indication in the register entry for register rO. Hence, the value of rO does not need to be traced and processing proceeds directly to step S150.
25 At step S150 it is determined that the contents of the source memory address (00001 fib) is not derivable by the trace analysing tool because there is no indication in the memory entry for memory address "OOOOlffc".
At step Sl60 it is determined that because the instruction involves a load to the program counter, this instruction is an indirect branch and hence no data trace is 30 necessary since the contents of the source address (OOOOlffc), i.e. the value "ee", has already been traced at step S80 and, hence, the performing a data trace of the contents of
( the contents of the source address (OOOOlffc) can be suppressed and processing proceeds to step S170.
At step S170 it is determined that the memory address "OOOOlffc" is not within the range of the memory table. Hence, at step S190 the memory table is cleared (as 5 shown at 9d in Figure 4B), at step S200 the memory base address is updated to "OOOOlxxx" (as shown at 9e in Figure 4B) and at step S210, the entry in the memory table associated with the memory address (namely "OOOOlffc") is updated (as shown at 9f in Figure 4B) to indicate that the content of this memory address is derivable by the trace analysing tool. Alternatively, as mentioned previously, a further table may be lo provided whose base address is set to "OOOOlxxx" or the existing memory table may be arranged to be cleared only when a number of successive accesses are made to memory addresses outside the range of the memory table in order to improve table stability.
At step S220, the entry associated with the program counter register is updated in the register table (not shown since no change would be noticeable because the value 5 of the program counter will always be derivable using the instruction trace) and processing returns to step S20 to await the next instruction.
It will be appreciated that although for illustrative purposes, the above examples relate to simple instructions whereby a change in a single item of architectural state is traced, tracing of more complex instructions whereby changes in multiple items of 20 architectural state are required to be traced could equally be performed. For example, the complex instruction could be considered as a number of simple instructions, each simple instruction causing the change in one item of architectural state to be traced.
Alternatively, a placeholder could be provided for changes in each item of architectural state which are not required to be traced.
25 To illustrate this, consider the example instruction or opcode LDM rO{rl-r4} (i.e. load into rl the value stored in the memory address referred to by contents of rO, load into r2 the value stored in the memory address referred to by adding the immediate #4 (or some other constant) to the contents of rO, load into r3 the value stored in the memory address referred to adding the immediate #8 to the contents of rO, load into r4 30 the value stored in the memory address referred to adding the immediate #12 to the contents of rO).
( Assume now that, for illustrative purposes, the contents of the register rO is derivable, that the contents of the memory address referred to by contents of the register rO is derivable and that the contents of the memory address referred to by adding the immediate #12 contents of the register rO is derivable. However, also assume that the 5 contents of the memory address referred to by adding the immediate #4 contents of the register rO is not derivable and that the contents of the memory address referred to by adding the immediate #8 contents of the register rO is not derivable.
In the example where the instruction is represented by a series of simple instructions,namely, LDR rl, trO]; LDR r2,[rO,#4]; LDR r3,[rO,#]; and LDR lo r4,[rO,#12], the following trace elements are generated.
For LDR rl, [rOl, an instruction trace is issued and no data trace is issued since the contents of the of the memory address referred to by the contents of the register rO is derivable. For LDR r2, [rO,#4], an instruction trace is issued and a data trace indicative of is the contents of the memory address referred to by adding the immediate #4 to the contents of the register rO is issued since the contents of that memory address is not derivable. For LDR r3, [rO,#], an instruction trace is issued and a data trace indicative of the contents of the memory address referred to by adding the immediate #8 to the 20 contents of the register rO is issued since the contents of that memory address is not derivable. For LDR r4, [rO,#12], an instruction trace is issued and no data trace is issued since the contents of the of the memory address referred to by adding the immediate #8 to the contents of the register rO is derivable.
2s In the alternative example which utilises placeholders, a single instruction trace is issued and the data trace takes the form placcholder, data trace, data trace, placeholder.
The issue of the first placeholder indicates to the trace analysing tool that the contents of the of the memory address referred to by the contents of the register rO is derivable. The first data trace is indicative of the contents of the memory address referred to by adding 30 the immediate #4 to the contents of the register rO and is issued since the contents of that memory address is not derivable. The second data trace is indicative of the contents of the memory address referred to by adding the immediate #8 to the contents of the
register rO and is issued since the contents of that memory address is not derivable. The issue of the second placeholder indicates to the trace analysing tool that the contents of the ofthe memory address referred to by adding the immediate #12 to the contents of the register rO is derivable.
5 Although a particular embodiment of the invention has been described herewith, it will be apparent that the invention is not limited thereto, and that many modifications and additions may be made within the scope of the invention. For example, various combinations of the features of the following dependent claims could be made with the features of the independent claims without departing from the lo scope ofthe present invention.

Claims (1)

  1. t Claims
    1. A trace module operable to trace changes in a subset of architectural state of a data processing apparatus with which the trace module is coupled, said trace module 5 comprising: a trace generation unit operable to receive input signals from one or more components of said data processing apparatus indicative of a change in said subset of architectural state and to generate from one or more of said input signals a number of trace elements indicative of said change so as to enable a recipient of said trace elements lo to subsequently reconstruct said subset of architectural state; and a table maintained by said trace generation unit to identify architectural state derivable from previously generated trace elements, said trace generation unit referencing said table in order to determine which trace elements to generate during said trace generation.
    2. A trace module as claimed in claim I, wherein said subset of architectural state comprises a number of items of architectural state and said table has one or more entries associated with each item of architectural state, said trace generation unit being operable to make an indication in each entry when said item of architectural state is derivable by JO said recipient.
    3. A trace module as claimed in claim 2, wherein in response to the receipt of one or more of said input signals, said trace generation unit is operable to determine whether said change in an item of architectural state is derivable by said recipient by 2s determining whether an indication has been made in each entry associated with that item of architectural state.
    4. A trace module as claimed in claim 2 or 3, wherein in response to the receipt of one or more of said input signals, said trace generation unit is operable to determine 30 whether said change in an item of architectural state is derivable by said recipient by determining whether an indication has been made in each entry associated with items of architectural state utilised to effect said change in said item of architectural state.
    ( 5. A trace module as claimed in any one of claims 2 to 4, wherein said trace generation unit is operable to generate a number of trace elements indicative of said change in said item of architectural state not derivable by said recipient and to make s an indication in each entry associated with that item of architectural state.
    6. A trace module as claimed in any preceding claim, wherein each item of architectural state has an architectural state value and said trace generation is operable to generate a number of trace elements indicative of said change in said architectural state lo value. 7. A trace module as claimed in claim 6, wherein said change in said architectural state value causes sEd item of architectural state to have a new value, said trace 3 generation unit being operable to generate a number of trace elements indicative of 5 said new value when said new value is not derivable by said recipient and to make an indication in each entry associated with that item of architectural state.
    8. A trace module as claimed in any preceding claim, wherein said subset of architectural state comprises the contents of a number of registers and said table has a 20 register entry associated with each of said number of registers.
    9. A trace module as claimed in claim 8, wherein in response to an input signal indicative of a change in the contents of a register to a new value, said trace generation unit is operable to make an indication in each entry associated with that register when 25 said new value is derivable by said recipient.
    10. A trace module as claimed in claim 8, wherein in response to an input signal indicative of a change in the contents of a register to a new value, said trace generation unit is operable to generate a number of trace elements indicative of said new value 30 when said new value is not derivable by said recipient and to make an indication in each entry associated with that register.
    _.- 46
    11. A trace module as claimed in claim 8, wherein said number of registers includes a number of source registers and a number of destination registers and in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on the contents one or more of said source registers, said trace generation unit 5 is operable to generate a number of trace elements indicative of said new value when said new value is not derivable by said recipient and to make an indication in each entry associated with said destination register.
    12. A trace module as claimed in claim 8, wherein said number of registers include a lo number of source registers and a number of destination registers and, in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on the contents of one or more of said source registers, said trace generation unit is operable to make an indication in each entry associated with said destination register when said new value is derivable by said recipient.
    13. A trace module as claimed in any one of claims 8 to 10, wherein said number of registers include a number of destination registers, said architectural state further comprises the contents of a number of memory addresses and, in response to an input signal indicative of a change in the contents of a destination register to a new value so dependent on the contents of one or more of said memory addresses, said trace generation unit is operable to generate a number of trace elements indicative of said one or more memory addresses when said one or more memory addresses are not derivable by said recipient and to make an indication in each entry associated with said one or more memory addresses.
    14. A trace module as claimed in claim 8 to 10, wherein said number of registers include a number of destination registers, said architectural state further comprises the contents of a number of memory addresses and, in response to an input signal indicative of a change in the contents of a destination register to a new value dependent on the so contents of one or more of said memory addresses, said trace generation unit is operable to make an indication in each entry associated with said one or more memory addresses when said new value is derivable by said recipient.
    15. A trace module as claimed in any preceding claim, wherein said subset of architectural state comprises the contents of a number of memory addresses and said table has an address entry associated with each of said number of memory addresses.
    16. A trace module as claimed in claim 15, wherein in response to an input signal indicative of the contents of a memory address changing to a new value, said trace generation unit is operable to make an indication in each address entry associated with that memory address when said new value is derivable by said recipient.
    17. A trace module as claimed in claim 15, wherein in response to an input signal indicative of the contents of a memory address changing to a new value, said trace generation unit is operable to generate a number of trace elements indicative of said new value when said new value is not derivable by said recipient and to make an 5 indication in each address entry associated with that memory address.
    18. A trace module as claimed in claim 15, wherein in response to an input signal indicative of the contents of a memory address changing to a new value dependent on one or more registers, said trace generation unit is operable to make an indication in 20 each address entry associated with that memory address when said new value is derivable by said recipient.
    19. A trace module as claimed in claim 15, wherein in response to an input signal indicative of the contents of a memory address changing to a new value dependent on 2s one or more registers, said trace generation unit is operable to generate a number of trace elements indicative of said new value when said new value is not derivable by said recipient and to make an indication in each address entry associated with that memory address.
    30 20. A trace module as claimed in claim 19, wherein in response to an input signal indicative of the contents of a memory address changing to a new value, said trace generation unit is operable to generate a number of trace elements indicative of said
    memory address when said memory address is not derivable by said recipient and to make an indication in each register entry providing that memory address.
    21. A trace module as claimed in any of claims 15 to 20, wherein said table 5 comprises one or more tables, each having a base address entry associated with a base memory address and an address entry associated with each of a range of memory addresses logically offset from said base address, said trace generation unit being operable to determine, in response to an input signal indicative of the contents of a memory address changing to a new value, whether said memory address is within one of lo said ranges and, if so, to make an indication in said address entry associated with that memory address.
    22. A trace module as claimed in claim 21, wherein said trace generation unit is operable to determine, in response to an input signal indicative of the contents of a 15 memory address changing to a new value, whether said memory address is within one of said ranges and, if not, to clear all address entries in one of said tables, to update the base address entry of that table, to generate a number of trace elements indicative of said new value and to make an indication in said address entry associated with said memory address.
    23. A trace module as claimed in claim 22, wherein said base address entry is arranged to store at least part of a logical memory address.
    24. A trace module as claimed in any preceding claim wherein entries in said table 25 are cleared periodically.
    25. A trace module as claimed in any preceding claim, wherein said trace generation unit is operable to generate an instruction trace element indicative of an instruction being executed. 26. A trace module as claimed in any preceding claim, wherein said change in said subset of architectural state causes said data processing apparatus to execute an
    instruction which is out of sequence and said trace generation unit is operable to generate a branch trace element indicative of said out of sequence instruction to be executed. 5 27. A trace module as claimed in any preceding claim, wherein said recipient is a trace analysing tool and said table identifies said subset of architectural state derivable by said trace analysing tool.
    28. A trace module as claimed in claim 27, wherein said trace analysing tool is lo provided with an indication of sequential instructions to be executed by said data processing apparatus.
    29. A trace module as claimed in claim 28, wherein each sequential instruction has an address associated therewith and said trace generation unit is operable to determine whether an address of said out of sequence instruction is derivable by said trace analysing tool by determining whether an indication has been made in each entry associated with items of architectural state utilised to effect said change in said item of architectural state which causes said data processing apparatus to execute said out of sequence instruction.
    30. A trace module as claimed in any of claims 28 or 29, wherein said table identifies said indication of sequential instruction to be executed by said data processing apparatus. 2s 31. A trace module as claimed in claim 30, wherein said trace generation unit is operable to determine in response to said input signals indicative of an instruction being executed whether said trace analysing tool is able to determine said instruction being executed by referencing said table and to generate a number of trace elements indicative of said instruction when said instruction is not derivable by said trace 30 analysing tool.
    so 32. A trace module operable to trace changes in a program counter value of a data processing apparatus with which the trace module is coupled, said data processing apparatus being arranged to execute a sequence of instructions, said program counter value indicating a next instruction to be executed by said data processing apparatus, said 5 trace module comprising: a trace generation unit operable to receive input signals from one or more components of said data processing apparatus indicative of a current instruction being executed and to selectively generate from said input signals a data trace element indicative of data associated with said current instruction and a branch trace element to indicative of said change in program counter value, and in the event that said current instruction is an indirect branch instruction which causes a non-sequential change in said program counter value, said trace generation unit being operable to suppress the generation of either said data trace element or said branch trace element, said change in program counter value being derivable from the 5 generated trace element, whereby said change in program counter value can be subsequently reconstructed by a recipient of said trace elements from the generated trace element in order to determine said next instruction to be executed by said data processing apparatus.
    20 33. A trace module as claimed in claim 32, wherein said trace generation unit is operable to suppress the generation of said data trace element, said change in program counter value being derivable by said recipient from said branch trace element.
    34. A trace module as claimed in claim 32, wherein said trace generation unit is 2s operable to suppress the generation of said branch trace element, said change in program counter value being derivable by said recipient from said data trace element.
    35. A trace module as claimed in any one of claims 32 to 34, comprising: a table maintained by said trace generation unit to identify whether said 30 change in program counter value is derivable from previously generated trace elements, said trace generation unit referencing said table in order to determine which trace elements to generate during said trace generation.
    ! 36. A trace module as claimed in claim 35, wherein said trace generation unit is operable to suppress the generation of said data trace element and said branch trace element when it is determined that said change in program counter value is derivable s by said recipient.
    37. A trace module as claimed in any one of claims 32 to 36, wherein said trace generation unit is operable to generate a placeholder indicative of said suppression.
    to 38. A trace module as claimed in any one of claims 32 to 37, wherein said trace generation unit generates an instruction trace in response to receipt of said input signals providing an indication that an instruction is being executed by said data processing apparatus. IS 39. A data processing apparatus comprising said trace module as claimed in any preceding claim.
    40. A method of tracing changes in a subset of architectural state of a data processing apparatus, said method comprising the steps of: 20 receiving input signals from one or more components of said data processing apparatus indicative of a change in said subset of architectural state; determining which trace elements to generate by referencing a table identifying architectural state derivable from previously generated trace elements; and generating a number of trace elements indicative of said change so as to enable a 2s recipient of said trace elements to subsequently reconstruct said subset of architectural state. 41. A method as claimed in claim 40, wherein said subset of architectural state comprises a number of items of architectural state and said table has one or more entries 30 associated with each item of architectural state, said method comprising the step of: making an indication in each entry when said item of architectural state is derivable by said recipient.
    ( _ _- 5 2
    42. A method as claimed in claim 41, wherein said determining step comprises: determining whether an indication has been made in each entry associated with that item of architectural state.
    43. A method as claimed in claim 41 or 42, wherein said determining step comprises: determining whether an indication has been made in each entry associated with items of architectural state utilised to effect said change in said item of architectural lo state.
    44. A method as claimed in any one of claims 41 to 43, wherein said generating step comprises: generating a number of trace elements indicative of said change in said item of 5 architectural state not derivable by said recipient, said method comprising the step of: making an indication in each entry associated with that item of architectural state. 45. A method as claimed in any one of claims 40 to 44, wherein each item of 20 architectural state has an architectural state value and said generating step comprises: generating a number of trace elements indicative of said change in said architectural state value.
    46. A method as claimed in claim 45, wherein said change in said architectural state 25 value causes said item of architectural state to have a new value, said generation step comprises: generating a number of trace elements indicative of said new value when said new value is not derivable by said recipient, said method comprising the step of: making an indication in each entry associated with that item of architectural 30 state.
    47. A method as claimed in any one of claims 40 to 46, wherein said subset of architectural state comprises the contents of a number of registers and said table has a register entry associated with each of said number of registers.
    5 48. A method as claimed in claim 47, wherein said receiving step comprises: receiving input signals indicative of a change in the contents of a register to a new value and said method comprising the step of: making an indication in each entry associated with that register when said new value is derivable by said recipient.
    49. A method as claimed in claim 47, wherein said receiving step comprises: receiving input signals indicative of a change in the contents of a register to a new value and said generating step comprises: generating a number of trace elements indicative of said new value when said 5 new value is not derivable by said recipient, said method comprising the step of: making an indication in each entry associated with that register.
    SO. A method as claimed in claim 47, wherein said number of registers includes a number of source registers and a number of destination registers and said receiving step 20 comprises: receiving an input signal indicative of a change in the contents of a destination register to a new value dependent on values of one or more of said source registers, said generation step comprises: generating a number of trace elements indicative of said new value when said 2s new value is not derivable by said recipient, said method comprising the step of: making an indication in each entry associated with said destination register.
    51. A method as claimed in claim 47, wherein said number of registers include a number of source registers and a number of destination registers and said receiving step 30 comprises:
    ! receiving an input signal indicative of a change in the contents of a destination register to a new value dependent on values of one or more of said source registers, said method comprising: making an indication in each entry associated with said destination register s when said new value is derivable by said recipient.
    52. A method as claimed in one of claims 40 to 51, wherein said subset of architectural state comprises the contents of a number of memory addresses and said table has an address entry associated with each of said number of memory addresses.
    53. A method as claimed in claim 52, wherein said receiving step comprises: receiving an input signal indicative of the contents of a memory address changing to a new value, said method comprising the step of: making an indication in each address entry associated with that memory IS address when said new value is derivable by said recipient.
    54. A method as claimed in claim 52, wherein said receiving step comprises: receiving an input signal indicative of the contents of a memory address changing to a new value, said generating step comprises: 20 generating a number of trace elements indicative of said new value when said new value is not derivable by said recipient, said method comprising the step of: making an indication in each address entry associated with that memory address. 25 55. A method as claimed in any one of claims 52 to 54, wherein said table comprises one or more tables, each having a base address entry associated with a base memory address and an address entry associated with each of a range of memory addresses logically offset from said base address, said receiving step comprising the step of: receiving an input signal indicative of the contents of a memory address 30 changing to a new value, said determining step comprising the step of: determining whether said memory address is within one of said ranges and, if so, said method comprising the step of:
    making an indication in said address entry associated with that memory address. 56. A method as claimed in claim 55, wherein said receiving step comprises the step 5 of: receiving an input signal indicative of the contents of a memory address changing to a new value, said determining step comprising the step of: determining whether said memory address is within one of said ranges and, if not, said method comprising the steps of: lo clearing all address entries in one of said tables; and updating the base address entry of said one of said tables, and wherein said generating step comprises the step of: generating a number of trace elements indicative of said new value, said method comprising the step of: 5 making an indication in said address entry associated with said memory address. S7. A method as claimed in any one of claims 40 to 56, comprising the step of: generating an instruction trace element indicative of an instruction being 20 executed.
    58. A method as claimed in any one of claims 40 to 57, wherein said change in said subset of architectural state causes said data processing apparatus to execute an instruction which is out of sequence, said method comprising the step of: 25 generating a trace element indicative of said out of sequence instruction to be executed. 59. A method as claimed in any one of claims 40 to 58, wherein said recipient is a trace analysing tool and said table identifies said subset of architectural state derivable 30 by said trace analysing tool.
    60. A method as claimed in claim 59, comprising the steps of:
    providing said trace analysing tool with an indication of sequential instructions to be executed by said data processing apparatus.
    61. A method as claimed in claim 60, wherein each sequential instruction has an 5 address associated therewith and said determining step comprises: determining whether an address of said out of sequence instruction is derivable by said trace analysing tool by determining whether an indication has been made in each entry associated with items of architectural state utilised to effect said change in said item of architectural state which causes said data processing apparatus to execute to said out of sequence instruction.
    62. A method as claimed in any of claims 60 or 61, wherein said table identifies said indication of sequential instruction to be executed by said data processing apparatus, said method comprising the steps of: 15 receiving input signals indicative of an instruction being executed; determining in response to said input signals indicative of an instruction being executed whether said trace analysing tool is able to determine said instruction being executed by referencing said table and, if not; generating a number of trace elements indicative of said instruction when said 20 instruction is not derivable by said trace analysing tool.
    63. A method of tracing changes in a program counter value of a data processing apparatus, said data processing apparatus being arranged to execute a sequence of instructions, said program counter value indicating a next instruction to be executed by 25 said data processing apparatus, said method comprising the steps of: receiving input signals from one or more components of said data processing apparatus indicative of a current instruction being executed; selectively generating from said input signals a data trace element indicative of data associated with said current instruction and a branch trace element indicative of so said change in program counter value; and in the event that said current instruction is an indirect branch instruction which causes a non- sequential change in said program counter value, suppressing the
    generation of either said data trace element or said branch trace element, said change in program counter value being derivable from the generated trace element.
    64. A method as claimed in claim 63, wherein suppressing step comprises: 5 suppressing the generation of said data trace element, said change in program counter value being derivable by a recipient from said branch trace element.
    65. A method as claimed in claim 63, wherein suppressing step comprises: suppressing the generation of said branch trace element, said change in lo program counter value being derivable by a recipient from said data trace element.
    66. A method as claimed in any one of claims 63 to 65, comprising: determining which trace elements to generate by referencing a table identifying whether said change in program counter value is derivable from 5 previously generated trace elements.
    67. A method as claimed in claim 66, wherein said suppressing step comprises: suppressing the generation of said data trace element and said branch trace element when it is determined that said change in program counter value is derivable 20 by said recipient.
    68. A method as claimed in any one of claims 63 to 67, comprising the step of: generating a placeholder indicative of said suppression.
    25 69. A method as claimed in any one of claims 63 to 68, comprising the step of: generating an instruction trace in response to receipt of said input signals providing an indication that an instruction is being executed by said data processing apparatus. 30 70. A computer program product stored on a computer readable medium operable when executed on a computer to perform the method steps as claimed in any one of claims 40 to 69.
    71. A trace module as hereinbefore described with reference to the accompanying drawings. 5 72. A data processing apparatus as hereinbefore described with reference to the accompanying drawings.
    73. A method of tracing changes in a subset of architectural state of a data processing apparatus as hereinbefore described with reference to Figures 3A to 4B.
GB0229009A 2002-06-07 2002-12-12 Generation of trace elements within a data processing apparatus Expired - Lifetime GB2389931B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
GB0514709A GB2413418B (en) 2002-06-07 2002-12-12 Generation of trace elements within a data processing apparatus
US10/452,904 US7197671B2 (en) 2002-06-07 2003-06-03 Generation of trace elements within a data processing apparatus
JP2003195368A JP4225851B2 (en) 2002-06-07 2003-06-06 Trace element generation system for data processor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GB0213149A GB2389432B (en) 2002-06-07 2002-06-07 Instruction tracing in data processing systems
US10/206,829 US7003699B2 (en) 2002-06-07 2002-07-29 Generation of trace signals within a data processing apparatus

Publications (3)

Publication Number Publication Date
GB0229009D0 GB0229009D0 (en) 2003-01-15
GB2389931A true GB2389931A (en) 2003-12-24
GB2389931B GB2389931B (en) 2005-12-14

Family

ID=30117084

Family Applications (2)

Application Number Title Priority Date Filing Date
GB0229009A Expired - Lifetime GB2389931B (en) 2002-06-07 2002-12-12 Generation of trace elements within a data processing apparatus
GB0300799A Expired - Lifetime GB2391351B (en) 2002-06-07 2003-01-14 Generation of trace signals within a data processing apparatus

Family Applications After (1)

Application Number Title Priority Date Filing Date
GB0300799A Expired - Lifetime GB2391351B (en) 2002-06-07 2003-01-14 Generation of trace signals within a data processing apparatus

Country Status (2)

Country Link
JP (2) JP4175927B2 (en)
GB (2) GB2389931B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7702964B2 (en) * 2004-05-11 2010-04-20 Qualcomm Incorporated Compression of data traces for an integrated circuit with multiple memories
CN101548270A (en) * 2007-09-03 2009-09-30 松下电器产业株式会社 Semiconductor device, and development supporting device
US8799753B2 (en) 2008-02-04 2014-08-05 Nec Corporation Trace/failure observation system, trace/failure observation method, and trace/failure observation program
JP2010123050A (en) * 2008-11-21 2010-06-03 Renesas Technology Corp Semiconductor device
JP2011013867A (en) * 2009-06-30 2011-01-20 Panasonic Corp Data processor and performance evaluation analysis system
GB2477936B (en) * 2010-02-17 2016-02-10 Advanced Risc Mach Ltd Trace data priority selection
GB2487355B (en) * 2011-01-13 2020-03-25 Advanced Risc Mach Ltd Processing apparatus, trace unit and diagnostic apparatus
US9069896B2 (en) * 2012-08-29 2015-06-30 Freescale Semiconductor, Inc. Data processor device for handling a watchpoint and method thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5678028A (en) * 1994-10-25 1997-10-14 Mitsubishi Electric Information Technology Center America, Inc. Hardware-software debugger using simulation speed enhancing techniques including skipping unnecessary bus cycles, avoiding instruction fetch simulation, eliminating the need for explicit clock pulse generation and caching results of instruction decoding
US5724505A (en) * 1996-05-15 1998-03-03 Lucent Technologies Inc. Apparatus and method for real-time program monitoring via a serial interface
EP0849670A1 (en) * 1996-12-19 1998-06-24 STMicroelectronics Limited Integrated computer providing an instruction trace
US5802272A (en) * 1994-12-19 1998-09-01 Digital Equipment Corporation Method and apparatus for tracing unpredictable execution flows in a trace buffer of a high-speed computer system
US6167536A (en) * 1997-04-08 2000-12-26 Advanced Micro Devices, Inc. Trace cache for a microprocessor-based device
EP1130518A1 (en) * 2000-01-31 2001-09-05 Applied Microsystems Corporation Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof
EP1184790A2 (en) * 1997-04-08 2002-03-06 Advanced Micro Devices, Inc. Trace cache for a microprocessor-based device
WO2002054245A2 (en) * 2000-12-29 2002-07-11 Intel Corporation Qualification of event detection by thread id and thread privilege level
US20020178403A1 (en) * 2001-05-24 2002-11-28 International Business Machines Corporation Method and apparatus for increasing the effectiveness of system debug and analysis

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0390955A (en) * 1989-08-31 1991-04-16 Nippondenso Co Ltd Development support device for computer corresponding to plural cpus
US5764885A (en) * 1994-12-19 1998-06-09 Digital Equipment Corporation Apparatus and method for tracing data flows in high-speed computer systems
JPH08314764A (en) * 1995-05-17 1996-11-29 Fujitsu Ltd Bus tracer
US5544311A (en) * 1995-09-11 1996-08-06 Rockwell International Corporation On-chip debug port
US6148381A (en) * 1997-04-08 2000-11-14 Advanced Micro Devices, Inc. Single-port trace buffer architecture with overflow reduction
JPH11306040A (en) * 1998-04-21 1999-11-05 Toshiba Corp Emulator tracing device
JP3147862B2 (en) * 1998-07-08 2001-03-19 日本電気株式会社 Trace collection method for multiple online control programs
US6918065B1 (en) * 1999-10-01 2005-07-12 Hitachi, Ltd. Method for compressing and decompressing trace information
US6615370B1 (en) * 1999-10-01 2003-09-02 Hitachi, Ltd. Circuit for storing trace information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5678028A (en) * 1994-10-25 1997-10-14 Mitsubishi Electric Information Technology Center America, Inc. Hardware-software debugger using simulation speed enhancing techniques including skipping unnecessary bus cycles, avoiding instruction fetch simulation, eliminating the need for explicit clock pulse generation and caching results of instruction decoding
US5802272A (en) * 1994-12-19 1998-09-01 Digital Equipment Corporation Method and apparatus for tracing unpredictable execution flows in a trace buffer of a high-speed computer system
US5724505A (en) * 1996-05-15 1998-03-03 Lucent Technologies Inc. Apparatus and method for real-time program monitoring via a serial interface
EP0849670A1 (en) * 1996-12-19 1998-06-24 STMicroelectronics Limited Integrated computer providing an instruction trace
US6167536A (en) * 1997-04-08 2000-12-26 Advanced Micro Devices, Inc. Trace cache for a microprocessor-based device
EP1184790A2 (en) * 1997-04-08 2002-03-06 Advanced Micro Devices, Inc. Trace cache for a microprocessor-based device
EP1130518A1 (en) * 2000-01-31 2001-09-05 Applied Microsystems Corporation Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof
WO2002054245A2 (en) * 2000-12-29 2002-07-11 Intel Corporation Qualification of event detection by thread id and thread privilege level
US20020178403A1 (en) * 2001-05-24 2002-11-28 International Business Machines Corporation Method and apparatus for increasing the effectiveness of system debug and analysis

Also Published As

Publication number Publication date
GB2391351B (en) 2005-10-05
JP2008097646A (en) 2008-04-24
GB2391351A (en) 2004-02-04
GB0229009D0 (en) 2003-01-15
JP2004013897A (en) 2004-01-15
GB0300799D0 (en) 2003-02-12
JP4175927B2 (en) 2008-11-05
GB2389931B (en) 2005-12-14

Similar Documents

Publication Publication Date Title
US7197671B2 (en) Generation of trace elements within a data processing apparatus
GB2413418A (en) Selective generation of trace elements
JP4038372B2 (en) Tracing out-of-order data
JP3105223B2 (en) Debug peripherals for microcomputers, microprocessors and core processor integrated circuits
US4879646A (en) Data processing system with a pipelined structure for editing trace memory contents and tracing operations during system debugging
US7689867B2 (en) Multiprocessor breakpoint
US20030154028A1 (en) Tracing multiple data access instructions
US20030051122A1 (en) Trace information generation apparatus for generating branch trace information omitting at least part of branch source information and branch destination information on target processing
US8037363B2 (en) Generation of trace elements within a data processing apparatus
US6691207B2 (en) Method and apparatus for implementing loop compression in a program counter trace
US6760835B1 (en) Instruction branch mispredict streaming
US8762779B2 (en) Multi-core processor with external instruction execution rate heartbeat
JP2002323995A (en) Trace circuit
JPH05204709A (en) Processor
US20030100133A1 (en) System-on-chip breakpoint synchronization
JP2002163127A (en) Trace control circuit
US20080082801A1 (en) Apparatus and method for tracing instructions with simplified instruction state descriptors
GB2389931A (en) Selective generation of trace elements
US6249880B1 (en) Method and apparatus for exhaustively testing interactions among multiple processors
JP3260083B2 (en) Debug system and debugging method
US7305586B2 (en) Accessing and manipulating microprocessor state
US6230263B1 (en) Data processing system processor delay instruction
JP2002529851A (en) Maintaining object size information in parallel with data optimization for debugging
JP3349911B2 (en) Microprocessor and development support device thereof
JPH087713B2 (en) Microprocessor

Legal Events

Date Code Title Description
PE20 Patent expired after termination of 20 years

Expiry date: 20221211