This invention relates to circuitry and methods for implementing interpolation, and particularly for correctly ordering samples retrieved from memory for interpolation.
Interpolation is a technique for approximating the value of a curve or waveform between points for which samples of the curve or waveform are available. Application of the technique may require subtracting a higher-index sample value from a lower-index sample value. Because any individual sample may be either the higher-index sample or the lower-index sample value depending on the particular point to be interpolated, in applications where real-time processing speed is important, double storage of all samples may be needed to avoid time-consuming reordering of the samples or negation of a negative difference.
In accordance with embodiments of the present invention, a set of samples is stored only once, and all samples for a particular point to be interpolated may be accessed on the same clock cycle.
The samples are binned into groups according to the degree of the interpolation to be performed. Thus, for linear interpolation, which is the simplest case, the set of samples is stored once but binned into two groups—even samples and odd samples. The point to be interpolated is processed to derive an address into each group to select one sample from each group, as explained in more detail below. The two samples are passed through a circuit, such as a cross-bar switch, which may invert the order of the samples based on an input that also is derived from the point to be interpolated, as described below.
Embodiments of the invention may be extended to higher-order interpolations. Thus, for cubic interpolations, involving four samples, the set of samples is stored once but binned into four groups. If the samples are identified as An, one group would include samples A0, A4, A8, A12, . . . ; a second group would include samples A1, A5, A9, A13, . . . ; a third group would include samples A2, A6, A10, A14, . . . ; and a fourth group would include samples A3, A7, A11, A15, . . . . As in the linear case, the point to be interpolated is processed to derive an address into each group to select one sample from each group, as explained in more detail below. The four samples would be passed through a circuit which may rotate the order of the samples based on an input that also is derived from the point to be interpolated, as described below. In this case, rather than a cross-bar switch, the circuit could be a circular barrel shifter.
It should be apparent from these examples that present invention allows the universe of samples to be stored only once, and allows all samples to be accessed in one clock cycle.
Therefore, in accordance with embodiments of the present invention there is provided interpolation circuitry for interpolating a value based on a first plurality of samples from within a larger second plurality of samples. The interpolation circuitry includes storage for the second plurality of samples, including a plurality of sample memories corresponding in number to the first plurality of samples, wherein samples in the second plurality of samples are distributed uniformly among the plurality of sample memories, so that each pair of adjacent samples in one of the sample memories corresponding to samples in the second plurality of samples is separated by other samples numbering one less than that number. Circuitry that receives an input index corresponding to the value derives a first sample address into a first one of the sample memories by dividing a floor of the index by the number. Respective circuitry for each respective other one of the sample memories derives a respective other sample address from the first sample address based on a remainder of dividing the floor of the index by the number. Shifting circuitry receives as inputs, in a first order, samples selected by the first sample address and each respective other sample address, and outputs the selected samples in a second order under control of a value determined by the remainder.
A method of operating such circuitry, and a method of configuring such circuitry in a programmable integrated circuit device, also are provided.
Further features of the invention, its nature and various advantages will be apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings, in which like reference characters refer to like parts throughout, and in which:
Interpolation has many practical applications. For purposes of illustration only, circuitry and methods for performing interpolation will be described herein in the context of back-projection in digital Synthetic Aperture Radar (or Sonar) systems.
As seen in
However, rk is known only where it has been sampled. For greater resolution, rk can be interpolated in accordance with embodiments of the invention.
As discussed above, to obtain the inputs for data interpolator 205, it is known either to read each input during a separate clock cycle, or to store multiple copies of the radar samples in memory 206 so that multiple copies can be read out during a single clock cycle. The former approach requires additional clock cycles (e.g., twice as many clock cycles in the case of linear interpolation where each point is interpolated from two samples, or four times as many clock cycles in the case of cubic interpolation where each point is interpolated from four samples), while the latter approach requires additional memory (e.g., twice as much memory in the case of linear interpolation where each point is interpolated from two samples, or four times as much memory in the case of cubic interpolation where each point is interpolated from four samples).
It has been proposed to use dual-port memory to overcome these limitations. However, as shown in
Therefore, in accordance with embodiments of this invention, the input samples are stored only once, but divided, as discussed above, into a number of groups reflecting the degree of interpolation. The total amount of memory needed is only the amount needed to store all samples once, although a separate physical memory is required for each group of samples.
Taking the example of linear interpolation,
That interpolation, and a circuit implementation 600 for performing that interpolation, are shown in
To compute the numerator of the slope, the difference between the values f(rk+1) and f(rk) of the two sample points 513, 512 is taken at subtractor 601. The denominator of the slope is a known constant (the interval between samples) that is entered at 602. The horizontal distance from the lower end of the line to the horizontal location of slice 522 is computed by subtracting rk from r at subtractor 603. The two differences 601, 603 and the constant 602 are multiplied by multiplier 604, and that product is added by adder 605 to f(rk) to yield the interpolated result.
Embodiments of this invention are directed to extracting all samples from the sample storage within one clock cycle. In the context of
It will be appreciated that if the desired point to be interpolated falls between two samples, and if the sample numbers are used as addresses into the sample storage, the address 712 into the odd sample memory 702 for one of the two samples surrounding the desired point will be half the index of the lower one of the two samples. Thus, if in
The values output from the two memories 701, 702 are input to crossbar switch 703 and either passed straight through to outputs 713, 723 as f(rk), f(rk+1), respectively, or swapped and outputted as f(rk+1), f(rk), respectively. It will further be appreciated that swapping will be necessary when the output of memory 701 has a higher index than the output of memory 702, which occurs when ‘1’ has been added at adder 711. Thus, the same value REM(└i┘, 2) that is added at adder 711 also controls crossbar switch 703 at 733.
As a numerical example, if i=2.3, then INT(i/2)=INT(1.15)=1. Using 1 as the address into memory 702 selects sample A3. REM(└i┘, 2)=REM(2,2)=0 so the address into memory 701 also is 1, which selects sample A2, and also sets crossbar switch 703 to pass-through mode. So f(rk)=A2 and f(rk+1)=A3.
If i=3.7, then INT(i/2)=INT(1.85)=1. Using 1 as the address into memory 702 again selects sample A3. REM(└i┘/2)=REM(3/2)=1 so the address into memory 701 is 2, which selects sample A4. REM(└i┘, 2)=REM(3,2)=1 also sets crossbar switch 703 to swap mode. So f(rk)=A3 and f(rk+1)=A4.
In other types of interpolations, it may be necessary to extract more than two samples in the same time. For example in a cubic interpolation, four samples would be used—two samples to left of the desired point and two samples to the right of the desired point. As shown in
it=└i┘−1
The circuit 900 for extracting the samples for such an interpolation would be similar to the linear interpolation case. As shown in
The address 914 into sample memory 904 would be INT(i/4). The addresses into the other sample memories 901-903 would be determined by adding m0, m1 or m2, respectively, to INT(i/4) at adders 911, where each of m0, m1 or m2 could be ‘0’ or ‘1’ based on REM(└i┘, 4), according to the following table, which also shows the corresponding values of shift parameter n:
A method 1400 of operating circuitry such as that shown in
Circuitry such as that shown in
As noted above, the interpolation circuitry described herein may be part of any kind of larger circuitry that requires interpolation to operate. One such example is circuitry for the radar application described above. If the interpolation circuitry is formed by configuring an FPGA, that FPGA also may be configured—again by using a suitable configuration tool as described above—to include the larger circuitry (such as radar circuitry).
Thus it is seen that interpolation circuitry, and methods for configuring and operating such circuitry, have been provided.
An FPGA or other PLD 180 configured to include interpolation circuitry according to an implementation of the present invention, whether or not including additional circuitry, may be used in many kinds of electronic devices. One possible use is in an exemplary data processing system 1800 shown in
System 1800 can be used in a wide variety of applications, such as computer networking, data networking, instrumentation, video processing, digital signal processing, Remote Radio Head (RRH), or any other application where the advantage of using programmable or reprogrammable logic is desirable. PLD 180 can be used to perform a variety of different logic functions. For example, PLD 180 can be configured as a processor or controller that works in cooperation with processor 1801. PLD 180 may also be used as an arbiter for arbitrating access to a shared resources in system 1800. In yet another example, PLD 180 can be configured as an interface between processor 1801 and one of the other components in system 1800. It should be noted that system 1800 is only exemplary, and that the true scope and spirit of the invention should be indicated by the following claims.
Various technologies can be used to implement PLDs 180 as described above and incorporating this invention.
It will be understood that the foregoing is only illustrative of the principles of the invention, and that various modifications can be made by those skilled in the art without departing from the scope and spirit of the invention. For example, the various elements of this invention can be provided on a PLD in any desired number and/or arrangement. One skilled in the art will appreciate that the present invention can be practiced by other than the described embodiments, which are presented for purposes of illustration and not of limitation, and the present invention is limited only by the claims that follow.
This claims the benefit of U.S. Provisional Patent Application No. 62/069,025, filed Oct. 27, 2014, which is hereby incorporated by reference herein in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
7453492 | Silverbrook | Nov 2008 | B2 |
8384458 | Huang | Feb 2013 | B1 |
8729943 | Weng | May 2014 | B2 |
20040120437 | Casper | Jun 2004 | A1 |
20110224996 | Wang | Sep 2011 | A1 |
20140176213 | Rylov | Jun 2014 | A1 |
Number | Date | Country | |
---|---|---|---|
62069025 | Oct 2014 | US |