Near Data Rate Adapters
What is discussed / disclosed are both Synchronous and Asychronous Near Data Rate Adapters for raster based image processing. Briefly, in a Synchronous Near Data Rate Adapter, synchronization and data rate adaption are achieved through the use of doubly buffered input and output row buffers and sub-pixel interpolation. While an Asychronous Near Data Rate Adapter is the digital equivalent of data rate adaption via digital to analog conversion followed by analog to digital conversion - with the DACs and ADCs replaced by binary to unary decoding followed by unary to binary encoding. Conceptually, we can think of the unary coding as a therometer code in which case the Asychronous Near Data Rate Adapter can be analyzed as a thermometer-code to binary front-end followed by a thermometer-code to binary back-end.
Synchronous Near Data Rate Adapter:
Assuming that the nominal row times (horizontal frequency) are the same for both the input and output - as they would be for time base correction [ TBC ] or D1 to 14.32MHz conversion, then the operation of a Synchronous Near Data Rate Adapter might proceed as follows.
- First an input buffer is filled with one row of data.
- The number of samples is counted.
- Then this number, in conjunction with the desired number of output samples, is used to derive the sub-pixel (fractional) address of each output sample relative to the input buffer.
- Then each output pixel can be computed using linear interpolation or some other method such as a one-dimensional cubic convolution (or other approximation of (sin x) / x).
- As each new pixel is calculated it is placed in the output buffer.
- Once a new row is assembled it can be clocked out by the output clock. Meanwhile, a new input buffer is being filled and so on.
- In any event this scheme would use three clocks:
- an input clock,
- a computation clock,
- and an output clock - with no synchronization assumed among the clocks.
- The computation clock would synchronize:
- the unloading of the input buffer,
- the pixel computation,
- and the loading of the output buffer.
The input buffer would be loaded and and the ouput buffer unloaded with their respective clocks. If the assumption about horizontal frequencies does not hold then additional buffering may be necessary.
Asychronous Near Data Rate Adapter:
The Asychronous Near Data Rate Adapter, however, operates in a totally different fashion: it has no row buffers and operates asynchronously and on-the-fly. First, in order to avoid anomalous thermometer-code to binary conversions in the output section (caused by conditions similar to those causing 'sparkle' codes in ADCs), the binary-to-thermometer code conversion should have both synchronous and asynchronous elements. If the TC is one in which the unit equal to the value to be encoded is turned on, as well as all of the units whose value is less than that value, then the possibility of anomalous conversion can be eliminated by allowing a unit to be turned on only if all of the units below it have turned on and to turn off only if all of the units above it have turned off. Interpolation would be accomplished by making the rate at which units are turned on and off proportional to the magnitude of the change in value for each succesive sample. Unfortunately, with current IC technology, an eight-bit converter implemented in this fashion would probably be limited to a full power bandwidth of less than one megahertz.
If the TC is one in which only the unit whose value to be encoded is turned on, then a different strategy can be suggested: a unit to be turned off is only allowed to turn off after the new unit has turned on. If in addition, an up indicator and a down indicator are included, then the thermometer-code to binary section should always be able to avoid anomalous conversions.
The operation of a binary-to-thermometer code of this sort would proceed as follows: at initialization the unit that encodes the value zero would be turned on, all of the other units would be cleared, as well as UP and DOWN; as long as the value to be converted remained equal to zero, then no change would take place; when the first new value is entered the following sequence would occur:
- UP is turned on;
- then the unit equal to the new value is turned on;
- then the zero unit is turned off; and finally,
- UP is turned off;
- or if interpolating and, for example, going from 0 to 255 at 10 MHz:
- UP is turned on; delay 22 ns;
- the unit equal to 63 is turned on; delay 22 ns;
- the unit equal to 127 is turned on; delay 22 ns;
- the unit equal to 191 is turned on; delay 22 ns;
- the unit equal to 255 is turned on; delay 4 ns;
- all units except 255 are turned off; delay 4 ns; and finally,
- UP is turned off;
and so on with each new value. Here, interpolation would be accomplished by turning on intermediate values with their spacing, both in magnitude and time, proportional to the magnitude of the change. Further, the timing of the transitions should be such that, at most, one of the input flops to the thermometer-code to binary section is at hazard.
Another approach would be to use a grey-code counter in lieu of the TC logic, with the counter counting from the current value to the new value. Such a scheme, though, would only be useful at very low data rates (the counter would have to count at a very high multiple of the input data rate). To speed it up one would need to use multiple counters and converters. To interpolate, the counting frequency should be proportional to the magnitude of the change.