System and method for debugging system-on-chips

Large, complex SoCs comprise interconnections of various functional blocks. Such functional blocks contain scan chains that are used for their individual production testing. The present invention utilizes these scan chains as a tool in the debugging of these SoCs by providing the internal contents of registers and memories contained on the SoC device. Accordingly, both hardware and software designers are provided a means to observe the effect of their designs on the internal operation of the SoC device. The invention is compatible with current integrated circuit design methodology and requires minimal area on the SoC for support circuitry.

FIELD OF THE INVENTION

The present invention relates to a system and method for debugging embedded cores based system-on-chips (SoCs), and more particularly, to a system and method for debugging complex SoCs by utilizing scan chains contained in individual processor blocks.

BACKGROUND OF THE INVENTION

Since the 1990's, integrated circuit (IC) design has evolved from a chip-set philosophy to an embedded core based SoC concept. An SoC IC includes various reusable functional blocks, such as microprocessors, interfaces, memory arrays, and DSPs (digital signal processors). Such pre-designed functional blocks are commonly called “IP cores”, “cores”, or “blocks”, and will collectively be referred to hereafter as “functional blocks” or simply, “blocks”. The resulting SoCs have become quite complex. Moreover, the techniques used in the design of these SoCs have not scaled with the complexities of chip designs. That is, SoCs are currently designed by combining functional blocks from different vendors into a single design. Prior to their incorporation on the SoC, these functional blocks typically will have been subjected to various production testing procedures, to include scan chain tests. Scan chain testing is well-known in the prior art and permits determining the internal states of various memories and registers contained on the functional block. In addition to prior testing of the component functional blocks, the interfaces between these blocks are functionally verified by various well-know techniques. Frequently, problems in the resulting SoC are encountered in spite of these two levels of testing. Moreover, if there are problems in a design after the device has been fabricated, it may be extremely difficult to determine the cause of the problems. This difficulty can be attributed to the number of functional blocks that are potential sources of the problem and the lack of visibility of the internal operation of the SoC device. Additionally, the operation of the device can differ significantly from the simple functional vectors that are typically used to verify the interfaces of the functional blocks.

Various prior art methods exist whereby designers take preventive steps for avoiding problems with their SoC designs. Preventive steps include writing many vectors to check the functionality of a device and running code coverage tools to evaluate the test results. In spite of such efforts, functional problems do occur in fabricated devices. The likelihood of functional problems occurring increases with the complexity of the SoC. For such complex systems, it is virtually impossible to write vectors to test all the different combinations of functional operation of functional blocks. Moreover, there may be functional features that the designer did not think about testing. Further, the functional problem may occur after extended periods of operation and accordingly cannot be easily detected by running simple test vectors.

When functional problems do occur with fabricated SoCs, designers attempt to determine the cause by observing the state of internal registers, internal memories, or by monitoring the outputs of the pins to the device (e.g., by various prior art means such as test probing of the device pins as well as more sophisticated methods employing computer driven debugging interfaces). Often, there is insufficient visibility to the internal state of the SoC device. In such cases, the designer must speculate as to what the cause of the functional failure is. As a result, it may take several revisions to the circuit design before the problem is corrected.

Lacking in the prior art is a more accurate means of determining the internal state of an SoC device to thereby better determine the nature of a failure and thereby more efficiently effect a remedy.

SUMMARY OF THE INVENTION

Large, complex SoCs comprise interconnections of various functional blocks. Such functional blocks contain scan chains that are used for their individual production testing. The present invention utilizes these scan chains as a tool in the debugging of these SoCs by providing the internal contents of registers and memories contained on the SoC device. Accordingly, both hardware and software designers are provided a means to observe the effect of their designs on the internal operation of the SoC device. The invention is compatible with current integrated circuit design methodology and requires minimal area on the SoC for support circuitry.

DETAILED DESCRIPTION

FIG. 1illustrates an embodiment of the invention applicable for debugging SoCs. As shown inFIG. 1, SoC102includes three functional blocks (functional block1, functional block2and functional block3; represented by item numbers104,106and108, respectively).FIG. 1is intended to be a simple example of an SoC as there frequently are far more functional blocks in an typical SoC. Each functional block may contain one or more scan chains. For simplicity,FIG. 1shows only one scan chain (item numbers110,112and114) in each functional block. These scan chains correspond to the chains (or subsets of the chains) used in production testing of the device. By way of example, scan chain112is used in the production testing process of functional block2).

In the embodiment of the invention illustrated inFIG. 1, outputs from the various scan chains are multiplexed to a single output (debug scan out116) from which the internal state of the device can be observed. An input (chain select118) is fed to a decoder120to generate the enable signal (i.e., item122for chain2) to cause the scan chain to be processed. In this embodiment the total number of enable signals corresponds to the total number of scan chains in the SoC design.

Scan chain2(item112) of functional block2(item106), is shown expanded in the inset ofFIG. 1. Flip-flops124operate as normal registers until configured as a scan chain for debugging—as is done normally in the production process testing of functional block2. As illustrated inFIG. 1, the prior art loading of these registers is driven by the presence of an ATE scan enable active signal126. In the illustrated embodiment these registers are also so configured during the invention's debugging of SoC102(being driven by the presence of a debug enable signal128AND'd with chain2enable signal122). The register124contents are shifted out through debug scan out116. In additional embodiments of the invention, the mode select signal130controls whether the register contents are re-initialized with their current contents (to allow operation of the device to continue normally after the internal state is observed) or loaded with new contents (to allow operation of the device to proceed with a new state after the internal state is observed). Since the scan chains already exist for production fault coverage testing of the functional blocks, minimal additional chip area is required to support this embodiment of the invention. Additionally, this embodiment is functionally compatible with existing design methodology for scan testing of devices.

A debug and clock control block140controls the operation of the SoC device in debug mode. Debug mode is triggered when a debug trigger signal142is activated. The debug trigger signal can be sourced from internal breakpointing logic on the SoC or from an external debug input pin to the SoC, as are well-known in the prior art. The debug enable signal128configures the individual register elements124in the functional blocks as scan chains when a scan chain is selected for debugging (e.g., chain enable active122for chain2as illustrated inFIG. 1). A debug ready signal144mirrors the debug enable signal128and indicates to the external environment when the internal state of the SoC is ready to be observed. The normal operating clocks for all the blocks (145for block clock1,146for block clock2,147for block clock3) are halted when the debug trigger signal142is activated. A debug ack signal148allows the external environment to control when the scan chain contents are actually shifted out. When debug ack signal148is activated, the selected block clock switches to a scan clock150, which clocks out the contents of the selected scan chain.

FIG. 2illustrates the timing operation for the embodiment of the system depicted inFIG. 1. When the debug trigger signal142is activated, it is synchronized to the normal operating clock for each block. This generates the clock halt signal for each block.FIG. 2illustrates the timing of a clock2halt signal202generated for functional block2. As each functional block may be operating on a different clock domain, there is a different clock halt signal for each block.

When all the clocks in the SoC are halted, the combined signal is synchronized to the scan clock150. This causes the control circuitry to trigger the debug ready144and debug enable signals128. At this point, the registers in the selected scan chain (e.g.,124) are configured for scan mode operation. The user then triggers the debug ack signal148from the external environment to cause the selected scan chain contents to be shifted out. The debug ack signal148is held active long enough to scan out the entire contents of the scan chain; the number of scan cycles corresponds to the number of cells in the selected scan chain.

If the contents of more than one scan chain are to be observed, the debug trigger signal142is held active after scanning out the contents of the selected scan chain. The chain select signal118is then modified by the user to thereby select the new scan chain. Then, the newly selected scan chain is shifted out by activating the debug ack signal148as described previously. In this embodiment of the invention, it is envisioned that the user would have conventional diagnostic tools available to help select the scan chain(s) to be invoked. Thus for example, the type of error occurring in the SoC would, with the aide of prior art diagnostic literature for a suspect malfunction block, direct a user to those scan chains which would potentially help diagnose the problem.

It should be noted that the present invention is not limited to applications in which malfunction hardware is being diagnosed. By way of example, the present invention would be useful to a software programmer who is attempting to debug his code by examining intermediate conditions within the SoC device (e.g., in seeking to determine why his driver software is not functioning properly).

When the debug trigger signal142is disabled, the debug enable128and debug ready signals144are disabled by the control logic. This causes the clocks to the functional blocks to be re-synchronized to their normal operating clocks146.

FIG. 3Ashows the clock control circuitry for controlling a block clock (block2clock146) in an embodiment of the invention in which the illustrated circuitry is implemented for each separate clock domain in the SoC.FIG. 3Bdepicts the clock control circuitry for an additional embodiment of the invention where two functional blocks share the same clock. This corresponds to the situation illustrated inFIG. 2where block2clock (146) and block3clock (147) are both under the clock domain of normal block clock204. In this situation, and as illustrated inFIG. 3B, the front end of the clock control circuitry can be shared by both functional blocks. Separate clock multiplexers (items304and308) allow the clocks to the different scan chains to be controlled.

FIG. 4shows the debug control circuitry of one embodiment of the invention. The individual clock halt signals (e.g.,202for clock2halt) are gated with the debug trigger signal142and then synchronized to generate the debug enable144and debug ready signals128.

For simplicity, omitted fromFIGS. 3 and 4is the presence of a power-up reset signal that is inputted to synchronizers (items306and402, respectively), thereby resulting in a “0” output signal from said synchronizers. Use of such a reset signal is well-known in the prior art. Its use in the present invention ensures that the debug logic is not active at the time the system is powered up.

As is well known in the art, a functional block may contain cells with state information that are affected by the debugging process, when they should not be. For example,FIG. 5shows nonscan flip-flops502and RAM504in functional block2that are clocked when scan chain2is shifted out. This could alter the contents of the nonscan flip-flops502and RAM504. Since those cells are not re-initialized with their original states or loaded with new start states, the operation of the SoC would not proceed normally after the debugging process. As such, and as illustrated inFIG. 5, an additional embodiment of the invention disables the clocks to those cells to prevent them from being modified by the debugging process.

Additionally, the debugging process may cause control signals of internal bidirectional signals to become active. To prevent multiple cells from driving the bidirectional signal at the same time, a further embodiment of the invention gates the control signals506with the debug enable signal128as shown inFIG. 5.

FIGS. 6A and 6Beach illustrate an additional embodiment of the invention in which a debugging computer system602receives as inputs various signal conditions described above and also supplies various inputs to the SoC102. These signals are bit wide with the exception of chain select, whose width is dependent on the number of scan chains in the SoC102.

As illustrated inFIG. 6A, if there are adequate pins present on the SoC102, the controlling signals can be connected as dedicated pins on the SoC. Otherwise, and as illustrated inFIG. 6B, the controlling signals can be connected to a serial test interface, such as the IEEE 1149.1 JTAG tap controller606, to reduce pin count. The hook-up to a serial test interface is a well-known industry practice.

In a further embodiment of the invention, the system602communicates with one or more remote computer systems which perform analysis of the scan output data. This communication between such systems can occur via direct modems, internet connection, or other well-known prior art methods.

In additional embodiments of the invention the debugging system602provides more than just I/O support. With the design of an SoC, the order and number of registers used in the construction of the scan chains for production testing of the component functional blocks are known. This information is saved to a database that is used by the software in the debugging system602. The debugging system is test equipment or a computer that controls the debugging process as illustrated in the timing diagram (FIG. 2) of the present application.

The debugging system602periodically monitors the debug ready signal144. When the debug ready signal144is active, the debugging system602recognizes that the SoC102has entered debug mode, either due to a preset breakpoint or triggering of the external debug input pin. The debugging system602then systematically sets the chain select signal118to select each scan chain (110,112, and114) in the SoC102or to a subset of these scan chains selected by the system operator. The run-time information contained in the registers of the SoC102is then scanned out through the debug scan out signal116, when the debugging system activates the debug ack signal148.

In additional embodiments of the invention, when the mode select signal130is set to zero, this causes each scan chain (110,112,114) to be reinitialized with its current state, concurrently as the scan chain contents are read. This provides an effective means for observing the internal state of the SoC as it is stepped. After the internal state of the SoC has been read into the debugging system, the debugging system's software provides the user with control over the next execution state of the SoC. The user modified state for the SoC is loaded into the SoC through the debug scan in signal152when the mode select signal130is set to one, and another scan of the scan chain to be modified is performed.

In additional embodiments of the invention, software in the debugging system allows the user to efficiently process the internal state information from the SoC102. The debugging system allows the user to trace logic states in the SoC. It also allows the user to concurrently run a software model of the SoC, enabling the user to debug by comparing the expected operation of the SoC with its actual operation (such software models are typically obtainable from the SoC vendor). In additional embodiments, the software also has the capability of pattern detection, thus allowing the user to detect when the registers or a subset of the registers have a certain state. The debugging system can be programmed to automatically check the internal state of the SoC at periodic intervals and compare the run state of the device with expected register contents.

The above-described steps can be implemented using standard well-known programming techniques. The novelty of the above-described embodiment lies not in the specific programming techniques but in the use of the steps described to achieve the described results. In a client/server environment, such software programming code may be stored with storage associated with a server. The software programming code may be embodied on any of a variety of known media for use with a data processing system, such as a diskette, or hard drive, or CD_ROM. The code may be distributed on such media, or may be distributed to users from the memory or storage of one computer system over a network of some type to other computer systems for use by users of such other systems. The techniques and methods for embodying software program code on physical media and/or distributing software code via networks are well known and will not be further discussed herein.

It will be understood that the forgoing description of the invention is by way of example only, and variations will be evident to those skilled in the art without departing from the scope of the invention, which is as set out in the appended claims.