Patent Publication Number: US-5894176-A

Title: Flexible reset scheme supporting normal system operation, test and emulation modes

Description:
This application is a continuation of application Ser. No. 08/070,007, filed May 28, 1993, now abandoned, which is a continuation of 07/715,523, filed Jun. 14, 1991, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     This invention relates to integrated circuits, and in particular relates to testing integrated circuits. 
     BACKGROUND OF THE INVENTION 
     Among methods developed to test a system incorporating a component (e.g. a microprocessor), are the use of an &#34;in-circuit emulator&#34; (ICE), and the use of a &#34;clam-shell&#34; tester. Therefore, it is desirable for the component to provide support features to facilitate the use of these testing methods For microprocessor-based system designs, support during system reset and immediately after system reset is particularly important. This is because, during and immediately after reset, the microprocessor has very limited information about the environment and must often be responsible for initializing the environment upon its own reset. In the following discussion, the component under test is referred to as the microprocessor under test. However, it will be appreciated by those skilled in the art that the principles discussed below are applicable to testing of many components including those not commonly known as microprocessors. 
     Normally, when a reset signal is sent to a microprocessor, a sequence of events is triggered over a period of time known as the &#34;reset period.&#34; During the reset period, the control output signals of the microprocessor are typically &#34;negated&#34;, i.e. driven to the inactive or non-asserted states by the microprocessor, to allow external state machines and control structures to reset at the same time the microprocessor is being reset. 
     In an ICE testing environment, however, the reset requirements are different. ICE testing is often performed during design time, when the system is not fully debugged. The ICE provides diagnostic facilities beyond that provided by the microprocessor under test. For example, setting up break points, single-stepping etc. are very commonly provided by an ICE. In order to provide real time testing, the microprocessor under test performs much of its normal functions in the system, but is disabled as to certain functions, which are performed by the ICE under auspices of the ICE&#39;s extensive diagnostic facilities. Hence, under ICE testing, the microprocessor under test must remain active during most, if not all, of the testing process. Very often, the ICE includes a copy of the chip under test which is known to be functioning properly. During reset, however, when a microprocessor under test resets from its limited knowledge of the environment, both the microprocessor under test and the ICE will attempt to drive the control signals negated, which may be undesirable under certain situations. It is more desirable that, during the period of reset under such situations, the ICE should be given control of the system and the control output signals of the microprocessor under test should remain tristated, i.e. in a high impedance state. After the reset period, however, it is desirable that the microprocessor under test be allowed to perform normal functions. 
     Clam-shell testing is often used during manufacturing of a board including the microprocessor (i.e. after system design is fully debugged) to inject test patterns for uncovering manufacturing defects, such as an open circuit or a defective part. In clam-shell testing, especially for a surface-mounted microprocessor, the microprocessor is not removed from the system. Instead, the tester &#34;clamps&#34; onto the microprocessor and completely takes over control of the external circuit from the microprocessor. At all times during clam-shell testing, the output terminals of the microprocessor under test must remain inactive, i.e. all the output terminals must be tristated. Therefore, under the clam-shell testing scheme, the microprocessor must remain tristated during and after the reset period. This requirement is in conflict with that needed for supporting ICE testing, as described above. 
     In the prior art, a microprocessor such as the R3000 available from Integrated Device Technology, Inc. of Santa Clara, Calif., provides support for tristating the microprocessor output pins after reset to support clam-shell type testing. However, no circuit is known to support both ICE and clam-shell testings in the manner discussed above. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, a structure and a method are provided in a circuit to support various testing techniques both during and after a reset period using a mode pin and a reset pin. Depending upon the signal applied on the mode pin during the reset period, the control output signals of the circuit can be disabled during the reset period. Depending upon the signal on the mode pin at the time the reset period is terminated, the control output signals of the circuit can be disabled for subsequent operations until the next reset period. 
     In one embodiment, between reset periods, the mode pin is a functional pin performing other functions, such as acting as a pin for receiving an interrupt signal. 
     In one embodiment, the input and output data signals of the circuit are disabled during the reset period, and depending upon the state of the signal on the mode pin at the time the reset period is terminated, the input and output data signals can be disabled for subsequent operations until the next reset period. 
     In one embodiment, the reset signal can be asynchronously applied and is synchronized internally with the system clock signal. 
     Using the reset and mode pins in the manner described above, the present invention provides support for testing and debugging techniques such as clam-shell testing and testing using an in-circuit emulator (ICE). 
    
    
     The present invention is better understood upon consideration of the detailed description below and the accompanying drawings. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram representation of a microprocessor 101, which is provided with a reset pin 102 and mode pins 103. 
     FIG. 2 is a block diagram 200 showing a transparent latch 201 and a reset synchronization circuit 202 in the microprocessor 101 shown in FIG. 1. 
     FIG. 3 shows a circuit 300 suitable for implementing the reset synchronization circuit 202 of FIG. 2. 
     FIG. 4 shows a circuit 400 which generates the signals SInt 2:0! associated with the interrupt pins labelled SInt 2:0! and one of the Tristate, BigEndian and DBlockRefill signals shown in FIG. 2, in response to the Reset signal received. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 is a block diagram representation of a microprocessor 101. Microprocessor 101 is provided a reset pin 102 Reset, a clock input pin 104 (Clk2xin), a 6-bit interrupt bus 103 (Int 5:0!), a 4-bit branch condition bus 106 (BrCond 3:0!), bus request pin 105 (BusReq), and bus grant pin (BusGnt) 107. In addition, the microprocessor communicates with the main memory system, I/O devices and peripherals over a 32-bit bus 108 (AD 31:0!), using a number of control signal pins 109-118 designated ALE (address latch enable), ADDR 3:2! (lower address bits), Rd (read enable), Wr (write enable), Ack (acknowledgement), RdCEn (read clock enable), DataEn (data enable) Burst/WrNear (burst mode or &#34;write near&#34;) and BErr (bus error), and clock signal output pin SysClk (system clock). The functions of the control signal pins are discussed in the &#34;IDT79R3051 Family Hardware User&#39;s Manual&#34;, copyrighted 1990, available from Integrated Device Technology, Inc., Santa Clara, Calif., and which is hereby incorporated by reference in its entirety. 
     In microprocessor 101, the Reset signal on reset pin 102 can be asserted asychronously from an external circuit (not shown). 3 pins (Int 2:0!) in the 6-bit interrupt bus 103 are multiplexed as mode pins during the active phase of the Reset signal. Under this multiplexing scheme, the signals on pin Int 2:0! are sampled at the end of the reset period and the values of these signals are used to select the modes under which the microprocessor 101 operates after the reset period. For example, if the signal (BigEndian) on pin Int 0! is at logic high when the Reset signal is negated, i.e. transitions from logic low to logic high, the microprocessor 101 operates as a &#34;big endian&#34; microprocessor after reset. Conversely, if the signal on Int 0! is at logic low when the Reset signal is negated, the microprocessor 101 operates as a &#34;little endian&#34; microprocessor after reset. A person of ordinary skill in the art will appreciate the &#34;little endian&#34; and &#34;big endian&#34; designations as related to ordering of byte addresses in a word. As another example, if the signal (DBlockRefill) on pin Int 2! is at logic high when the Reset signal is negated, the data cache of microprocessor 101 has a refill block size of four words; otherwise, the data cache of microprocessor 101 has a refill block size of one word. Of course, one of ordinary skill will appreciate the refill block size of a cache memory as related to the number of words the cache memory fetches from the main memory at a time. 
     In accordance with the present invention, the signal (Tristate) on pin Int 1! is of significance not only upon the negation of the Reset signal, but during the reset period as well. During the reset period, while the Tristate signal is asserted, i.e. brought to logic low, the output pins of microprocessor 101, except output clock signal pin SysClk, are each set to a high impedance state (&#34;tristated&#34;). Alternatively, during the reset period, while the Tristate signal is at logic high, all the control output pins, with the exception of the output clock pin SysClk, are driven to the negated states, and all the input/output signals (e.g. AD 31:0!) are tristated. In addition, if the Tristate signal remains at logic low for a sufficient period (see below) prior to the negation of the Reset signal, i.e. the Reset signal is brought to logic high, the tristated pins will remain tristated until the next reset period. However, if the Tristate signal is negated, i.e. brought to logic high, prior to the end of the reset period, the output pins of microprocessor 101 will remain tristated for the remainder of the reset period, but the control output signals of microprocessor 101 will operate normally (i.e. functional) after the Reset signal is negated. Although not necessary under ideal conditions, the specification of the present embodiment requires that the Tristate signal be held unchanged in the four clock periods preceding the negation of the Reset signal, so as to provide sufficient set up time and to avoid noise in the Tristate signal which may lead to undesirable results. 
     Under normal functional operation, during the reset period, the Tristate signal is not expected to be asserted, so that the expected behavior of microprocessor 101 during reset is the tristating of input/output signals and the negation of control output signals. However, when testing a board including the microprocessor, using testing techniques such as clam-shell testing or under control of an ICE, while microprocessor 101 is in the reset period, the Tristate signal can be asserted to allow the circuit on the board external to the microprocessor 101 to be controlled by the testing device (i.e. the ICE or clam-shell tester) and avoids contention in the control output signals between the device under test (i.e. microprocessor 101) and the testing device. Furthermore, the user can enable the output pins of microprocessor 101 by holding the Tristate signal at logic high during the last four SysClk periods prior to the negation of the Reset signal, as is desirable when testing in an ICE environment. Alternatively, the user can hold the Tristate signal at logic low for the last four SysClk periods prior to the negation of the Reset signal, so as to tristate all the output signals of microprocessor 101, as is desirable under clam-shell testing. 
     In order to implement this reset scheme, the signals of the Reset and mode pins are received as shown in FIG. 2. In FIG. 2, the Reset signal received on pin 102 (FIG. 1) is synchronized with the output control clock signal SysClk of pin 118 in the synchronization circuit 202 and is provided to the central processing unit (&#34;CPU&#34;, not shown in FIG. 2) within microprocessor 101. The Reset signal is also used to clock transparent latch 201, such that when the Reset signal is negated, i.e. Reset transitions from logic low to logic high, the transparent latch 201 provides the values of the signals on bus 103 (Int 5.0!) at the output terminals (103-1&#39; to 103-6&#39;) of transparent latch 201. As shown in FIG. 2 the Tristate signal is shown at terminal 103-2&#39;. The BigEndian and BlockRefill signals are synchronously received on the pins SInt 0! and SInt 2! respectively. The remaining pins Int 5:3! are not currently used as mode pins for reset. The signals from Int 2:0! pins are shown in FIG. 2 as SInt 2:0!, indicating that the signals on Int 2:0! have been synchronized with the SysClk signal prior to being provided at transparent latch 201. 
     In the present embodiment, the negation of the synchronized Reset signal is received at the CPU after two SysClk cycles. The CPU then performs &#34;house-keeping&#34; tasks, such as reinitializing the instruction fetch pipelines, before branching to the reset exception handling service routine specified by the reset exception vector. The reset exception vector resides in unmapped and uncacheable memory space, so as to allow the reset exception be handled even though the cache memory and the virtual memory systems may be in an undefined state. The reset service routine initializes the CPU&#39;s internal states and boot-straps the operating system. 
     FIG. 3 shows a circuit 300 receiving the Reset signal 102 of FIG. 2. As shown in FIG. 3, the Reset signal is first received on an input buffer 301 of pin 102. From input buffer 301, the Reset signal is amplified for distribution throughout the chip by a number of inverting amplifiers. As shown in FIG. 3, three asynchronous signals YRet, YRetB, and CA --  RESET are generated. YRet and YRetB are complementary signals suitable for use as complementary clocking signals. In addition, a signal Reset&#39; is also provided. As shown in FIG. 3, with respect to logic low to logic high transitions of the Reset signal (i.e. negation of reset) signal Reset&#39; is synchronized by the latches 302, 303 and 304, respectively controlled by three sets of complementary clock signals. Signal Reset&#39; is asynchronous with respect to logic high to logic low transitions of the Reset signal (i.e. onset of reset). Thus, signal Reset&#39; can be used to provide an asynchronous qualified Reset signal at the beginning of the reset period, and a synchronous qualified Reset signal at the end of the reset period. Reset&#39; satisfies the reset timing requirements of the CPU. 
     FIG. 4 is structure suitable for implementing a circuit for generating one of the signals SInt 2:0! on one of the interrupt pins labelled SInt 2:0!. As shown in FIG. 4, an input buffer 401 receives the signal from the associated pin, for example, pin Int 1!. An inverted asynchronous signal is provided on lead 402, which is one bit of bus TINT. This inverted asynchronous signal on lead 402 is routed to circuits (not shown) which receive the interrupt signal asynchronously. During functional operations, i.e. when not in the reset period, the signal received in input buffer 401 is synchronized, after suitable buffering, by the flip-flops 403-406, each of which being controlled by a pair of complementary clock signal. The synchronized signal appears on terminal 407 The synchronized signal SInt 1! on terminal 407 satisfies the timing requirements of the CPU core. However, as mentioned above, the Int 1! pin is multiplexed as a mode pin during the reset period. At the negation of reset, the complementary clock signals YRet and YRetB, which are generated in response to the Reset signal discussed above in conjunction with FIG. 3, latch the value of the signal received in input buffer 401 into transparent latch 408. Since the signals YRet and YRetB change state only when the Reset signal changes state, the value latched into latch 408 will be held until the next reset period. As shown, the signal latched into latch 408 becomes the Tristate signal described above after suitable buffering for distribution. The signals BigEndian and DBlockIRefill are generated similarly. 
     The above detailed description is provided to illustrate the specific embodiments provided above, and not intended to be limiting the present inventions. Many modifications and variations within the scope of the present invention are possible. The present invention is defined by the following claims.