Abstract:
Serial assertion checking is realized in a System On a Chip (SoC) device by connecting scan chain output to a bit extractor configured within a functionally reconfigurable module that is part of the SoC, which extracts the bits necessary for the assertion checking. The extracted bits are applied to a finite state machine that implements the assertion checking.

Description:
RELATED APPLICATION 
   This application is related to U.S. patent application Ser. No. 10/956,854, filed Oct. 1, 2004, which is hereby incorporated by reference. 
   BACKGROUND 
   This invention relates to integrated circuits and, more particularly, to functional testing and debugging of integrated circuit designs. 
   The 10/956,854 patent application discloses a beneficial design approach for System on a Chip (SoC) devices, where each core is encompassed with a wrapper that includes a functionally reconfigurable module (FRM). The advance in the art disclosed in the 10/956,854 patent application incorporates configurable circuits within the FRM that perform assertion checking. 
   In assertion checking, a collection of conditions is identified which conditions are expected to hold true during the operation of a properly working SoC. To perform assertion checking, the tested SoC receives various input test vectors, and the resulting SoC states are checked against a collection of assertions. Assertion checking can be of two types: “at-speed” assertion checking, and “single-step” assertion checking. In at-speed assertion checking all of the inputs and outputs of a core are available, in parallel, to the assertion checking circuitry within the FRM. The logic for performing the assertion checking is responsive to some or all of these signals, and this logic operates in parallel. In single-step assertion, the internal flip-flops of the SoC are connected to form a scan chain (the circuitry for forming the scan chain having been included in the SoC design in accord with conventional design practices), the data of the formed scan chain is clocked out, and the information thus obtained is analyzed to determine whether any of the assertions fire. 
   The 10/956,854 patent application also disclosed the Continuous Single Step (CSS) mode, which makes possible automatic checking such assertions after every functional clock. That is, the SoC under test is activated in its normal mode (mode A) for a single period of the operational clock, and then moved to its assertion checking mode (mode B). During the assertion checking mode the scan chain is formed, the data are outputted and captured (and reinserted, to return the circuit to its operational state), and tested against the set of assertions. If none of the assertions fires, the SoC is again activated in its normal state for one period of the operations clock, and then again moved to its assertion checking mode. 
     FIG. 1  shows a core  20  of an SoC and its associated FRM  30 . Core  20  is shown to receive two control signals from a management circuit (not shown), one of which configures the flip-flops within core  20  into a chain scan (as depicted in the FIG.), and the other provides a clock. The clock signal causes the states of the flip-flops to appear at the SO output, and those states applied to both the SI input and bit extractor  52 . The duration of the clock is set to restore core  20  to the state it was in before commencement of the clock. 
   It should be understood that a core can be designed to comprise more than one scan chain, with a plurality of SO outputs and SI inputs, although  FIG. 1  shows only one scan chain for sake of simplicity. It should be further understood in the context of this disclosure that although one scan chain is shown, as well as one bit extractor and one set of circuits responsive to the bit extractor, in  FIG. 1  as well as in subsequent FIGS. a plurality of scan chains might be employed, in which case a plurality of bit extractors and corresponding subsequent circuits would also be employed. It is noted that a plurality of bit extractors can be combined to form a single bit extractor with a plurality of outputs, and it is also noted that a plurality of scan chains can be outputted via a single output terminal of a core, thus effectively outputting the various scan chains in a seriatim manner. In such a case, a single bit extractor may suffice. 
   As for the structure of bit extractor  32 , skilled artisans would recognize that there are numerous ways to implement a bit extractor. One very simple way is to configure an addressable memory that stores the numbers of the identified sequence; for example, the memory might be uploaded with the values 5, 28, . . . 111. Within the bit extractor there might be a counter A that advances with each test clock, a counter B that addresses the memory, and a comparator responsive to the output of the memory and to counter A. Thus, when the first entry of the memory is retrieved (e.g., 5), the comparator fires when counter A reaches the value 5, indicating that the fifth bit of the scan chain is available, at which time the available bit is presented to the output of bit extractor  32 . At that time counter B is incremented, advancing the address and causing the memory to output its second entry, i.e., 28. The process continues until the 28 th  bit arrives and it is outputted, etc. 
   Under control of bit extractor logic  32 , selected bits of the Scan Output (SO) are stored in register  34 . Those bits are applied to Assertion Logic (AL) circuits  35 - 1  through  35 -K, each of which checks one assertion. The outputs of the AL circuits are stored in respective flip-flops  36 - 1  through  36 -K, and those flip-flops are interconnected to provide a serial output of their contents to the management circuit. The serial output of register  34  is connected to flip-flop  36 - 1 , which allows the management circuit to receive and additionally analyze the bits collected by extractor logic  32 . Finally, the outputs of the AL circuits are also applied to OR gate  37  that provides an indication to the management circuit as to whether any of the assertions fired. Of course, the management circuit includes means to output various signals to the user who is exercising the SoC and means to stop the functional clock when an assertion fires. The management circuit is not shown because its design depends on the particular choices that may be made in connection with specific SoCs, or in connection with the goals set for simulating an SoC, and such designs do not form a part of this invention. However, it should be realized that both in connection with the  FIG. 1  circuit in connection with the other FIGS. a management circuit is included for controlling operation of the circuits embodying the concepts of this invention and for outputting results of the assertion checking. 
   There are significant advantages to circuit disclosed in  FIG. 1 , but it is noted that the assertion logic circuits operate in parallel, therefore the amount of logic they require depends of the number of extracted bits and these circuits potentially can take up a significant amount of FRM “real estate.” 
   SUMMARY 
   An advance in the art is realized by checking assertions serially, as the bits are captured from each Scan Output lead of a core under control of an associated bit extractor logic element. The captured bits are applied to a finite state machine comprising a combinatorial logic circuit responsive to the captured SO bits and to one or more output of a memory module that receive inputs from one or more outputs of the combinatorial logic circuit. Additionally, signals available from the memory module and/or from the logic circuit are applied to a second combinatorial logic circuit that develops a signal representing the result of the assertion checking. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  shows the circuitry in an FRM of an SoC for CSS assertion checking; 
       FIG. 2  depicts an arrangement in accord with the principles disclosed herein; 
       FIG. 3  illustrates a “one-hot” assertion checking embodiment; 
       FIG. 4  illustrates a parity assertion checking circuit; . . . 
       FIG. 5  illustrates an equality checking assertion checking embodiment; . . . 
       FIG. 6  illustrates an embodiment for checking “greater than,” “less then” and equality assertions, when the compared numbers arrive in a most-significant-bit-first order; 
       FIG. 7  illustrates a “less than” assertion checking embodiment when the compared numbers arrive in a least-significant-bit-first order; 
       FIG. 8  illustrates a “strict set inclusion” assertion checking embodiment; and 
       FIG. 9  illustrates alternative structure of the  FIG. 8  block  60 . 
   

   DETAILED DESCRIPTION 
   As described in the aforementioned Ser. No. 10/425,101 application, an FRM can be realized with field-programmable logic arrays (FPLAs) in a conventional manner, and the variety of digital circuits that can be created within an FPLA is essentially limitless. We realized and discovered that this powerful structure can be applied to provide a novel solution to the problem of efficiently implementing assertion checking in hardware by creating assertions in the reconfigurable logic contained in wrappers. By repeatedly reusing the reconfigurable logic within the FRMs to implement different subsets of assertions, one subset of assertions at a time, all of the necessary assertions can be checked. Advantageously in accord with the principles disclosed herein, all of the assertions of a subset are checked concurrently. 
     FIG. 2  presents one illustration of assertion checking circuit in accord with the present disclosure. As in the  FIG. 1  arrangement,  FIG. 2  depicts a core  20  with a SO output that is coupled to an SI input and to bit extractor  52 . Bit extractor  52  outputs the bits captured from the SO output to logic circuit  53 . Logic circuit  53  is a combinatorial circuit with one or more outputs that are applied to a set of flip-flops that form memory module  54 . The outputs of the flip-flops are fed back to logic circuit  53 , and thus circuit  53  and memory module  54  form a classic finite state machine (or a sequential circuit). The outputs of logic circuit  53  and the outputs of memory module  54  are applied to combinatorial logic circuit  55  to form one or more output signals that informs whether the assertion checked by the sequential circuit has fired or not, or some other condition. The combination of logic circuit  53 , memory module  54 , and logic circuit  55  can be viewed as a single sequential circuit  60 . The advantage of the serial implementation of assertion checking is that the required circuit is much smaller than the parallel implementation of the same assertion; moreover, the amount of logic required by the serial implementation does not depend on the number of the bits extracted. 
     FIG. 3  presents a specific embodiment where the assertion tested specified that one and only one bit of a set of extracted bits should be at logic level 1 (“1”). This is also called “one-hot” property. When the specified condition is not satisfied, we say that the assertion has fired. With a serially applied input, it is clear that a flip-flop is needed to indicate whether at least one of the bits extracted so far has been “1.” This is the function of the flip-flop FF  1  which starts at “0” (the reset signal is not shown for simplicity of the drawing) and it is set on the arrival of the first “1;” then FF  1  remains locked in this state (until reset for another assertion check), because of the feedback loop through the OR gate  61 . A second flip-flop is necessary to indicate that at least two bits with value “1” have been extracted; this is the flip-flop FF 2 , which starts at “0” and it is set to on the arrival of the second “1;” FF 2  remains locked in this state (until reset) because of the feedback loop through the OR gate  63 . Accordingly, the memory module  54  of  FIG. 3  has two flip-flops. The combinatorial logic circuit  53  includes merely an AND gate and two OR gates, and the combinatorial logic circuit  55  includes an inverter and an AND gate. When, after all needed bits have been extracted, FF 1  is at “1” (at least one bit was “1”) and FF 2  is at “0” (the second “1” bit never came), one can conclude that the condition of the assertion has been satisfied, or that the assertion is True. This condition is detected by the AND gate  62  where an output that is at “0” indicates that the assertion has fired. 
   If the output of bit extractor  32  at time t is designated by A t , the output of FF 1  at time t is designated by Q 1   t , the output of FF 2  at time t is designated by Q 2   t , and the output of gate at time t is designated by  62  by O t , it is clear that the relationships in  FIG. 3  are as follows:
 
 Q   1   t+Δ   =A   t   +Q   1   t  
 
 Q   2   t+Δ   =A   t   Q   1   t   +Q   2   t  and
 
O t =Q 1   t   Q   2   t .
 
where Δ is the clock period.
 
     FIG. 4  illustrates a parity checker. It merely requires an Exclusive OR gate within circuit  53  that is responsive to bit extractor  52  and to the output of the one flip-flop within circuit  54 . Circuit  55  is empty. In operation, the flip-flop is reset to output a “0” and that output stays until the first “1” appears at the output of bit extractor  52 , whereupon the flip-flop is set to a “1.” Thereafter, the flip-flop continually outputs a “1” until the appearance of another “1” at the output of bit extractor  52 , whereupon the flip-flop is set to a “0.” The operation thus continues and, at the termination of the operation, the state of the flip-flop provides the Exclusive OR of all the extracted bits. To implement an odd parity checker, the flip-flop output is the assertion output; for an even parity checker, the assertion output is provided by the complemented flip-flop output. 
   Using the nomenclature employed above, the relationships in  FIG. 4  are as follows:
 
Q t+Δ =A t ⊕Q t  and
 
O t =Q t .
 
   The circuit of  FIG. 5  implements an assertion that checks for equality between a bits string outputted by shift register  56  and the sequence of bits outputted by bit extractor  52 . Logic circuit  53  merely requires an Exclusive OR gate  65  and an OR gate  66 , and circuit  54  requires only a single flip-flop. Circuit  55  is empty. In operation, as long as the bits applied by bit extractor  52  are the same as the bits applied by register  56 , Exclusive OR gate  65  outputs a “0”. Flip-flop FF 1  starts at 0, and the feedback from FF 1  to OR gate  66  allows the signal of OR gate  65  to pass to the input of FF 1 . Therefore, as long as gate  65  is at “0,” FF 1  remains at “0.” On the occurrence of the first mismatch between a bit applied by bit extractor  52  and a bit applied by register  56 , the “1” output of Exclusive OR gate  65  passes through OR gate  66  sets FF 1 , and FF 1  is locked in the set “1” by operation of the feedback loop through OR gate  66 . Thus, a “1” output of FF 1  at the end of a test designates an inequality, and its complemented output (the  Q  output of the flip-flop) can be used to indicate a firing assertion. 
   It may be noted that the reference bit string may also be generated from another bit extractor or another bit extractor output, which allows the comparison to be done between two functional registers of core  20 , or of different cores, whose contents may change dynamically during operation. 
   Using the nomenclature employed above, and adding the designator B t  for a bit delivered by register  56  at time t, the relationships in  FIG. 5  are as follows:
 
 Q   t+Δ =( A   1   t   ⊕B   t )+ Q   t  and
 
O t =Q t .
 
     FIG. 6  presents a circuit that not only checks an assertion of equality, but also provides an indication as to whether a tested number that exits bit extractor  52  (in a most-significant-bit first order) is greater than or less than a reference number that is stored in register  56  (likewise, in a most-significant-bit-first order). This circuit is somewhat more complex than the circuits described so far, but the general structure is the same; that is, there is a logic circuit  53  that includes two inverters, two AND gates, and two OR gates, a memory circuit  54  with two flip-flops, and a logic circuit  55  that includes one AND gate. 
   To test relationship between the tested number and the reference number, corresponding bits are compared. If the compared bits are pair-wise alike, the two numbers are equal. If they are not alike then upon a first mismatch the condition exists that the tested number at the output of extractor  52  is a “1” and the reference number at the output of register  56  is a “0” (first type of mismatch), or vice versa (second type of mismatch). The first type of mismatch indicates that the tested number is greater than the reference number, and the second type of mismatch indicates that the tested number is smaller than the reference number. 
   To implement the desired test, circuit  54  comprises flip-flops FF 1  and FF 2  that are initially set to “0,” (i.e., they output “0” at their Q outputs and a “1” at their  Q  outputs). The Q output of FF 1  is connected to the input of OR gate  73 , which is connected to the input of FF 1 , and similarly, the Q output of FF 2  is connected to the input of OR gate  74 . This enables OR gates  73  and  74 . The  Q  output of FF 1  is applied to one input of AND gate  72  and, correspondingly, the  Q  output of FF 2  is applied to one input of AND gate  71 . AND gate  71  also receives a signal directly from bit extractor  52 , and through an inverter from register  56 . AND gate  72  also receives a signal directly from register  56  and through an inverter from bit extractor  52 . AND gate  75  is responsive to the  Q  outputs of FF 1  and FF 2 . 
   In operation, with flip-flops FF 1  and FF 2  starting at “0,” as long as the output bits of bit extractor  52  and register are the same, AND gates  71  and  72  output a “0” and so do OR gates  73  and  74 . Upon the occurrence of a mismatch of the first type, AND gate  71  outputs a “1” which propagates through OR gate  73 , setting FF 1  to “1.” FF 1  remains locked in this state by operation of the feedback loop through OR gate  73 . Thus FF 1  is set if and only if the extracted number is greater than the reference number. The change in FF 1  also disables AND gate  72 , preventing FF 2  from changing its “0” state. Consequently, regardless of the nature of the succeeding bits that are outputted by bit extractor  52  and register  56 , FF 1  is at “1” and FF 2  is at “0.” Consequently, the “GT” output is at “1,” indicating that the tested number is greater than the reference number, and the “EQ” and “LT” outputs are at “0.” 
   Conversely, on the occurrence of a mismatch of the second type, AND gate  72  outputs a “1” which propagates through OR gate  74 , setting FF 2  to “1.” FF 2  remains locked in this state by operation of the feedback loop through OR gate  74 . Thus FF 2  is set if and only if the extracted number is greater than the reference number. The change in FF 2  also disables AND gate  71 , preventing FF 1  from changing its “0” state. Consequently, regardless of the nature of the succeeding bits that are outputted by bit extractor  52  and register  56 , FF 1  is at “0” and FF 2  is at “1.” Consequently, the “LT”output is at “1,” and the “EQ” and “GT” outputs are at “0.” Thus, the circuit of  FIG. 6  provides signals relative to assertions that the extracted number is equal to, or greater than, or less than, the reference number. 
   Using the nomenclature employed above, the relationships in  FIG. 6  are as follows:
 
 Q   2   t+Δ   =Q   1   t   +A   t     B     t     Q     2   t  
 
 Q   2   t+Δ   =Q   2   t   +Ā   t   B   t     Q     2   t  
 
GT t =Q 1   t  
 
LT t =Q 2   t  and
 
EQ t =  Q   1   t   Q   1   t .
 
     FIG. 7  presents a circuit that performs only “less than” checking, but in connection with numbers that arrive in a least-significant-bit-first order. Circuit  53  includes AND gates  76  and  77 , Exclusive OR gate  75 , two invertors, and OR gate  78  whose output is applied to flip-flop FF within circuit  54 . The assertion that this implementation checks states the number extracted by the bit extractor  52  is less than the reference number in the register  56 .  FIG. 7  explicitly depicts management circuit  40 , which provides control over the operation of core  20  and FRM  50  and interface to the user who exercises core  20  through the Continuous Single Step (CSS) process in the manner disclosed herein. 
   In operation, flip-flop FF starts at “0” and consequently AND gate  77  is disabled. The output of AND gate  76  becomes “1” only on the occurrence of a “1” at the output of register  56  while bit extractor  52  outputs a “0.” This indicates the possibility that the extractor  52  number is smaller than the register  56  number, provided that the subsequent more significant compared bits do not reverse this result. Thus, FF is set every time when the output of AND gate  76  is “1” and it represents the partial result that the assertion is true based on the comparisons done so far. If all subsequent compared bits (from bit extractor  52  and register  56 ) match, a conclusion can be reached that the number of register  56  is larger than the number of bit extractor  52 . Whether the subsequent bit pairs match is assessed by Exclusive OR gate  75 . Inverter  79 , which is responsive to the output of Exclusive OR gate  75  applies a “1” to AND gate  77  as long as the compared bits match. Whenever the compared bits are different, inverter  79  applies a “0” to AND gate  77 , gate  77  outputs a “0,” and the value of AND gate  76  is passed through OR gate  78  to determine the next state of flip-flop FF. In this way, the last mismatch, which is the most significant, determines the final result. Consequently, if at the conclusion of the test the flip-flop is at “0,” it means that the assertion has fired, as the number extracted by bit extractor  52  is not less than the reference number of register  56  (it could be equal or greater). 
   Using the nomenclature employed above, the relationships in  FIG. 7  are as follows:
 
 Q   t+Δ   =Q   t (    A   t   ⊕B   t   )+ Ā   t   B   t  and
 
LT t =Q t  
 
     FIG. 8  presents a circuit that implements a “strict set inclusion” assertion check. If bit extractor  52  output is considered a string of bits x i  and register  56  output is considered a string of bits r i , then the assertion can be stated as follows: x i ≦r i  for every i, and x i &lt;r i  for at least one i. 
   In operation, flip-flops FF 1  and FF 2  start at “0.” FF 1  is set at the first occurrence of x i ≧r i  and its value is locked by operation of the feedback loop through OR  81 . Similarly, flip-flop FF 2  is set at the first occurrence of x i ≦r i  and its value is locked by operation of the feedback loop through OR  82 . The condition is met, therefore, when FF 2  is set and FF 1  is not set. Accordingly, AND gate  75  is responsive to the Q output of FF 2  and the  Q  output of FF 1 . The assertion fires when the output of AND gate  75  is “0”. 
   Using the nomenclature employed above, the relationships in  FIG. 8  are as follows:
 
 Q   1   t+Δ   =Q   1   t   +A   t   B   t  
 
 Q   2   t+Δ   =Q   2   t   +Ā   t   B   t  and
 
O t =  Q   1   t Q 2   t .
 
   As indicated above, the combination of logic circuits  53  and  55  and memory module  54  can be viewed as a single sequential circuit  60 , or a finite state machine  60 , which can be viewed as a classical finite state machine that comprises a single logic sub-module and a single memory sub-module that is responsive to output of the logic sub-module and provides a feedback to the logic sub-module.  FIG. 9  depicts the  FIG. 6  element  60  in a form that includes merely one logic sub-module and one memory sub-module. 
   The above discloses the principles of this invention through a number of illustrations. However, it should be realized that the principles disclosed herein are broader than the specific illustrations, and that a skilled artisan would be able to employ various modifications and enhancements without departing from the spirit and scope of the instant disclosure. To illustrate, the above depictions all show a single output from bit extractor  32 , and that single output is applied to a single finite state machine (sequential circuit)  60 . However, it is well recognized that at each step of an SoC operation one might wish to check a plurality of assertions. In general, this plurality of assertions requires different sets of bits and, accordingly, a skilled artisan would easily realize that an advantageous embodiment of the instant invention might employ a bit extractor element that provides a plurality of different output bit streams. Those streams would each be applied to a distinct finite state machine. Of course, the plurality of finite state machines can be implemented within one finite state machine. 
   It is noted that  FIGS. 2-9  depict various arrangements where the finite state machine is configured to check different assertions, and the above paragraph extends the teachings to the notion that a plurality of assertions can be checked concurrently by simply having a different bit stream for the bit extractor be applied to a different finite machine. It should be also noted, moreover, that since a system on a chip, is checked by alternating between mode A and mode B operations, each time mode B operation commences the finite state machine may be reconfigured to check one or more a completely different set of assertions.