Secure scan design

A circuit configuration for testing integrated circuitry featuring a number of system scan flip flops wired in series and connected to the integrated circuitry for inputting test signals and receiving test data back. At the front and back ends of the system scan flip flops there is an input multiplexer and an output multiplexer, each with a control input tied to a comparator. The multiplexers isolate the test circuitry until a predetermined scan key is received. When the comparator receives a k-bit scan key it enables the multiplexer to pass test data to the system scan flip flops.

BACKGROUND

1. Field of the Invention

The present invention relates to integrated circuit testing, and more specifically systems and methods for more secure integrated circuit testing.

2. Description of Related Art

As the performance and computational power of electronic devices steadily rises the circuit density and number of components increases as well. Processor, memory and logic circuits often include millions of gates. The vast numbers of components and high component densities pose a challenge in the testing and validation of large scale integrated circuits. These challenges have given rise to design-for-test (DFT) techniques. One DFT technique involves incorporating scan registers into the circuit design. The scan registers may be configured to include inputs to the combinational logic so that the state may be changed. The scan registers may also receive outputs from the combinational logic for evaluation of testing results. Typically, the DFT scan registers are configured to be controllably switched between a normal mode and a test mode. When in the test mode the scan registers receive an input test data signal, and in turn, provide an output signal with the test results.

One of the most popular DFT structures features a scan design with multiple externally accessible scan chains. Each scan chain has one or more scan cells coupled in series and embedded into the integrated circuit. Typically, a scan cell is a storage element such as a scan flip-flop or a scan latch. A scan structure may be used in conjunction with fault simulation and automatic test pattern generation (ATPG) to generate diagnostic test patterns that aid in production test and factory yield improvement.

Unfortunately, security and testability for integrated circuits tend to be fundamentally contradictory objectives. Scan based test is a powerful test technique but can sometimes make an otherwise secure IC vulnerable to malicious attacks. A conventional scan flip flop architecture is shown inFIG. 1Awith scan flops101-107.FIG. 1Bdepicts an example of typical circuitry for a single scan flop, for example, any one of scan flops101-107. Conventional scan flop designs and scan based DFT architectures can sometimes provide full access to all flip flops in the scan chain, e.g., scan flops101-107, thus providing a security weakness that can potentially be exploited. For example, an attacker can retrieve secret data by unloading the scan path during a cryptographic operation. It is possible to obtain secret cryptographic keys from repeated snapshots of the scan. In some instances secret data can be retrieved by loading a scan with known vectors and observing the side-channel responses. Faults can be injected in the system by loading a scan with malicious data. Another security weakness may occur at the scan interface where design or other intellectual property information can sometimes be obtained.

Circuit designers have attempted to increase the security of scan based architectures in a number of manners. One conventional method involves removal of the test interface by blowing out fused links after completion of manufacturing testing. While effective from a security standpoint, such measures to cut off the test interface eliminate any possibility of in-field testing. Other security enhancement techniques have been attempted, including encoding/decoding, scan chain scrambling and dummy insertion techniques. These conventional approaches cause significant design overhead and do not protect from all security threats. For example, despite these conventional measures an attacker can still load malicious data in the system.

What is needed is a way to provide secure scan capability while maintaining its testability benefits.

SUMMARY

Embodiments disclosed herein address the above stated needs by providing systems and methods for testing integrated circuitry. The test circuitry configuration includes a number of system scan memory elements which may be flip flops wired in series. The system scan elements are connected to the integrated circuitry to be tested. At the front and back ends of the system scan flip flops there is an input multiplexer and an output multiplexer, each with a control input tied to a comparator. The multiplexers isolate the test circuitry until an enable input is set to high and a predetermined scan key is received and verified by the comparator. When the enable input is set to high and the comparator receives a k-bit scan key it enables the multiplexer to pass test data to the system scan flip flops. Setting the enable input to low stops the multiplexer from passing further test data to the system scan flip flops.

DETAILED DESCRIPTION

FIG. 2depicts a secure scan design in accordance with various embodiments of the present invention. The circuitry includes combinational logic203representing the integrated circuitry, gates or other logic being tested. The system scan flip flops205perform the scan testing by providing inputs to, and detecting outputs from, the combinational logic203. In order to reduce the number of pins needed in an integrated circuit employing scan-based DFT, the system scan flip flops205may be configured as a series of scan registers connected in a chain such that scan inputs and outputs may be serially shifted through the chain to reduce the number of pins needed to fully test the integrated circuit. It should be noted that althoughFIG. 2depicts flip flops (205,211) various embodiments of the invention can be practiced with many other types of memory elements so long as the memory element is capable of being controlled to switch back and forth between two states which are stable. The circuitry shown within dotted line201of FIG.2—that is, the combinational logic203and system scan flip flops205—may, in some embodiments, be configured in the manner of the scan flop architecture depicted inFIG. 1. The embodiment ofFIG. 2differs from, that shown inFIG. 1in a number of ways, for example, by providing additional circuitry to selectively supply or deny the test data input (and also prevent from the output being read) based on detecting whether the correct scan key has been received. Regarding the dotted line201, it should be noted that this does not represent a chip boundary. Circuit lines passing through the dotted line201do not represent input or output leads on a chip. In at least some implementations all the circuitry depicted inFIG. 2may be found on a single chip with inputs being provided by logic also found on the chip. In other implementations, one or more of the inputs or outputs (e.g.,215,217,219, or others) may represent an input lead or output lead of the chip.

The system scan flip flops block205is additionally connected to input mux (multiplexer)207, output mux209, k-bit scan input flip flops211and k-scan output flip flop213. The scan input flip flops211may be referred to in more general terms as input scan memory elements, thus encompassing other implementations aside from flip flops, as is known by those of ordinary skill in the art. Similarly, the other flip flops depicted inFIG. 2(205,213) may also be implemented as memory elements. AlthoughFIG. 2is depicted with multiplexers (207,209) the circuitry of various embodiments of the invention may be implemented with other types of combiner devices or controllable switches. Test data is applied to the scan input, SIN215. Output from the scan flip flops205is provided at the scan output, SOUT217. The system further comprises a control enable input219, and a comparator221with a scan key input223. The k-scan output flip flop213is depicted in the figure with one output connected to the mux207and another output connected to the comparator221. Although the embodiment ofFIG. 2depicts a comparator, in practice any sort of scan key detector or other logic capable of detecting receipt of the scan key may be used in various embodiments of the invention. The k-scan input flip flop211may, in some implementations, be configured to supply an output to both the mux207and to the comparator221using the same circuit trace or line. In other implementations even though the mux207and the comparator221are connected to different pins of the k-scan input flip flop211, the signals being provided to each component may be the same output due to the pins being internally connected within the flip flop211.

Control enable input219being set to a logic low (EN=0) puts the system in the non-test mode. In the non-test mode the input select signal controlling mux207is set to block any data received at scan input SIN215from being passed beyond the mux207, thus isoloating the system scan flip flops205. To initiate the process of testing the system should be set to the scan mode by applying the control enable input219to high (EN=1). However, even though the control enable input219is sent to high the test data won't be passed on from scan input SIN215to the system scan flops205until the proper scan key is received. The comparator221compares received data with the k-bit scan key223to determine whether the predefined k-bit scan key has been received at scan input SIN215. Upon verifying receipt of the scan key the comparator output EQ goes to high, indicating a match. If the comparator output EQ becomes high due to a correct key, the data is latched in a latch with the match signal being one. Now the EQ signal can change but the match signal will stay at one until the EN signal is on. This may be important because in a serial scan chain, once we start to scan in a pattern, the initial k-bit registers will not always contain value same as the key. However, if we have entered the right key by scanning in the correct key bits in the first k-flops, it will activate the match signal which will then stay on irrespective of the future changes in the state of the k-bit scan flops. This, in turn, applies a logical high to the input mux207select signal. With the mux207select signal set high the test data applied to scan input SIN215is provided to the system scan flops205in order to perform scan testing of the combinational logic203. The output mux209and output data217are turned on in a similar manner as well.

Some embodiments may also be provided with a k-scan output flip flop213and output mux209, as depicted inFIG. 2. As shown in the figure the control enable of output mux209may be tied to that of input mux207so as to enable the two muxes at the same time with the same enable signal. Alternatively, other embodiments may provide separate enablement circuitry for the input and output muxes. In the embodiment ofFIG. 2, once input mux207and output mux209are enabled, the system can begin loading and unloading the system scan flops205.

FIG. 3is a flowchart depicting the use of the secure scan design in accordance with various embodiments of the invention. The method begins at301and proceeds to303to determine whether the system—that is, the integrated circuit to be tested—is set to test mode. This may be done by setting a control enable input such as219ofFIG. 2to high (EN=1). Other like types of circuitry or logic may be used to selectively enable the test mode, as would be known by those of ordinary skill in the art. If it is determined in block303that the system is not in test mode (e.g., EN=0), then the method loops back from303in accordance with the NO branch to305to wait for an indication of EN=1 or other such control to initiate test mode. Once it is determined that the system is in test mode the method proceeds from303along the YES branch to307.

In block307the system receives a test data input, for example, an input to SIN215ofFIG. 2, and then the method proceeds to309. In block309it is determined whether the predetermined scan key has been received. The scan key operates to unlock access to the system scan flops. In at least some embodiments the scan key is compared to a previously stored scan key, for example, through the use of a comparator such as the comparator221ofFIG. 2. If the scan key for initiating testing has not yet been received the method loops from309along the NO branch back to303to begin the process anew. However, if it is determined in309that the scan key has been correctly received the method proceeds from309along the YES branch to311. The system depicted inFIG. 2is configured so that if the correct scan key is not received, then the mux control signal remains zero. Hence, the mux passes either static 0/1 or random bits as input to the system flops, and similarly outputs static 0/1 or random bits. The static 0/1 or random bits is provided to one input of input mux207and also to output mux209. From a security point of view, this is useful because even though the correct key may not have been received yet the scan chain will still be loaded, but with inputs beyond the control of an attacker. Similarly the scan output dumps out bits also beyond the control of the attacker.

In311ofFIG. 3the input MUX is controlled so as to begin providing access to the system scan flip flops. Referring again toFIG. 2, this may be done once the comparator221indicates receipt of the scan key in309by outputting EQ=1 from the comparator221to control the input mux207and begin passing input test data. In this way the system scan flops205can begin loading test data received at SIN. The method proceeds from311to313to set the output MUX209to output test data from the scan flops. Depending upon the specifics of the implementation the output MUX may be controlled with the same control line as the input MUX. Once access is provided to the system scan flip flops205the method proceeds to315to perform testing of the integrated circuits a manner akin to conventional DFT scan systems.

The method then proceeds to317to determine whether circuitry testing is complete so the IC circuitry can again be isolated for security purposes. This may be done by setting the control enable input219to a logical low (EN=0). In some implementations the end of testing may be indicated by a predetermined code or input data fed to the scan input, SIN215. If it is determined that testing is not complete the method proceeds from317along the NO path back to315. However, if it is determined in317that IC testing has reached completion the method proceeds from317along the YES path to319.

In319the input and output muxes are both set to block access to the system scan flops. That is, the input and output muxes are controlled to quit passing data so as to again isolate the system scan flip flops. This is done by controlling the circuitry to set the input mux select signal is set to zero. For example, the EQ output from comparator221may be set to a logical low output level. Once the muxes are controlled to again isolate the system scan flip flops the method proceeds from319to321and ends.

Various activities of the methods may be included or excluded as described above, or performed in a different order, with the rest of the activities still remaining within the scope of at least one exemplary embodiment. For example, block313may be performed before block311to turn the output mux ON before the input mux, or blocks311and313may be performed at the same time. In some embodiments the output mux may be eliminated altogether. It should be noted that in some embodiments no data is loaded to the scan flops211until a scan key has been received and verified. This may be implemented by performing block307ofFIG. 3after it is determined that the scan key is properly received in block309.

The invention may be implemented with any sort of processing units, processors controllers and/or logic or circuitry capable of performing the stated functions and activities. A processing unit in accordance with at least one exemplary embodiment can operate computer software programs stored (embodied) on computer-readable medium such as the computer's memory (e.g. hard disk drive or RAM memories), CD, flash memory, or any other suitable computer readable medium recognized by those of ordinary skill in the art. The computer software programs can aid or perform the steps and activities described above. For example computer programs in accordance with at least one exemplary embodiment may include: source code for receiving a data input at an input scan memory element, source code for providing the data input from a controllable input switch such as a multiplexer, source code for providing the data input from the input scan memory element to a scan key detector such as a comparator, and source code that provides a control signal causing the controllable input switch to pass the data input to the system scan memory elements in response to detecting the scan key. There are many further source codes that may be written to perform the steps and procedures disclosed above, and these are intended to fall within the scope of various exemplary embodiments.

The use of the word “exemplary” in this disclosure is intended to mean that the embodiment or element so described serves as an example, instance, or illustration, and is not necessarily to be construed as preferred or advantageous over other embodiments or elements.

The description of the various exemplary embodiments provided above is illustrative in nature and is not intended to limit the invention, its application, or uses. Thus, variations that do not depart from the gist of the invention are intended to be within the scope of the embodiments of the present invention. Such variations are not to be regarded as a departure from the spirit and scope of the present invention.