Abstract:
A scan-register having first and second data input ports (SYS --  DATA, SCAN --  IN), a data output port, and inputs for at least first, second, third, and fourth control signals (SYS --  CLK, M --  LOAD, CLK --  B, CLK --  A). 
     The scan-register comprises the following elements: first means (12A) having inputs coupled to the first and second data input ports for selectively storing data appearing on one of the said data input ports in accordance with the occurrence of a predefined combination of states of at least the first and second control signals; second menas (10A) having at least one input coupled to the second data input port for selectively storing data appearing on the second data input port in accordance with the occurrence of a predefined state of at least the third control signal; and third means (12B) having at least one input port coupled to an output of one of the first and second means, and further having an output coupled to the data output port, for selectively storing data stored in either the first or second means in accordance with the occurrence of a predefined state of at least the fourth control signal and providing the data stored therein to the data output port. 
     The data appearing on one of the first and second data input ports is therefore sequentially shiftable through selected ones of the first, second and third means, to the output port in accordance with the occurrence of predefined sequences of the predefined states of selected ones of the control signals.

Description:
FIELD OF THE INVENTION 
     The present invention relates to the field of scannable latches. More particularly, the invention relates to scannable latches designed to facilitate scan delay testing. 
     BACKGROUND OF THE INVENTION 
     The central processing unit (CPU) of a large computer system basically consists of memory elements, combinational logic, and a clocking system. The memory elements are arranged in sets, sometimes called registers, corresponding to the word size used within the computer system. Between the sets of memory elements are combinational logic circuits. 
     At the end of a clock cycle, which is also the beginning of the next clock cycle, data on the output of the combinational logic circuitry is stored in a first set of memory elements. This data appears on the output of the set of memory elements, and therefore on the input of other combinational logic circuitry connected to the outputs of the first set of memory elements. This other logic circuitry performs the designed logic function on the data, and at the end of the clock cycle the output of this combinational logic is stored in a next set of memory elements, at least some of which may include a set of latches that provide input to the logic circuitry. This process is repeated as the computer system operates; that is, data is processed by combinational logic circuitry, stored, passed on to the next set of combinational logic circuitry, processed, stored, and so on. 
     One of the features that is employed in large computer systems today is a &#34;scannable latch.&#34; A scannable latch includes a latch that can be converted to a stage of a shift register by the use of appropriate clock signals. The scannable latch allows the contents of the resulting shift register to be &#34;scanned&#34; by shifting out the contents for examination. The shift register, and therefore the latch, can also be loaded with new contents by shifting in new data. See, for example, U.S. Pat. No. 4,495,629. Circuitry for testing for timing faults in synchronous sequential circuits are also disclosed and discussed in Malaiya, Y.K. and Narayanaswamy, R., &#34;Testing for Timing Faults in Synchronous Sequential Integrated Circuits,&#34; Paper 19.3, pp. 560-571, 1983 International Test Conference (CH19331/83/0000/0560$0100 IEEE). The advantages offered over these by the present invention include flexibility, ease of use and simple construction. 
     FIG. 1 depicts a known &#34;gated-latch&#34; circuit 10 in which the gated-latch output Q follows (i.e. is set to the same value as) the data input D while the gate signal G is &#34;high&#34; (i.e., at the logic high level). When gate signal G changes to &#34;low&#34;, any further changes to Q are prevented, and Q retains its most recent value, even if D changes. The complementary gated-latch output QN is always set to the opposite of the Q output value. 
     FIG. 2 depicts a known &#34;gated-latch with dual ports&#34; circuit 12 in which the gated-latch output Q follows the first port data input D, or the second port data input SIN, depending upon whether the first port gate signal CLK or the second port gate signal S --  CLK is high. The output Q is prevented from any further changes when both CLK and S --  CLK are low, even if D or SIN changes. The complementary gated-latch output QN is always set to the opposite of Q. If both CLK and S --  CLK are high while D and SIN have opposite values, the latch outputs Q and QN will both be high. 
     FIG. 3 depicts a &#34;master-slave&#34; register circuit comprising first gated-latch 10A, second gated-latch 10B, and inverter 11 which inverts the gate signal SYS --  CLK connected to gated-latch 10A. It is customary to refer to gated-latch 10A as the &#34;master latch,&#34; and gated-latch 10B as the &#34;slave latch.&#34; 
     When SYS --  CLK is low, the gate signal G to master latch 10A is high, which enables master latch output Q to follow the SYS --  DATA input. During this time (i.e., while SYS --  CLK is low), the gate signal G to slave latch 10B is low, which prevents the slave latch 10B output Q from changing. When SYS --  CLK changes to the logic high level, the master latch 10A gate signal G goes to logic low, which prevents any further changes at the master latch Q output, even if the master latch data input D (which is connected to SYS --  DATA) changes. During this time (i.e. when SYS --  CLK is high), the gate signal to slave latch 10B is high, which enables the slave latch Q output to take on the same value as the master latch Q output. The slave latch output Q is thus allowed to change only once per clock cycle in response to SYS --  CLK changing from low to high. When SYS --  CLK changes from low to high, the slave latch Q output is set to the value of the SYS --  DATA input immediately prior to SYS --  CLK going high. 
     Previous scannable register designs focused on functional test problems. See, e.g., &#34;Eichelberger, E.B. and Williams, T.W., &#34;A Logic Design Structure for LSI Testability&#34;, Journal of Design Automation and Fault Tolerant Computing, May 1978, pp. 165-178. The present invention addresses the problem of testing the delay associated with particular paths. Whereas special process test devices can be used to test whether a particular device can be operated at a particular speed, defects and variations across the chip or wafer are not detected by such devices. Applying test vectors at speed to the pins of a chip provides some delay test coverage, but it is difficult to generate the required vectors for specific paths inside the chip. 
     Accordingly, it is an object of the present invention to provide means for facilitating delay path testing between any two scannable registers. It is a further object of the present invention to provide a scannable register in which two different values can be stored in the scan register, the second value being transferred to the register&#39;s output on a rising clock edge, propagating through the combinational logic (i.e., the delay path), and being captured in a scannable register on the next rising clock edge. In addition, another object of the present invention is to provide a scannable register in which initial values are loaded into a slave-latch portion of the scannable register, while values which are to replace them are loaded into a master-latch portion of the same register. Special test signals should be provided which allow these two values to be loaded into the register. These special test signals should also provide means for triggering the transfer of data values from the master-latch to the slave-latch, through the delay path, and into a register. Path delays in excess of the time delay between the rising edges of the two clock pulses should be exposed. The present invention achieves these goals. 
     SUMMARY OF THE INVENTION 
     The present invention achieves the stated objectives by providing a &#34;scan-register with master-load&#34; (or &#34;scan-register&#34;). 
     A scan-register according to the invention comprises at least two data input ports, at least one data output port, and inputs for at least first, second, third and fourth control signals. Within the scan-register, a first means, having inputs coupled to data input ports, selectively stores data appearing thereon in accordance with the occurrence of a predefined combination of states of the first and second control signals. Second means selectively stores data appearing on the second data input port in accordance with the occurrence of a predefined state of the third control signal, and third means, having at least one input coupled to an output of at least the first or second means, and further having an output coupled to the data output port, selectively stores data stored in the first and second means in accordance with the occurrence of a predefined state of the fourth control signal. The data stored in the third means is provided to the data output port. 
     According to the invention, the data appearing on either of the data input ports is sequentially shiftable through selected ones of the first, second and third means. The data is shifted from the selected input port to the output port in accordance with the occurrence of predefined sequences of the predefined states of the control signals. 
     According to a first preferred embodiment of the invention, a first mode of operation may be selected in accordance with a first predefined sequence of predefined states of the control signals. In this mode, data is sequentially shiftable from either the first or second data input ports, through the first and third means to the data output port while different data is stored in the second means. A second mode of operation may be selected in accordance with a second predefined sequence of predefined states of the control signals. According to this second mode of operation, data is sequentially shiftable from the second data input port, through the second and third means to the output data port while different data is stored in the first means. 
     In the first mode of operation of the first preferred embodiment, data is shifted from the first data input port to the data output port in response to sequential predefined states of the first control signal. In addition, data is shifted from the second data input port to the data output port in response to a predefined state of the second control signal followed by a predefined state of the first control signal. 
     In the second mode of operation of the first preferred embodiment, data is shifted from the second data input port, directly through only the second means and third means to the data output port in response to a predefined state of the third control signal followed by a predefined state of the fourth control signal. 
     Other preferred embodiments and modes of operation are described in detail below. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a prior art &#34;gated-latch&#34; circuit. 
     FIG. 2 is a block diagram of a prior art &#34;gated-latch with dual ports&#34; circuit. 
     FIG. 3 is a block diagram of a prior art &#34;masterslave&#34; register circuit. 
     FIG. 4 is a block diagram of a &#34;scan-register with master-load&#34; circuit according to the present invention. 
     FIG. 5 is a block diagram of a scan-path in accordance with the present invention. 
     FIG. 6 is a block diagram of an alternative embodiment of the circuit of FIG. 4. 
     FIGS. 7 and 8 are block diagrams of alternative embodiments of the circuits of FIGS. 4 and 6, respectively. 
     FIGS. 9(A)-(C) are timing diagrams for the circuit of FIG. 8. 
     FIG. 10 is a schematic representation of the circuit of FIG. 8, as implemented in CMOS and incorporating an ENABLE function. 
     FIGS. 10A, 10B, 10C and 10D illustrate how the various control signals used in FIG. 10 are derived. 
     FIG. 11 is a tabular description of the behavior of the circuit of FIG. 8. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Preferred embodiments of the invention will now be described with reference to FIGS. 4-10, wherein like reference numerals designate like elements 
     FIG. 4 depicts a first preferred embodiment of the present invention. This embodiment is referred to herein as &#34;scan-register with master-load,&#34; and comprises master-latch 12A, slave-latch 12B, scan-latch 10A and NOR gate 13. 
     The operation of the embodiments of FIGS. 4 and 6 will now be summarized. Reference is made to FIG. 4, but the operation of the embodiment of FIG. 6 is virtually identical. (Any differences will be readily apparent from the description of FIG. 6.) 
     There are two modes of operation. The first mode of operation is selected in accordance with a first predefined sequence of predefined states of particular clock signals. The clock signals are essentially control signals, since they control the operation of the device. In this first mode of operation data is sequentially shifted from the &#34;SYS --  DATA&#34; or &#34;SCAN --  IN&#34; data input ports, through master latch 12A and slave latch 12B to the output data port (i.e., &#34;Q --  OUT&#34;) while different data is stored in scan-latch 10A. 
     According to the first mode of operation, data is shifted from the SYS --  DATA input port to the Q --  OUT output port in response to sequential occurrences of rising edges of the SYS --  CLK signal. Data is shifted from the SCAN --  IN input port to the Q --  OUT output port in response to a high going pulse of the M --  LOAD signal followed by a high going pulse of the SYS --  CLK signal. 
     The second mode of operation is selected in accordance with a second predefined sequence of predefined states of the control signals. According to this mode of operation, data is sequentially shifted from the SCAN --  IN data input port, through scan-latch 10A and slave latch 12B to the SCAN --  OUT data port while different data is stored in master latch 12A. 
     During this second mode of operation, data is shifted from the SCAN --  IN input port, directly through only scan-latch 10A and slave latch 12B to the SCAN --  OUT output port in response to a high going pulse of the CLK --  B signal followed by a high going pulse of the CLK --  A signal. 
     The circuit of FIG. 4 will now be described in detail. 
     Master-latch 12A and slave-latch 12B are each a gated-latch with dual ports circuit, and scan-latch 10A is a gated-latch, each of which is described above in the Background of the Invention section. When the three signals M --  LOAD, D --  STRB and SYS --  CLK are all low, master-latch 12A&#39;s output Q follows the SYS --  DATA input. The Q output of master-latch 12A moves to the Q output of slave-latch 12B (which is also the Q --  OUT output of the overall scan-register with master-load circuit 14) by keeping CLK --  A low while SYS --  CLK is changed from low to high. This causes the master-latch/slave-latch pair to behave like the master-slave register circuit depicted in, and described above with reference to, FIG. 3. 
     Scan-latch 10A can be operated separately such that when CLK --  B is set high, the scan-latch output Q follows SCAN --  IN. When CLK --  B is changed to low, the most recent value of the scan-latch 10A output Q is preserved, even if SCAN --  IN changes. The value from the Q output of scan-latch 10A can be transferred to the Q output of slave-latch 12B by keeping CLK --  B low while the CLK --  A signal to slave latch 12B is high, provided that SYS --  CLK is low. 
     M --  LOAD is used as the gate signal for the second port of master-latch 12A. With either SYS --  CLK or D --  STRB set high, the master latch 12A output Q will follow the SCAN --  IN value when M --  LOAD is set high. D --  STRB is used as a disable signal for the SYS --  CLK signal going into master-latch 12A. When D --  STRB is set high, the gate signal CLK on the first port of master-latch 12A will be low, and master-latch 12A will be immune to changes to SYS --  DATA and SYS --  CLK. 
     Noteworthy features of scan-register with master-load circuit 14 include: Firstly, the ability to prevent master-latch 12A&#39;s Q output from changing prior to slave-latch 12B being loaded from master-latch 12A when SYS --  CLK changes from low to high. This is accomplished by keeping D --  STRB high. Secondly, the ability to set master-latch 12A&#39;s Q output from a data input source (i.e., SCAN --  IN) which is different from the system data input (SYS --  DATA). 
     These two features make it possible to cause a transition at the Q --  OUT output to any desired value (which includes the complement of its present value), with the changing of SYS --  CLK from low to high, by loading the desired value into master-latch 12A&#39;s Q output, using the SCAN --  IN and M --  LOAD signals, and holding D --  STRB high. Without the D --  STRB signal, the value loaded into master-latch 12A&#39;s Q output would be subject to change if SYS --  DATA were to change before SYS --  CLK is set high. 
     Scan-registers 14 of the type just described would typically be used in a digital system for implementing that system&#39;s internal state variables. In addition, the individual scan-registers 14 would be connected to each other in such a way that the SCAN --  OUT output signal from scan-register &#34;i&#34; would be connected to the SCAN --  IN input of scan-register &#34;i+1&#34;, thereby forming a chain of scan-registers collectively referred to as a &#34;scan-path&#34;. 
     Referring now to FIG. 5, SCAN --  IN for first scan-register 14A (scan-register with the lowest ordinal number &#34;i&#34;) and SCAN --  OUT from the last scan-register 14C (scan-register with the highest ordinal number &#34;i&#34;) along the chain would be connected to separate SCAN --  INPUT and SCAN --  OUTPUT pins of the overall integrated circuit in which the scan path is implemented. All scan-registers would share the CLK --  A, CLK --  B, D --  STRB and the M --  LOAD signals. In this way, master-latch sections 12A of individual scan-register circuits 14A, 14B, etc. can be set to predetermined values by setting D --  STRB and M --  LOAD high, SYS --  CLK low, and using alternate (non-overlapping) CLK --  A and CLK --  B signals in concert with the SCAN --  IN signal to the overall integrated circuit. The desired values are presented on the SCAN --  IN terminal in the same order as the destination scan-registers are interconnected along the scan-path. The serial shifting-in of the predetermined values into scan-registers 14A, 14B, 14C, etc., is referred to as the &#34;scan in&#34; action. Once this is done, the M --  LOAD signal would be set low, and while D --  STRB is kept high another round of scan in would be performed to set the respective slave-latches 12B. 
     During the second scan in, the master-latch 12A sections of scan-registers 14A, 14B, etc. would not be changed since M --  LOAD is low and D --  STRB is high. At this stage, two successive SYS --  CLK pulses would be applied to the entire circuit and D --  STRB would be changed to logic low in between the two SYS --  CLK low to high transitions. This can be achieved by using a separate latch or pair of latches to provide the D --  STRB signal such that this latch (or pair of latches) is reset (that is D --  STRB is set to low) following the rising edge of SYS --  CLK. For correct operation the new value of D --  STRB following the first rising edge of SYS --  CLK should be available to all scan register circuits before the second SYS --  CLK pulse. Furthermore, the D-STRB register should not be along the scan path since otherwise its value would be subject to change during scan operations, and this would cause the master latch circuit to lose its data. FIG. 10B illustrates how D --  STRB may be implemented using a flip-flop circuit. In this way, the first SYS --  CLK pulse allows the slave-latch 12B sections of scan-registers 14A, 14B, 14C, etc., to be updated from the predetermined values present in their respective master-latch sections 12A. The setting of D --  STRB to logic low before the second SYS --  CLK pulse permits the register to be updated with its normal system input SYS --  DATA on the second rising edge of SYS --  CLK. 
     It is possible to repeat a given experiment several times by gradually reducing the time between the first and second SYS --  CLK pulses until these become so closely spaced that the digital system&#39;s combinational logic does not have sufficient time, before the second SYS --  CLK pulse arrives, to respond properly to the values set at the slave-latch 12B circuit outputs q --  out with the first SYS --  CLK pulse. The failure point provides a measurement of the propagational delay through the combinational circuit. 
     FIG. 6 depicts an alternative embodiment 16 of the scan-register with master-load circuit 14. This embodiment is referred to as &#34;scan-register with master-load and double inversion.&#34; In the circuit of FIG. 6, the inverting output QN of latch circuits 12A&#39; and 12B&#39; is used in place of the non inverting Q output and the scan-register 16 output SCAN --  OUT is obtained from the Q output of slave-latch 12B&#39;. The effect of this interchange of signals is that every data transfer from master-latch 12A&#39; or scan-latch 10A&#39; to slave-latch 12B&#39;, as well as from the scan-register 16 input SYS --  DATA or scan-in to the master latch 12A&#39; results in inversion of data polarity. This does not affect data transfers from the scan register 16 input SYS --  DATA to scan register 16 output Q-OUT since it involves an even number of inversions, which cancel each other out. Scan register 16 output SCAN --  OUT always stores the complement of scan register 16 output Q --  OUT. Data transfers from the scan register 16 input SCAN --  IN to the scan register 16 output SCAN --  OUT involves inversion of data polarity only if the said transfer is achieved by going through master-latch 12A&#39;. 
     The circuit of FIG. 6 has an important feature not present in the circuit of FIG. 4 since data which is latched into master-latch 12A&#39; of FIG. 6 (and saved there by setting D --  STRB high) is inverted when it is later moved into slave-latch 12B&#39;. It is possible to initially set the master-latch 12A&#39; and slave-latch 12B&#39; Q outputs to the same value. It is seen that Q --  OUT is initially set to the Q value, and then changes to the complement of the Q value when SYS --  CLK transitions from low to high. Therefore, if scan in is performed with D-STRB and M-LOAD set high, all scan-registers would be set to contain the same value in their master-latch 12A&#39; as in their slave-latch 12B&#39;  such that dropping M --  LOAD to low and then applying two consecutive SYS --  CLK pulses and allowing D --  STRB to change between rising edges would force all of the Q --  OUT signals to change to the opposite state. In many instances, this would be the desired effect as it allows creating signal transitions whose effects on the combinational circuitry of the chip can be captured by a subsequent SYS --  CLK pulse. Delay path testing could be performed without the need for a second scan in action before the two SYS --  CLK pulses are applied. 
     FIGS. 7 and 8 show additional alternative embodiments of the invention that operate in a manner similar to the circuits of FIGS. 4 and 6, respectively. The embodiments of FIGS. 7 and 8 differ from their counterparts depicted in FIGS. 4 and 6 by the interconnections among master-latch 12A&#34;, slave-latch 12B&#34;, and the scan-latch 10A&#34;. In FIG. 7, the master-latch/slave-latch pair is interconnected in a similar fashion to the ordinary master-slave register depicted in FIG. 4. A separate scan-latch 10A&#34; is driven from the slave-latch 12B&#34; Q terminal. 
     The circuit of FIG. 8 is similar to the circuit of FIG. 7, with the exception that the inverting output QN of each latch 12A&#39;&#34;, 12B&#39;&#34;, 10A&#34;&#34; is used in place of its non-inverting Q output. This produces the same effect as discussed above with reference to the circuit of FIG. 6. 
     The operation of the embodiments of FIGS. 7 and 8 will now be summarized with reference to FIG. 7. (As with FIGS. 4 and 6, any differences between the operations of the embodiments of FIG. 7 and 8 will be readily apparent.) 
     Again, there are two modes of operation. The first mode of operation is selected in accordance with a first predefined sequence of the predefined states of the control signals SYS --  CLK and M --  LOAD. Data is sequentially shifted from either the SYS --  DATA or SCAN --  IN input ports, through master latch 12A&#34; and slave latch 12B&#34; to the Q --  OUT data output port. This data is also available to scan latch 10A&#34; for storage and presentation at the SCAN --  OUT data output port. 
     According to the first mode of operation, data is shifted from the SYS --  DATA input port to the Q --  OUT output port in response to sequential occurrences of rising edges of the SYS --  CLK signal. In addition, data is shifted from the SCAN --  IN port to the Q --  OUT port in response to a high going pulse of the M --  LOAD signal followed by a high going pulse of the SYS --  CLK signal. 
     The second mode of operation is selected in accordance with a second predefined sequence of the predefined states of the control signals. According to this mode, data is shifted from the SCAN --  IN port, directly through only slave latch 12B&#34; and scan-latch 10A&#34; to the Q --  OUT and SCAN --  OUT output ports in response to a high going pulse of the CLK --  B signal followed by a high going pulse of the CLK --  A signal. 
     It should be noted that the NOR gate associated with the master latch 12, 12A&#39;, 12A&#34; in the various embodiments may be considered as part of the master latch in the invention defined by the appended claims, but the claims are by no means limited in scope to use of a master latch having the illustrated NOR gate or NOR function, except as may be expressly set forth in the claims. 
     FIG. 9 depicts timing diagrams for the test signals CLK --  A, CLK --  B, M --  LOAD and D --  STRB. Q1 represents the value that was scanned into slave-latch 12B&#39;&#34;, Q2 the value that was scanned into master-latch 12A&#39;&#34;, and Q3 the system input data captured into the register 20. 
     FIG. 10 shows a particular CMOS implementation of the scan-register with master-load and double inversion 20 which also incorporates an ENABLE function. FIGS. 10A, 10B, 10C and 10D illustrate how the various control signals used in FIG. 10 are derived. The table of FIG. 11 presents a tabular description of the behavior of the register depicted in FIG. 8. 
     Many changes, modifications and variations of the preferred embodiments will become apparent to those skilled in the art after considering this specification and accompanying drawings. All such changes, modifications and variations within the spirit and scope of the invention are deemed to be covered by the invention, which is limited only by the following claims.