The present application claims priority to and the benefit of the Indian Provisional Patent Application No. 202141036272 entitled “ARBITRARY SAMPLE RATE CONVERSION USING MODULUS ACCUMULATOR” and filed Aug. 11, 2021, which is hereby incorporated by reference in its entirety as if fully set forth below and for all applicable purposes.
The present disclosure generally relates to integrated circuits and, more specifically, to systems, methods, and techniques for performing arbitrary sample rate conversion.
Sample rate conversion is the process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal. If the ratio of the input sampling rate and the output sampling rate is or can be approximated by a fixed rational number L/M, sample rate conversion may be performed by generating an intermediate signal by inserting L−1 zeros between each of the original input samples, low-pass filtering this signal at half of the lower of the two sampling rates, and selecting every M-th sample from the filtered output to obtain rate-converted samples.
To provide a more complete understanding of the present disclosure and features and advantages thereof, reference is made to the following description, taken in conjunction with the accompanying figures, wherein like reference numerals represent like parts, in which:
Overview
The systems, methods and devices of this disclosure each have several innovative embodiments, no single one of which is solely responsible for all of the desirable attributes disclosed herein. Details of one or more implementations of the subject matter described in this specification are set forth in the description below and the accompanying drawing.
Sample rate conversion is becoming an important component in many applications, for example, including but not limited to, digital mixing consoles, digital audio workstations, digital audio and/or video recorders, digital audio broadcast equipment, multimedia systems, computer system, wireless communication systems. For interpolation, the output sample rate is higher than the input sample rate. On the hand, for decimation, the output sample rate is lower than the input sample rate. Sample rate conversion can be implemented using a wide variety of techniques and/or architectures, such as half-band filters, finite impulse response (FIR) filters, polyphase-based filters, and polynomial-based filters.
The present disclosure provides techniques for performing sample rate conversion using polynomial-based filters. In some aspects, a farrow structure may be used to implement the polynomial-based filters. In some aspects, the generation of a delta value used in the farrow structure may be implemented using a modulus accumulator, for example, implemented using digital hardware logics. The delta value may refer to the fractional sampling time interval parameter, which is commonly referred to as u, in the farrow structure. Because a new delta value is to be calculated for each output sample for interpolation or for each input sample for decimation, it may be difficult or impossible to operate the filters and/or the modulus accumulator when the input/output sampling frequencies are high (e.g., in the GHz range). Accordingly, in some aspects, the delta value generation may be performed at a slower clock rate than the input and/or output sampling frequencies and using a parallel architecture. Further, to facilitate the parallel operations, first-in-first-out (FIFO) buffers may be used for transferring data to or from the polynomial-based filters depending on whether the sample rate conversion is for interpolation or decimation.
In one aspect of the present disclosure, a first sample rate converter (SRC) is provided for implementing a rate conversion R, where R is a fractional value greater than 1, and data is input to the first SRC at an input rate Fin and output from the first SRC at an output rate Fout=Fin×R (e.g., for interpolation). The first SRC may include a plurality of filters to process samples received at an input of the first SRC. In some aspects, the plurality of filters may be polynomial-based filters (e.g., farrow filters) and each filter may be associated with a different polynomial order. The first SRC may further include a multiplier-adder block to generate output samples for the first SRC based on respective delta values and outputs of the plurality of filters. Each of the delta values may correspond to a time interval or a time distance (e.g., a fraction of an input sampling time interval) from one of the received input samples.
To enable sample rate conversion for high input/output sample rates (e.g., in the GHz range), the first SRC may operate at a clock rate slower than the input/output sampling rates (e.g., using a clock signal at Fout/N, where N is an integer greater than 1) and may utilize a parallel implementation scheme. For instance, the first SRC may further include a plurality of buffers (e.g., FIFOs) to buffer (or transfer) samples between the plurality of filters and the multiplier-adder block based at least in part on N buffer read pointers. For instance, each buffer of the plurality of buffers may stores output samples of a respective one of the plurality of filters. The stored samples may be read from each buffer based on the N buffer read pointers. To facilitate the parallel implementation, the first SRC may further include resampler control circuitry to generate N delta values of the delta values and the N buffer read pointers in parallel based on R (e.g., within one clock cycle).
To provide an efficient parallel implementation, the resample control circuitry may increment a base accumulation value by N×1/R and generate the N delta values and the N buffer read pointers based on the incremented base accumulation value. The resample control circuitry may apply a modulo operation to the base accumulation value before the incrementing. That is, the base accumulation value is computed using modulus accumulation. Subsequently, the resampler control circuitry may generate the N delta values by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1. In an aspect, the resampler control circuitry may include a base accumulator and N adders coupled to the output of the base accumulator. The base accumulator (e.g., a modulus accumulator) may increment the base accumulation value by N×1/R. Each of the N adders may generate one of the N delta values and an offset for a corresponding buffer read pointer of the N buffer read pointers by adding k×R_int to the incremented base accumulation value, where k varies from 0 to N−1 and R_int corresponds to 1/R represented by a P-bit integer value. In some aspects, an output of an individual adder of the N adders may include a first portion of bits (e.g., lower bits or least-significant-bits (LSBs)) providing a respective one of the N delta values and a second portion of bits (e.g., upper bits or most-significant-bits (MSBs)) providing an offset for a respective one of the N buffer read pointers. In some aspects, the resampler control circuitry may further include N multiplexers (MUXs), each having inputs connected to respective outputs of a first buffer of the plurality of buffers and outputs connected to the multiplier-adder block. The resample control circuitry may further generate a selection signal to each of the N MUXs based on a respective one of the N buffer read pointers.
In another aspect of the present disclosure, a second SRC is provided for implementing a rate conversion R, where R is a fractional value greater than 1, and data is input to the second SRC at an input rate Fin and output from the second SRC at an output rate Fout=Fin/R (e.g., for decimation). The second SRC may include a multiplier block to multiply each input sample received at the second SRC by a respective one of delta values. Each of the delta values may correspond to a time interval (e.g., a fraction of an output sampling time interval) from one of output samples of the second SRC. The second SRC may further include integration and dump circuitry to sum outputs of the multiplier block. The second SRC may further include resampler control circuitry to generate N delta values of the delta values and N buffer write pointers in parallel, where N is an integer greater than 1. For instance, the second SRC may utilize a parallel implementation to facilitate rate conversion for high sampling rates (e.g., in the GHz range) where the second SRC may operate at a clock rate of Fin/N. The second SRC may further include a plurality of filters (e.g., polynomial-based filters) and a plurality of buffers (e.g., FIFOs) to buffer samples between the integration and dump circuitry and the plurality of filters based at least in part on the N buffer write pointers. As will be discussed more fully below, to enable an efficient parallel implementation, the resampler control circuitry of the second SRC (for decimation) may utilize substantially the same mechanisms as the resampler control circuitry of the first SRC (for interpolation), but the buffer pointer calculation may be used for writing samples to the FIFOs instead of reading samples from the FIFOs.
The systems, schemes, and mechanisms described herein advantageously utilize a parallelization scheme to enable hardware implementation of SRCs for high sampling rates (e.g., in the GHz range). Utilizing modulus accumulation to compute the delta values can provide an accurate or precise sample rate conversion. Additionally, the disclosed arrangement of the base accumulator and the N accumulators for calculating the N delta values and N buffer pointers (e.g., N buffer read pointers for interpolation or N buffer write pointers for decimation) can provide an efficient parallel implementation. Further, the disclosed buffer pointer calculation techniques can allow for a reduced number of multiplexers for accessing the buffers (e.g., for reading from the buffers in interpolation or for writing to the buffers in decimation). The disclosed SRCs may be suitable for use in any suitable applications for arbitrary sampling rate conversion (e.g., fractional sample rate conversion). The disclosed SRCs may be suitable for application where the sample rate change R is to be dynamically configured (e.g., programmed via software and/or firmware).
Example FSRC
A sample rate ratio R may be a rational or irrational number. In any case, the sample rate ratio R may be represented as a fraction L/M, where, for an irrational number, L/M may closely match the actual value based on the precision of L and M.
In the example
The SRC 100 may be a part of a rational SRC. A rational SRC may implement a rate conversion “R” with an input rate Fin and an output rate Fout, wherein Fout may be equal to Fin×R. In the SRC 100 the rate conversion R may be expressed as a fraction L/M.
Example FSRC Based on a Polyphase Structure
An SRC function, such as performed by the SRC 100 of
In
A polyphase implementation, such as the SRC 200 shown in
In some embodiments, the exact conversion rate may not be known at a design stage of the rate converter, making it difficult or even impossible to choose the number of sub-filters for a polyphase implementation. Consequently, the number of sub-filters in an implementation such as shown in
When implementing an FSRC with a polyphase structure, the following approach may be followed. Choose number of sub-filters as SL (with SL less than L). This allows generating samples with spacing Tin/SL. The number SL of stages may determine the granularity of the interpolating process. If Tin/SL is sufficiently small so that the successive values of the signal do not change significantly, the value at any location t=n Tin+ΔTin, 0≤Δ≤1, may be determined using the value of the nearest neighbor (zero-order hold interpolation). In this case the output of one of the sub-filters may be used. Additional improvement may be obtained using two-point linear interpolation. In this output of two adjacent sub-filters of polyphase implementation are used.
With this approach for implementing an FSRC with the polyphase structure, deciding the number of sub-filters (SL) can be difficult and the memory usage for saving the coefficients with a higher SL may be high. Moreover, errors may occur in zero-order hold or linear interpolations.
Improved FSRC Implementation
Interpolation filters may be based upon polynomial-based filters, in which the impulse response of the continuous underlying filter is a polynomial. The polynomial may be used to approximate the continuous-time impulse response between the sample points of the input data. Different polynomial coefficients may be used for different sections of the response. FSRC output for the polynomial-based implementation may then be calculated as follows:
y((n+Δ)Tin=Σk=0kΔkΣi=0T−1hk(i)((n−i)Tin)) (1)
wherein K represents the polynomial order, hk(i) represents i-th filter coefficients for the filter associated with k-th polynomial order and T represents taps per filter. As can be seen from equation (1), the Δ parameter may represent a fractional sample time interval. In the present disclosure, the Δ parameter, the μ parameter, and “delta value” may be used interchangeably to refer to a fractional sample time interval (e.g., a fractional input sample time interval for interpolation or a fractional output sample time interval for decimation).
Farrow Structure-Based FSRC
An efficient way of representing polynomial filters is through farrow structures.
As shown in
As can be seen, the arrangement of the filters 502-508 and the multipliers and adders in the multiplier-adder block 510 in
In an example of a direct farrow implementation for interpolation (e.g., as shown in the FSRC 600 of
accum0=0,
μi=accumi=mod(accumi−1+1/R,1), (2)
ovr
i=accum1≤accumi−1, (3)
where μi may represent the delta value for generating the i-th output sample, accumi may represent the modulus accumulation value used for the generation of the delta value μi and may be initialized to 0 for i=0, and ovri may represent the overflow factor associated with the i-th output sample. As will be discussed further, the overflow factor may signal a new sample request.
For interpolation, the input sampling rate is lower than the output sampling rate. When there is an overflow (ovr in equation (3), e.g., ovr equals 1 or true), a new input may be driven to the filter (e.g., the filters 502-508 in
Table 1 shows an example of delta values (or μ) and associated overflow values for at each output sample processing for a rate change R of 4/3. The delta values and overflow values in Table 1 are generated in accordance with equations (2) and (3) discussed above.
In the example of table 1, input samples (received at the input of the FSRC 600) may be fed to filters (e.g., the filters 502-508) and each filter (e.g., H0(Z) to Hk(Z)) output may be multiplied by a power of (2×μ−1) from 0 to k (e.g., (2×μ−1){circumflex over ( )}k), respectively, and then added together as shown in
For simplicity discussion, the followings are described for operations for one of the k polynomial sections, for example, for the section 601 associated with a polynomial order of 2 (e.g., along the path of H2(Z)) shown in
Decimation may be performed using similar techniques (e.g., equations (2)-(3)) discussed above for interpolation. In decimation, the input sampling rate is higher than the output rate. For example, the input rate is Fin and the output rate is Fout, where Fout=Fin/R and R>1. For decimation, the input data may be multiplied by a power of (2×μ−1) from 0 to k (e.g., (2×μ−1){circumflex over ( )}k). When there is no overflow (e.g., ovr equals zero or false), the multiplied data may be integrated (or added). When there is an overflow (e.g., ovr equals 1 or true), the integrated data may be dumped (or output) to a respective filter and the respective integrator may be reset. The resample (output) clock may be used as a gated version of the sample (input) clock and ovr may be used as a gating signal.
As shown in
The integration and dump circuitry 710 may include a plurality of integration and dump sub-circuitries (shown as 712-718 and depicted as InD-0 to InD-k) coupled to respective ones of the plurality of filters 722-728. For each input sample x(n), 2×μ−1 may be multiplied recursively using the multipliers 704 to provide (2×μ−1){circumflex over ( )}k for k varying from 1 to K. In other words, each input sample may be multiplied by (2×μ−1){circumflex over ( )}k for k varying from 1 to K and the multiplied data may be provided to respective integration and dump sub-circuitries 714-718. The integration and dump sub-circuitry 712 (InD-0) coupled to the filter 722 H0(k) associated with the 0-th polynomial order may receive the input sample directly.
At each integration and dump sub-circuitry 712, 714, 716, and 718, when there is no overflow (e.g., ovr equals zero or false), inputs to the respective integration and dump sub-circuitry 712, 714, 716, and 718 may be integrated (or added). For instance, each integration and dump sub-circuitry may have a storage or memory to store an integrated data (e.g., represented by InD-k data). When there is an overflow (e.g., ovr equals 1 or true in equation (3)), the integrated data may be dumped (output) to the respective filter 722, 724, 726, and 728 and the respective integrator may be reset. The filters 722-728 may filter samples output by respective integration and dump sub-circuitries 712-718. The adders 732 may combine the output from each of the of the filters 722-728 to generate rate-converted samples at the output of the FSRC 700.
Table 2 shows an example of delta (or μ) and overflow values at each input sample processing for a rate change R of 4/3. The delta values and overflow values in Table 2 are generated in accordance with equations (2) and (3) discussed above. However, for decimation, μi in equation (2) may represent the delta value for generating the i-th input sample rather than the i-th output sample and ovri may represent the overflow factor may be associated with the i-th input sample (to the filters 712-718). Further, the overflow factor may signal a new sample write request (to the filters 712-718). As can be observed from Table 2 below, the delta values generated from equation (2) may each correspond to a time interval or a time distance (e.g., a fraction of an output sampling time interval, 1/Fout) from one of the output samples.
In the example of table 2, an input sample (received at the input of the FSRC 700) may be multiplied by a power of (2×μ−1) from 0 to k e.g., (2×μ−1){circumflex over ( )}k), and fed to the integration and dump sub-circuitries 712-718 (e.g., InD-0 to InD-k), respectively, as shown in
For simplicity discussion, the followings are described for operations for one of the k polynomial sections, for example, for the section 701 associated with a polynomial order of 2 (e.g., along the path of H2(Z)) shown in
For input sample 2, delta(μ)=0.75 and ovr=0. After multiplication with a power of (2×μ−1), the multiplied data may be fed to a respective InD-k and added to the previous InD-k data (e.g., which may equal to zero due to the reset). Because ovr=0, the InD-k data may not be sent out of InD-k. That is, the InD-k data is retained at the integration and dump sub-circuitry. This means that the data at the input of the respective filters may not change and the filter may not be clocked for that cycle.
For input sample 3, delta(μ)=0.5 and ovr=1. After multiplication with a power of (2×μ−1), the multiplied data may be fed to InD-k and added to the previous InD-k data (sample 2). Because ovr=1, the InD-k data (added data) may be sent to the filter and the InD-k data is reset to zero.
Stated differently, the integration and dump operation at each integration and dump sub-circuitry 712, 714, 716, 718 may include receiving an input (e.g., multiplied data), adding the input to an accumulator (internal or local to the respective integration and dump sub-circuitry) to generate a new integrated value, storing the new integrated value at an internal memory, and outputting the new integrated value and resetting the accumulator (and/or memory) if ovr is true. This process may be continued for all input samples in table 2.
Example Generation of Delta (μ) Values Through Accumulations
In an embodiment, an accumulator-based approach may be used to calculate delta values (μi in equation (2)) and overflow values (ovri in equation (3)) at a higher sampling clock (at a sampling frequency of Fs). That is, the sampling clock may correspond to the output clock (Fout) for interpolation or to the input clock (Fin) for decimation. The following parameters may facilitate the generation of delta values (μ) using the accumulation techniques discussed above with reference to equations (2)-(3):
where R is a rate change value (which may be a fractional value) greater than or equal to 1,
R_int=(floor(M/L*2{circumflex over ( )}Pbits)), where P is the accumulator bit-width (e.g., 48 bits),
R_frac_A=mod(2{circumflex over ( )}Pbits*M,L), where mod is a modulo operation, and
R_frac_B=L.
Thus, 1/R=(R_int+R_frac_A/R_frac_B)/2{circumflex over ( )}Pbits.
The following equations show an example integer (or fixed-point) implementation of intermediate values for generating of delta values (e.g., represented by μi, or Deltai, where i represents an output sample number in the case of interpolation or an input sample number in the case of decimation) using the modules accumulation techniques:
int_accumi=mod (int_accumi−1+R_int,2{circumflex over ( )}Pbits), (4)
mod_valuei=mod (mod_valuei−1+R_frac_A,R_frac_B), (5)
mod_incri=(mod_valuei−1+R_frac_A)≥R_frac_B for R_frac_A>0 or equals “0” for R_frac_A=0, (6)
mod_accumi=mod (mod_accumi−1+mod_incri,2{circumflex over ( )}Pbits). (7)
In one embodiment, a further intermediate value may be computed as follows:
accumi=mod (int_accumi+mod_accumi,2{circumflex over ( )}Pbits), (8)
and delta values may be computed as follows:
Deltai=accumi[Pbits−1:Pbits−D]; D is delta bit-width. (9)
In another embodiment, the intermediate value accumi may be computed as follows:
accumi=mod (accumi−1+R_int+mod_incri−1,2{circumflex over ( )}Pbits), (10)
and the delta values may be computed using equation (9).
Referring to
Referring to
As further shown in
As further shown in
As further shown in
As further shown in
In general, delta (μ) and ovr generation may have the same operations (e.g., computations of equations (4)-(10)) for interpolation and decimation. However, for interpolation, delta values (μ or in modified farrow 2×μ−1) may be used to multiply the filter output (e.g., outputs of the filters 502-508 shown in
To facilitate the discussion for the parallel implementation scheme, the following definitions will be used When the sample rates are very high (e.g., in the MHz range or GHz range), operating the digital logic (e.g., the accumulators 800 and 900 shown in
Example FSRC at Higher Sampling Rates
According to aspects of the present disclosure, for FSRC at a high sample rate, accumulators for generating delta values and overflow values for sample rate conversion may be operated at a slow rate, for example, at a Fs/N frequency, where Fs the sampling clock frequency (which may correspond to the output sampling clock in the case of interpolation or the input sampling clock in the case of decimation) and N may be any integer value greater than 1. In some examples, N may be a power of 2. Accordingly, the FSRC may be operated with “N” parallel samples processed per clock cycle in filters and delta generations. In some instances, N may be referred to as a clock division value.
To facilitate the discussion for the parallel implementation scheme, the following definitions may be used:
Fsh: Higher sampling rate clock, which may correspond to the output resampling rate clock in interpolation or the input sampling rate clock in decimation
Fsl: Lower sampling rate clock, which may correspond to the input sampling rate clock in interpolation or the output resampling rate clock in decimation.
As shown in
As can be seen, the FSRC 1000 of
For each clock cycle, N samples may be processed. As such, the operating clocks are divided by N. Each multiplier (e.g., the multiplier 514) in the multiplier-adder block 510 may perform N multiplications for the N samples read from the FIFO read data in each cycle (e.g., multiplying by a corresponding 2×μ−1). The operating clock can be generated using two options. In a first option, an Fsh/N clock can be generated from Fsh with a divider value N. In a second option, an Fsh/N clock can be generated from Fsh/N1 with a divider value N2, here N1×N2=N. In some examples, it may be desirable to use the second option when Fs is high compared to the speed of the digital cells to reduce the physical implementation (timing) challenges in operating the divider at higher frequencies.
Similarly, Fsl/N generation may be performed using various approaches. For example, a first approach may utilize the Fsh clock to generate ovr in accordance with equation (3) (e.g., as show in
As will be discussed more fully below, the FSRC 1000 may further include resampler control circuitry 1020 to generate delta values (shown by the arrow 1022) and FIFO read and/or write pointers (shown by the arrow 1024) for transferring samples from the filters 502-508 to respective FIFOs 1012-1018. To perform sample rate conversion at high sampling rates, parameters N, X, FIFO_DEPTH may be defined to assist the computation of delta values and determination on how to use the input samples to generate output samples (e.g., via FIFO read pointers and FIFO write pointers).
For a rate change R (>1), N may represent the number of samples processed per operating clock (Fsh/N or Fsl/N), X may represent a sample index varying from 0 to N−1, and FIFO_DEPTH may represent the size of each of the FIFOs 1012-1018 can be dependent on a particular hardware design. As an example, the FIFO_DEPTH can be 4N. To relax the timing requirement between the input and output clocks through FIFO 1012-1018, the FIFO_DEPTH can be an increased integer multiple of N (>4N).
Delta may represent μ (the fractional sample time interval in farrow structures). For the multiplication, 2×μ−1 may be used in a modified farrow structure as discussed above.
To facilitate generation of N delta values and N FIFO read/write pointers in each cycle, a set of parameters including a base accumulation value, an intermediate accumulation, a delta value, a FIFO pointer increment, a FIFO pointer offset, a FIFO base pointer, a FIFO read pointer, and a FIFO write pointer represented by base_accumi, accumi[X], deltai[X], fifo_ptr_incri−1, fifo_ptr_addi[X], fifo_base_ptri, fifo_rd_ptri[X], and fifo_wr_ptri[X], respectively, may be defined as discussed below. For example, base accumulation values may be computed as shown below:
base_accumi=mod (base_accumi−1,1)+N×1/R, (11)
where i may represent the output clock cycle number for the FSRC 1000. The base_accumi may be computed once for every block of N input samples. In an aspect, the resampler control circuitry 1020 may include a modulus accumulator (e.g., the base accumulator 1310 shown in
Intermediate accumulation values may be computed as shown below:
accumi[X]=mod (base_accumi,1)+(X)×1/R. (12)
In equation (12), X=0,1 . . . N−1 and 0<accumi[X]<N+1. In other words, N accumi[X] may be computed for every block of N input samples. In an aspect, to avoid having to multiply X by 1/R in the calculation of accumi[X], the resampler control circuitry 1020 may include N parallel paths coupled to the output of the base accumulator and may include N−1 adders (e.g., the N adders 1320 shown in
Delta values may be computed as shown below:
deltai[X]=mod (accumi[X],1). (13)
In equation (13), X=0,1 . . . N−1. That is, a delta value is calculated for each parallel path (e.g., as shown in
Increments for incrementing a FIFO base pointer may be computed as shown below:
fifo_ptr_incri−1=floor(base_accumi). (14)
That is, fifo_ptr_incri−1 may correspond to the integer part of base_accumi and may be computed once for every block of N input samples.
Offsets for adding to a FIFO base pointer may be computed as shown below:
fifo_ptr_addi[X]=floor(accumi[X]). (15)
In equation (15), the term floor(accumi[X]) may correspond to the integer part of accumi and X=0,1 . . . N−1. Thus, N fifo_ptr_addi may be computed for each block of N input samples. However, in some instances, consecutive fifo_ptr_addi can have the same in these N values, where 0≤fifo_ptr_addi≤N.
The FIFO base pointer may be pointing to a reference or starting FIFO location for a block of N samples in a clock cycle of the Fsh/N clock and may be computed as shown below:
fifo_base_ptri=mod(fifo_base_ptri−1+fifo_ptr_incri−1,FIFO_DEPTH). (16)
The FIFO read pointers may each be pointing to a FIFO location for reading and may be computed as shown below:
fifo_rd_ptri[X]=mod(fifo_base_ptri+fifo_ptr_addi[X],FIFO DEPTH). (17)
In equations (16) and (17), X=0,1 . . . N−1. Thus, N fifo_base_ptri and fifo_rd_ptri[X] may be computed for every block of N input samples.
The computation of the parameters base_accumi, accumi[X], deltai[X], fifo_ptr_incri−1, fifo_ptr_addi[X], fifo_base_ptri, and fifo_rd_ptri[X] discussed above in equations (11)-(17) may be performed at Fsh/N clock.
On the other hand, the computation of FIFO write pointers (e.g., fifo_wr_ptr) may be performed at Fsl/N clock, for example, as shown below:
wrptri=mod(wrptri−1+1,FIFO_DEPTH/N). (18)
A FIFO write pointer, represented by fifo_wr_ptri[X], may each be pointed to a FIFO location for writing and can be computed as shown below in equation (19) or (2):
fifo_wr_ptri[X]=mod(fifo_wr_ptri−1[N−1]+1+X,FIFO_DEPTH). (19)
fifo_wr_ptri[X]=wrptri×N+X. (20)
In interpolation, write to the FIFO is preferably N sample in Fsl/N clock domain. Based on R and the specific time, by using the single FIFO sample, multiple consecutive output samples may be generated with different delta values.
To generate values shown in the table 1100 of
Referring to the table 1100, in input cycle 1, wrptr=0 (fifo_wr_ptr[0]=0), fifo_wr_ptr[0 to 3]=0 to 3, so 4 input samples are written into FIFO location 0 to 3. In input cycle 2, wrptr=1 and fifo_wr_ptr[0 to 3]=4 to 7, 4 input samples of this cycle are written into FIFO location 4 to 7. In input cycle 3, wrptr=2, so 4 input samples of this cycles are written into FIFO location 8 to 11. In input cycle 4, wrptr=3, so 4 input samples of this cycles are written into FIFO location 12 to 15. In input cycle 5, wrptr=0, so 4 input samples of this cycles are written into FIFO location 0 to 3. The last three columns (columns 1122, 1124, and 1126) of table 1100 indicate the FIFO writing information.
The following value for 1/R may be used: 1/R=5/6=0.8333.
In output clock cycle 1 (i=1), output samples 1 to 4:
In output clock cycle 2, i=2, output samples 5 to 8:
In output clock cycle 3, i=3, output samples 9 to 12:
In output clock cycle 4, i=4, output samples 13 to 16:
In output clock cycle 5, i=5, output samples 17 to 20: the delta and FIFO read locations may be calculated as above. Here, four output samples are generated by using the data from FIFO locations 13,14,15,15 with corresponding delta(μ)=0.333 . . . , 0.1666 . . . , 0, 0.8333 . . . .
In output clock cycle 6, i=6, output samples 21 to 24: the delta and FIFO read locations may be calculated as above. Here, four output samples are generated by using the data from FIFO locations 0,1,2,3 with corresponding delta(μ)=0.666 . . . , 0.5, 0.333 . . . , 0.1666 . . . .
In an example digital design with bit precision, the above equations (11)-(17) may be modified as follows, for example, to facilitate integer or fixed-point computations:
Nb=log2(N);Bits to represent 0 to N−1, (21)
T=Nb+Pbits, (22)
int_accumi=mod (int_accumi−1[Pbits−1:0]+N×R_int,2{circumflex over ( )}(T+1));T+1 bits, (23)
mod_incri=(mod_valuei−1+R_frac_A)R_frac_B For R_frac_A>0, or “0” for R_frac_A=0, and (24)
mod_accumi=mod (mod_accumi−1+N×mod_incri,2{circumflex over ( )}Pbits). (25)
The base accumulation values can be computed as shown in equation (26) or (27):
base_accumi=mod (int_accumi+mod_accumi,2{circumflex over ( )}(T+1)), (26)
base_accumi=mod (base_accumi−1[Pbits−1:0]+N×(R_int+mod_incri−1),2{circumflex over ( )}(T+1)) (27)
The base_accumi may be used to generate N delta values and N FIFO pointers.
The intermediate accumulation values can be computed as shown below:
accumi[0]=base_accumi[Pbits−1:0]; //accumi is N×T, (28)
accumi[1]=base_accumi[Pbits−1:0]+R_int, (29)
accumi[2]=base_accumi[Pbits−1:0]+2×R_int, and (30)
accumi[N−1]=base_accumi[Pbits−1:0]+(N−1)×R_int. (31)
Accordingly, accumi may generally be computed as shown below:
accumi[X]=base_accumi[Pbits−1:0]+(X)×R_int, for X=0,1 . . . N−1. (32)
The delta values can be computed as shown below:
deltai[X]=accumi[X][Pbits−1: Pbits−D]. (33)
The FIFO pointer increment can be computed as shown below:
fifo_ptr_incri−1=base_accumi[T: Pbits], (34)
where fifo_ptr_incri−1 may have a length of Nb+1 bits and may be used to increment the fifo_base_ptr for the next clock cycle.
The FIFO pointer add can be computed as shown below:
fifo_ptr_addi[X]=accumi[X][T−1: Pbits], (35)
where X=0,1 . . . N−1.
The equations (21)-(35) shown above for implementation in a digital hardware design may be operated off of the ungated Fs/N clock.
As shown in
As an example, P may be 48, T may be 4 (e.g., for N=4 and a FIFO having a size of 4N), and the delta values may be represented by 16 bits. In this example, the base accumulation value (e.g., base_accum) output by the base accumulator 1310 may have a bit-width of 52 bits. The MSB 4 bits of the base accumulation value may be output as the fifo_ptr_incr. At the output of each of the adder 1320, a fifo_ptr_add value may be provided by bits[50:48] of the adder 1320 and a corresponding delta value may be provided by bits[47:32] of the adder 1320.
The FIFO read pointer may be calculated as shown below:
fifo_base_ptri=fifo_base_ptri−1+fifo_ptr_incri−1, (36)
fifo_rd_ptri[X]=mod(fifo_base_ptri+fifo_ptr_addi[X],FIFO DEPTH). (37)
Using equations (36)-(37) with X varying from 0 to N−1, N FIFO read pointers may be generated for reading from the FIFO (e.g., the FIFOs 1012-1018).
As can be seen in the
As further shown, the scheme 1400 may operate on N input samples input at a rate of the gated Fs/N clock. The N input samples may correspond to samples output by the filters 502-508. The MUXs 1420 may provide N output samples (as selected by the MUX 1420) at a rate of the ungated Fs/N clock. Some consecutive samples of the N input samples may correspond to the same sample (filtered sample) depending on R and the particular time instances while the N output samples may be N unique samples.
Accordingly, in some aspects, the resampler control circuitry 1020 may operate based on a clock signal divided from Fout based on N, and generate N delta values and N FIFO read pointers in parallel (e.g., as shown in
In both the scheme 1400 of
As shown in
As can be seen, the FSRC of
As further shown in
To facilitate generation of N delta values and N FIFO read/write pointers in each cycle for decimation, a set of parameters including a base accumulation value, an intermediate accumulation, a delta value, a FIFO pointer increment, a FIFO pointer offset, a FIFO write base pointer, a FIFO read pointer, and a FIFO write pointer represented by base_accumi, accumi[X], deltai[X], fifo_ptr_incri−1, fifo_ptr_addi[X], fifo_wrt_base_ptri, fifo_rd_ptr i[X], and fifo_wr_ptri[X], respectively. The values for base_accumi, accumi[X], deltai[X], fifo_ptr_incri−1, fifo_ptr_addi[X] may be computed by the resample control circuitry 1620 using equations (21)-(35).
The FIFO write base pointer may be computed as shown below:
fifo_wr_base_ptri=mod(fifo_wr_base_ptri−1+fifo_ptr_incri−1,FIFO DEPTH). (38)
The FIFO pointer add (e.g., offset) can be computed as shown below:
fifo_ptr_addi[X]=accumi[X][T−1: Pbits], for X=0,1 . . . N−2. (39)
An integration and dump flag value, InDi[X], may be computed as shown below:
In an aspect, InDi[X] may correspond to an inverted overflow value.
An individual integration and dump sub-circuitry (e.g., one of the integration and dump sub-circuitries 712-718) may compute the following:
InD_datai[X]=InD_datai[X−1]×InDi[X−1]+input_data_indi[X] for X=1,2 . . . N−1, (41)
InD_datai[0]=InD_datai−11[N−1]×InDi−1[N−1]+input_data_indi[0]. (42)
where input_data_indi may be data input to the respective individual integration and dump sub-circuitry. Accordingly, in some aspects, the integration and dump circuitry 710 (or more specifically an individual integration and dump sub-circuitry 712, 714, 716, or 718) may sum the outputs of the multiplier block by multiplying a first output (e.g., InD_datai[X−1]) of the outputs of the multiplier block by a value (e.g., InDi[X−1]) that is based on a comparison between two successive FIFO write pointers of the N FIFO write pointers to produce a product value and summing a second output (e.g., input_data_indi[X]) of the outputs of the multiplier block 702.
The following shows an example pseudo-code for writing integration data (output by one of the integration and dump sub-circuitries 712-718) to a respective FIFO (e.g., one of the FIFOs 1012-1018) based on (decoded from) fifo_ptr_add[N−1:0]:
In the above pseudo-code, X may represent the sample number within a block of N samples (or clock cycle i), input_ptri[X] may represent the location or index of the integration data buffer (e.g., InD_data) in which the stored integration data is to be written to the FIFO for the X-th sample in the block of N samples (or clock cycle i), and findi[X] may be indicative of whether a value is generated for the X-th sample. For instance, when there is an insufficient number of samples (e.g., N samples) to be written to the FIFO in the clock cycle i (meaning that not all input_ptr values can be generated), findi[X] is used to facilitate the filling of the remaining input_ptrs (that cannot not generated) as will be shown in an example below.
The data to be written to the FIFO may be as shown below:
data_to_fifoi[X]=InD_datai[input_ptri[X]]. (43)
The fifo_ptr_incri value may represent the number of samples that may be written to the FIFO for each Fs/N ungated clock, starting from an address indicated by fifo_wr_base_ptri and the data to be written to the FIFO may correspond to the bottom fifo_ptr_incri samples from data_to_fifoi.
In an example, N=9. Assuming fifo_wr_base_ptri=10, fifo_ptr_addi[0:7]={0,0,1,2,3,3,4,5}, fifo_ptr_incri=6, and InDi−1[7]=1. Then, InDi−1[7]=1 may indicate that the integrated data, InD_datai−11[N−1], is written to the FIFO in a previous cycle (e.g., the (i−1)-th cycle). The fifo_ptr_incri=6 may indicate that in the present cycle, 6 samples may be written to the FIFO.
Further, as per equation (40), InDi[0:7]={0,1,1,1,0,1,1,1}.
As per equations (41) and (42), InD_datai[0:7]={input_data_indi[0], input_data_indi[0]+input_data_indi[1], input_data_indi[2], input_data_indi[3], input_data_indi[4], input_data_indi[4]+input_data_indi[5], input_data_indi[6], input_data_indi[7]}.
Based on the for loop in the pseudo-code above, findi[0:7]={1,1,1,1,1,1,0,0} and input_ptri[0:7]={1,2,3,5,6,7,7,7}. Here, findi[0:7] indicates that there is a value generated for each of the first six locations but not the last two locations. Accordingly, the last two locations of the input_ptr (e.g., input_ptri[6:7]) are filled with the value 7.
As per equation (43), data_to_fifoi[0:7]={InD_datai[1], InD_datai[2], InD_datai[3], InD_datai[5], InD_datai[6], InD_datai[7], InD_datai[7], InD_datai[7]}.
As fifo_ptr_incri=6, only the data_to_fifoi[0:5] may be written to the FIFO starting from fifo_wr_base_ptri+0 to fifo_wr_base_ptri+(6-1) locations.
As shown in
As further shown, the scheme 1700 may further include N MUXs 1720. The current integrated value 1710 output by the accumulator 1708 may be an input to each of the N MUXs 1720. Each of the N MUXs 1720 may select one of the N inputs each from one of the accumulator and AND gate arrangement (e.g., integration and dump sub-circuitry 1706). The selection line to each of the N MUXs 1720 may be one of N input_ptr[X], where X varies from 0 to N−1, for example, computed as discussed above with reference to the pseudo-code.
As further shown, the scheme 1700 may include a FIFO 1730 (e.g., corresponding to a FIFO 1612, 1614, 1616, or 1618 in the FSRC 1600 of
As further shown, the scheme 1700 may include a filter 1740 (e.g., corresponding to a filter 722, 724, 726, or 728 in the FSRC 1600 of
In some aspects, the resampler control circuitry 1620 may implement part of the scheme 1700, for example, including the N MUXs 1720 coupled to N integration and dump sub-circuitries (e.g., the integration and dump sub-circuitry 1706) and generating a selection signal 1722 for each MUX 1720.
In some aspects, for a given rate change, by programming different a reset value for the accumulator (e.g., the base accumulation value, base_accum0, discussed above) used for calculating the delta values, a different fractional delay may be achieved. The following may apply for rate change:
For interpolation: Max delay (range)=FSRC input sample delay
In a 1× mode (meaning that there is no sample rate change, by using the same hardware, a fractional delay may be achieved by fixing the delta (μ) value to the required fractional delay, step size (precision)=sample_delay/(2{circumflex over ( )}delta_bit_width). Delta generation may be ignored in 1× mode, but all other modules may be reused.
Accordingly, in some aspects, the resample control circuitry 1020 in the FSRC 1000 of
The method 2000 may perform a sample rate conversion R with an input rate Fin and output rate Fout=Fin×R, where R is a fraction greater than 1. For example, at 2002, input samples may be received at the input rate Fin.
At 2004, the received input samples may be processed by a plurality of filters. The filters may be polynomial-based filters, for example, corresponding to the filters 502-508.
At 2006, the outputs samples of a first filter of the plurality of filters may be stored in a FIFO buffer, for example, correspond to the FIFO 1012, 1014, 1016, or 1018.
At 2008, the stored samples may be read from the FIFO buffer according to N FIFO read pointers.
At 2010, rate-converted output samples may be generated at the output rate Fout based on the read samples and respective delta values, where each of the delta values (e.g., deltai[X] or μ[X] where X may vary from 0 to N−1) corresponds to a time interval from one of the receive input samples.
At 2012, N delta values of the delta values and the N FIFO read pointers may be generated in parallel (or simultaneously) based on R, where N is an integer greater than 1. In an aspect, the parallel generation of the delta values and the N FIFO read pointers may utilize mechanisms discussed above with reference to
In some aspects, the N delta values and the N FIFO read pointers is based on a clock signal divided from Fout based on N, and the N delta values and the N buffer read pointers are generated in parallel within one clock cycle of the clock signal. In some aspects, as part of generating the N delta values and the N FIFO read pointers, a base accumulation value may be incremented by N×1/R and the N delta values and the N buffer read pointers may be generated based on the incremented base accumulation value. In some aspects, as part of generating the N delta values and the N FIFO read pointers, a modulo operation may be applied to the base accumulation value before the incrementing. In some aspects, as part of generating the N delta values and the N FIFO read pointers, the N delta values may be generated by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
The method 2100 may performing a sample rate conversion R with an input rate Fin and output rate Fout=Fin/R, where R is a fraction greater than 1. For example, at 2102, input samples may be received at the input rate Fin.
At 2104, the received input samples may be multiplied, using a multiplier block (e.g., the multiplier block 702), by respective delta values (e.g., deltai[X] or μ[X]). Each of the delta values corresponds to a time interval from a sample time of one of output samples at the output rate Fout.
At 2106, outputs of the multiplier block may be integrated in groups, where each of the groups is associated with a respective one of a plurality of filters (e.g., the filters 722-728).
At 2108, N delta values of the delta values and N FIFO write pointers may be generated in parallel based on R, where N is an integer greater than 1. In an aspect, the parallel generation of the delta values and the N FIFO read pointers may utilize mechanisms discussed above with reference to
At 2110, integrated samples associated with each filter of the plurality of filters may be stored at a respective one of a plurality of FIFO buffers according to the N FIFO write pointers.
At 2112, the stored samples from the FIFO buffers may be output o to respective filters of the plurality of filters.
In some aspects, the N delta values and the N FIFO write pointers may be generated based on a clock signal divided from Fin based on N, where the N delta values and the N FIFO write pointers may be generated in parallel within one clock cycle of the clock signal. In some aspects, a number of the outputs for the integrating is based on an overflow factor dependent on R. In some aspects, as part of the integrating, a first output of the outputs of the multiplier block may be multiplied by a value based on a comparison between two successive FIFO write pointers of the N FIFO write pointers to produce a product value and the product value may be summed with a second output of the outputs of the multiplier block. In some aspects, as part of generating the N delta values and the N FIFO write pointers, a base accumulation value may be incremented by N×1/R and the N delta values and the N FIFO write pointers may be generated based on the incremented base accumulation value. In some aspects, as part of generating the N delta values and the N FIFO write pointers, a modulo operation may be applied to the base accumulation value before the incrementing. In some aspects, as part of generating the N delta values and the N FIFO write pointers, the N delta values may be generated by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
Example 1 includes a sample rate converter (SRC) for implementing a rate conversion R, where the SRC receives input samples at an input rate Fin and outputs samples at an output rate Fout=Fin×R, and where R is a fractional value greater than 1, the SRC including a plurality of filters to process the received input samples; a multiplier and adder block to generate the output samples for the SRC based on respective delta values and outputs of the plurality of filters, where each of the delta values is associated with a time interval (e.g., a fraction of an input sampling time interval) from one of the received input samples; and a plurality of buffers to buffer samples between the plurality of filters and the multiplier and adder block based at least in part on N buffer read pointers, where N is an integer greater than 1; and resampler control circuitry to generate N delta values of the delta values and the N buffer read pointers in parallel based on R.
In Example 2, the SRC of Example 1 can optionally include where each one of the plurality of filters is associated with a different polynomial order.
In Example 3, the SRC of any one of Examples 1-2 can optionally include where the multiplier and adder block includes multipliers and adders arranged based on a polynomial-based filter structure.
In Example 4, the SRC any one of Examples 1-3 can optionally include where each buffer of the plurality of buffers stores output samples of a respective one of the plurality of filters, and where the stored samples are read from each buffer based on the N buffer read pointers.
In Example 5, the SRC of any one of Examples 1˜4 can optionally include where the resampler control circuitry further includes N multiplexers (MUXs), each of the N MUXs having inputs connected to respective outputs of a first buffer of the plurality of buffers and outputs connected to the multiplier-adder block; and the resampler control circuitry further generates a selection signal to each of the N MUXs based on a respective one of the N buffer read pointers.
In Example 6, the SRC of any one of Examples 1-5 can optionally include where the resampler control circuitry operates based on a clock signal divided from Fout based on N, and where the N delta values and the N buffer read pointers are generated in parallel within one clock cycle of the clock signal.
In Example 7, the SRC any one of Examples 1-6 can optionally include where the resampler control circuitry increments a base accumulation value by N×1/R and generates the N delta values and the N buffer read pointers based on the incremented base accumulation value.
In Example 8, the SRC any one of Examples 1-7 can optionally include where the resampler control circuitry applies a modulo operation to the base accumulation value before the incrementing.
In Example 9, the SRC of any one of Examples 1-8 can optionally include where the resampler control circuitry generates the N delta values by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
In Example 10, the SRC of any one of Examples 1-9 can optionally include where the resampler control circuitry includes a base accumulator to increment a base accumulation value by N×1/R; and N adders each generating one of the N delta values and an offset for a corresponding buffer read pointer of the N buffer read pointers by adding k×R_int to the incremented base accumulation value, where k varies from 0 to N−1 and R_int corresponds to 1/R represented as a P-bit integer value.
In Example 11, the SRC of any one of Examples 1-10 can optionally include where an output of a first adder of the N adders includes a first bit portion corresponding to a respective one of the N delta values; and a second bit portion corresponding to an offset for a respective one of the N buffer read pointers.
In Example 12, the SRC of any one of Examples 1-11 can optionally include where the base accumulation value is initialized according to a predetermined fractional delay.
Example 13 includes a sample rate converter (SRC) for implementing a rate conversion R, where the SRC receives input samples at an input rate Fin and outputs samples at an output rate Fout=Fin/R, and where R is a fractional value greater than 1, the SRC including a multiplier block to multiply each of the received input samples by a respective one of delta values, where each of the delta values is associated with a time interval (e.g., a fraction of an output sampling time interval) from a sample time of one of the SRC output samples; integration and dump circuitry to sum outputs of the multiplier block; and resampler control circuitry to generate N delta values of the delta values and N buffer write pointers in parallel, where N is an integer greater than 1; a plurality of filters; and a plurality of buffers to buffer samples between the integration and dump circuitry and the plurality of filters based at least in part on the N buffer write pointers.
In Example 14, the SRC of Example 13 can optionally include where each one of the plurality of filters is associated with a different polynomial order.
In Example 15, the SRC of any one of Examples 13-14 can optionally include where a number of the outputs for the summing at the integration and dump circuitry is based on an overflow factor dependent on R.
In Example 16, the SRC of any one of Examples 13-15 can optionally include where the integration and dump circuitry includes a plurality of integration and dump sub-circuitries each coupled to a respective filter of the plurality of filters to generate a sample for input to the respective filter based on a sum of a first output and a second output of the outputs of the multiplier block.
In Example 17, the SRC of any one of Examples 13-16 can optionally include where the integration and dump circuitry sums the outputs of the multiplier block by multiplying a first output of the outputs of the multiplier block by a value based on a comparison between two successive buffer write pointers of the N buffer write pointers to produce a product value and summing a second output of the outputs of the multiplier block.
In Example 18, the SRC of any one of Examples 13-17 can optionally include where output samples of the integration and dump circuitry for each of the plurality of filters are stored at a respective one of the plurality of buffers based on the N buffer write pointers, and where the stored samples are read from each buffer for processing by a respective filter of the plurality of filters.
In Example 19, the SRC of any one of Examples 13-18 can optionally include where the resampler control circuitry further includes N multiplexers (MUXs), each of the N MUXs having inputs connected to the integration and dump circuitry and outputs connected to respective inputs of a first buffer of the plurality of buffers; and the resampler control circuitry further generates a selection signal to each of the N MUXs based on a respective one of the N buffer write pointers.
In Example 20, the SRC of any one of Examples 13-19 can optionally include where the resampler control circuitry operates based on a clock signal divided from Fin based on N, and where the N delta values and the N buffer write pointers are generated in parallel within one clock cycle of the clock signal.
In Example 21, the SRC of any one of Examples 13-20 can optionally include where the resampler control circuitry increments a base accumulation value by N×1/R and generates the N delta values and the N buffer write pointers based on the incremented base accumulation value.
In Example 22, the SRC of any one of Examples 13-21 can optionally include where the resampler control circuitry applies a modulo operation to the base accumulation value before the incrementing.
In Example 23, the SRC of any one of Examples 13-22 can optionally include where the resampler control circuitry generates the N delta values by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
In Example 24, the SRC of any one of Examples 13-23 can optionally include where the resampler control circuitry includes a base accumulator to increment a base accumulation value by N×1/R; and N accumulators each generating one of the N delta values and an offset for a corresponding buffer write pointer of the N buffer write pointers by adding k×R_int to the incremented base accumulation value, where k varies from 0 to N−1 and R_int corresponds to 1/R represented as a P-bit integer value.
In Example 25, the SRC of any one of Examples 13-24 can optionally include where the base accumulation value is initialized according to a predetermined fractional delay.
Example 26 includes a method for performing a sample rate conversion R with an input rate Fin and output rate Fout=Fin×R, where R is a fraction greater than 1, the method including receiving input samples at the input rate Fin; processing the received input samples by a plurality of filters; storing outputs samples of a first filter of the plurality of filters in a first-out (FIFO) buffer; reading the stored samples from the FIFO buffer according to N FIFO read pointers; generating rate-converted output samples at the output rate Fout based on the read samples and respective delta values, where each of the delta values corresponds to a time interval from one of the received input samples; and generating, in parallel, N delta values of the delta values and the N FIFO read pointers based on R, where N is an integer greater than 1.
In Example 27, the method of Example 26, where the generating the N delta values and the N FIFO read pointers is based on a clock signal divided from Fout based on N, and where the N delta values and the N buffer read pointers are generated in parallel within one clock cycle of the clock signal.
In Example 28, the method of any one of Examples 26-27 can optionally include where the generating the N delta values and the N FIFO read pointers includes incrementing a base accumulation value by N×1/R; and generating the N delta values and the N buffer read pointers based on the incremented base accumulation value.
In Example 29, the method of any one of Examples 26-28 can optionally include where the generating the N delta values and the N FIFO read pointers further includes applying a modulo operation to the base accumulation value before the incrementing.
In Example 30, the method of any one of Examples 26-29 can optionally include where the generating the N delta values and the N FIFO read pointers further includes generating the N delta values by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
Example 31 includes a method for performing a sample rate conversion R with an input rate Fin and output rate Fout=Fin/R, where R is a fraction greater than 1, the method including receiving input samples at the input rate Fin; multiplying, using a multiplier block, the received input samples by respective delta values, where each of the delta values corresponds to a time interval from a sample time of one of output samples at the output rate Fout; integrating outputs of the multiplier block in groups, where each of the groups is associated with a respective one of a plurality of filters; generating, in parallel, N delta values of the delta values and N first-in-first-out (FIFO) write pointers based on R, where N is an integer greater than 1; storing integrated samples associated with each filter of the plurality of filters to a respective one of a plurality of FIFO buffers according to the N FIFO write pointers; and outputting the stored samples from the FIFO buffers to respective filters of the plurality of filters.
In Example 32, the method of Example 31 can optionally include where the generating the N delta values and the N FIFO write pointers is based on a clock signal divided from Fin based on N, and where the N delta values and the N FIFO write pointers are generated in parallel within one clock cycle of the clock signal.
In Example 33, the method of any one of Examples 31-32 can optionally include where a number of the outputs for the integrating is based on an overflow factor dependent on R.
In Example 34, the method of any one of Examples 31-33 can optionally include where the integrating further includes multiplying a first output of the outputs of the multiplier block by a value based on a comparison between two successive FIFO write pointers of the N FIFO write pointers to produce a product value; and summing a second output of the outputs of the multiplier block.
In Example 35, the method of any one of Examples 31-34 can optionally include where the generating the N delta values and the N FIFO write pointers includes incrementing a base accumulation value by N×1/R; and generating the N delta values and the N FIFO write pointers based on the incremented base accumulation value.
In Example 36, the method of any one of Examples 31-35 can optionally include where the generating the N delta values and the N FIFO write pointers further includes applying a modulo operation to the base accumulation value before the incrementing.
In Example 37, the method of any one of Examples 31-36 can optionally include where the generating the N delta values and the N FIFO write pointers further includes: generating the N delta values by adding k×1/R to the incremented base accumulation value, where k varies from 0 to N−1.
Variations and Implementations
While embodiments of the present disclosure were described above with references to exemplary implementations as shown in
In certain contexts, the features discussed herein can be applicable to automotive systems, safety-critical industrial applications, medical systems, scientific instrumentation, wireless and wired communications, radio, radar, industrial process control, audio and video equipment, current sensing, instrumentation (which can be highly precise), and other digital-processing-based systems.
In the discussions of the embodiments above, components of a system, such as filters, integration and dump circuitry, adders, multipliers, FIFOs, and/or other components can readily be replaced, substituted, or otherwise modified in order to accommodate particular circuitry needs. Moreover, it should be noted that the use of complementary electronic devices, hardware, software, etc., offer an equally viable option for implementing the teachings of the present disclosure related to arbitrary/fractional sample rate conversion, in various communication systems.
Parts of various systems for implementing arbitrary/fractional sample rate conversion as proposed herein can include electronic circuitry to perform the functions described herein. In some cases, one or more parts of the system can be provided by a processor specially configured for carrying out the functions described herein. For instance, the processor may include one or more application specific components, or may include programmable logic gates which are configured to carry out the functions describe herein. The circuitry can operate in analog domain, digital domain, or in a mixed-signal domain. In some instances, the processor may be configured to carrying out the functions described herein by executing one or more instructions stored on a non-transitory computer-readable storage medium.
In one example embodiment, any number of electrical circuits of the present figures may be implemented on a board of an associated electronic device. The board can be a general circuit board that can hold various components of the internal electronic system of the electronic device and, further, provide connectors for other peripherals. More specifically, the board can provide the electrical connections by which the other components of the system can communicate electrically. Any suitable processors (inclusive of DSPs, microprocessors, supporting chipsets, etc.), computer-readable non-transitory memory elements, etc. can be suitably coupled to the board based on particular configuration needs, processing demands, computer designs, etc. Other components such as external storage, additional sensors, controllers for audio/video display, and peripheral devices may be attached to the board as plug-in cards, via cables, or integrated into the board itself. In various embodiments, the functionalities described herein may be implemented in emulation form as software or firmware running within one or more configurable (e.g., programmable) elements arranged in a structure that supports these functions. The software or firmware providing the emulation may be provided on non-transitory computer-readable storage medium comprising instructions to allow a processor to carry out those functionalities.
In another example embodiment, the electrical circuits of the present figures may be implemented as stand-alone modules (e.g., a device with associated components and circuitry configured to perform a specific application or function) or implemented as plug-in modules into application specific hardware of electronic devices. Note that particular embodiments of the present disclosure may be readily included in a system on chip (SOC) package, either in part, or in whole. An SOC represents an IC that integrates components of a computer or other electronic system into a single chip. It may contain digital, analog, mixed-signal, and often RF functions: all of which may be provided on a single chip substrate. Other embodiments may include a multi-chip-module (MCM), with a plurality of separate ICs located within a single electronic package and configured to interact closely with each other through the electronic package.
It is also imperative to note that all of the specifications, dimensions, and relationships outlined herein (e.g., the number of components in the FSRCs 500, 600, 700, 1000, and 1600 shown in
Note that with the numerous examples provided herein, interaction may be described in terms of two, three, four, or more electrical components. However, this has been done for purposes of clarity and example only. It should be appreciated that the system can be consolidated in any suitable manner. Along similar design alternatives, any of the illustrated components, modules, and elements of the FIGURES may be combined in various possible configurations, all of which are clearly within the broad scope of this Specification. In certain cases, it may be easier to describe one or more of the functionalities of a given set of flows by only referencing a limited number of electrical elements. It should be appreciated that the electrical circuits of the FIGURES and its teachings are readily scalable and can accommodate a large number of components, as well as more complicated/sophisticated arrangements and configurations. Accordingly, the examples provided should not limit the scope or inhibit the broad teachings of the electrical circuits as potentially applied to a myriad of other architectures.
Note that in this Specification, references to various features (e.g., elements, structures, modules, components, steps, operations, characteristics, etc.) included in “one embodiment”, “example embodiment”, “an embodiment”, “another embodiment”, “some embodiments”, “various embodiments”, “other embodiments”, “alternative embodiment”, and the like are intended to mean that any such features are included in one or more embodiments of the present disclosure, but may or may not necessarily be combined in the same embodiments. Also, as used herein, including in the claims, “or” as used in a list of items (for example, a list of items prefaced by a phrase such as “at least one of” or “one or more of”) indicates an inclusive list such that, for example, a list of [at least one of A, B, or C] means A or B or C or AB or AC or BC or ABC (i.e., A and B and C).
Various aspects of the illustrative embodiments are described using terms commonly employed by those skilled in the art to convey the substance of their work to others skilled in the art. For example, the term “connected” means a direct electrical connection between the things that are connected, without any intermediary devices/components, while the term “coupled” means either a direct electrical connection between the things that are connected, or an indirect connection through one or more passive or active intermediary devices/components. In another example, the term “circuit” means one or more passive and/or active components that are arranged to cooperate with one another to provide a desired function. Also, as used herein, the terms “substantially,” “approximately,” “about,” etc., may be used to generally refer to being within +/−20% of a target value, e.g., within +/−10% of a target value, based on the context of a particular value as described herein or as known in the art.
Numerous other changes, substitutions, variations, alterations, and modifications may be ascertained to one skilled in the art and it is intended that the present disclosure encompass all such changes, substitutions, variations, alterations, and modifications as falling within the scope of the examples and appended claims. Note that all optional features of the apparatus described above may also be implemented with respect to the method or process described herein and specifics in the examples may be used anywhere in one or more embodiments.
Number | Date | Country | Kind |
---|---|---|---|
202141036272 | Aug 2021 | IN | national |