PARALLEL DECIMATOR METHOD AND APPARATUS

Abstract: A decimation device has a sampler, a memory and an adder in the decimation stage. The sampler and the adder form a partial sample for storage in the memory at a sample time. At a next sample time the sum of a current sample and the partial sample is output from the decimation stage. The partial sample is formed by adding the first sample to a value equal to twice a second sample obtained after the first sample.

Description: PARALLEL DECIMATOR METHOD AND APPARATUS Background of the Invention Field of the Invention The invention relates to apparatus and methods for performing decimation. Description of Related Art Voice processing is a real time issue. Processing voice data requires accepting the data at a very high rate since accepting data at a relative lower rate results in lost information and degraded performance. Moreover, voice data processing itself is often a lengthy task. The acceptance of data at a high rate combined with such long processing tasks often demand the use of parallel execution units operating at very high rates. Such execution units typically consume larce amounts of power and significant amounts of silicon area. Therefore, before processing takes place on voice data, such data is often routed to a 'decimator. ' A decimator accepts data at a high rate and generates equivalent information at a relatively low rate, such that data processing can be performed comfortably. •Decimation' is a process for accumulating information at regular intervals and combining the information such that combined result still represents the original information, but can be processed at a lower rate than the rate at which the original information is available. A decimator is a demanding logic tilement. A decimator must accommodate a high rate of incoming data and feed that data to different stages of a decimator apparatus performing various decimator functions. In the past, a serial approach was used to implement the function. Disadvantages of the serial approach include the number of components required, thereby driving up the costs of such devices, and the time delay introduced by serial processing. Summary of the Invention In view of the above mentioned limitations of the related art the invention provides a lower cost decimator. Such a decimator operates at higher speeds than speeds obtained from conventional decimators. A decimator according to the invention requires less silicon area than that required by conventional decimators . A decimator according to the invention is implemented using structured cells to achieve layout advantages. The invention also provides a decimator which is parallel in nature. Further, the invention provides a decimator which time shares common resources to execute the stages of decimation. A decimator according to the invention has a decimation stage with a sampler. The sampler and the adder form a partial sample which is stored in a memory. At the next sample time, the current sample and the partial sample are added to form a sum. The sum is the output of the decimation stage. The partial sample discussed above is formed when the memory stores a first sample and the adder adds a value of twice a second sample to the first sample. The sampling, adding and memory storage functions can be implemented by discrete circuitry or in a processor. According to the invention, a decimator can be implemented by a plurality of controllers causing the sampler, memory and adder to carry out decimation. The controller stages are commonly clocked with each stage receiving as its input, the output of the preceding stage. In one decimator according to the invention five such decimation controller stages are serially connected. The first stage receives as its input the output from two preceding controller stages of a second type. The second type controller causes the addition of the current sample to the previous sample. Thus, a decimator according to the invention includes two such second type controllers serially connected to each other, the first controller of the second type receiving a clock and announcing to the sampler the presence of samples. The output of the first controller of the second type is routed to another controller of the second type which announces samples to the sampler at one half the previous sample rate. The result of each addition adds another bit of precision. The output of the second decimation controller of the second type is then routed to the input of the first of five decimation controllers of the first type connected in series. In this way a signal sampled at 4Mhz to 6 bits can be converted through decimation to a 32Khz sampled signal of 18 bits. Brief Description of the Drawings The above and other objects of the invention are met by the method and apparatus described herein with reference to the drawings in which: Figure 1 shows 4Mhz to 2Mhz decimation; Figure 2 shows 2Mhz to lMhz decimation; Figure 3 shows lMhz to 512Khz decimation; Figure 4 is a dot diagram of nanocode control; Figure 5 is a block diagram of the processing elements of a system according to the invention; Figure 6 is a block diagram of a decimation according to the invention; Figures 7A-B are a listing of nanocode showing the sequencing of events and the associate signals in Figure 6 to trigger execution of the steps discussed above. Figure 8 is a block diagram of one type of decimation controller used in Figure 6; and Figure 9 is a block diagram of another type of decimation controller used in Figure 6. Detailed Description of the Preferred Embodiments The method according to the invention employs a floor plan that is customized to handle decimation. It provides 'visible' outputs that can be observed for every stage of decimation and limits the temporary storage in memory required for intermediate calculations. An execution unit or processor is dedicated to performing decimation. The execution unit processes incoming data and outputs the result on the same cycle of a clock. In order to achieve this result, the execution unit is formed using a parallel processor capable of executing the required functions in a single cycle. By way of example and not limitation assume that a decimation apparatus according to the invention accepts 4Mhz input data samples and generates : * 2Khz output samples. Such a decimator has the following stages and respective decimation functions: clock rate stage decimation function 4Mhz 4Mhz - 2Mhz (1+Z '1 ) 2Mhz 2Mhz - 2Mhz (1+z 1 ) lMhz lMhz - 512Khz U+z *1 ) * (1+z *1 ) 512Khz 512Khz - 256Khz (1+Z *1 ) * (1+Z *1 ) 256Khz 256Khz - 128KhZ (1+z *1 ) * (1+z 1 ) 128Khz 128Khz - 64Khz (1+Z 1 ) * (1+Z *1 ) 64Khz 64Khz - 32Khz (1+z 1 ) * (l+z l ) Altogether in this example, there are seven stages with associated decimation functions. Each stage executes one of the two decimation equations: (1+z' 1 ) or (l+z-'j- l+z- 1 ) . In a stage implementing the first decimation function (1+z *1 ) , the input samples are accepted at the clock rate for that stage. Once a sample arrives, it is added to the previously stored sample. The result of such an addition becomes the output sample of that stage. In a stage implementing the second decimation function (1+z *1 ) *(l+z '1 ) , execution processing can be done in parts. Rewriting (1+z' 1 ) *(l+z'') as (l+2*z * '+z '2 ) it is seen that the output of this stage can be obtained by adding the current sample to twice the previous sample and to the sample one before the previous one. Evident from this expression is that two storage elements are required to store the two samples preceding the current sample. However, if the expression is rewritten as: S « 1 + (2*z * ' + z *2 ) or S = 1 + P, where P = (2*z ** + z "2 ) , then it is only necessary to store P, the partial sample. Generating the term P, however, implies additional intermediate processing of the data. Thus, implementation of second decimation function (1+z *1 ) *(l+z " -) can be split into the following two parts: 1) Generation of partial sample, P. 2) Generation of final sample, S. By generating the partial sample one sample twice unit prior to generating the final sample output, S, at that instant, the partial sample is calculated as (2 + z - 1 ) or 2 (current sample) + previous sample. Generation of the final output sample is done when the partial sample output has already been calculated. The final output sample is arrived at by the function S = 1 + P, adding the current sample to the partial sample output. At the time of the final sample S , which is the next sample time, P now represents the sum of twice the previous sample and the sample before the previous sample. Thus, P = 2z * '+z *2 and S = l+2z'*+z *2 . According to the invention, nanocode can be used to execute all seven stages of the example decimator using the same processor or execution unit. Events are scheduled such that all the decimation functions corresponding to the various decimation stages are interleaved and the need for temporary storage is reduced. In this particular decimator, the input samples arrive at the rate of 4Mhz and the decimator outputs the samples at 32Khz. The incoming samples are 6-bits wide including the sign bit and the output samples are 18-bits wide including the sign bit. The nanocode for this example decimator is executed on a unit operating at 12Mhz. The following is a stage by stage explanation of the floor plan. The first stage according to the example is the decimation of 4Mhz to 2Mhz samples. The decimation function is (1+z" 1 ) . At the rate of 4Mhz, 6 bit wide input samples are received. The first sample received is stored <ιnd the next sample received is added to the stored sample. This addition results in the output sample. Since it takes two 4Mhz samples to generate one sample, the output rate is 2Mhz . Figure 1 shows signals illustrating the process of 4Mhz to 2Mhz decimation. In Figure 1, 4Mhz samples nO, nl, n2, n3 , ... are input to the decimator. 2Mhz output samples are generated as so, si ... , where so = nO + nl, si = n2 + n3 ... A store event during which the sample Ls stored in memory is scheduled every first 4Mhz sample. An add event in which the processor adds the current sample to the sample stored in memory is scheduled every second 4Mhz sample. Since each 2Mhz output sample is generated by adding, two 4Mhz 6 bit samples, each 2Mhz sample is 7 bits wide. The second stage is the decimation of 2Mhz to lMhz samples. The decimation function again is (l+z *1 ) . At the rate of 2Mhz, 7 bit wide input samples are received. The first sample received is stored and the next sample received is added to the stored sample. This addition results in the output sample. Since it tajces two 2Mhz samples to generate one sample, the output rate is lMhz. Figure 2 illustrates signals generated the process of 2Mhz to lMhz decimation. In Figure 2, 2Mhz samples nO, nl , n2 , n3 , ... are the input to the decimator. lMhz output samples are generated as sO, si ..., where sO = nO + nl si = n2 + n3 ... A store event is scheduled every first 2Mhz sample. An add event is scheduled every second 2Mhz sample. Since each lMhz output sample is generated by adding two 2Mhz 7 bit samples, each lMhz sample is 8 bits wide. The third stage is the decimation of lMhz to 512Khz samples. In this case, the decimation function is (1+z *1 ) *(l+z " ') . Input samples are accepted from the output of the prior stage. The implementation of (1+z *1 ) *(l+z '* ) is done in two steps by generating a partial sample, P, and a final sample, S, as previously discussed, wherein: step 1: P 512K = 2 + z "1 step 2: S 5 , 2K = 1 + P J12K Step 1 generates the partial sample fc this stage. To generate the partial sample, the current sample is doubled and then added to the previous sample. Thus, it is necessary to fetch the previously stored sample and to double the current sample before generating the partial sum. The partial sample, P 512K , is then stored in memory for the later use. Step 2 generates the final output samples for this stage. The current sample is added to the partial sample P 512κ . A fetch of Pj 12K is scheduled prior to generating the final sample S il2K . Since the partial sample P J12K is generated by adding two lMhz samples, one 8 bits wide and the other 9 bits wide. The partial sample P 512κ is 18 bits wide. The final sample S 112K output is generated by adding the 10 bit wide lMhz sample and the 9 bit wide partial sample. Therefore, the final stage is 10 bits wide. Figure 3 illustrates the third decimation stage. In Figure 3, samples nO, nl, n2, n3, ... are lMhz samples. Step 1 is implemented by adding samples nO and 2*nl. This partial sample pso is stored in memory. Step 2 is implemented upon arrival of sample n2. Sample n2 is added to psO to generate 512Khz sample sO. The process includes fetching the previously stored sample, multiplying the current sample by 2 and adding it to the previous sample to generate the partial sample. A store of the partial sample follows. Later, upon arrival of yet another lMhz sample, the sample is first stored, and then a fetch of the partial sample is performed. Partial sample P J12K is then added to the current lMhz sample to generate final output S J12K . Stage 4, 5, 6 and 7 are carried out in a fashion similar to stage 3. They all have the same decimation function. However, the bit length for each of the stages is different, as illustrated below: Stage 4: Partial sample - 12 bits; Final sample = 12 bits. Output rate = 256Khz. Stage 5: Partial sample = 14 bits; Final sample = 14 bits. Output rate = l28Khz. Stage 6: Partial sample = 16 bits; Final sample = 16 bits. Output rate = 64Khz. Stage 7: Partial sample = 18 bits; Final sample = 18 bits. Output rate = 32Khz. All seven stages combine to form a decimation output at 32Khz from the incoming samples at 4Mhz. For a solution that is performance driven and yet economical, a single execution unit can be used to implement all the stages with a minimum requirement for temporary storage. A program to be executed by the processor or execution unit may include nanocode that orders the sequences of instruction to be executed in an appropriate manner. Figure 4 is a 'Dot Diagram' illustrating the sample generation in various stages and their interdependence. Stages 1-4 are illustrated in Fig. ' . Stage 5 follows from stage 4 as the stage 4 follows from stage 3. Similarly, stage 6 follows from stage 5 as stage 5 follows Prom stage 4. In Fig. 4 the scale is changed at stage 7 to show the generation of 32Khz samples. Based upon the dot diagram in Fig. 4, the nanocode is designed to execute the samples as they are generated. The sequencing of the control is completely interleaved to share the same resources. Figure 5 is memory 505 a block diagram showing a sampler 501, processor 503 and controller 507. Controller 507 is used to schedule execution of the decimation steps and is shown in more detail in Figure 6. A control unit that schedules the execution of various stages is shown in Figure 6, generally at 601. A 4Mhz sample clock ACLKS generated from master clock MCLK in circuit 608 is used to load the samples. Signal LD4MA and LD4MB are generated successively in control circuit 605-1 which receives 4Mhz sample clock CLKS. Therefore, each of the two signals occur at the rate of 2Mhz. For every occurrence of LD4MB which is routed to circuit 605-2, either LD2MA or LD2MB art generated. Circuit 605-2 is a duplicate of circuit 605-1, since LD4MB is at a rate of 2Mhz, the rate of which LD2MA and LD2MB are generated is lMhz. Figure 8 shows circuit CNTRL-B (605-1, 605-2) and is discussed further herein. LD2MB declares the presence of samples at lMhz to control circuit 607-1. As the next sample arrives, the sample is multiplied by two and added to the previously stored sample. Before the multiplication occurs, the processor applies a sign extension for overflow correction. This control circuit 507-1 generates signal is signal DP2ML-1M to trigger the program to perform this sign extension function. The very next phase of DPI causes circuit 607-1 to generate a signal MUL2-1M, which triggers the processor to execute the following steps simultaneously. (1) Multiply the current sample by 2. (2) Load the previously stored sample. (3) Add the current sample multiplied by 2 and the previously stored sample, as determined in (1) and (2) immediately above, to generate partial sample for the next stage. Signal PST_512K generated on the next phase of DP2 triggers the processor to store the partial sample in a memory. Upon its arrival, the next lMhz sample is first stored by the processor in response to signal ST0_1M also generated in circuit 607-1, so that the new sample can be used later. After having been stored, the new sample is added to the previously stored partial sample to generate the 512Khz sample. This function is performed by the processor in response to signal LATCH_1M generated in circuit 607-1. LATCH_1M triggers the processor to: (1) Read the partial sample ps_512K, and (2) Add the current lMhz sample to ps 512K. Figure 8 shows the circuit CNTRL_C (607-1 through 607-5) which generates these signals and is discussed in more detail further herein. LATCH _1M generated by control circuit 607-1 also declares the presence of samples at 512Khz. As the next 512Khz sample arrives, the sample is multiplied by two and added to a previously stored sample. Before this multiplication occurs, the processor applies a sign extension for overflow correction in response to DP2ML_512K. The very next phase of DPI causes circuit 607-2 to generate signal MUL2_512K which triggers the processor to execute the following steps sim ltaneously: (1) Multiply the current sample by 2. (2) Load the previously stored sample. (3) Add the current sample multiplied by 2 and the previously stored sample (from steps 1 and 2 immediately above) to generate the partial sample for the next stage. Signal PST_256K generated in circuit 607-2 on the next phase of DP2 triggers the processor to store the partial sample. Upon its arrival, the next sample is first stored by the processor in a memory in response to signal ST0_512K generated in control circuit 607-2 so that it can be used later. After having been stored, the new sample is added to the previously stored partial sample to generate the 256Khz sample. This, function is performed by the processor in response to signal LATCH_512K generated in circuit 607-2. LATCH_512K triggers the processor 10: (1) Read the partial sample ps_256K, and (2) Add the current 512Khz sample to ps_256K. LATCH_512k generated by control circuit 607-2 also declares the presence of samples at 256Khz to control circuit 607-3. As the next 256Khz sample arrives, the sample is multiplied by two and added to the previously stored sample. Before this multiplication occurs, the processor applies a sign extension for overflow correction, in response to signal DP2ML_256K generated by control circuit 607-3. The very next phase of DPI causes control circuit 607-3 to generate signal MUL2_256K which triggers the processor to execute the following steps simultaneously: (1) Multiply the current sample by 2, (2) Load the previously stored sample, and (3) Add the current sample multiplied by 2 and the previously stored sample (from steps 1 and 2 immediately above) to generate the partial sample for th * -.- next stage. Signal PST_128K generated in control circuit 607-3 on the next phase of DP2 triggers the processor to store the partial sample. Upon its arrival, the next 256Khz sample is first stored by the processor in a memory in response to signal STO_256K generated in control circuit 607-3 so that it can be used later. After having been stored, the new sample is added to the previously stored partial sample to generate a 128Khz sample. This function is performed by the processor in response to LATCH_256K generated in control circuit 607-3. LATCH_256K triggers the processor to: (1) Read the partial sample ps_128K, end (2) Add the current 256Khz sample to ps_128K. LATCH_256k generated in control circuit 607-3 also declares the presence of samples at l28Khz. As the next 128Khz sample arrives, the sample is multiplied by two and added to a previously stored sample. Before the multiplication occurs the processor applies a sign extension for overflow correction in response to signal DP2ML_128K generated by control circuit 607-4. The very next phase of DPI causes control circuit 607-4 to generate signal MUL2_128K, which triggers the processor to execute the following steps simultaneously: (1) Multiply the current sample by 2. (2) Load the previously stored sample. (3) Add them to generate the partial sample for the next stage. Signal PST_64K generated by control circuit 607-4 on the next phase of DP-2 triggers the processor to store the partial sample. Upon its arrival, the next 128Khz sample is first stored by the processor in a memory in response to signal STO_128K generated in control circuit 607-4 so that it can be used later. After having been stored, the sample is added to the previously stored partial sample to generate a 64Khz sample. This function is performed by the processor in response to signal LATCH_128K generated in circuit 607-4. LATCH_128K triggers the processor to: (1) Read the partial sample ps_64K, and (2) Add the current 128Khz sample to ps_64K. LATCH _128K generated in control circuit 607-4 also declares the presence of samples at 64Khz to control circuit 607-5. As the next 64Khz sample arrives, the sample is multiplied by two and added to the previously stored sample. Before the multiplication occurs, the processor applies a sign extension for overflow correction in response to signal DP2ML_64K generated by control circuit 607-5. The very next phase of DPI causes control circuit 607-5 to generate signal MUL2_64K, which triggers the processor to execute the following steps simultaneously: (1) Multiply the current sample by 2, (2) Load the previously stored sample, and (3) Add them to generate partial sample for the next stage. Signal PST_32K generated in control circuit 607-5 on the next phase of DP2 triggers the processor to store the partial sample. Upon its arrival the next 64Khz sample is first stored by the processor in a memory in response to signal ST0_64K generated in control circuit 607-5, so that it can be used later. After having been stored, the new sample is added to the previously stored partial sample to generate a 32Khz sample. This function is performed by the processor in response to signal LATCH_64K generated in control circuit 607-5. LATCH_64K triggers the processor to: (1) Read the partial sample ps_32K, and (2) Add the current 64Khz sample to ps_32K. LATCH_64K also declares the presence of samples at 32Khz. This completes the entire cycle of the nanocode, which accepts 4Mhz samples to generate 32Khz output. Figure 7A-B are a listing of nanocode showing the sequencing of events and the associate signals in Fig. 6 to trigger execution of the steps discussed above. Figure 8 is a block diagram of a first type of decimation stage used in Fig. 6 and shown as 605-1 and 605-2. The circuit in Fig. 8 implements the (1 + z " ') decimation function of the first two stages. DPI and DP2 are non-overlapping clock:- and LD is a conditional DPI signal. Thus, LD and DP2 are non- overlapping clock signals. RST is an asynchronous reset signal t.hat externally forces LD to 0 and DP2 to 1. The output of each block are signals LDA and LDB. Every LD signal alternatively generates LDA and LDB. Therefore, an LD coming at a rate of 4Mhz will generate LDA and LDB at 2Mhz. Initially, RST will generate the reset action. When RST is set to 1, the reset signal forces DP2 to 1 and LD to 0. This results in node 11=1, node 12=0 and node 13=1. Pass gate 811 will be ON and pass gat.2813 will be OFF. Since pass gate 811 is ON, LDA=LD=0. Since pass gate 813 is OFF, nmos gate 817 will be ON, and therefore, LDB=0. Once the RST is set to 0, signals LD and DP2 assume their normal clock operations. DP2 occurs at every clock cycle, whereas LD occurs on certain DPI phases of the clock cycle. Occurrences of DP2 without a prior LD have no effect on the state of the device. Once the LD occurs, latch LI latches the value at node 13, which is 1 after reset. At the same time, LDA will be 1 since LDA=LD when node 13=1. The next DP2 will cause the value of nodes 12 and 13 to change; thus node 13=0. The next LD will generate an LDB=1 since LDB=LD when node 13=0. Therefore, at every LD signal, either an LDA or an LDB is generated. Figure 9 is a block diagram of the second type of decimation stage used in Figure 6 and shown as 607-1 to 607-5. The circuit in Figure 9 implements the (l + z * ')*(l + z *1 ) decimation function of Stage 3 through Stage 7. DPI and DP2 are non-overlapping clocks and LD is a conditional DPI signal. Thus, LD and DP2 are non- overlapping clock signals. RST is an asynchronous reset signal that externally forces LD to 0 and DP2 to 1. The output of the block are signals PST, MUL2, DP2ML, STORE and LATCH. The input signals to the block are DPI, DP2, LD and RST. Initially, RST will generate the reset action. When RST is set to 1, the reset signal forces DP2 to 1 and LD to 0. This results in node 11=0, node 12=1, node 13=0, PST_BL=1 and PST_BLK=0. The RSMUXBL blocks function such that: if BLOCK=l then OUT=0 and if BLOCK=0 then OUT=IN. The RSMUXPS blocks function such that: if PASS=0 then OUT=0 and if PASS=1 then OUT=IN. Thus, at reset, PST=1, MUL2=0, DP2ML=0, STORE=l and LATCH=0. Also, nodes GOT_l and GOT_2 are 0 at reset. The devices progress with the occurre. ce of an LD signal. LD occurs on certain DPI phases of the clock cycle, whereas DP2 occurs at every clock cycle. As the LD occurs, it sets GOT_l to 1 while GOT_2 remains 0. The next LD will reset G0T_1 to 0 and set GOT_2 to 1. Thus, the device operates with either GOT_l or GOT_2 set to 1. When node 14=1, the first subsequent LD signal will make node 11=1 and node 12=0. Thus, the next DP2 will generate a DP2ML and will also result in node 13=1 and node 16=0. The next DPI will generate a MUL2. The next DP2 will consequently generate a PST=1. The next set of DPI and DP2 clocks will have no effect on the state of the device. The next set of events will ocαur with the arrival a second subsequent LD signal. As this LD occurs, node 18=0. The next DP2 will generate a STORE and the DPI after that will generate a LATCH. The next LD signal will make node 11=1 and node 12=0, thus repeating the cycle of events described within this paragraph.

Claims: What Is Claimed Is: 1. A decimation stage comprising -- sampler, a memory and an adder, said sampler and said adder forming a partial sample for storage in said memory at a sample time and at a next sample time forming a sum of a current sample and said partial sample as an output of said decimation stage. 2. The decimation stage recited in claim 1, wherein said sampler stores a first sample in said memory and said adder adds first sample to a value of twice a second sample to form said partial sample. 3. The apparatus recited in claim 2, wherein said sampler obtains said second sample after said first sample. 4. The apparatus recited in claim 3, wherein said sampler obtains said current sample after said second sample. 5. A decimator comprising: a sample; an adder; a memory; a first control circuit at predetermined times directing operation of said sampler, said adder and said memory to add a current sample to an immediately preceding sample stored in said memory; a second control circuit at predetermined times directing said sampler, said adder and said memory to add a current sample to a partial sample stored in said memory, said partial sample comprising a sum of a first sample and twice a record sample, and a data bus communicating linking said sample, said memory, said adder, said first control circuit and said second control circuit. 6. The apparatus recited in claim 5, wherein said first sample is obtained by said sampler one sample time before a current sample time and said second sample is obtained by said sampler two sample time units before said current sample time.

Inventors: GAGLANI PARNAY, GAGLANI, PARNAY
Applicants: ADVANCED MICRO DEVICES INC, ADVANCED MICRO DEVICES, INC.
Application year: 1997
Main classification: H03H17
IPC codes: H03H17