Windowed clock generation

Abstract: Resynchronized windowed clock signals are constructed starting from a main clock signal of the same frequency of that of the active phases of the constructed windowed clock signal, advantageously without requiring a main clock of a higher frequency.

Description: In general, the present invention relates to processing digital systems using timing signals (clocks) and more in particular to a method and a device for generating a peculiar "windowed" clock signal that is a clock signal characterized by a succession of periods or active phases during which the signal has a certain frequency and of inactive period phases during which there isn't any signal at said frequency. In processing systems that utilize a plurality of identical pipelines substantially operating in parallel according to a so-called systolic scheme, to process in parallel data belonging to blocks of data fed in series to the various pipelines, it might be useful or necessary to use a particular timing or clock signals having active periods alternating with inactive periods, commonly defined as windowed clocks, whereby the active period may have a duration different from the period of inactivity. Such requirements occur for example in the so-called motion estimators. A motion estimator is a digital processor that calculates an estimate of the motion in a video frame (VF), using a reference frame (RF). Each of the blocks (VF) into which the video frame is normally divided and which for example may be of 16x16 pixels (pels), is compared to a correspondent block or with equivalent blocks of the reference frame RF that are within the search area defined by the position of the particular block of the video frame VF. For example, if the dimensions of the search area are 46x46 pels, there will be 31x31 blocks that the motion estimator will have to compare with the block of the video frame VF. The motion estimator will find the block in the search area that is more similar to the block of the video frame VF and will make available the data that define its position in the search area. In practice, the motion estimation processor is a machine that must compare with each other many blocks and this means that it would be advantageous to use many processing pipelines (PE) functioning in parallel. A controller would then coordinate the functions of the different pipelines. Fig. 1 shows a simplified functional scheme of a motion estimation processor. The systolic array (LINEAR ARRAY OF PE), represents a linear structure of identical processing element PE, functioning in parallel. The flow of data through the array needs to be controlled by a controller (CONTROLLER). Each PE works in parallel to all the other PE of the array and the current video block is fed along the array according to a local communication control. The absolute values of the differences between the VF and RF blocks, calculated by the PEs, are stored as distortions in a dedicated accumulator (ACCUMULATOR). The comparators (COMPARATOR) receive representative data of the various distortions in sequence and retain (select) the data relative to the minimum distortion detected. The primary function of the CONTROLLER is that of producing a windowed clock having active phases or periods alternating with inactive phases or periods, for coordinating the functions of the plurality of processing pipelines (PE) that make up the linear array. Fig. 2 shows the way a typical windowed clock signal is produced. If f is the clock frequency during active phases, a typical way of producing the windowed clock signal is to start from a clock signal (2f) having twice that frequency. The 2f frequency can be divided by two through a common digital divider thus obtaining an f frequency signal, and by a larger multiple of two (in the example by 16), thus obtaining an f/16 frequency signal. These two derived clock signals of fractional frequency in respect to the frequency 2f of the starting signal, obtained by digital frequency division, are supplied to an AND gate to produce the required windowed clock signal that represents the logic product of the two derived clocks, as diagrammatically illustrated in Fig. 2. The delay introduced by the combinatory logic AND circuit can be, as it is well known, eliminated by using a D-latch circuit, to which the 2f frequency signal may be fed as the sampling clock signal. The disadvantage of this method is represented by requiring a 2f frequency primary signal, that is twice the clock frequency actually required during the active phases of the windowed clock signal to be produced. For example in a typical application of a motion estimate system, the requisite of having a windowed clock signal with a frequency, during the active phases, of 72MHz would require the availability of a master clock signal with twice that frequency, that is of 144MHz. Clearly, this aspect may be extremely burdensome because it may impose severe constraints to the hardware architecture and to the components used. Confronted with these difficulties, a method and relative device has now been found whereby it is possible to construct or derive the required windowed clock signal without the need for a 2f master clock signal. This objective is reached by deriving the windowed clock signal from a master clock signal whose frequency can be that of the same windowed clock signal during its active phases. According to a first aspect of the method of the invention digital frequency division of a master clock signal are generated at least a first derived clock signal with a first frequency submultiple by a factor equivalent to an integer multiple (n) of two of the master clock frequency and a second derived clock signal having a second frequency submultiple by a factor equivalent to an integer multiple (m) of two of the master clock frequency, where m is greater than n, for establishing a certain ratio between active and inactive intervals of the windowed clock signal. Optionally, a time shift of the first one of the two derived clock signals that is of the highest frequency one of the derived clocks equivalent to an odd integer multiple of a semiperiod of the master clock signal may be produced and the two clock signals may be fed to the inputs of a logic AND gate. The logic product signal of the two clock signals output by the AND gate defines the active and inactive intervals, that is the defined windows of the clock signal. Therefore, a perfect synchronism with the main clock signal is restored, eliminating the delays introduced by the combinatory logic gate, while producing at the same time a pair of resynchronized signals out-of-phase by a semiperiod of the master clock signal. The pair of out-of-phase and resynchronized signals are fed to the inputs of an exclusive OR (XOR) gate to output the desired windowed clock signal whose frequency during its active phases may be equal to that of the master clock signal (in case that the first of the two derived clock signals employed has a halved frequency (n=1) in respect to the frequency of the master clock signal). In view of the resynchronization of the pair of input signals of the XOR gate and by suitably designing the XOR circuit a windowed clock output signal with satisfactory characteristics is obtained without requiring a "double" frequency main clock to start with. According to another aspect of the invention, the circuit device of the invention comprises a first time-shift block of a derived clock signal of fractional frequency in respect to the master clock frequency. The time- shift block employs at least a D-Latch stage and more preferably an array of D-Latch stages in cascade, all employing the master clock as the timing signal. The input signal and the signals present at the respective outputs of the various D-Latch stages in cascade may be selected through a multiplexer, to construct a windowed clock signal according to the requisites of the specific application. Such a derived, fractional frequency clock signal, eventually shifted, as selected through the multiplexer, is applied to a first input of an AND gate, to a second input of which is applied a second derived clock signal of fractional frequency in respect to the master clock frequency and whose value is in a certain ratio in respect to the frequency of the first derived clock signal. The ratio between the frequencies of the two derived fractional frequency clock signals fed to the inputs of the AND gate is such to produce certain ratio between the duration of the active phases and of the inactive phases of the windowed signal output by the AND gate and the period of the derived signal having the highest frequency. The circuit further comprises a second and a third resynchronization circuits, realized with a number of D-Latch stages (timed by the master clock signal) different from each other by an odd integer number the windowed signal output by the AND gate is fed to an input of said second and third circuits to obtain, at the respective outputs, a pair of windowed signals, both resynchronized with the master clock signal and having the same frequency during their respective active phases, corresponding to a fractional value of the frequency of the master clock signal. Therefore these two resynchronized signals are out-of-phase by essentially a semiperiod of the master clock signal. This pair of resynchronized, fractional frequency and out-of-phase windowed clock signals is fed to the inputs of an XOR gate which produces at its output the desired windowed clock signal with a frequency during the active phases that can be identical to the frequency of the master clock. Another aspect of the invention is that of permitting the generation of a windowed clock signal in which the active and inactive phases have different duration in terms of number of cycles master clock, in other words of an "asymmetric" windowed clock signal. This can be obtained by generating a logic product of a derived clock signal, shifted by a multiple integer of a semiperiod of the master clock signal or of one of a plurality of derived, fractional frequency clock signals available at the respective outputs of a frequency divider block, with another derived signal whose semiperiod has a duration equal to the duration of the active phase of the desired windowed clock and essentially lower than the semiperiod of the first derived clock signal. In this way, an asymmetric clock signal having a certain duty-cycle may be produced. This asymmetric derived clock signal may then be resynchronized with the master clock signal and used in place of the second derived clock signal to produce the logic product (AND) signal which will be then resynchronized and phase-shifted by a semiperiod of the master clock signal to generate the pair of resynchronized and out-of-phase signals that are applied to the inputs of the final XOR logic circuit to output the desired asymmetric, windowed clock signal. The various aspects and relative advantages of the invention will be even more evident through the following description of some important embodiments and by referring to the attached drawings, wherein: Figure 1 shows, as already mentioned, the scheme of a motion estimation processor, in which a windowed clock signal is used to synchronize the functioning of an array of identical processing modules working in parallel; Figure 2 diagrammatically illustrates a typical method of deriving a windowed clock signal, according to a common practice; Figure 3 shows the basic architecture of the circuit of the invention; Figure 4 shows the internal scheme of the SHIFT D-Latch block of the block diagram of Fig. 3, according to a preferred embodiment; Figure 5 shows a number of derived clock signals that are produced by digital frequency division, starting from a main clock signal; Figures 6 and 7 diagrammatically illustrate the way a symmetric windowed clock signal can be produced by the circuit of Fig. 3; Figure 8 shows a modified scheme of the circuit of the invention; Figure 9 and 10 diagrammatically illustrate the way an asymmetric windowed clock signal can be produced by the circuit of Fig. 8. An embodiment of the invention is schematically shown in Fig. 3. By way of example only, suppose that a windowed clock signal having eight cycles of activity at the main clock frequency CK followed by eight cycles of inactivity. Starting from a main clock signal CK, the first block 1 (cLocKs GENERATOR) that may contain a plurality of frequency divider circuits, produces a plurality of derived clock signals with binarylly fractional frequencies, namely: CK_2, CK_4, CK_8 and CK_16. Of course, the block 1 may be designed for producing any number of derived signals (depending on the foreseeable requirements). By way of example, for the application considered the derived clocks CK_2 and CK_16 with a halved frequency and with a frequency equivalent to a sixteenth of the main clock signal frequency CK, respectively, are utilized. The derived clock CK_2 may be treated in a phase-shifting block 2 (D-Latch SHIFT), timed by the main clock CK, which, in the illustrated example, outputs the signal CK_2_A, which is shifted by a semiperiod of the CK main clock frequency in respect to the input signal CK_2. The signal CK_2_A and the signal CK_16 are fed to the input of an AND logic circuit 3, which produces at its output a signal CK_2_B equivalent to the logic product of the two input signals. Therefore, this CK_2_B signal defines the intervals or in other words the windows of the clock signal being constructed, in terms of number of semiperiods of the derived clock signal CK_2_A that has the lowest frequency of the two input signals, as illustrated in the diagrams of Fig. 6. The signal CK_2_B has an active phase of four cycles or periods of the derived fractional frequency signal CK_2_A (that is having half the frequency of the clock CK), followed by four inactive cycles or periods thereof. This signal CK_2_B, precursor of the desired windowed clock signal, is fed to the respective inputs of two resynchronization blocks 4 and 5, both timed at main clock (CK) frequency. As shown, the first resynchronization block 4 may be constituted by two D-Latch stages in cascade (x2D-Latch) while the second block 5 may be constituted by a single D-Latch stage (x1 D-Latch). The output pair of signals, namely: CK_2_B and CK_2_C will be perfectly synchronous with the main clock signal CK, while they will be out-of-phase by a semiperiod of the main clock signal CK. This pair of resynchronized out-phased signals by a semiperiod of the main clock frequency, is fed to the inputs of the XOR logic circuit, at the output of which a desired windowed clock having eight active main clock periods followed by eight main clock inactive periods is obtained as diagrammatically shown in Fig. 7. The only nonsynchronous cell of the whole system is the XOR output cell. All the other blocks are synchronous in view of the two stages 4 and 5 that eliminate the delay introduced by the AND circuit. The use of an XOR circuit carefully designed so as to minimize delays, ensure satisfactory characteristics of the output windowed clock, in view of the resynchronization of the signal input to the XOR circuit. The objective of constructing a windowed clock signal without requiring a clock signal having a "double" frequency is fulfilled by the architecture of the invention. Of course it is possible to construct windowed clock signals with active phases of any number of main clock periods by defining the required mask (which in the illustrated example was defined by employing CK_16). This may be achieved, in general terms, by the following, mutually nonexclusive options: a) choosing a certain scale factor (16 in the illustrated example); b) choosing a certain number of main clock semiperiods when mutually phase-shifting the two derived clock signals used, by a first phase-shifting block (D-Latch SHIFT). Such a flexibility of the circuit of the invention may be implemented by realizing the block 2 (D-Latch SHIFT) as shown in Fig. 4. The block 2 may contain an array of D-Latch stages in cascade, the various nodes of which being selectable via a multiplexer MUX, to allow the selection of the desired number of main clock semiperiods by which shifting the output signal CK_2_A in respect to the input signal CK_2. The basic circuit of the invention may be modified for allowing, whenever needed or useful, also the construction of an "asymmetric" windowed clock signal, that is, where the active phase and the inactive phase have a different duration, in terms of number of main clock cycles. The scheme of a circuit realized according to the present invention, having the ability to permit such an increased flexibility of definition of a ratio between the active and inactive phase different from unity, as well as the duration of the respective phases in terms of number of semiperiods of the main clock signal is shown in Fig. 8. Compared to the basic scheme of Fig. 3, the circuit of Fig. 8 comprises an additional network for producing a second input signal to the AND 3 circuit of the basic scheme, having certain characteristics. As shown, this additional network may comprise a second phase-shifting block 7, which can be made up of one or more arrays of D-Latches in cascade, timed by the clock CK or even a different arrangement of D-Latch stages, timed by one of the fractional frequency clock signals derived from the main clock CK in order to produce a shift by a semiperiod of the respective frequency of the derived clock signal used. Of course, the architecture of the block 7 will be optimized in function of the number of the available fractional frequency derived clocks and of other considerations, to ensure the largest number of choices while keeping to a minimum the circuit complexity. In this case, as in the first shift block 2, a multiplexer may be advantageously included for allowing the output of a selected derived clock as required for realizing the desired windowed clock. The network further comprises a two input AND circuit 8. To a first input is applied a signal among those produced by block 7, corresponding to a derived clock signal, shifted by an integer multiple equal to half a period of the main clock signal (CK) or any of the other derived clock signals (CK_2, CK_4, CK_8). To the other input of the AND circuit 8, may be applied a derived signal (CK_16_D) having a semiperiod whose duration corresponds to the duration of the active phase of the windowed clock signal to be constructed, which is essentially less than the semiperiod duration of the other signal applied to the other input of the AND circuit 8. The preferred embodiment of the circuit shown in Fig. 8 also indicates the optional use of a two input XOR gate 9, to which inputs can be applied two fractional frequency derived clock signals, out-of-phase among themselves by a certain number of half periods of a derived clock, of a higher frequency or also of the main clock, in order to increment the range of possible choices in constructing the signal to be applied to the respective input of the AND circuit 8. Fundamentally, the AND circuit 8 outputs an asymmetric derived signal CK_16_F, having a certain duty-cycle that defines the ratio between active and inactive phase of the required windowed clock signal. This auxiliary network may comprise also a synchronization block 10, which can be constituted by a D-Latch stage, timed by the main clock CK. Such a "precursor" asymmetric signal CK_16_E, so resynchronized, is then supplied to the second input of the AND circuit 3 of the basic scheme of the circuit of the invention. Figures 9 to 10 illustrate the construction of an asymmetric windowed clock signal whose active phase has a duration of 4 cycles or periods of the main clock and the same frequency of the latter, and the inactive phase has a duration that corresponds to 12 cycles of the main clock.

Claims: Method of producing a windowed clock signal, from a main clock signal (CK) comprising the steps of generating by a digital frequency division at least a first derived clock signal (CK_2) having a first frequency submultiple by a factor equivalent to an integer multiple n of 2 of the main clock (CK) frequency and a second derived clock signal (CK_16) having a second frequency submultiple by a factor equivalent to an integer multiple m of 2 of the main clock frequency, where m is greater than n; generating a logic product or AND signal (CK_2_B) of said first (CK_2) and second (CK_16) derived clock signals; resynchronizing said logic product signal (CK_2_B) producing a pair of resynchronized signals (CK_2_B, CK_2_C), one of which (CK_2_B) is phase-shifted in respect to the other (CK_2_C) by a half period of the clock signal (CK); generating said windowed clock signal as a logic XOR signal of said pair of resynchronized and phase-shifted signals (CK_2_B, CK_2_C). The method of claim 1, characterized in that said integer number n is equal to one and said windowed clock signal has a frequency, during active phases thereof, identical to the frequency of said clock signal. The method of claim 1, wherein the ratio between the duration of the active and of the inactive phase is different from one and comprises generating a logic product or AND signal of said second derived clock signal (CK_16_C), phase-shifted by an integer number of half periods of the clock signal or of one of said derived clock signals (CK_CK_2, CK_4, CK_8) with a derived signal (CK_16_D) having a semiperiod of duration equal to that of the active phase of the windowed clock signal and essentially larger than the semiperiod of said derived signal (CK_16) to produce an asymmetric clock signal (CK_16_F) having a certain duty-cycle ; resynchronizing said asymmetric clock signal (CK_16_F) with the main clock signal (CK); utilizing said resynchronized asymmetric clock signal (CK_16_E) for generating said logic product signal of (CK_2_B) with said first derived clock signal (CK_2_A). A circuit for generating a windowed clock signal from a main clock signal (CK) comprising a digital frequency divider block (1) capable of producing two or more selectable signals (CK_2, CK_4, ..., CK_16) having frequencies submultiple by an integer multiple of 2 of the main clock frequency, at least a logic AND circuit (3) receiving as input a first fractional frequency clock signal and a second fractional frequency clock signal having a frequency lower than the first signal and outputting a windowed clock signal and resynchronization means, comprising a first phase-shift block (2) timed by said main clock signal (CK), receiving as input a first derived clock signal (CK_2) with a submultiple frequency submultiple in respect to the frequency of said clock and outputting a derived clock signal (CK_2_A), phase-shifted by an integer number of half periods of the main clock signal (CK) and whose output is coupled to a first input of said logic AND circuit (3); at least a second and a third resynchronization blocks (4, 5), made of a different number of D-Latch stages by an odd number, timed by said main clock signal (CK), each having an input coupled in common to the output of said AND circuit (3) and an output; a logic XOR logic circuit (6) having two inputs coupled to the outputs of said resynchronization blocks (4, 5), respectively, and phase-shift and an output on which said windowed clock signal is produced. The circuit of claim 4, characterized in that said first phase-shift block (2) comprises an array of D-Latch stages in cascade, all timed by said clock (CK, CK ), and a multiplexer (MUX) for selecting an output tap of said cascaded stages. The circuit of claim 4, characterized in that said second block of resynchronization (5) is constituted by a single D-Latch stage timed by the clock (CK) and said third resynchronization block (4) is constituted by two D-Latch stages in cascade, both timed by said clock (CK). The circuit of claim 4, characterized in that it comprises an additional network for generating said second derived clock signal to be applied to the input of said logic AND circuit (3), said network comprising a second phase-shift block (7) receiving through as many inputs said clock signal (CK), said fractional frequency derived clock signals and having a plurality of outputs through each of which a derived clock signal, phase-shifted by an integer number of a semiperiod of another input clock signal of said second phase-shift block (7) is selectable; at least a second two input AND circuit (8) receiving a pair of output signals of said second phase-shift block (7) and having an output coupled to the input of a fourth resynchronization block (10) timed by said clock (CK) and having an output on which said second derived clock signal is generated. The circuit according to claim 7, characterized in that it comprises a second XOR circuit (9) having two inputs coupled to two outputs, respectively, of said second phase-shift block (7) and an output coupled to one input of said second AND circuit (8).

Inventors: PAU DANILO, PAU, DANILO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1996
Main classification: H03K5
IPC codes: H03K23, H03K3, H03K19, H03K21, H03K5