1. Field of the Invention
This invention relates to integrated circuits and, more particularly, to master/slave flip-flop circuits.
2. Description of the Related Art
During the design cycle of many integrated circuits, testability features may be inserted into the design to make the circuit more testable during production testing. One testing methodology, referred to as scan testing, allows data that has propagated through the device logic to be captured by sequential logic elements such as flip-flops using the clock signal of the circuit. The captured data values may then be scanned out of the device using a scan chain in which a number of such flip-flops are serially linked together. Scan testing is widely accepted due to its high test coverage percentages and the capability of automated scan logic insertion and test pattern generation tools.
Although scan testing has many advantages, there may be some drawbacks in some timing sensitive circuits. One such drawback may be datapath delay on some scannable circuit elements. For example, in a conventional scannable D flip-flop, a two-input multiplexer is inserted at the D input of the flip-flop. The two inputs are typically a data input and scan data input. This type of flip-flop is commonly referred to as a mux-D flip-flop. The multiplexer allows the data from the circuit datapath to be captured through the data input during a normal clock cycle, and scanned out during a scan test. The multiplexer may be switched via a scan enable signal to select the scan data input which may be a data value from a previous flip-flop in the scan chain. Although circuit designers try to keep the datapath delay associated with multiplexer small, in some cases, it may be unacceptable.
Various embodiments of a skew tolerant scannable flip-flop circuit are disclosed. In one embodiment, an integrated circuit may include a flip-flop circuit including a master latch unit coupled to a slave latch unit. The master latch unit includes a data latch that may be configured to receive a data value on a data input. The master latch unit may also include a scan latch that may be configured to receive a scan data value on a scan data input. The data latch may be configured to latch and output the data value on an output line in response to a transition of a first clock signal, while the scan latch may be configured to latch and output the scan data value on the output line in response to a transition of a second clock signal. The slave latch unit may be coupled to the output line and configured to latch and output either the data value or the scan data value in response to a transition of a third clock signal. The flip-flop circuit also includes a clock select circuit that may be configured to selectively provide either the first clock signal or the second clock signal dependent upon a scan enable signal.
In some embodiments, the clock select circuit may also delay a system clock by some predetermined delay to generate the first and second clock signals. This delay may enable the data latch to capture data values that arrive late, and may thus provide clock skew tolerance in some circuits.
While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include,” “including,” and “includes” mean including, but not limited to.
Various units, circuits, or other components may be described as “configured to” perform a task or tasks. In such contexts, “configured to” is a broad recitation of structure generally meaning “having circuitry that” performs the task or tasks during operation. As such, the unit/circuit/component can be configured to perform the task even when the unit/circuit/component is not currently on. In general, the circuitry that forms the structure corresponding to “configured to” may include hardware circuits. Similarly, various units/circuits/components may be described as performing a task or tasks, for convenience in the description. Such descriptions should be interpreted as including the phrase “configured to.” Reciting a unit/circuit/component that is configured to perform one or more tasks is expressly intended not to invoke 35 U.S.C. §112, paragraph six interpretation for that unit/circuit/component.
Turning now to
It is noted that combinatorial logic blocks 12, 14 and 16 may be representative of any type of combinatorial logic that may be found on an integrated circuit. For example, the logic may be part of a sea of gates block, or some specialized logic block. As such, the combinatorial logic blocks may be any circuit that provides a data signal.
As described above, flip-flops 18a-18c are scannable flip-flops. As described in greater detail below, flip-flops 18a-18c may be implemented as skew tolerant scannable master/slave flip-flops with an improved datapath delay. In addition, each of flip-flops 18a-18c may include embedded logic that may be used by logic synthesis tools during circuit design.
Referring to
As described above, a conventional scannable flip-flop typically includes a two-input multiplexer at the D input of the flip-flop. The multiplexer may be implemented as a complex complementary metal oxide semiconductor (CMOS) gate that may include a number of transistors coupled in such as way as to form a 2-1 multiplexer having the scan enable signal as the mux select. When a datapath is identified as a critical path, the flip-flop 18 may be used in place of a conventional scannable flip-flop. More particularly, flip-flop 18 does not use an internal multiplexer to select between the scan data and the normal data, and as such the normal data path delay may be less for flip-flop 18 than the path delay of a conventional scannable flip-flop that uses a scan mux implementation. Accordingly, during the design process the logic designer may choose a custom cell that implements flip-flop 18 from the library, instead of a cell that implements a flip-flop with scan mux at its input.
For designs that use flip-flop 18, the transistors that would have been used to form the scan mux may still be placed and used. In one embodiment, those transistors may be implemented as logic embedded in the flip-flop 18 that the synthesis tool may use. For example, if there is logic in the normal datapath just before the flip-flop 18, then that logic may be implemented using the transistors that would have been in the scan mux. Accordingly, in one embodiment, the embedded logic block 213 may be implemented as any of a variety of logic gates. For example, in one embodiment, a four-input AND/OR/Invert (AOI) logic block may be implemented by a synthesis tool if the tool needs the gates in the combinatorial device logic. If all or part of the logic isn't needed, the synthesis tool may tie off any unused inputs to an appropriate logic level. Thus, as described above, in various embodiments any number of custom cells may be created to implement flip-flop 18, each having an embedded logic block 213 that is implemented as a different combinatorial logic function.
Conceptually, during normal circuit operation of flip-flop 18, data coming from another part of integrated circuit 10 (e.g., combinatorial logic 12) may pass through embedded logic 213. The SE signal is deasserted or is inactive (e.g., logic level zero). Thus the clock select circuit 211 is providing the DClk signal, which is clocking the master data latch 208a. In one embodiment, during the time DClk is low, the master data latch 208a is transparent and the Data In signal passes through to the slave. Because the SE signal is inactive, the master scan latch 208b is not clocked and is thus not providing a master scan latch output. At the rising edge of DClk, the master data latch 208a latches the Data In signal. At about the same time, the slave latch unit 209 is transparent, and on the rising edge of
During scan mode, the SE is “asserted” or becomes active (e.g., logic level one) such as during a scan test, for example. Accordingly, the clock select circuit 211 provides the SClk signal instead of the DClk signal (which becomes inactive) and in one embodiment may be held to a given logic level. Thus, with DClk held inactive, master data latch 208a is not clocked and is thus not passing the master data latch output. During the time that SClk is low, the scan latch 208b is transparent, replacing the previously latched data value and passing the scan data value provided on the SDI pin to the slave latch unit 209. At the rising edge of SClk, the scan latch 208b latches the SDI signal. At about the same time, the slave latch unit 209 is transparent, and on the rising edge of
In one embodiment, the clock select circuit 211 may be implemented using combinatorial logic including strings of inverters and other logic gates such as NOR gates, for example. As such, the DClk and SClk signals (and their complements) may be delayed relative to the system clock (Clk) that may be used to drive the combinatorial system logic in the datapath. This added delay 212 may serve to provide skew tolerance in the datapath since a later-arriving data signal may still be captured by the master latch unit 207. Thus the skew may be absorbed in those cases in which the datapath has such a skew. In one embodiment, the added delay may be a predetermined amount that may be ideally substantially equivalent to any clock skew between the clock used to drive the data on the datapath and the clock used to clock the flip-flop 18. It is noted that in various embodiments, a variety of logic gate types may be used to implement the clock select circuit 211.
It is noted that the above embodiment describes positive edge triggered operation. However, in other embodiments, negative edge triggered operation may be implemented. In addition, the above description of
Turning to
In the illustrated embodiment, the transistor stack includes three PMOS transistors (e.g., T1-T3) and three NMOS transistors (e.g., T4-T6). As shown, transistors T1 and T6, along with T-gate 313 are part of the scan latch 208b. Similarly, transistors T2 and T5, along with T-gate 311 are part of data latch 208a. Transistors T3 and T4 and inverter 317 are shared by both latches.
In one embodiment, the T-gate 311 is coupled to receive clock signals
During normal operation (i.e., not scan mode) in a given clock cycle, when DClk is low and
In one embodiment, during scan mode the SE signal becomes active (e.g., a logic value of one). Accordingly, as described above, the DClk and
During scan mode several clock cycles worth of scan data may be scanned through the scan chain. Accordingly, the SE signal may stay active long enough to clock all the scan data through the scan chain. For example, if there are 100 flip-flops in the scan chain, then the SE signal may stay active for 100 clock cycles. To resume normal operation the SE signal may be deasserted, and the data that is present at the Data In pin of the flip-flop 207 may be captured.
It is noted that for simplicity various circuit components may have been omitted. For example, in one embodiment, there may be a number of inverters and/or buffers in the SDI datapath within the master latch unit 207 and the slave latch unit 209 that are not shown.
Referring to
More particularly, in the embodiment illustrated in
In one embodiment, the T-gate 411 is coupled to receive clock signals
During normal operation (i.e., not scan mode) in a given clock cycle, when DClk is low and
In one embodiment, during scan mode the SE signal becomes active (e.g., a logic value of one). Accordingly, as described above, the DClk and
Upon the rising edge of SClk and the falling edge of
Similar to the embodiment of
Accordingly, from the above descriptions of the embodiments, the scan datapath is separated from and in parallel with the normal datapath through the master latch unit 207. In one embodiment, this separation may allow the logic that was previously used as the scan input mux to be used as logic that may be in the datapath anyway, as described above. Accordingly, one or more logic stages may be saved and the accompanying datapath delay may be improved. In addition, the clock select circuit 211 of
It is noted that the embodiments shown and described above may be implemented on an integrated circuit. It is further noted that in one embodiment, integrated circuit 10 may be a processor chip, a communication chip, a controller, or the like. One such embodiment is shown in
Turning to
The external memory 512 may be any desired memory. For example, the memory may include dynamic random access memory (DRAM), static RAM (SRAM), flash memory, or combinations thereof. The DRAM may include synchronous DRAM (SDRAM), double data rate (DDR) SDRAM, DDR2 SDRAM, DDR3 SDRAM, etc.
The peripherals 514 may include any desired circuitry, depending on the type of system 500. For example, in one embodiment, the system 500 may be a mobile device and the peripherals 514 may include devices for various types of wireless communication, such as WiFi, Bluetooth, cellular, global position system, etc. The peripherals 514 may also include additional storage, including RAM storage, solid-state storage, or disk storage. The peripherals 514 may include user interface devices such as a display screen, including touch display screens or multi-touch display screens, keyboard or other keys, microphones, speakers, etc.
Although the embodiments above have been described in considerable detail, numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.