The present invention relates generally to data processors, and in particular to synchronizing the timing of a data processor and an external device.
A typical computer system (e.g., a personal computer) includes a microprocessor chip and various external devices such as system logic, memory, controllers (disk, USB, etc.), and other devices. As shown in
The problem is exacerbated if a device external to the computer system operates on a separate clock altogether. For example,
All synchronizer circuits suffer from a meta-stability problem which is a statistical artifact in the behavior of these circuit that result in an error. Moreover, it is not a question of whether the error will occur, but when it will occur; the only uncertainty is how long it will take to occur. Meta-stability arises when the two signal edges being synchronized are sufficiently close to one another that the synchronizer does not have enough gain to respond to the input and consequently becomes stuck in a particular state.
Therefore, there is a need for another solution to this problem.
In accordance with the present invention, data processing circuits in a data processing system can be clocked based on the frequency or data rate of an external data stream. More specifically, a processor clock signal having a frequency that is an integer multiple of the frequency of the data stream is generated. The data processing circuits can be clocked based on this generated processor clock to achieve data processing that is synchronized with the external data stream without the aforementioned problems.
Aspects, advantages and novel features of the present invention will become apparent from the following description of the invention presented in conjunction with the accompanying drawings, wherein:
The data stream can be any form of digital data. For example, the data stream can be an audio data stream or a video data stream. The data stream can be textual data (e.g., ASCII characters), graphical data, and so on. The data stream is characterized by having a data rate. That is, the data is transmitted a rate of some number of bits per unit of time. Conventionally, the unit of measure is bits or bytes per second. Thus, for audio data the data rate might be 44Kbytes per second. Video data streams have different data rates for the different video formats that are available. For example, high definition (HD) digital video runs at a data rate of 1.485 Gbps (Giga-bits per second), while standard definition digital video uses a data rate of 270 Mbps.
The data stream 104 feeds into a clock generation circuit 102. The clock generation circuit 102 is configured to produce a clock signal 106 based on the data rate of the incoming data stream. The clock signal 106 is fed to the digital processor circuit 112 and thus serves to clock the digital processor circuit. Thus, in accordance with the present invention, the data processing circuit is clocked based at least on the data rate of the data stream. This includes integer multiples of the data rate as well as integer sub-multiples of the data rate. For example, if the data rate is m×n bits per second (where m and n are integers), then an “integer sub-multiple” of this data rate would be m bits per second. In the description of the embodiments of the present invention, it is understood that the term “integer multiple” will also include implementations that use “integer sub-multiples”.
The clock signal 106 that is produced is an integer multiple of the frequency (data rate) of the data stream 104. The data processing circuit is thereby clocked at a frequency that is related to the frequency which corresponds to (or is associated with) the data stream 104 by an integer multiple. This eliminates the need for a synchronizing circuit and the resulting errors due to meta-stable behavior of such circuits.
It will be understood that the “frequency” of the data stream and the “data rate” of the data stream can be used interchangeably in the context of the present invention. The frequency and the data rate are related measures of the bit rate in the data stream. For example, a data rate of 8 Mbits per second in an 8-bit data bus would require a clock frequency of 1 MHz.
The de-serializer 304 also produces a clock signal (pclk) 326 that is derived from the data rate of the incoming digital video 322. Thus, the frequency of this video-based clock signal 326 is determined from the data rate of the incoming digital video 322. The video-based clock signal 326 is multiplied by a multiplier block 306 to produce a generated clock signal 328. In accordance with the present invention, the multiplier block 306 is configured to generate a clock signal 328 having a frequency that is an integer multiple of the frequency of the video-based clock signal 326. Alternatively, the multiplier block 306 can be configured to generate a clock signal 328 having a frequency that is an integer sub-multiple of the frequency of the video-based clock signal 326; i.e., the frequency of the generated clock signal 328 is less than the frequency of the video-based clock signal 326 by an integer multiple.
The generated clock signal 328 is used to clock one or more digital processing circuits 308 in the video processing system 300. Thus, in accordance with the present invention, a microprocessor chip in the video processing system could be clocked by the generated clock signal 328. Moreover, all data processing circuits 308 comprising the video processing system 300 can be clocked by the generated clock signal 328. Since the frequency of the generated clock signal 328 is an integral multiple of the frequency of the video data 322, processing of the video data 322 by the data processing circuits which comprise the video processing system 300 will be inherently synchronous with the video data. A significant advantage of the present invention is therefore the elimination of metastable states which could result in missing incoming video data.
The data processing circuit 508b is clocked by a signal that is produced after dividing the generated clock signal 328 by a divider circuit 502, thus dividing the frequency of the generated clock signal. In particular, the divider 502 performs an integer value division to ensure that the resulting lower frequency clock signal being fed into the data processing circuit 508b remains an integer multiple of the video data 322. The divider circuit 502 can be internal to the data processing circuit 508b, though in
The data processing circuit 508c is clocked by a signal that is produced by feeding the generated clock signal 328 into a PLL 504 (which has a divider in the feedback path to raise the frequency). This has the effect of multiplying the frequency of the generated clock signal 328. In particular, the PLL 504 performs an integer value multiplication of the input clock, resulting in a higher frequency clock signal that feeds into the data processing circuit 508c and remains an integer multiple of the video data 322. It can be appreciated of course that the PLL 504 can be an internal component of the data processing circuit 508c. More generally, the PLL functionality can be incorporated in the system in any suitable manner.
The configuration of
In one implementation, the register 604 can simply be jumper settings on a PC board on which components of the video processing system are assembled. When the system boots up, many initialization actions take place. One of them would be to read out the jumper settings of the “register” 604 and programmed into the divider chip 606.
In another implementation, the register 604 can be programmatically set by an application program executing in the video processing system. This would allow an application program to alter the processing speed of the various data processing circuits during operation of the video processing system. In this configuration, suitable reset/re-initialization operations would be performed to properly reset the various devices for subsequent operation at the new clock frequencies. Though not shown in
The present invention is related to the following commonly owned, applications: DIRECT MEMORY ACCESS (DMA) METHOD AND APPARATUS AND DMA FOR VIDEO PROCESSING, filed concurrently herewith (attorney docket no. 021111-001500US); and VECTOR PROCESSOR WITH SPECIAL PURPOSE REGISTERS AND HIGH SPEED MEMORY ACCESS, filed concurrently herewith (attorney docket no. 021111-001300US) all of which are incorporated herein by reference for all purposes.