This application is related to the following co-pending United States patent application numbers: application Ser. No. 11/560,217, filed Nov. 15, 2006, entitled NON-INTRUSIVE, THREAD-SELECTIVE, DEBUGGING METHOD AND SYSTEM FOR A MULTI-THREAD DIGITAL SIGNAL PROCESSOR; application Ser. No. 11/560,323, filed Nov. 15, 2006, entitled METHOD AND SYSTEM FOR A DIGITAL SIGNAL PROCESSOR DEBUGGING DURING POWER TRANSITIONS; application Ser. No. 11/560,332, filed Nov. 15, 2006, entitled METHOD AND SYSTEM FOR TRUSTED/UNTRUSTED DIGITAL SIGNAL PROCESSOR DEBUGGING OPERATIONS; application Ser. No. 11/560,339, filed Nov. 15, 2006, entitled EMBEDDED TRACE MACROCELL FOR ENHANCED DIGITAL SIGNAL PROCESSOR DEBUGGING OPERATIONS; and application Ser. No. 11/560,344, filed Nov. 15, 2006, entitled METHOD AND SYSTEM FOR INSTRUCTION STUFFING OPERATIONS DURING NON-INTRUSIVE DIGITAL SIGNAL PROCESSOR DEBUGGING.
The disclosed subject matter relates to data processing systems and processes such as may find use in data communications and similar applications. More particularly, this disclosure relates to a novel and improved method and system for digital signal processing debugging operations, including providing an inter-thread trace alignment method and system for an multi-threaded processor.
Increasingly, telecommunications and other types of electronic equipment and supporting video, complex audio, videoconferencing and other rich software applications involve signal processing. Signal processing requires fast mathematical calculations and data generation in complex, but repetitive algorithms. Many applications require computations in real-time, i.e., the signal is a continuous function of time, which must be sampled and converted to digital signals for numerical processing. The processor must execute algorithms performing discrete computations on the samples as they arrive.
The architecture of a digital signal processor (DSP) is optimized to handle such algorithms. The characteristics of a good signal processing engine include fast, flexible arithmetic computation units, unconstrained data flow to and from the computation units, extended precision and dynamic range in the computation units, dual address generators, efficient program sequencing, and ease of programming.
One promising application of DSP technology includes communications systems such as a code division multiple access (CDMA) system that supports voice and data communications, as well as text messaging and other applications, between users over a satellite or terrestrial link. The use of CDMA techniques in a multiple access communication system is disclosed in U.S. Pat. No. 4,901,307, entitled “SPREAD SPECTRUM MULTIPLE ACCESS COMMUNICATION SYSTEM USING SATELLITE OR TERRESTRIAL REPEATERS,” and U.S. Pat. No. 5,103,459 entitled “SYSTEM AND METHOD FOR GENERATING WAVEFORMS IN A CDMA CELLULAR TELEHANDSET SYSTEM,” both assigned to the assignee of the claimed subject matter.
A CDMA system is typically designed to conform to one or more standards. One such first generation standard is the “TIA/EIA/IS-95 Terminal-Base Station Compatibility Standard for Dual-Mode Wideband Spread Spectrum Cellular System,” hereinafter referred to as the IS-95 standard. The IS-95 CDMA systems are able to transmit voice data and packet data. A newer generation standard that may more efficiently transmit packet data is offered by a consortium named the “3rd Generation Partnership Project” (3GPP) and embodied in a set of documents including Document Nos. 3G TS 25.211, 3G TS 25.212, 3G TS 25.213, and 3G TS 25.214, which are readily available to the public. The 3GPP standard is hereinafter referred to as the W-CDMA Standard.
Complex DSP operational software employing the W-DCMA Standard, for example, requires robust development tools. Such development tools may include those for code generation, integration, testing, debugging, and evaluating application performance. In developing and operating software or complex DSP applications, such as advanced telecommunications applications, there is the need for sophisticated, yet non-intrusive debugging software. That is, debugging software applications must be not only sufficiently robust to monitor, test, and support the correction of software defects and operational problems. At the same time, debugging software may need to operate so as not to interfere with the core processor software operations during concurrent debugging operations. Otherwise, any problems in the core processing software may not be detected or detected properly during software debugging operations.
During debugging operations, there is a need for associating with the non-intrusive software debugging operations tracing functions for tracing the operations of the processing of the operating threads within the DSP. Such a system may provide information on the DSP's state parameters for capturing such information both before and after a specific event occurs. At the same time, the desired tracing functions cannot add any significant burden to processor performance, even while the DSP operates at full speed. In combination with a non-intrusive debugging operation, such a tracing process may capture specific types of information. The tracing functions, therefore, provide for monitoring and recording in conjunction with non-intrusive debugging operations in a multi-threaded processor.
One particularly useful set of information a tracing function may provide includes inter-thread execution behavior. That is, a need exists for a set of tracing functions capable of inter-relating tracing data among different threads of a multi-threaded DSP. No known system provides such information. In debugging software operations, the user may desire to choose an arbitrary point in time at which to know which instructions a multi-threaded processor may be executing at a particular point in time. This information may be particularly valuable in the instance that different threads activate different per-thread debugging operations at different times.
In an interleaved multi-threaded DSP, the execution of multiple instruction sequences may occur concurrently. As such, the processor may be viewed as several single-threaded processors operating independently. Once such processor may include an execution tracing unit that records the runtime execution sequence of each of the operating threads. These traces facilitate program debugging operation by breaking down the program flow into a sequence of packets. In such a system, thread number fields may be added to certain packets to identify which packet belongs to which thread. With such an approach, each packet sequence for a particular thread may recreate the full execution sequence including all program flow changes and all instruction timing.
While identifying which packets belong to which thread is advantageous, no known tracing function provides the ability to identify inter-thread timing relationships during execution tracing. For instance, time differences between trace activation may be very large from one thread to another. When thread tracing begins on different threads sat different times, it may not be possible to align one thread's timing with other threads that are also being traced.
Accordingly, there is a need for a set of tracing functions capable of operating within a non-intrusive debugging process that establishes and maintains timing relationship between different DSP threads.
Yet a further need exists for a method and system that permits the alignment of different threads of a multi-threaded processor for use in association with an embedded trace macrocell process of the multi-threaded processor.
Still further, a need exists for an inter-thread trace alignment method and system for an interleaved multi-threaded processor capable of operating in association with a broad array of non-intrusive in-silicon debugging processes occurring during core processor software operations.
Techniques for providing inter-thread trace alignment in an multi-threaded processor are disclosed, which techniques cooperate with an embedded trace macrocell for identifying inter-thread timing relationships and, therefore, to establish and maintain various timing relationships between different threads. The method and system here disclosed improve both the operation of a digital signal processor and the efficient use of digital signal processor instructions for increasingly powerful software applications, including applications operating in personal computers, personal digital assistants, wireless handsets, and similar electronic devices, as well as increasing the associated digital processor speed and service quality.
According to one aspect of the disclosed subject matter, a method and system are provided for inter-thread trace alignment with execution trace processing which includes recording timing data relating to a common predetermined event. Such a common predetermined event may be the number of cycles since a last thread initiated execution tracing or the number of cycles since all threads terminated execution tracing. The number of cycles at which a thread initiates execution tracing is referenced to the common predetermined event for maintaining the timing of execution tracing. The data relating to the common predetermined event is then updated to associate with the time at which the thread initiated execution tracing. The result is to permit aligning the timing data associated with all threads. Interrelated records permit reconstructing interdependent execution tracing information for threads operating in the multi-threaded processor, as well as synchronizing timing data for all operating threads.
These and other advantages of the disclosed subject matter, as well as additional novel features, will be apparent from the description provided herein. The intent of this summary is not to be a comprehensive description of the claimed subject matter, but rather to provide a short overview of some of the subject matter's functionality. Other systems, methods, features and advantages here provided will become apparent to one with skill in the art upon examination of the following FIGUREs and detailed description. It is intended that all such additional systems, methods, features and advantages be included within this description, be within the scope of the accompanying claims.
The features, nature, and advantages of the disclosed subject matter may become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout and wherein:
The disclosed subject matter for a inter-thread trace alignment method and system for use in association with execution trace processes of a multi-threaded digital signal processor has application for multi-threaded processing of any type for which the benefits here presented may be advantageous. One such application appears in telecommunications and, in particular, in wireless handsets that employ one or more digital signal processing circuits. For explaining how such a wireless handset may be used,
At a receiver unit 22, the transmitted signal is received by an antenna 24 and provided to a receiver (RCVR) 26. Within receiver 26, the received signal is amplified, filtered, down converted, demodulated, and digitized to generate in phase (I) and (Q) samples. The samples are then decoded and processed by a receive (RX) data processor 28 to recover the transmitted data. The decoding and processing at receiver unit 22 are performed in a manner complementary to the coding and processing performed at transmitter unit 12. The recovered data is then provided to a data sink 30.
The signal processing described above supports transmissions of voice, video, packet data, messaging, and other types of communication in one direction. A bi-directional communications system supports two-way data transmission. However, the signal processing for the other direction is not shown in
Output from execution data paths 62 goes to register file write circuit 64, also configured to accommodate individual threads T0:T5, for returning the results from the operations of DSP 40. Thus, the data path from circuit 54 and before to register file write circuit 64 forms a processing pipeline 66. The present embodiment may employ a hybrid of a heterogeneous element processor (HEP) system using a single processor with up to six threads, T0:T5. Processor pipeline 66 has six stages, which matches the minimum number of processor cycles necessary to fetch a data item from circuit 54 to registers 60 and 64. DSP 40 concurrently executes instructions of different threads T0:T5 within a processor pipeline 66. That is, DSP 40 provides six independent program counters, an internal tagging mechanism to distinguish instructions of threads T0:T5 within processor pipeline 66, and a mechanism that triggers a thread switch. Thread-switch overhead varies from zero to only a few cycles.
DSP 40, therefore, provides a general-purpose digital signal processor designed for high-performance and low-power across a wide variety of signal, image, and video processing applications.
Sequencer 76 provides hybrid two-way superscalar instructions and four-way VLIW instructions to S-Pipe unit 86, M-Pipe unit 88, LD[Load]-Pipe 90, and LD/ST[Store]-Pipe unit 92, all of which communicate with general registers 94. AXI Bus 74 also communicates via Bus I/F 73 with shared data cache 96 LD/ST instructions to threads T0:T5. Optional L2 Cache/TCM 98 signals include LD/ST instructions with shared data TCM 100, which LD/ST instructions further flow to threads General Registers 94. From AHB peripheral bus 102 MSM specific controller 104 communicates interrupts with T0:T5, including interrupt controller instructions, debugging instructions, and timing instructions. Global control registers 106 communicates control register instructions with threads T0:T5.
DSP 40, therefore, includes six virtual DSP cores, each containing global control registers 106 and private supervisor control registers 80. Global control registers 106 are shared between all threads. Each thread shares a common data cache and a common instruction cache. Load, store, and fetch operations are serviced by a common bus interface. High performance AXI bus 74 and a lower performance AHB bus 102 are used to connect the data and instruction traffic to off-core memory and peripherals. An integrated level two memory (cache and/or TCM) input 98 is optional. Peripheral access may be through memory-mapped loads and stores. The physical address partition between AHB and AXI may be configured at the MSM level.
Clearly, the presented architecture for DSP 40 may evolve and change over time. For example, the number of instruction caches that DSP 40 may use could change from six to one, or other numbers of caches. Superscalar dispatch, L1 data at TCM 98, and other architectural aspects may change. However, the present subject matter may have continued relevance in a wide variety of configurations and for a large family of modifications of DSP 40.
ISDB 82, through JTAG interface 84, provides a hardware debugger for DSP 40. ISDB 82 provides software debug features through JTAG interface 84 by sharing system or supervisor-only registers. These registers are divided into supervisor control registers 80 on a per thread basis, as well as global control registers 106 between all threads. The system control registers are used for per thread interrupt and exception control and per thread memory management activities. Global registers allow interacting with the ISDB 82 for debugging operations.
ISDB 82 enables software developers to debug their software while DSP 40 operates. ISDB 82 hardware, in combination with a software debugger program operating in ISDB 82, may be used to debug the DSP 40 operating system software. ISDB 82 supports debugging hardware threads individually. Users may suspend thread execution, view and alter thread registers, view and alter instruction and data memory, single step threads, stuff instructions to threads, and resume thread execution. Trusted users have access to all of ISDB 82 features, while untrusted users have access to a subset of features.
ISDB 82 may interface with a debugger interface card to communicate with ISDB 82 debugging software residing on a program counter (PC), yet all through JTAG interface 84. Host debugger software may interact with the ISDB 82 by reading and writing ISDB control registers. Communication, for example, may be through a 40-bit packet which identifies the ISDB register to which read/write is to occur, as well as a 32-bit data payload. A packet format supporting this operation may be up to 64 control registers which may be 32 bits wide each.
The per-thread mode state diagram of
Registers are available in DSP 40 in both USER mode 142 and SUPERVISOR mode 144. The user-mode registers are divided into a set of general registers and a set of control registers. General registers are used for all general purpose computation including address generation, scalar and vector arithmetic. Control registers support special-purpose functionality such as hardware loops, predicates, etc. General purpose registers are 32 bits wide and may be accessed as single registers or as aligned pairs of two registers. The general register file provides all operands for instructions, including addresses for load/store, data operands for numeric instructions, and vector operands for vector instructions.
DEBUG mode 150 provides a special state where the thread is waiting for commands from ISDB 82. Whenever an ISDB Debug Event occurs, such as by the execution of a software breakpoint instruction, a breakpoint command from ISDB 82, or occurrence of a hardware breakpoint, indicated threads may enter DEBUG mode 150. While in DEBUG mode 150, the core is controlled by ISDB 82 via commands from JTAG interface 84. When the ISDB 82 releases the thread due to execution of a resume command, the thread may resume operation according to their current mode settings. When a thread is in DEBUG mode 150, it is controlled by ISDB 82 and cannot be controlled by other threads. A Wait, Resume, Start, or Stop instruction from a running thread, targeting a thread in DEBUG mode 150, may be ignored. Similarly, a Non-Maskable Interrupt (NMI) may be ignored by threads in DEBUG mode 150.
A HARDWARE RESET mode (not shown in
The ETM, therefore, provides comprehensive debug and trace functions for DSP 40 and other similar digital signal processors. These functions allow information on the processor's state to be captured both before and after a specific event, while adding no burden to the processor's performance, even as DSP 40 runs at full speed. The ETM may be configured in software to capture only select trace information and only after a specific sequence of conditions. A dedicated, configurable, trace port and FIFO then allow the compressed trace data to be read from the chip by an external trace port analyzer without interrupting, or affecting, the processor.
The trace port can be configured from a 1- to 32-bit data bus, with trace clock independent to the core clock. For example, the data rate from the ETM can be half of the core clock and the number of pins increased to maintain the data bandwidth. Similarly, the number of pins can be halved and the data rate increased. The ETM may be used in both stand-alone and within a multi-core environment to allow the developer to view simultaneous, correlated trace from multiple, asynchronous cores.
As shown in
ETM 162 provides trace instruction sequencing and timing for all six threads, as well as the ability to record and send out profiling counts (cache misses, bank conflicts, and micro-tlb misses). ETM 162 may trigger on PC and LDST addresses, as well as on LDST data. ETM 162 supports serial and external event detections. Moreover ETM 162 may also generate ISDB breakpoint trigger events, external trigger event, and DSP 40 interrupts. ETM 162 is programmable through JTAG 84 and may support a dedicated ETB trace repository 170 of, in one embodiment, 512×32 bits, in one embodiment. ETM 162 may contain 4-trigger blocks (each with 2 address and 1 data comparators) and may contain a 3-state sequencer. ETM 162 tracing may operate under the control of a secure DSP 40 enable register, and may be programmed for operation during DSP 40 power collapse.
ETM 162 generates an instruction trace as a recording of the full progression of the program counter for a thread over a given window in time. Optionally, the timing of the program counter progression (i.e., identification of stall cycles) can also be included in an instruction trace. The event-resources mechanisms are used to define when to generate these instruction traces. The trigger and filtering functions are controlled through the programming of the event-resources. In more detail, the event-resources control filtering, triggering, and ISDB breakpoint generation. Filtering includes the functions of deciding when to enable and disable an instruction trace. Triggering involves deciding when to insert a trigger marker into the packet stream. ISDB breakpoint determination involves specifying the conditions under which ISDB 82 generates and responds to a breakpoint for debugging operations.
ETM 162 contains a number of primary event resources (e.g., address and data comparators) to detect when specific conditions within DSP 40 occur (e.g., whether a certain PC is executed, or if a certain memory location is read). In addition, there are secondary event resources (trigger blocks and the sequencer) which enable detection of more complex arrangements of events.
ETB trace repository 170 provides an on-chip memory area where trace information is stored during capture rather than being exported immediately through a trace port at the pins of the device. The stored information can then be read out at a reduced clock rate from ETB trace repository 170 once capture has been completed. This is done through JTAG interface 84. This two step process removes the necessity for a wide trace port that uses many, high-speed device pins. Effectively, a “zero-pin” trace port is created where the device already has a JTAG port at the pins. ETB trace repository 170 may accept data at a higher frequency and with the full 32-bit data port, exceeding trace port bandwidth limitations and may integrate with a RAM block supplied by the system integrator.
In one embodiment, ETB trace repository 170 has a size of 2 KB arranged as 512 entries, each 32-bits wide. However, other sizes for ETB trace repository are clearly within the scope of the disclosed subject matter. ETB trace repository 170 interfaces with the user through a set of JTAG accessible registers. Each register can be read or written through JTAG interface 84. These registers are used to set up ETB trace repository 170 for a trace-capture session and to read out the contents of ETB trace repository 170 once trace capture is complete. ETB trace repository 170 provides a read-pointer as an index into the ETB trace repository 170 memory array. When reading out the contents of ETB trace repository 170 through JTAG interface 84, the read-pointer indicates the location to read. ETB trace repository 170 also provides a write-pointer as an index into the ETB trace repository 170 memory array. When trace data is written into ETB trace repository 170, it is written to the entry indicated by the write-pointer. Each of the write operations auto-increment the write-pointer to the next location after write occurs. ETB trace repository 170 may only capture a small window of the ETM trace stream. The ETB looks for a trigger packet from the ETM to determine when to capture data and the trigger-counter is used to specify the division between pre-trigger data and post-trigger data captured by ETB trace repository 240.
ETM 162, therefore, aids a programmer in debugging code for DSP 40. ETM 162 generates instruction traces which are a record of the execution flow for a thread over a given window in time. Using a recorded instruction trace, the programmer can see a detailed view of their code's runtime behavior. For example, if the user's program generates and unexplained exception, the ETM 162 aids in determining the flow of instructions leading up to the exception, thereby allowing the user to assess exactly what happened. ETM 162 uses a particular packet-based protocol for efficiently representing program flow and for minimizing the generation of trace data.
One aspect of ETM 162 includes a sequencer process for chaining of events and more complex event detection scenarios. To illustrate operation of the sequencer process and associated trigger block circuits 180,
Sequencer process 180, therefore, includes three states S0:S2, with the transitions between states being programmable and based on matches from trigger blocks circuits 182:188. Sequencer process 180 has use in trace filtering for enabling each trigger blocks circuits 182:188 to be conditioned on state-enables. This allows tracing to be restricted to certain states. Upon entering a new state, the counter in each trigger blocks circuits 182:188 may be reloaded to an initial value. Upon entering a given state, an ISDB breakpoint can be asserted. Upon entering a given state, a trigger marker can be inserted into the trace stream. Upon entering a given state, an external trigger control may also be asserted. The external trigger may remain asserted anytime that the sequencer is in the given state. Upon entering a given state, an interrupt to DSP 40 may be asserted. After reset, the counter is initialized to S0. If multiple transitions fire at the same time, the sequencer remains in the current state.
In one embodiment, ETM 162 contains six counters that can record various events related to DSP 40 performance. The basic operation makes use of each counter as a programmable source. A user-programmable region counter divides execution into windows of a fixed number of cycles. During the window, the events are accumulated into counters. At the end of the window, the counter values are formed into packets and sent out through the trace port. The counters are then reset and the process begins again. When the profiling unit is operated in at the same time as the program flow tracing, this results in the program flow trace being overlaid with detailed information about performance events. In addition, the profiling unit contains a state-enable mask to limit when the unit is active.
A region counter is used to divide up the execution into windows of a fixed number of cycles. The size of the region is determined by a user-programmable register. The region counter is initialized to the user-specified value, and all of the profiling-event counters are reset. The region counter then begins counting down. When the region counter reaches zero, the value for each of the profiling-event counts is emitted in the trace stream. The process then begins again. The region-counter only counts when the state-enable matches. When the profiling is inactive, the region counter maintains its value and resumes when an enabled state is re-entered.
Different events for which a profiling counter may accumulate information include (a) d-cache misses; (b) d-cache stall cycles; (c) i-cache misses; (d) i-cache stall cycles; (e) ITLB and DTLB misses; and (f) total stall cycles. In addition, each profiling counter contains a six-thread mask to restrict the counter to events that occur in certain hardware threads.
As with the region counter, the profiling counters are only active when the state-enable mask matches the current state. During all other times the counts maintain their values and counting resumes when an enabled state is re-entered.
The present disclosure provides a novel packet protocol set of functions to support inter-thread trace alignment. That is, for any thread that is being traced using ETM 162, at any arbitrary point in time, the present disclosure allows identifying for all other threads being traced the program counter value and instruction state (e.g., stalled, executed, etc.) of those threads at that point. Thus, when ETM 162 operates in a cycle-accurate mode, trace-alignment makes use of a trace-port protocol supporting inter-thread trace alignment. The present disclosure, therefore, make cycle-count fields for isync-restart packets thread-relative, as well as the cycle-count field fully precise for inter-thread alignment. The disclosure arrangement generates an isync-periodic packet on the same thread cycle for all threads. This further allows for re-alignment, in the event that thread alignment is lost for any reason.
In one embodiment of the present disclosure provides for the execution of multiple instruction sequences occurring concurrently and during which DSP 40 may be viewed as several single-threaded processors operating independently. In ETM 162, program flow is broken down into a sequence of packets and that include thread number (tnum) fields to certain packets to identify which packet belongs to which thread. For identifying inter-thread timing relationships, the present disclosure establishes and maintains timing relationships between different threads. Because each thread may enable and disable instruction tracing independently, when a thread turns on instruction tracing, other threads may already have had their tracing enabled for some time. The presently disclosed method and system establish the relative timing of the threads execution sequences by marking the offset between when a thread turns on tracing and when other threads have turned on and do subsequently turn on tracing.
The present disclosure, therefore, includes a thread cycle-offset field for indicating the number of cycles since the last thread turned on tracing. Also, if no other threads are active, the cycle-offset field contains the number of cycles since the most recent trace turn-off among all threads. After a trace session, the packets allow for reconstructing the thread execution. Then, using the offset-fields, the execution sequences may be properly aligned among the threads. In addition, an instruction-alignment mechanism allows re-establishing execution tracing in case of a data loss.
The disclosed subject matter furthermore allows re-establishing the inter-thread timing relationships. By maintaining a global counter that permits periodically generating synchronization packets, when the counter reaches zero, a packet may be generated for each thread. Such a packet contains the current program counter value for that thread. Now, because of various limitations that may exist with DSP 40 relating to simultaneous packet generation for all threads, the present disclosure includes a cycle-offset field to a synchronization packet. The cycle-offset field indicates the number of cycles since the last thread (among the other threads) generated a synchronization packet. The cycle-offset field is of limited size and if the count saturates, synchronization will not be able to be achieved and may wait for the counter. Using these mechanisms, which are more fully described below, the present disclosure allows maintaining inter-thread execution timing relationships at any given point for one thread. The result is the ability to observe operations and states of all threads for debugging and other important purposes.
With this understanding,
To more fully describe the inter-thread operations of the present disclosure,
FIFO input mux 234 takes all of the packets that need to be generated on a given cycle and forms them into a contiguous chunk. FIFO input mux 234 must account for packets being variable sized when doing its concatenation. The output of FIFO input mux 234 is registered before being sent to the FIFO.
For the present disclosure packet generation and FIFO input mux 234 operations occur across three stages. In the first stage of packet generation, packet generation control functions 232 and individual packet generation engines 236 through 244 operates, as well as atom counters w-count, e-count, and n-count increment. FIFO input mux 234 operations include merging all packets generated in the cycle into a contiguous block in this first stage. In the second stage, FIFO write occurs to include rotating data to align to FIFO write pointer, computing and rotating write-enables, and writing data into FIFO mux 234 registers. At the third stage, FIFO read stage, data may be read from FIFO registers. At this third stage, also the special case of inserting the trigger packet and sending data to ETB occurs.
As seen in
From branch address generation functions 242, a branch address packet may be generated for a target of an indirect branch loopback, if the target is different from previous loopback. If all-loopbacks mode is set, the packet is sent out for every loopback. Also a new loopback packet is forced out after an isync-restart and isync-periodic packet is generated. The target of a PC-relative branch IF direct-branches mode is then set. The target of an event (interrupt, exception, SWI, TRAP, etc.) returns the RTE instruction. The branch-address packet may be generated when trace-enable is asserted and it is not the first cycle of tracing (an isync-restart packet may be generated instead). The packet generation control unit maintains a previous-loopback target register for each thread to determine if a loopback branch-address packet is needed.
The branch-address packet is variable with PC, TID/ASID, and type compression. The TID/ASID may be sent out if either one has changed since the last branch-address packet or isync (restart or periodic) for the tnum. The type may be sent out if it has changed since the last type was sent out. It may be generated on the first branch-address packet after a isync-restart or isync-periodic. The PC is compressed relative to the previous PC sent by a branch-address, isync-restart, or isync-periodic. The lower portion of the PC that has changed may be sent out. For each thread, previous PC, previous TID/ASID, and previous type registers are used to determine the proper compression.
Anytime an isync-restart packet is encountered, the present disclosure may inspect the cycle-count field and cycle-count type field. If the type-field is ‘global’, the process assigns a last-isync-restart-count to the cycle-count field value and annotates that packet with last-isync-restart-count. If the type-field is ‘offset’, the process may increment the last-isync-restart-count by the value in the cycle-count field and further annotate the packet with last-isync-restart-count. At which point, each isync-restart packet will be annotated with a global thread-cycle value.
The next step is to annotate the atoms. The process splits the trace-stream into the individual thread-local packet-streams based on the tnum values in the packet-stream. For each thread-local packet-stream, the process maintains a variable global-thread-cycle. This value is maintained such that anytime an isync-restart packet is encountered, global-thread-cycle is assigned to the value that was annotated. Each time an instruction atom is encountered (E, N, S, or W) the process may annotate that atom with global-thread-cycle and increment global-thread-cycle by 1. Using the normal decompression procedure, the process determines the program counter values for each atom. After this procedure is applied, every cycle of every thread being traced may be annotated with a global thread-cycle count value. As a result, for example, for a given thread cycle, the current program counter value for all six threads may be determined, as well as the state of the pipeline for those threads (stalled, executed, etc.)
For the non-cycle-accurate version, the TID field is expanded to 32-bits. For the cycle-accurate version, the TID is expanded to 32-bits and the new cycle-count field is defined to support trace-alignment. A global cycle-count indicates the number of thread-cycles since the last hardware reset. An offset cycle-count indicates the number of cycles since the last isync-restart packet was generated.
The ETM isync-periodic counters may be decremented whenever packet bytes are sent to the FIFO. When the counter reaches zero for a thread, an isync-periodic packet may be marked as pending. At the next opportunity, the isync-periodic packet is generated. An isync-periodic may be held back if any of the following packets are being generated (isync-restart, trigger, branch-address, async, profile). Each thread may maintain its own isync-periodic counter. The isync counters may be reset whenever any isync-restart packet is generated for that thread.
The cycle-count in the isync-restart packet has been redefined as two possible types: a 64-bit ‘global’ count that is referenced from the last hardware reset, and a 16-bit offset count that indicates the number of thread cycles since the last isync-restart packet (from among all threads).
In addition to two-byte 300 and three-byte 310 cycle-count packets, the present disclosure provides a three-byte packet 320 to fit a 32-bit value into the 16-bit payload. In the present subject matter, a five-byte packet, which includes a one-byte header and four-byte payload is defined as shown in
In summary, the disclosed subject matter provides a method and system for inter-thread trace alignment with a multi-threaded processor for use with execution trace processing. The disclosed subject matter, therefore, includes recording timing data relating to a common predetermined event. Such an event may be the number of cycles since a last thread initiated execution tracing or the number of cycles since all threads terminated execution tracing. The number of cycles at which a thread initiates execution tracing is referenced to the common predetermined event for maintaining the timing of execution tracing. The data relating to the common predetermined event may then updated to associate with the time at which the thread initiated execution tracing. The result is to permit aligning the timing data associated with all threads. Interrelated records permit reconstructing interdependent execution tracing information for threads operating in the multi-threaded processor, as well as synchronizing timing data for all operating threads.
As seen above, the processing features and functions described herein for inter-thread trace alignment with a multi-threaded processor in a multi-threaded digital signal processor, including an interleaved multi-threaded processor, may be implemented in various manners. For example, not only may DSP 40 perform the above-described operations, but also the present embodiments may be implemented in an application specific integrated circuit (ASIC), a microcontroller, a digital signal processor, or other electronic circuits designed to perform the functions described herein. Moreover, the process and features here described may be stored in magnetic, optical, or other recording media for reading and execution by such various signal and instruction processing systems. The foregoing description of the preferred embodiments, therefore, is provided to enable any person skilled in the art to make or use the claimed subject matter. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without the use of the innovative faculty. Thus, the claimed subject matter is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Number | Name | Date | Kind |
---|---|---|---|
4080650 | Beckett | Mar 1978 | A |
4669059 | Little et al. | May 1987 | A |
4901307 | Gilhousen et al. | Feb 1990 | A |
5093914 | Coplien et al. | Mar 1992 | A |
5103459 | Gilhousen et al. | Apr 1992 | A |
5136717 | Morley et al. | Aug 1992 | A |
5544311 | Harenberg et al. | Aug 1996 | A |
5551043 | Crump et al. | Aug 1996 | A |
5944841 | Christie | Aug 1999 | A |
5951696 | Naaseh et al. | Sep 1999 | A |
6018759 | Doing et al. | Jan 2000 | A |
6029248 | Clee et al. | Feb 2000 | A |
6052708 | Flynn et al. | Apr 2000 | A |
6067588 | Ito | May 2000 | A |
6106571 | Maxwell | Aug 2000 | A |
6199181 | Rechef et al. | Mar 2001 | B1 |
6202172 | Ponte | Mar 2001 | B1 |
6212544 | Borkenhagen et al. | Apr 2001 | B1 |
6226749 | Carloganu et al. | May 2001 | B1 |
6249907 | Carter et al. | Jun 2001 | B1 |
6314530 | Mann | Nov 2001 | B1 |
6341347 | Joy et al. | Jan 2002 | B1 |
6343371 | Flanagan et al. | Jan 2002 | B1 |
6467054 | Lenny | Oct 2002 | B1 |
6480818 | Alverson et al. | Nov 2002 | B1 |
6532553 | Gwilt et al. | Mar 2003 | B1 |
6567839 | Borkenhagen et al. | May 2003 | B1 |
6665802 | Ober | Dec 2003 | B1 |
6684348 | Edwards et al. | Jan 2004 | B1 |
6697935 | Borkenhagen et al. | Feb 2004 | B1 |
6708270 | Mayer | Mar 2004 | B1 |
6714958 | Tudor | Mar 2004 | B1 |
6757829 | Laczko, Sr. et al. | Jun 2004 | B1 |
6798713 | Yearsley et al. | Sep 2004 | B1 |
6832334 | Wojcieszak et al. | Dec 2004 | B2 |
6834360 | Corti et al. | Dec 2004 | B2 |
6915416 | Deng et al. | Jul 2005 | B2 |
6981261 | Kalafatis et al. | Dec 2005 | B2 |
7013400 | Kalla et al. | Mar 2006 | B2 |
7020871 | Bernstein et al. | Mar 2006 | B2 |
7047451 | Agarwala et al. | May 2006 | B2 |
7055139 | Balle et al. | May 2006 | B2 |
7073059 | Worely, Jr. et al. | Jul 2006 | B2 |
7076804 | Kershenbaum et al. | Jul 2006 | B2 |
7080289 | Swaine et al. | Jul 2006 | B2 |
7093236 | Swaine et al. | Aug 2006 | B2 |
7131114 | Nguyen et al. | Oct 2006 | B2 |
7185319 | Kaler et al. | Feb 2007 | B2 |
7203926 | Bogle et al. | Apr 2007 | B2 |
7210064 | Mayer | Apr 2007 | B2 |
7213134 | Soltis, Jr. et al. | May 2007 | B2 |
7222262 | Prasadh et al. | May 2007 | B2 |
7254716 | Giles et al. | Aug 2007 | B1 |
7278058 | Narisi | Oct 2007 | B1 |
7318017 | Swoboda | Jan 2008 | B2 |
7321957 | Khan et al. | Jan 2008 | B2 |
7360117 | Boike et al. | Apr 2008 | B1 |
7369954 | Levine et al. | May 2008 | B2 |
7370210 | Symes | May 2008 | B2 |
7380112 | Okabayashi et al. | May 2008 | B2 |
7380276 | Saha et al. | May 2008 | B2 |
7383537 | Darweesh et al. | Jun 2008 | B2 |
7383540 | Kalra | Jun 2008 | B2 |
7421571 | Shoemaker | Sep 2008 | B2 |
7437619 | McCullough et al. | Oct 2008 | B2 |
7461407 | Little et al. | Dec 2008 | B2 |
7472378 | Bennett et al. | Dec 2008 | B2 |
7475303 | Edgar et al. | Jan 2009 | B1 |
7512954 | Srivastava et al. | Mar 2009 | B2 |
7577878 | Baradie et al. | Aug 2009 | B2 |
7594146 | Horikawa et al. | Sep 2009 | B2 |
7600221 | Rangachari | Oct 2009 | B1 |
7657791 | Codrescu et al. | Feb 2010 | B2 |
7657875 | Alexander et al. | Feb 2010 | B2 |
7770155 | Bates et al. | Aug 2010 | B2 |
7770156 | Thekkath | Aug 2010 | B2 |
7823131 | Gard et al. | Oct 2010 | B2 |
7890316 | Swoboda et al. | Feb 2011 | B2 |
7917907 | Ahmed et al. | Mar 2011 | B2 |
8136097 | Konishi et al. | Mar 2012 | B2 |
8196109 | Fung et al. | Jun 2012 | B2 |
8239838 | Yim et al. | Aug 2012 | B2 |
20010027538 | Wojcieszak et al. | Oct 2001 | A1 |
20020004933 | Dzoba et al. | Jan 2002 | A1 |
20020035721 | Swoboda | Mar 2002 | A1 |
20020065646 | Waldie et al. | May 2002 | A1 |
20020099977 | Wong | Jul 2002 | A1 |
20030014643 | Asami et al. | Jan 2003 | A1 |
20030037225 | Deng et al. | Feb 2003 | A1 |
20030037226 | Tsuruta et al. | Feb 2003 | A1 |
20030061550 | Ng et al. | Mar 2003 | A1 |
20030065963 | Gregg | Apr 2003 | A1 |
20030074650 | Akgul et al. | Apr 2003 | A1 |
20030097615 | Corti et al. | May 2003 | A1 |
20030135720 | DeWitt, Jr. et al. | Jul 2003 | A1 |
20040024995 | Swaine | Feb 2004 | A1 |
20040103397 | Agarwala et al. | May 2004 | A1 |
20040103398 | Agarwala et al. | May 2004 | A1 |
20040105298 | Symes | Jun 2004 | A1 |
20040117768 | Chang et al. | Jun 2004 | A1 |
20040123274 | Inagaki et al. | Jun 2004 | A1 |
20040133823 | Swoboda et al. | Jul 2004 | A1 |
20040170046 | Belnet et al. | Sep 2004 | A1 |
20040170168 | Dedek | Sep 2004 | A1 |
20040177269 | Belnet et al. | Sep 2004 | A1 |
20040205747 | Bernstein et al. | Oct 2004 | A1 |
20040260910 | Watt et al. | Dec 2004 | A1 |
20050034024 | Alverson et al. | Feb 2005 | A1 |
20050034039 | Prasadh et al. | Feb 2005 | A1 |
20050044534 | Darweesh et al. | Feb 2005 | A1 |
20050091520 | Khan et al. | Apr 2005 | A1 |
20050108689 | Hooper et al. | May 2005 | A1 |
20050132338 | Kalra | Jun 2005 | A1 |
20050177703 | Norden et al. | Aug 2005 | A1 |
20050177819 | Ober et al. | Aug 2005 | A1 |
20050188358 | Johnson et al. | Aug 2005 | A1 |
20050193277 | Horikawa et al. | Sep 2005 | A1 |
20050246691 | Hsieh et al. | Nov 2005 | A1 |
20050268168 | Ishihara | Dec 2005 | A1 |
20060026594 | Yoshida et al. | Feb 2006 | A1 |
20060048099 | Templin et al. | Mar 2006 | A1 |
20060069953 | Lippett et al. | Mar 2006 | A1 |
20060129999 | Hiraoka et al. | Jun 2006 | A1 |
20060179281 | Jensen et al. | Aug 2006 | A1 |
20060184835 | Al-Omari et al. | Aug 2006 | A1 |
20060206902 | Jamil et al. | Sep 2006 | A1 |
20060212759 | Campbell et al. | Sep 2006 | A1 |
20060242470 | McCullough et al. | Oct 2006 | A1 |
20060248394 | McGowan | Nov 2006 | A1 |
20060248395 | McGowan | Nov 2006 | A1 |
20060248401 | Carroll et al. | Nov 2006 | A1 |
20060253894 | Bookman et al. | Nov 2006 | A1 |
20060259831 | Sohm et al. | Nov 2006 | A1 |
20060279439 | Swoboda | Dec 2006 | A1 |
20060282419 | Sen et al. | Dec 2006 | A1 |
20060282734 | Milne et al. | Dec 2006 | A1 |
20070016959 | Ikeda et al. | Jan 2007 | A1 |
20070043861 | Baron et al. | Feb 2007 | A1 |
20070089095 | Thekkath et al. | Apr 2007 | A1 |
20070180333 | Thekkath et al. | Aug 2007 | A1 |
20070180431 | Agarwala et al. | Aug 2007 | A1 |
20070220360 | Weinert et al. | Sep 2007 | A1 |
20070234306 | Klinger et al. | Oct 2007 | A1 |
20070240125 | Degenhardt et al. | Oct 2007 | A1 |
20070271461 | Hardy et al. | Nov 2007 | A1 |
20070288906 | Agarwala et al. | Dec 2007 | A1 |
20080010640 | Foo | Jan 2008 | A1 |
20080027961 | Arlitt et al. | Jan 2008 | A1 |
20080028196 | Kailas | Jan 2008 | A1 |
20080034350 | Conti | Feb 2008 | A1 |
20080052681 | Yang | Feb 2008 | A1 |
20080059963 | Foo | Mar 2008 | A1 |
20080080651 | Edgar | Apr 2008 | A1 |
20080098207 | Reid et al. | Apr 2008 | A1 |
20080114972 | Codrescu et al. | May 2008 | A1 |
20080115011 | Codrescu et al. | May 2008 | A1 |
20080115113 | Codrescu et al. | May 2008 | A1 |
20080115115 | Codrescu et al. | May 2008 | A1 |
20080209176 | Singh et al. | Aug 2008 | A1 |
20080256339 | Xu et al. | Oct 2008 | A1 |
20080288808 | Moyer | Nov 2008 | A1 |
20090007076 | Al-Omari et al. | Jan 2009 | A1 |
20090132863 | Ashfield et al. | May 2009 | A1 |
20090199162 | Choi et al. | Aug 2009 | A1 |
Number | Date | Country |
---|---|---|
1411434 | Apr 2004 | EP |
2183362 | Jul 1990 | JP |
04145544 | May 1992 | JP |
8055023 | Feb 1996 | JP |
8087366 | Apr 1996 | JP |
9167105 | Jun 1997 | JP |
2001154873 | Jun 2001 | JP |
2001519947 | Oct 2001 | JP |
2001331340 | Nov 2001 | JP |
2001521215 | Nov 2001 | JP |
2003177938 | Jun 2003 | JP |
2004171563 | Jun 2004 | JP |
2004171564 | Jun 2004 | JP |
2006285430 | Oct 2006 | JP |
20010031167 | Apr 2001 | KR |
20060049710 | May 2006 | KR |
200402959 | Feb 2004 | TW |
I226757 | Jan 2005 | TW |
I228929 | Mar 2005 | TW |
200625070 | Jul 2006 | TW |
WO9921089 | Apr 1999 | WO |
WO0068780 | Nov 2000 | WO |
WO0118651 | Mar 2001 | WO |
WO2006030195 | Mar 2006 | WO |
Entry |
---|
European Search Report—EP08005116, Search Authority—The Hague—Feb. 5, 2010. |
International Search Report and Written Opinion—PCT/US08/60117—International Search Authority, European Patent Office—Feb. 2, 2010. |
“Processor-Controlled Battery Back-Up Power Supply Architecture” IBM Technical Disclosure Bulletin, IBM Corp. New York, US, Vol. 31, No. 3, (Aug. 1, 1988), pp. 183-185, XP000119002, ISSN: 0018-8689. |
“Technique for Power Management in Signal Processors” IBM Technical Disclosure Bulletin, IBM Corp. New York, US, vol. 35, No. 5, (Oct. 1, 1992), pp. 425-427, XP000313036. |
Hartvigsen, J. et al., “JTAG/Debug Interface”; Motorola Technical Developments, Motorola Inc., Schaumburg, Illinois, US; vol. 19, Jun. 1, 1993; pp. 107-109. |
Wu C E et al: “Trace-based analysis and 1-35 tuning for distributed parallel applications” Parallel and Distributed Systems, 1994. International Conference On Hsinchu, Taiwan Dec. 19-21, 1994, Los Alamitos, CA, USA, IEEE Comput. Soc, Dec. 19, 1994, pp. 716-723, XPOI0223604 ISBN: 978-0-8186-6555-4 * the whole document *. |
Yang Gian et al: “Cycle accurate thread 1-35 timer for linux environment” Performance Analysis Of Systems And Software, 2001. ISPASS. 2001 IEEE International Symposium On Nov. 4-6, 2001, Piscataway, NJ, USA, IEEE, Nov. 4, 2001, pp. 38-44, XPOI0583886 ISBN: 978-0-7695-7230-7 * abstract * p. 40, left-hand column, line 5-line *13 * p. 42, left-hand column, line 10-line 23 *. |
“Universal Mobile Telecommunications Systems (UMTS)” ETSI Standards, European Telecommunications Standard Institute, Sophia-Antipo, FR, vol. 3-R2, No. V610, Jun. 2001, XP014016761. |
Microsoft Press Computer Dictionary, Third Edition, “operating system,” Microsoft Press (Aug. 1, 1997), ISBN 1-57231-446-X, p. 341. |
Translation of Office Action in Korean Application 10-2009-7023540 corresponding to U.S. Appl. No. 11/734,199, citing WO06030195 and KR20060049710 dated Feb. 17, 2011. |
Jiang, “Enhancing System-on-Chip Verification Using Embedded Test Structures”, Dec. 2005, pp. 1-61. |
Vermeulen et al., “Core-Based Scan Architecture for Silicon Debug”, IEEE, 2002, pp. 638-647. |
ARM Limited, Embedded Trace Macrocell 9—Technical Reference Manual, 2002, 164 pages, <http://rtds.cs.tamu.edu/web—462/techdocs/ARM/debug/DDI0157F—ETM9—r2p2.pdf>. |
Blair Fort, et al., “A Multithreaded Soft Processor for SOPC Area Reduction”, IEEE International Symposium on Custom Computing Machines, Napa, CA, Oct. 2006, IEEE computer society, pp. 131-142. |
Kreuzinger J, et al: “Context-Switching Techniques for Decoupled Multithreaded Processors” Euromicroconference, 1999, Proceedings. 25th Milan, Italy Sep. 8-10, 1999, Los Alamitos, CA, USA, IEEE Comput, Soc, US, vol. 1, (Sep. 8, 1999), pp. 248-251. |
Ungerer Theo, “A Survey of Processors With Explicit Multithreading ,March 2003 (29-63),” ACM Computing Survey, 2003, 35 (1). |
Andrews et al, “Xbox 360 system Architecture”, 2006. |
Rootselaar et al., “Debugging of system-on-a-chip”, 1997. |
Vermeulen et al., “Silicon Debug of a Co-processor Array for Video Applications”, 2000. |
Compan et al., GENVIEW: A Portable Source-Level Debugger For Macrocell Generators, 1991, 5 pages, <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=206436&userType=inst.>. |
Mayer et al., Debug support, Clibration and Emulation for Multiple Processor and Powertrain Control SoCs, 2005, 5 pages, <http://ieeexplore.ieee.org/stamp/stamp.jps?arnumber=01395811>. |
Camera et al.,“An integrated debugging environment for reprogrammable hardware systems”, Sep. 2005, pp. 111-115, <http://delivery.acm.org/1 0.1145/1090000/1085145/p111-camera.pdf>. |
Vermeulen et al.,“Automatic generation of breakpoint hardware for silicon debug”, Jun. 2004, pp. 514-517, <http://delivery.acm.org/1 0.1145/1 000000/996708/p514-vermeulen.pdf>. |
Number | Date | Country | |
---|---|---|---|
20080256396 A1 | Oct 2008 | US |