Abstract:
Segmented mixed signal circuitry comprising a plurality of analog segments is disclosed. Each analog segment is operable to perform a series of switching operations dependent on an input data signal. The circuitry is arranged to receive shaped clock signals provided in common for all segments, and to perform each switching operation in a manner determined by the shape of the common shaped clock signals. The circuitry is suitable for use in digital to analog converters (DACs).

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to segmented mixed signal circuitry for performing a series of switching operations, and to switching circuitry for use therein. The present invention has particular application in high speed digital to analog converters (DACs). 
     In known DACs, a plurality of analog circuits, or segments, are provided, each of which comprises a current source and a differential switching circuit. Each differential switching circuit comprises a first switch connected between the current source and a first output terminal, and a second switch connected between the current source and a second output terminal. At any one time, one of the switches is on, and the other switch is off, in order to switch the current from the current source to one of the two output terminals. Drive circuitry is also provided in order to supply drive signals for driving the various switches in dependence on an input digital data signal. The analog output signal is the voltage difference between a voltage produced by sinking the current at one output terminal into a resistance of value R, and the voltage produced by sinking the current at the other output terminal into another resistance of the same value R. 
     In the known DAC, it is important that the timings of the signals applied to the first and second switches in each segment are carefully controlled with respect to each other. For example, when the differential switching circuit changes state, it is usually necessary for the switch which is off to start turning on before the switch which is on starts turning off. 
     This requires one of the drive signals to be slightly in advance of the other drive signal and/or to change state faster than the other drive signal. Such control of the drive signals is referred to as shaping of the signals. If the signals are not correctly shaped, glitches may occur in the output signal, which may cause distortion in the analog output signal. 
     United Kingdom patent publication number GB 2333191 in the name of Fujitsu Limited, the entire subject matter of which is incorporated herein by reference, discloses a DAC having a plurality of analog segments, in which the shaping of the drive signals within each segment is carried out by circuitry provided locally in each segment. This arrangement serves to ensure that, within each segment, the switches change state at the correct times with respect to each other. 
     A problem which has been identified in known DACs is that random variations may occur from one segment to another in the times at which the various switches change state. These timing mis-matches may lead to distortion in the output signal of the DAC. Such mis-matches may be due at least in part to random variations in the characteristics of circuitry within each segment. For example, shaping circuitry which is present within each segment may itself lead to mis-matches in the switching times of different segments, due to random variations in the characteristics of transistors in the shaping circuitry. 
     SUMMARY OF THE INVENTION 
     According to a first aspect of the present invention there is provided segmented mixed signal circuitry comprising a plurality of analog segments each operable to perform a series of switching operations dependent on an input data signal, the circuitry being arranged to receive shaped clock signals provided in common for all segments, and to perform each switching operation in a manner determined by the shape of the common shaped clock signals. 
     By providing shaped clock signals in common to each of the analog segments, and arranging that the manner of the switching operations is determined by the shape of the clock signals, mis-matches in the timings of the switching operations may be reduced in comparison to the case where such common shaped clock signals are not provided. This may lead to reduced distortion in the output signal. 
     The invention may also provide the advantage that, because the shaped clock signals are provided in common for all segments, the circuitry required for producing the shaped clock signals can be made relatively complex and thus can achieve good control of the timings of the signals. If the shaping circuitry were provided locally, then such complex circuitry might be prohibitive due to the area occupied by the circuitry. In addition, since the shaped clock signals are provided in common, additional complex circuitry for producing the carefully shaped clock signals does not lead to additional delay mis-matches between the segments. This would not be the case if the shaping circuitry were provided locally in each segment. 
     By shaped clock signals it is preferably meant that at least two clock signals are provided, and that, of those, at least two clock signals have waveforms with different shapes. For example, two clock signals may be substantially complementary, but with differences in the shapes of their waveforms. The differences in the shapes of the waveforms may be due, for example, to the clock signals having clock edges which are offset from each other, and/or having clock edges which have different rise times and/or fall times, and/or some other type of shaping so that, if part of one clock signal were superimposed on the corresponding part of another clock signal, those parts would have waveforms which do not exactly correspond. The clock signals may be arranged, for example, so as to effect different parts of a switching operation in a different manner. For example, a switching operation may comprise turning one switch on and another switch off, and the shaped clock signals may be arranged so as to change the states of the switches in a manner which are slightly different from each other. For instance, the relative times at which the switches change state and the periods of time over which they change state may be controlled by the shaped clock signals. Different types of shaping to those mentioned above could also be used. 
     Preferably, each analog segment is arranged so as to draw a net current from a power supply which is substantially independent of the input data signal. This may provide the advantage that any variations in the supply voltage due to the drawn current are also independent of data. Any variations in the supply voltage may lead to variations in the switching times of switches in the segments. Thus, by ensuring that the net current drawn by each segment is independent of the input data, data dependent mis-matches in the switching times of the switches are reduced, which may reduce distortion in the output signal. 
     Each analog segment may be arranged such that the input data signal has a net current which is substantially independent of the data in the data signal. This may provide the advantage that there is no net data dependent current flow between the analog circuitry and the digital circuitry which supplies the input data signals. This can help to ensure the stability of the analog segments, and thus help to reduce distortion in the output signal 
     The circuitry may be arranged such that the shaped clock signals have net currents which are substantially independent of the input data signal. This may help to prevent data dependent variations in the timings of the clock signals, which may help to reduce distortion in the output signal. 
     Each analog segment may comprise a differential switching circuit for performing the switching operations, and switch driver circuitry arranged to receive the input data signal and the shaped clock signals and to output drive signals to the differential switching circuit. Preferably the switch driver circuitry derives the drive signals from the shaped clock signals substantially without any reshaping of the shaped clock signals. 
     In known DACs, decoder circuitry is provided in order to convert incoming digital signals into signals for controlling the current sources. In high speed DACs, such decoder circuitry may not be able to keep up with the speed of the analog circuitry. It has therefore been proposed in United Kingdom patent publication number GB 2356301 in the name of Fujitsu Limited, the entire subject matter of which is incorporated herein by reference, to provide two (or more) decoder circuits, each of which decodes alternate samples of a digital input signal. By providing two decoder circuits, each of those circuits can operate at half of the operating speed of the DAC, which can allow the overall operating speed of the DAC to be higher than would otherwise be the case. In the arrangement of GB 2356301, a plurality of multiplexer circuits are provided for multiplexing the data signals produced by the two decoder circuits, before these signals are fed to the analog segments. A plurality of latching circuits are also provided for controlling the timings of each of the data signals. 
     The circuitry of the present invention may be used in situations such as that described above where two or more multiplexed input data signals are provided. In such cases, the data signals may be multiplexed before being applied to the analog segments. However, in preferred embodiments of the present invention, the analog segments themselves perform the multiplexing operations as well as the switching operations. This may be achieved by providing a plurality of driving circuits in each analog segment. Thus, the switch driver circuitry in each analog segment may comprise a plurality of switch driver circuits for receiving separate input data signals and separate shaped clock signals and for supplying drive signals to the differential switching circuit. The number of switch driver circuits in each segment may be, for example, two, four, or some other number, in dependence on the extent to which the input data signals are multiplexed. 
     Each switch driver circuit may comprise first and second data nodes for receiving complementary input data signals, a clock node for receiving a shaped clock signal, first and second output nodes for supplying drive signals to the differential switching circuit, a first switch for connecting the clock node to the first output node, and a second switch for connecting the clock node to the second output node, and the circuit may be arranged such that the first and second switches do not change state on a clock edge. By arranging that the switches which connect the clock node to the output nodes do not change state on a clock edge, random mis-matches which may otherwise occur in the switching times of such switches may be eliminated. This may reduce random variations in timings of the switching operations of the various analog segments, which may reduce distortion in the output signal. 
     Each switch driver circuit may have a first state and a second state in dependence on the input data signals, and the clock node may be connected to the first output node in the first state and to the second output node in the second state. Preferably, the first switch is conductive and the second switch is non-conductive when the input data signals have a first state, and the second switch is conductive and the first switch is non-conductive when the input data signals have a second state. 
     The second output node may be connected to a node having a predetermined potential when the switch driver circuit is in the first state, and the first output node may be connected to the node having a predetermined potential when the switch driver circuit is in the second state. Such a predetermined potential may be, for example, a potential which is sufficient to ensure that a switch in the differential switching circuit is maintained in the non-conducting state. Each switch driver circuit may comprise a third switch for connecting the first output node to the node having a predetermined potential, and a fourth switch for connecting the second output node to the node having a predetermined potential, and the circuit may be arranged such that the third and fourth switches do not change state on a clock edge. This may also help to prevent random variations in the timings of the switching operations of the various analog segments. Preferably the third switch is non-conductive and the fourth switch is conductive when the input data signals are in the first state, and the third switch is non-conductive and the fourth switch is conductive when the input data signals are in the second state. 
     The switch driver circuits preferably do not include buffers which take a data dependent current connected to their data input nodes. This may help to ensure that the net current which passes between the digital circuitry and the analog circuitry is independent of the data, which may help to reduce distortion in the output signal. 
     A further problem which has been identified in known DACs is that third order distortion may be worse than would be expected. Third order distortion is particularly undesirable in DACs which produce multi-tone output signals, since third order intermodulation distortion may occur inband, in which case it cannot be removed by filtering. Such third order distortion is believed to be due in part to current flowing into and out of parasitic capacitances which may be present in the differential switching circuits. 
     In preferred embodiments of the present invention, the differential switching circuit in each analog segment comprises a plurality of switches for connecting a common node of the circuit to one of first and second nodes of the circuit in accordance with the input data signal, and the circuit is arranged such that the same number of switches change state in each cycle of the shaped clock signals. By arranging the same number of switches to change state in each cycle, the charge which flows into and out of the parasitic capacitances may be less dependent on the input data signal. This may help to reduce third order distortion which may occur in the analog output signal. 
     Furthermore, by arranging the same number of switches to change state in each cycle, the current drawn by each analog segment is approximately the same in each cycle. This may help to reduce variations in the timings of the switching operations of the various analog segments, which may lead to reduced distortion. 
     Each differential switching circuit may, for example, comprise first and third switches connected between the common node and the first node and second and fourth switches connected between the common node and the second node, and the circuit may be arranged such that, in at least one cycle of the shaped clock signals, one of the first and second switches is conductive in dependence on the input digital signal and the other switches are non-conductive, and, in at least one other cycle of the shaped clock signals, one of the third and fourth switches is conductive in dependence on the input digital signal and the other switches are non-conductive. For example, the circuitry may be operable in alternate first and second cycles of the shaped clock signals, and in the first cycles one of the first and second switches may be conductive and the other switches may be non-conductive, and in the second cycles one of the third and fourth switches may be conductive and the other switches may be non-conductive. 
     Generally, the differential switching circuit may comprise n pairs of switches, where n≧2, with one switch of each pair connected between the common node and the first node and the other switch of each pair connected between the common node and the second node, and the circuit may be operable in repeating sequences of n cycles, and the circuit may be arranged such that, in each cycle of a sequence, a different pair of switches is controlled such that one switch of the pair is conductive and the other switch of the pair is non-conductive in dependence on the input data signal, and the switches in the other pairs are non-conductive. 
     Where a plurality of switch driver circuits are provided, each drive circuit is preferably arranged to supply drive signals for a pair of switches. 
     The circuitry may further comprise a clock shaping circuit, provided in common for each of the analog segments, for supplying the shaped clock signals. As discussed above, such a clock shaping circuit can be made relatively complex, since it is provided in common for all analog segments, and thus it may achieve effective shaping of the clock signals. 
     The shaped clock signals may be arranged so as to effect different parts of a switching operation at different times. For example, the shaped clock signals may comprise two clock signals having clock edges offset from each other and/or the shaped clock signals may comprise two clock signals having clock edges with different rise times and/or fall times. More than two shaped clock signals may be provided if required. 
     As an example, an edge of a clock signal which causes a switch in the analog segment (for example, a switch in a differential switching circuit) to change from a conductive state to a non-conductive state may be delayed with respect to the corresponding edge of a clock signal which causes another switch in the analog segment to change from a non-conductive state to a conductive state. The clock signal with the delayed edge may be maintained at a substantially constant potential until the switch which is changing from the non-conductive state to the conductive state is at least partially conductive. This may help to ensure stable operation of the switching circuitry. 
     Each clock signal, when in a state which causes switches in the analog segment to be conductive, may have a potential which tracks changes in operating properties of the switches. Each clock signal, when in a state which causes a switch in the analog segment to be non-conductive, may have a potential substantially equal to the predetermined potential in the switch driver circuit. This may help to prevent glitches occurring in the output signal of the drive circuit. 
     The clock shaping circuit may take as its input two complementary clock signals. Any skew which is present in the input clock signals may cause inaccuracies in the timings of the shaped clock signals output from the clock shaping circuit. In this context, clock skew is where there are mis-matches in the clock edges of the complementary clock signals. The circuitry may therefore further comprise a skew compensation circuit for receiving two complementary input clock signals and for outputting to the clock shaping circuit two complementary output clock signals having reduced skew. 
     The skew compensation circuit may be arranged such that the output clock signals change their states at times determined by the slowest edges of the input clock signals. The output clock signals may then be high impedance during the periods between the fastest edges of the input clock signals and the corresponding slowest edges. For example, the skew compensation circuit may comprise first and second inverters for outputting the output clock signals, each inverter comprising two switches connected in series between a high potential and a low potential, and each inverter being arranged such that, when the input clock signals change state, a switch which is in a conductive state is changed to a non-conductive state at a time determined by the clock signal having the fastest clock edge, and a switch which is in a non-conductive state is changed to a conductive state at a time determined by the clock signal having the slowest clock edge. 
     A digital signal which is input to the segmented mixed signal circuitry may not necessarily be in a form in which it can directly control the switching operations of the analog segments. Thus the circuitry of the present invention may further comprise decoder circuitry for receiving an input digital signal and for outputting a data signal to each of the analog segments. As discussed above, such decoder circuitry may not be as fast as the analog circuitry. Thus the decoder circuitry may comprise a plurality of decoder circuits each of which is arranged to output a separate data signal to each of the analog segments. Where a plurality of switch driver circuits are provided in each analog segment, the decoder circuitry may comprise a plurality of decoder circuits each of which is arranged to output a data signal to one of the switch driver circuits in each of the analog segments. In such a case, each of the decoder circuits is preferably arranged such that its data signal changes state during a period in which the clock signal which is supplied to the corresponding drive circuit has a state which prevents a switch in the differential switching circuit from changing its state. Such an arrangement can allow the decoder circuitry a period of time in which its output signals may settle, without those signals being used to control switching operations in the analog segments. 
     In the segmented mixed signal circuitry of the present invention, each segment may be arranged to switch the current flowing from a current source or to a current sink. Such an arrangement may be used, for example, in a digital to analog converter, and thus there may be provided a digital to analog converter comprising circuitry in any of the forms described above. 
     The switch driver circuit discussed above may be provided independently, and thus, according to a second aspect of the present invention there is provided a switch driver circuit for driving a switching circuit, the switch driver circuit comprising a data node for receiving an input data signal, a clock node for receiving a clock signal, first and second output nodes for supplying drive signals to the switching circuit, a first switch for connecting the clock node to the first output node, and a second switch for connecting the clock node to the second output node, wherein the circuit is arranged such that the first and second switches do not change state when a clock signal received at the clock node changes state. 
     The switch driver circuit may have a first state and a second state in dependence on the input data signal, the clock node being connected to the first output node in the first state and to the second output node in the second state. The first switch may be conductive and the second switch may be non-conductive when the input data signal has a first state, and the second switch may be conductive and the first switch may be non-conductive when the input data signal has a second state. The second output node may be connected to a node having a predetermined potential when the switch driver circuit is in the first state, and the first output node may be connected to the node having a predetermined potential when the switch driver circuit is in the second state. 
     The switch driver circuit may comprise a third switch for connecting the first output node to the node having a predetermined potential, and a fourth switch for connecting the second output node to the node having a predetermined potential, and the circuit may be arranged such that the third and fourth switches do not change state on a clock edge. The third switch may be non-conductive and the fourth switch may be conductive when the input data signal is in the first state, and the third switch may be non-conductive and the fourth switch may be conductive when the input data signal is in the second state. 
     The switch driver circuit may be arranged such that the net current flowing through the data nodes is independent of the input data. Furthermore, the switch driver circuit may be arranged such that the net current flowing through the clock nodes is independent of the input data. 
     There may also be provided switch driver circuitry comprising a plurality of such driver circuits, each arranged to receive separate data signals and clock signals and to output drive signals for driving a common differential switching circuit having a plurality of switches. 
     The switching circuitry discussed above may also be provided independently, and thus, according to a third aspect of the present invention, there is provided switching circuitry operable in a series of clock cycles to connect a common node of the circuitry to one of first and second nodes of the circuitry in dependence on an input digital signal, the switching circuitry comprising a plurality of switches for connecting the common node to the first and second nodes, the circuitry being arranged such that, in operation, the same number of switches change state in each clock cycle. 
     The switching circuitry may comprise first and third switches connected between the common node and the first node and second and fourth switches connected between the common node and the second node, and the circuitry may be arranged such that, in at least one cycle of the series, one of the first and second switches is conductive in dependence on the input digital signal and the other switches are non-conductive, and, in at least one other cycle of the series, one of the third and fourth switches is conductive in dependence on the input digital signal and the other switches are non-conductive. For example, the switching circuitry may be operable in alternate first and second cycles, and in the first cycles one of the first and second switches may be conductive and the other switches may be non-conductive, and in the second cycles one of the third and fourth switches may be conductive and the other switches may be non-conductive. 
     Generally, the switching circuitry may comprise n pairs of switches, where n≧2, with one switch of each pair connected between the common node and the first node and the other switch of each pair connected between the common node and the second node, and the circuitry may be operable in repeating sequences of n cycles, and the circuitry may be arranged such that, in each cycle of a sequence, a different pair of switches is controlled such that one switch of the pair is conductive and the other switch of the pair is non-conductive in dependence on the input data signal, and the switches in the other pairs are non-conductive. 
     The plurality of switches may be transistors, such as field effect transistors (FETs). For example, the switches may all be n-channel or p-channel MOSFETs (metal oxide semiconductor field effect transistors), although other types of transistors could be used instead. 
     As mentioned above, distortion in the output signal of a switching circuit may be caused by current flows into and out of parasitic capacitances in the switching circuit. The effect of such current flows may be reduced by providing one or more capacitative elements that cause complementary current flows. Thus the switching circuitry may further comprise a capacitative element connected to the common node, for compensating for the effect of current flow into capacitances associated with at least one of the plurality of switches. The capacitative element may be, for example, a transistor which is supplied with a signal which is at least approximately the complement of a clock signal which is supplied to the switching circuit. By this it is preferably meant that the signal which is supplied to the transistor is of opposite polarity to the clock signal for more than half of the time. 
     The switching circuitry may further comprise switch driver circuitry arranged to receive the input digital signal and a clock signal and to supplying drive signals to the plurality of switches. 
     The skew compensation circuitry described above may be used with circuitry other than the segmented mixed signal circuitry described above. According to a fourth aspect of the present invention there is provided skew compensation circuit for receiving two complementary input clock signals and for outputting two complementary output clock signals having reduced skew, the skew compensation circuit comprising first and second inverters for outputting the output clock signals, each inverter comprising two switches connected in series between a high potential and a low potential, and each inverter being arranged such that, when the input clock signals change state, a switch which is in a conductive state is changed to a non-conductive state at a time determined by the clock signal having the fastest clock edge, and a switch which is in a non-conductive state is changed to a conductive state at a time determined by the clock signal having the slowest clock edge. In each inverter, one switch may be a p-channel field effect transistor and the other switch may be an n-channel field effect transistor, and the two transistors may have separate inputs to their respective gates. 
     The skew compensation circuitry may further comprise a first NAND gate and a second NAND gate, the first NAND gate receiving at its input an input clock signal and the output of the second NAND gate, and the second NAND gate receiving at its input the complementary input clock signal and the output of the first NAND gate, outputs of the first and second NAND gates being supplied to control inputs of the switches in the first and second inverters. Each inverter may have one input connected to a non-inverted output of one of the NAND gates and the other input connected to the inverted output of the other NAND gate. The output clock signals may be high impedance during the periods between the fastest edges of the input clock signals and the corresponding slowest edges. 
     The present invention also provides method aspects corresponding to the various circuitry aspects described above. According to a fifth aspect of the invention there is provided a method of performing a series of switching operations in segmented mixed signal circuitry comprising a plurality of analog segments, the method comprising supplying shaped clock signals in common for all of the analog segments, and performing the series of switching operations, each switching operation being dependent on an input data signal, and being performed in a manner determined by the shape of the common shaped clock signals. 
     According to a sixth aspect of the invention there is provided a method of driving a switching circuit, the method comprising receiving an input data signal at a data node, receiving a clock signal at a clock node, and connecting the clock node to one of first and second output nodes via one of first and second switches in dependence on the input data signal, wherein the first and second switches do not change state when the clock signal changes state. 
     According to a seventh aspect of the invention there is provided a method of connecting a common node of a switching circuit to one of first and second nodes of the circuit in a series of cycles, the method comprising connecting the common node to one of the first and second nodes via one of a plurality of switches in each cycle, wherein the same number of switches change state in each cycle. 
     Apparatus features may be applied to the method aspects and vice versa. Features of any of the aspects of the invention may be applied to any of the other aspects. 
     Preferred features of the present invention will now be described, purely by way of example, with reference to the accompanying drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  shows an overview of a previously considered DAC; 
         FIG. 2  shows a known differential switching circuit; 
         FIG. 3  shows a current source connected to a known differential switching circuit; 
       FIGS.  4 ( a )-( f ) are schematic diagrams of various signals In the circuit of  FIG. 3 ; 
       FIGS.  5 ( a )-( c ) are schematic diagrams of the synthesised output, switching rate, and output error in a DAC; 
         FIG. 6  shows an overview of a DAC according to an embodiment of the present invention; 
         FIG. 7  shows a switch driver circuit in an embodiment of the invention; 
         FIG. 8  shows a differential switching circuit in an embodiment of the invention; 
         FIG. 9  shows a varient of the differential switching circuit of  FIG. 8 ; 
         FIG. 10  shows waveforms which are applied to the circuit of  FIG. 9 ; 
         FIG. 11  shows a clock shaper circuit in an embodiment of the invention; 
         FIG. 12  shows various signals within the clock shaper circuit of  FIG. 11 ; 
         FIG. 13  shows a low voltage generator for use with the clock shaper circuit of  FIG. 11 ; 
         FIG. 14  shows examples of clock skew; 
         FIG. 15  shows a skew compensation circuit in an embodiment of the present invention; and 
         FIG. 16  shows an inverter with separate pgate and ngate inputs. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Overview of a DAC 
       FIG. 1  shows an overview of a previously considered DAC. The DAC in  FIG. 1  is part of a DAC integrated circuit (IC) of the current-steering type, and is designed to convert an m-bit digital input word (D 1 -Dm) into a corresponding analog output signal. 
     Referring to  FIG. 1 , the DAC  1  contains analog circuitry including a number n of identical current sources  2   1  to  2   n , where n=2 m −1. Each current source  2  passes a substantially constant current I. The analog circuitry further includes a number n of differential switching circuits  4   1  to  4   n  corresponding respectively to the n current sources  2   1  to  2   n . Each differential switching circuit  4  is connected to its corresponding current source  2  and switches the current I produced by the current source either to a first terminal, connected to a first connection line A of the converter, or a second terminal connected to a second connection line B of the converter. 
     Each differential switching circuit  4  receives one of a plurality of digital control signals T 1  to Tn (called “thermometer-coded signals” for reasons explained hereinafter) and selects either its first terminal or its second terminal in accordance with the value of the signal concerned. A first output current I A  of the DAC  1  is the sum of the respective currents delivered to the first terminals of the differential switching circuit, and a second output current I B  of the DAC  1  is the sum of the respective currents delivered to the second terminals of the differential switching circuit. The analog output signal is the voltage difference V A −V B  between a voltage V A  produced by sinking the first output current I A  of the DAC  1  into a resistance R and a voltage V B  produced by sinking the second output current I B  of the converter into another resistance R. 
     The thermometer-coded signals T 1  to Tn are derived from the binary input word D 1 -Dm by digital circuitry including a binary-thermometer decoder  6 . The decoder  6  operates as follows. When the binary input word D 1 -Dm has the lowest value the thermometer-coded signals T 1 -Tn are such that each of the differential switching circuits  4   1  to  4   n  selects its second terminal so that all of the current sources  2   1  to  2   n  are connected to the second connection line B. In this state, V A =0 and V B =nIR. The analog output signal V A −V B =−nIR. As the binary input word D 1 -Dm increases progressively in value, the thermometer-coded signals T 1  to Tn produced by the decoder  6  are such that more of the differential switching circuits select their respective first terminals (starting from the differential switching circuit  4   1 ) without any differential switching circuit that has already selected its first terminal switching back to its second terminal. When the binary input word D 1 -Dm has the value i, the first i differential switching circuits  4   1  to  4   i  select their respective first terminals, whereas the remaining n−i differential switching circuits  4   i+1  to  4   n  select their respective second terminals. The analog output signal V A −V B  is equal to (2i−n)IR. 
     Thermometer coding is popular in DACs of the current-steering type because, as the binary input word increases, more current sources are switched to the first connection line A without any current source that is already switched to that line A being switched to the other line B. Accordingly, the input/output characteristic of the DAC is monotonic and the glitch impulse resulting from a change of 1 in the input word is small. 
     An exemplary differential switching circuit suitable for use with the DAC of  FIG. 1  is shown in FIG.  2 . This differential switching circuit comprises first and second PMOS field effect transistors (FETs) S 1  and S 2 . The respective sources of the transistors S 1  and S 2  are connected to a common node TAIL to which a corresponding current source ( 2   1  to  2   n  in  FIG. 1 ) is connected. The respective drains of the transistors S 1  and S 2  are connected to respective first and second output nodes OUTA and OUTB of the circuit which correspond respectively to the first and second terminals of each of the differential switching circuits shown in FIG.  1 . 
     Each transistor S 1  and S 2  has a corresponding driver circuit  8   1  or  8   2  connected to its gate. Complementary input signals IN and INB are applied respectively to the inputs of the driver circuits  8   1  and  8   2 . Each driver circuit buffers and inverts its received input signal IN or INB to produce a switching signal SW 1  or SW 2  for its associated transistor S 1  or S 2  such that, in the steady-state condition, one of the transistors S 1  and S 2  is on and the other is off. For example, as indicated in  FIG. 2 , when the input signal IN has the high level (H) and the input signal INB has the low level (L), the switching signal SW 1  (gate drive voltage) for the transistor S 1  is at the low level L, causing that transistor to be ON, whereas the switching signal SW 2  (gate drive voltage) for the transistor S 2  is at the high level H, causing that transistor to be OFF. Thus, in this condition, all of the input current flowing into the common node TAIL is passed to the output node OUTA and no current passes to the output node OUTB. 
     When it is desired to change the state of the circuit of  FIG. 2  so that the transistor S 1  is OFF and the transistor S 2  is ON, complementary changes are made simultaneously in the input signals IN and INB such that the input signal IN changes from H to L at the same time as the input signal INB changes from L to H. As a result of these complementary changes the transistor S 1  turns OFF and the transistor S 2  turns ON, so that all of the input current flowing into the common node TAIL is passed to the output node OUTB and no current passes to the output node OUTA. 
     Evaluations of DACs using known differential switching circuits have shown that third harmonic distortion is not as good as would be expected. Third harmonic distortion is particularly problematic in DACs which synthesis multi-tone output signals, because some of the distortion products fall in-band and thus cannot be filtered out. It has been discovered that parasitic capacitances which are present in the switching transistors may give rise to third order distortion. 
     The mechanism by which parasitic capacitances lead to third order distortion will now be explained with reference to  FIGS. 3 and 4 .  FIG. 3  shows a differential switching circuit comprising switching transistors M 1  and M 2  connected via a transistor  10  to a constant current source  12 . The circuit of  FIG. 3  corresponds to one of the current sources  2  and switching circuits  4  of  FIG. 1. A  signal A is input to the gate of the switch M 1  and a signal B is input to the gate of the switch M 2 . Also shown in  FIG. 3  are parasitic capacitances Cgs M1  and Cgs M2 , which are the gate-source parasitic capacitances contributed by M 1  and M 2  respectively, and parasitic capacitance C d , which is the combination of the drain capacitance of the device  10  and the capacitances of the source diodes of M 1  and M 2 . 
     FIGS.  4 ( a )-( f ) are schematic diagrams of various signals in the circuit of FIG.  3 . As shown in FIG.  4 ( a ), the gate drive to the switch M 2  (signal B) is initialy high, and the gate drive to the switch M 1  (signal A) is initially low. M 1  and M 2  are both active low, so that M 1  is initially on and M 2  is initially off. In the region X, signal B starts to fall, while signal A stays low. It is necessary for signal B to fall before signal A starts to rise to ensure that there is always a path for the current from the current source. 
     As signal B falls, the gate voltage to the switch M 2  falls, and thus the voltage across the capacitance Cgs M2  increases. This causes current to flow into Cgs M2 . This is shown in FIG.  4 ( c ) by an increase of current into C P . which is the combination of the parasitic capacitances on the tail node. This leads to a reduction in the tail voltage, as shown in FIG.  4 ( b ). The current which flows into C P  comes from the constant current source  12 , resulting in a reduction in the value of I 1 +I 2 , as shown in FIG.  4 ( d ) and a reduction in the value of I 1 −I 2 , as shown in FIG.  4 ( e ). 
     In region Y, switch M 2  starts to turn on as the gate drive B drops below the switch threshold voltage, and at the same time switch M 1  starts to turn off as gate drive A increases. Assuming that the slew rates of A and B are the same, Cgs M1  then injects charge into the tail at the same rate as Cgs M2  removes charge, and so there is no net current flow into or out of the parasitic capacitance C p . 
     In region Z, signal A rises, and so the voltage across Cgs M1  decreases. Charge which is stored in Cgs M1  is thus injected into the tail node. This extra current is added to the current from the constant current source  12 , and so causes an increase in the value of I 1 +I 2  (FIG.  4 ( d )) and a reduction in the value of I 1 −I 2  (FIG.  4 ( e )). 
     The signal output by the switching circuit is proportional to I 1 −I 2 . An output error can therefore be derived from I 1 −I 2 , as shown in FIG.  4 ( f ). It will be appreciated that the output error only occurs when the differential switching circuit is switching from one state to another. 
     The overall output error of the DAC due to the above mechanism is the sum of the output errors of each of the switching circuits. Thus, the overall output error will be higher when more of the switching circuits are switching, and lower when fewer of the switching circuits are switching. Thus the overall output error is dependent on the input data. 
     Incidentally, the currents which are injected and removed by the gate-drain parasitic capacitances (not shown) contributed by M 1  and M 2  always flow into and out of the same node, and therefore do not lead to any net changes in the output currents. 
     FIGS.  5 ( a )-( c ) show how the above mechanism is related to the third harmonic distortion. In the example of FIG.  5 ( a )-( c ), a digital input signal applied to the DAC is used to synthesise a sine wave of frequency f 0  at the analog output of me DAC. FIG.  5 ( a ) shows the synthesised output of the DAC, which is at the frequency f 0 . FIG.  5 ( b ) shows the slew rate of the output, which is proportional to the switching rate of the various switching circuits in the DAC, FIG.  5 ( c ) shows the amount of missing charge in the output. The amount of missing charge is at a maximum when all switching circuits are switching, and is zero when no switching circuits are switching. The output error thus varies with a frequency 2f 0 . The output signal Is a product of the synthesised signal, which is at a frequency f 0 , and the output error, which is at a frequency 2f 0 , which leads to distortion at a frequency of 3f 0  (i.e. at the third harmonic). 
     Embodiments of the Invention 
     Embodiments of the present invention seek to reduce the third harmonic distortion by reducing the dependency of the output error on the input data. Embodiments of the invention also seek to reduce mis-matches in the switching times of differential switching circuits in DACs. 
       FIG. 6  shows an overview of a DAC according to an embodiment of the present invention. The DAC may be used, for example, to synthesise the radio output signal in a mobile telephone base station. The DAC comprises first decoder circuit  20 , second decoder circuit  22 , switch driver circuitry  24 , switching circuitry  26 , current sources  28   1  to  28   n , clock shaper  30 , and skew compensation circuit  32 . The switch driver circuitry  24  comprises n switch drivers, and the switching circuitry  26  comprises n switching circuits. 
     In operation, the first decoder circuit  20  receives odd samples of a digital input signal and outputs n pairs of complementary thermometer coded signals T ODD1  and {overscore (T)} ODD1  to T ODDn  and {overscore (T)} ODDn . The second decoder circuit  22  receives even samples of a digital input signal and outputs n pairs of complementary thermometer coded signals T EVEN1  and {overscore (T)} EVEN1  to T EVENn  and {overscore (T)} EVENn . Since odd samples of the digital data signal are decoded by the first decoder  20 , and even samples are decoded by the second decoder  22 , each of these decoders can operate at half the speed than would be the case if only a single decoder were provided. This can allow the overall speed of the DAC to be increased. Further details of the decoder circuits  20 ,  22  are described in GB 2356301, cited above. If required, the outputs of the decoders could be latched in latch circuits (not shown). 
     Each pair of outputs from the first and second decoders is fed to a corresponding switch driver in the switch driver circuitry  24 . For example, the outputs T ODD1 , {overscore (T)} ODD1 , T EVEN1  and {overscore (T)} EVEN1  are all fed to switch driver  1 , and so on. Each switch driver also receives clock signals CLK ODD  and CLK EVEN  from the clock shaper  30 . Each switch driver circuit produces four drive signals which are fed to the corresponding switching circuit in the switching circuitry  26 . Each switching circuit also receives a current from one of the current sources  28   1  to  28   n , and switches that current to one of the two output terminals OUTA and OUTB in dependence on the drive signals received at its input. 
       FIGS. 7 and 8  show respectively a switch driver  36  and a differential switching circuit  38  in accordance with an embodiment of the present invention. The switch driver  36  is one of the switch drivers in the switch driver circuitry  24  of  FIG. 6 , and the differential switching circuit  38  is one of the switching circuits in the switching circuitry  26  shown in FIG.  6 . 
     Referring to  FIG. 7 , switch driver  36  comprises a first switch driver circuit consisting of switches SW 5  to SW 8 , and a second switch driver circuit consisting of switches SW 1  to SW 4 . In operation, the first switch driver circuit receives the signals T ODD  and {overscore (T)} ODD  from the first decoder circuit  20  in FIG.  6  and the signal CLK ODD  from the clock shaper  30  in FIG.  6 . The second switch driver circuit receives the signals T EVEN  and {overscore (T)} EVEN  from the second decoder circuit  22  in  FIG. 6 , and the signal CLK EVEN  from the clock shaper  30  in FIG.  6 . The switches in the switch driver of  FIG. 7  are active low, that is, they turn on when the voltage at their control input is low. 
     In the switch driver of  FIG. 7 , when T EVEN  is low, the switches SW 1  and SW 4  are closed, and the switches SW 2  and SW 3  are open. When T EVEN  is high, the switches SW 1  and SW 4  are open, and the switches SW 2  and SW 3  are closed. Thus, when CLK EVEN  is high, both outputs V S3  and V S4  are high. When CLK EVEN  is low, the output V S3  follows T EVEN , and the output V S4  follows the inverse of T EVEN . The switches SW 5 , SW 6 , SW 7  and SW 8  operate in a similar way in response to the signals T ODD  and CLK ODD . Thus, when CLK ODD  is high both outputs V S1  and V S2  are high, and when CLK ODD  is low, one of V S1  and V S2  is high and the other is low, in dependence on the value of T ODD . 
     The following table summarises how the various output signals vary with the input and clock signals. 
     
       
         
               
               
               
               
               
               
               
               
             
           
               
                   
               
               
                 T ODD   
                 T EVEN   
                 CLK EVEN   
                 CLK ODD   
                 V S1   
                 V S2   
                 V S3   
                 V S4   
               
               
                   
               
             
             
               
                  0 
                 0 
                 0 
                 1 
                 1 
                 1 
                 0 
                 1 
               
               
                 0 
                 0 
                 1 
                 0 
                 0 
                 1 
                 1 
                 1 
               
               
                 0 
                 1 
                 0 
                 1 
                 1 
                 1 
                 1 
                 0 
               
               
                 0 
                 1 
                 1 
                 0 
                 0 
                 1 
                 1 
                 1 
               
               
                 1 
                 0 
                 0 
                 1 
                 1 
                 1 
                 0 
                 1 
               
               
                 1 
                 0 
                 1 
                 0 
                 1 
                 0 
                 1 
                 1 
               
               
                 1 
                 1 
                 0 
                 1 
                 1 
                 1 
                 1 
                 0 
               
               
                 1 
                 1 
                 1 
                 0 
                 1 
                 0 
                 1 
                 1 
               
               
                   
               
             
          
         
       
     
     The outputs V S1 , V S2 , V S3 , V S4  from the switch driver  36  in  FIG. 7  are fed to the corresponding inputs V S1 , V S2 , V S3 , V S4  in the differential switching circuit of FIG.  8 . 
     Referring to  FIG. 8 , the differential switching circuit  38  has switches S 1  and S 3  connected between the node TAIL and the node OUTA, and switches S 2  and S 4  connected between the node TAIL and the node OUTB. The switches S 1  to S 4  have their control inputs driven by the signals V S1  to V S4  respectively which are provided by the switch driver circuit  36 . The switches S 1  to S 4  are active low. Thus the switch S 1  is off when the voltage V S1  is high (“1”) and on when the voltage V S1  is low (“0”), and so forth. 
     In operation, the switching circuitry of FIGS.  7  and  8  acts to switch the current at the node TAIL to one of the nodes OUTA and OUTB in dependence on the input signals T ODD , {overscore (T)} ODD , T EVEN  and {overscore (T)} EVEN . In odd numbered cycles, the switches S 1  and S 2  are used to switch the current at the tail node to either OUTA and OUTB in dependence on the value of T ODD  and {overscore (T)} ODD . In even numbered cycles, the switches S 3  and S 4  are used to switch the current at the tail node to either OUTA and OUTB in dependence on the value of T EVEN  and {overscore (T)} EVEN . The values of T ODD  and {overscore (T)} ODD  are changed in even numbered cycles and the values of T EVEN  and {overscore (T)} EVEN  are changed in odd numbered cycles. 
     Thus the data signals T ODD , {overscore (T)} ODD , T EVEN  and {overscore (T)} EVEN  are set in advance of the relevant clock edge, so that it is the clock signals CLK ODD  and CLK EVEN  that control the timing of the changes in V S1  to V S4 , rather than the data signals. This means that no special timing circuitry is needed for T ODD , {overscore (T)} ODD , T EVEN  and {overscore (T)} EVEN . If such timing circuitry were needed, the timing circuitry would have to be provided in every cell. However, in the present embodiment, a common clock shaper is provided for all cells. The clock shaper can be made as complex as necessary to achieve sufficiently good timing of the clock signals, without adding significantly to the overall amount of circuitry that is required. 
     Since the clock signals CLK ODD  and CLK EVEN  are fed by the switch driver  36  directly to the switches S 1  to S 4 , there is a very short time delay between a clock edge and a corresponding change in the state of the switches. Because this time delay is short, any variations in the time delay will be small. Furthermore, since no switches (other than the final current steering switches) need to change state on a clock edge, there are no random mis-matches which might otherwise occur in the switching times of such switches. This means that mis-matches in the clock signals received by the various switching circuits are very small. Thus, any mis-matches in the timings of the various switching circuits within the DAC will also be small. For example, the DAC of the present embodiment may have timing mis-matches of less than 1 ps (e.g. 0.85 ps) whereas timing mis-matches in known DACs are around 8 ps. Reducing the timing mis-matches in this way can help to reduce distortion in the output signal. 
     In the switching circuitry of  FIGS. 7 and 8 , it is important that the clock signals CLK ODD  and CLK EVEN  have the same potential as V DD  when they are high. If this were not the case, a glitch might occur in an output signal when an input signal changed and the corresponding clock signal was high. The clock signals CLK ODD  and CLK EVEN  are carefully controlled by the clock shaper circuit  30  shown in  FIG. 6 , as will be explained later. 
     As discussed above, in odd numbered cycles, one of the switches S 1  and S 2  is used to switch the current at the tail node to either OUTA and OUTB, and in even numbered cycles, one of the switches S 3  and S 4  is used to switch the current at the tail node to either OUTA or OUTB. Thus, whenever a new cyde begins, one of the switches turns on and another at the switches turns off. This means that the same number of switches change state in all clock cycles. regardless of the input data. By aranging the same number of switches to change state in all clock cycles, the gain error due to current flow into and out of the parasitic capacitances can be made independent of the input data. As was discussed above with reference to FIGS.  4 ( a )-( f ) and  5 ( a )-( c ), reducing the dependency of the output error on the input data may reduce the third order distortion that occurs in the output signal. 
     The circuitry shown in  FIGS. 7 and 8  also has the advantage that the current taken by the circuitry from the power supply is independent of the input data. In particular, since the same number of switches in the switching circuit  36  change state in each clock cycle, the current drawn by the switching circuit is the same in each cycle. In addition, current taken by the switch driver  36  is also the same in each cycle, and thus does not depend on the input data. By arranging the current drawn by the circuit to be independent of the data, any variations in the supply voltage due to the drawn current are also independent of data. This may help to reduce data dependent mis-matches in the switching times of the switches, which may reduce distortion in the output signal. 
     Furthermore, the current drawn by the switch driver  36  and switching circuit  38  from the clock shaper  30  is approximately the same in each cycle. If different currents were drawn, this might affect the timings of the clocks, which would then affect the timings of the switches. By ensuring that the circuitry draws the same current from the clock shaper  30  in each cycle, any effect on the clock signals is likely to be the same in each cycle, leading to a reduction in timing mis-matches. 
     A further advantage of the switch driver  36  shown in  FIG. 7  is that no net current is taken by the switch driver from the decoders  20 ,  22 . This is because no node in the switch driver changes state when the input data signals change state. Since there is no net current flow, variations in the values of the signals from the decoders  20 ,  22  do not feed through to the switching circuits, and thus do not affect the switching times of the switches. This may also help to reduce mis-matches in switching times, and thus reduce the distortion in the output signal. 
     As shown in  FIG. 6 , the DAC circuitry is divided into a digital part and an analog part. The digital part and the analog part preferably have separate power supplies. As discussed above, the analog circuitry is arranged so as to draw a current which is the same in each clock cycle. This can allow the analog power supply to be well controlled at a substantially constant potential. This is important because variations in the analog power supply may feed through to the output signals. By contrast, the current taken by the digital circuitry does vary, and thus the potential of the digital power supply may vary. Provided that the potential of the digital power supply stays within defined limits, variations in the potential do not seriously affect the digital circuitry. In the present embodiment, since there is no net data dependent current flow between the digital circuitry and the analog circuitry, variations in the potential of the digital power supply have minimal effect on the analog circuitry. 
     If required, buffers could be inserted between the clock shaper  30  and the switch driver  36 , or between the switch driver  36  and the switching circuit  38 . Such buffers may be needed in order to help with the driving of the load. An example of a suitable buffer is a source follower. Since source followers do not switch, delay variations introduced by such source followers are small. Other types of buffer could be used where appropriate. However, it is preferable not to use buffers which are powered by the analog supply circuit between the decoders  20 ,  22  and the switch driver circuitry  24 . This is because such buffers would taken a current which depended on the input data, which might disturb the analog supply. However, a balanced latch, such as that disclosed in United Kingdom patent publication number GB 2356750 in the name of Fujitsu Limited, the subject matter of which is incorporated herein by reference, could be inserted between the digital circuitry and the analog circuitry if required. 
     It will be appreciated from the above that the switching circuitry of  FIGS. 7 and 8  performs the functions of clocking and multiplexing the input signals, as well as switching the current from the current source. Since all of these functions are combined in the switching circuitry, delays between the decoder circuitry and the switching circuitry are reduced in comparison to the case where separate circuits are provided to carry out these functions. Since the delays are reduced, delay mis-matches between the various signals are also reduced, which reduces the mis-matches in the times at which the various switching circuits switch the currents from their current sources. In addition, since only the final current steering transistors switch on a clock edge, random mis-matches in transistor switching times are minimised. 
     A variant of the differential switching circuit  38  of  FIG. 8  is shown in FIG.  9 . The differential switching circuit of  FIG. 9  is the same as the circuit of  FIG. 8 , but with two transistors  40 ,  42  connected to the node TAIL. These transistors switch on and off in the same way as the current steering switches, but in the opposite direction. They are used to help cancel out the charge injected/removed into the parasitic capacitances by the switches S 1  to S 4  as the voltages at their gates change. The gates of the transistors  40 ,  42  are connected to clock signals CLK CC  and {overscore (CLK)} CC  respectively. As shown in  FIG. 10 , these are the approximate inverse of the main clock signals CLK ODD  and CLK EVEN . The transistors  40 ,  42  therefore cause current flows which are opposite to the current flows caused by the parasitic capacitances contributed by S 1  to S 4 . In this way, the transistors  40 ,  42  help to reduce the variations in the current flowing to the output terminals. 
     Clock Shaper Circuit 
     The clock signals CLK ODD  and CLK EVEN  which are applied to the switch driver circuitry in each segment are produced by the clock shaper circuit  30  of FIG.  6 . Parts of the clock shaper circuit are shown in FIG.  11 . The clock shaper circuit  30  comprises switches S 11  to S 20 , connected as shown in FIG.  11 . The switches may be, for example, PMOS FETs. In  FIG. 11 , CLK and its complement {overscore (CLK)} are the input clocks which are at the DAC conversion frequency. CLK SLR  and {overscore (CLK)} SLR  are buffered versions of CLK and {overscore (CLK)} that have slow rise times but fast fall times. 
     Operation of the clock shaper circuit  30  will now be explained with reference to  FIGS. 11 and 12 . For the initial explanation, the switches S 19  and S 20  will be ignored; the purpose of these switches will be explained later. It is assumed that the initial states of the various switches are as shown in  FIG. 11 , that is, S 11  is off, S 12  is on, S 13  is on, S 14  is off, S 15  is on, S 16  is off, S 17  is on and S 18  is off. The output CLK ODD  is therefore held high by S 17 , and the output CLK EVEN  is held low by S 12 . At time T=0, CLK changes from high to low and {overscore (CLK)} changes from low to high. In response to the change in the input clock the switches S 13  to S 16  change state immediately. This causes node A to be pulled high, turning switch S 17  off, whilst node B connects via switch S 14  to node C which is still high, keeping switch S 18  off for the time being. 
     At T=Δ (where Δ is the delay of the buffers used to produce CLK SLR  and {overscore (CLK)} SLR ) switch S 11  turns on fast because CLK SLR  has a fast fall time. This causes the output CLK ODD  to be pulled to low. Node B is pulled down slowly to low because of the combination of the resistance of the switch S 11  and the high gate capacitance of the pull-up switch S 18 , plus the load of all of the switch drivers. Switch S 12  starts to turn off slowly because {overscore (CLK)} SLR  has a slow rise time. This slow turn off holds CLK EVEN  low until just before S 18  turns on. S 18  turns on when node B has reached the switch threshold voltage. Since node B is connected via S 14  to node C, S 18  only turns on once the output CLK ODD  has fallen below the switch threshold voltage. When S 18  turns on, the output CLK EVEN  is then pulled to high. 
     It is important that the low output of CLK EVEN  does not vary very much before it starts to rise, because this output is connected directly to the differential switching circuit, and so any movement in the value of CLK EVEN  will result in movement in the tail voltage V TAIL . For this reason it is important that S 12  stays on until just before S 18  turns on. If S 12  were to turn off too early then the low output signal would be floating, which would also lead to variations in the output signal. However, if S 12  were on at the same time as S 18 , shoot-though current through S 18  and S 12  would disrupt the low output signal. The timing of the switches S 12  and S 18  is therefore set up so that, taking into account all process, voltage and temperature (PVT) variations there will be no shoot through. In practice this means that S 12  tends to turn off slightly early, but this is tolerated to achieve satisfactory performance over all PVT variations. 
     On the next clock edge, when CLK changes from low to high and {overscore (CLK)} changes from high to low, corresponding changes to those described above take place, so that the output CLK EVEN  first starts to fall to low, and the output CLK ODD  only starts to rise once CLK EVEN  has reached the switch threshold voltage. 
     The resistors  44 ,  45  shown in  FIG. 11  are resistors which have been added to the output clock path. These resistors allow adjustments to be made in the timings of the output clock signals by adjusting the pull down rates of the signals. 
     Next to each of the main pull-down switches S 11  and S 12  is a smaller sized switch S 19  and S 20 . These switches are used to absorb some of the injected charge pumped into the low output signal as a result of clock feed-through of the large switches S 11  and S 12  when they are turned off. For example, when S 12  turns off, CLK EVEN  momentarily enters a high impedance state. Any charge injected into node D through the gate-source capacitance of switch S 12  will cause variations in the low output of CLK EVEN . The switches S 19  and S 20  are driven by control signals CLK L  and {overscore (CLK)} L , which are derived from the buffers used to generate CLK SLR  and {overscore (CLK)} SLR . The switches S 19  and S 20  are therefore turned on slightly later than their corresponding switches S 11  and S 12  to absorb the injected charge caused by the slow control signals of S 11  and S 12 . The size of the switches S 19  and S 20  is a compromise between absorbing as much of the injected charge as possible, without injecting too much charge themselves. In practice the switches S 19  and S 20  may be about a quarter of the size of S 11  and S 12 . Further such switches of even smaller size could also be provided if required, with suitable drive circuitry. 
     The low voltage of the clock shaper circuit  30  is set to give the required voltage swing of the output clock signals CLK ODD  and CLK EVEN . The required voltage swing is related to the gate-source voltage of the switches in the differential switching circuit in each analog cell. In the present embodiment, the voltage at the node TAIL is about 1.8V. To ensure that there is sufficient voltage swing despite variations in process, voltage and temperature, the low output from the clock shaper circuit tracks the threshold voltage V T  and the saturation drain-source voltage V DS(sat)  of the switches S 1 , S 2 , S 3  and S 4  in FIG.  8 . 
       FIG. 13  shows a circuit which is used to set the low voltage of the clock shaper circuit  30 . The device MSW is a switch which is made as similar to the switches S 1  to S 4  as possible, and is placed as close to those switches as possible. The output amplifier  46  is designed to supply the required current to the clock shaper circuit. The decoupling capacitor  48  is provided to supply the fast current spikes drawn from the circuit. 
     Skew Compensation Circuit 
     If the signals CLK and {overscore (CLK)} which are input to the clock shaper circuit are skewed, then the timing of the switches in the clock shaper circuit may change, and undesired shoot-through of current may occur. Clock skew occurs where a clock signal and its complement have clock edges which do not change at identical times.  FIG. 14  shows two examples of clock skew. In the first example, each clock signal changes from low to high before its complement changes from high to low. In the second example, each clock signal changes from high to low before its complement changes from low to high. Any combinations of the two cases could also occur. 
     In order to compensate for clock skew, a clock skew compensation circuit  32  is provided at the input to the clock shaper circuit  30 , as shown in FIG.  6 . Clock skew compensation circuit  32  receives input clock signals CLK IN  and {overscore (CLK)} IN , and outputs clock signals CLK and {overscore (CLK)}. The circuit is arranged so that the output clock signals always change state using the input clock with the slowest edge. 
       FIG. 15  shows parts of the clock skew compensation circuit  32 . The clock skew compensation circuit comprises NAND gates  50 ,  52 , inverters  54 ,  56 ,  58 ,  60 ,  62 ,  64 , switches  55 ,  61 , and dual input inverters  66 ,  68 . Each of the inverters  66 ,  68  comprises a p-channel MOSFET  70  and an n-channel MOSFET  72  with separate pgate (pg) and ngate (ng) inputs, as shown in FIG.  16 . 
     Referring to  FIG. 15 , NAND gate  50  receives the signal CLK IN  at one input, and an output from NAND gate  52  at the other input. NAND gate  52  receives the signal {overscore (CLK)} IN  at one input, and an output from NAND gate  50  at the other input. NAND gates  50  and  52  thus form a flip-flop circuit. The output from NAND gate  50  is fed via inverters  54  and  56  to the pgate input of inverter  66 , and via switch  55  and inverter  58  to the ngate input of inverter  68 . The output from NAND gate  52  is fed via inverters  60  and  62  to the pgate input of inverter  68 , and via switch  61  and inverter  64  to the ngate input of inverter  66 . The switches  55  and  61  are provided to introduce the same delays as those caused by inverters  54  and  60 . 
     If, as indicated in  FIG. 15 , CLK IN  is high and {overscore (CLK)} IN  is low, the output of NAND gate  50  is low and the output of NAND gate  52  is high. When the input clock signals CLK IN  and {overscore (CLK)} IN  change, the output of NAND gate  50  goes high either when CLK IN  goes low or when {overscore (CLK)} IN  goes high, whichever occurs first. However, the output of NAND gate  52  only goes low when both CLK IN  is low and {overscore (CLK)} IN  is high. Thus the output of NAND gate  50  changes on the first clock edge of the input clocks, and the output of NAND gate  52  changes on the last clock edge of the input clocks. NAND gates  50 ,  52  function in the opposite way when CLK IN  changes from low to high and {overscore (CLK)} IN  changes from high to low, so that the output of NAND gate  52  changes on the first clock edge and the output of NAND gate  50  changes on the last clock edge. Thus it can be seen that whichever NAND gate has a high input will change state on the first clock edge, and whichever NAND gate has a low input will change state on the last clock edge. Thus the output of a NAND gate always changes from low to high on the first clock edge and from high to low on the last clock edge. 
     Inverter  66  receives a non-inverted buffered output from NAND gate  50  at its pgate input, and an inverted buffered output from NAND gate  52  at its ngate input. Similarly, inverter  68  receives a non-inverted buffered output from NAND gate  52  at its pgate input, and an inverted buffered output from NAND gate  50  at its ngate input. Thus, the pgate input of each of the inverters  66 ,  68  always changes from low to high on the first edge of the input clocks, and from high to low on the last edge of the input clocks. Similarly, the ngate input always changes from high to low on the first edge and from low to high on the last edge. This ensures that the transistors  70 ,  72  in  FIG. 16  are never both on at the same time. Between the first clock edge and the last clock edge, both transistors are off and the output of the inverter is high impedance. 
     The clock skew compensation circuit  32  also provides the buffering which is required between the signals CLK IN  and {overscore (CLK)} IN  and the inputs CLK and {overscore (CLK)} to the clock shaper circuit  30 . Such buffering would be required in any case in order to provide the necessary drive current for the load presented by the clock shaper circuit, and therefore the skew compensation circuit  32  adds little in the way of complexity to the overall circuit design. 
     The skew compensation circuit  32  may be used with DAC designs other than that described above. The skew compensation circuit  32  may also be used in timing sensitive applications other than DACs. 
     Although the foregoing embodiments have employed p-channel switching transistors in the differential switching circuits, it will be appreciated that the present invention can be applied in other embodiments to current switching circuitry employing n-channel switching transistors (and a current sink in place of the current source). In this case, the polarities of the supply lines and the conductivity types of the transistors in the switch driver circuitry are reversed. 
     While embodiments of the present invention have been described with reference to a DAC using thermometer coding, other types of coding may be used. In a DAC to which the present invention may be applied, each of the current sources may pass substantially the same current, or they may pass different currents. 
     Although the foregoing embodiments have been adapted for use in a DAC, it will be appreciated that in other embodiments the present invention can be applied to any suitable kind of mixed-signal circuitry where one or more digital signals for application to analog circuitry must be generated at a high frequency. For example, the invention can also be applied in programmable current generation, in mixers and in analog-to-digital converters.