Programmable engine core for executing digital signal processing functions

Information

  • Patent Application
  • 20050251542
  • Publication Number
    20050251542
  • Date Filed
    February 18, 2005
    19 years ago
  • Date Published
    November 10, 2005
    18 years ago
Abstract
A flexible engine for implementing digital signal processing (DSP) functions involving repeating various arithmetic/logical operations on a stream of data includes multiple programmable filter elements, at least one of which includes a microcode control program for internal control of the programmable filter element. The engine also includes programmable interconnection logic coupled to the programmable filter elements for selectively combining, scaling, and accumulating output values from the first plurality of programmable filter elements and selectively providing accumulated values as inputs to the first plurality of programmable filter elements. A filter controller coupled to the programmable filter elements and the programmable interconnection logic includes its own microcode control program for external control of the programmable filter elements and the programmable interconnection logic. Multiple engines can be combined to form larger, more powerful engines.
Description
FIELD OF THE INVENTION

The present invention relates generally to digital signal processing, and more particularly to a programmable engine core for executing digital signal processing functions.


BACKGROUND OF THE INVENTION

The algorithmic implementation of many digital signal processing (DSP) functions involves repeating various arithmetic/logical operations on a stream of data. Typical digital signal processing functions include Fast Fourier Transform (FFT), Inverse Fast Fourier Transform (IFFT), pre- and post-twiddling, complex gain-scaling, and barrel-shifting.


SUMMARY OF THE INVENTION

Embodiments of the present invention provide a flexible engine for implementing digital signal processing (DSP) functions involving repeating various arithmetic/logical operations on a stream of data.




BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a conceptual block diagram of a programmable engine core in accordance with an embodiment of the present invention;



FIG. 2 is another conceptual block diagram showing additional details of a programmable engine core in accordance with an exemplary embodiment of the present invention;



FIG. 3 shows the Radix-4 butterfly as known in the art;



FIG. 4 shows the programmable engine core configured for FFT/IFFT operation in accordance with an embodiment of the present invention;



FIG. 5 shows an overview of a digital signal processing engine for performing a Radix-4 butterfly operation in accordance with an embodiment of the present invention;



FIG. 6 shows an exemplary engine configuration for performing a Radix-4 butterfly operation in accordance with an embodiment of the present invention;



FIG. 7 shows a first timeline for performing a Radix-4 FFT in accordance with an embodiment of the present invention;



FIG. 8 shows a second timeline for performing a Radix-4 FFT operation in accordance with an embodiment of the present invention;



FIG. 9 shows an exemplary data fetch/store (DFS) unit in accordance with an embodiment of the present invention;



FIG. 10 shows an exemplary memory address generation circuit in accordance with an embodiment of the present invention;



FIG. 11 shows an exemplary barrel shifter circuit in accordance with an embodiment of the present invention;



FIG. 12 shows an exemplary engine configuration for performing a Radix-4 post-twiddle operation in accordance with an embodiment of the present invention;



FIG. 13 shows a receiver's review of the twiddle and gain-scale operation in accordance with an embodiment of the present invention;



FIG. 14 shows a timeline for operations performed after the post-twiddle operation in accordance with an embodiment of the present invention;



FIG. 15 shows the twiddle function datapath in accordance with an embodiment of the present invention;



FIG. 16 shows the gain-scale and windowing datapath in accordance with an embodiment of the present invention;



FIG. 17 shows a timeline for a Radix-2 FIT operation in accordance with an embodiment of the present invention;



FIG. 18 shows one exemplary engine core with feedback in which the output of Register B is fed back to the first ALU such that the first ALU can operate on the contents of Register A and/or the contents of Register B and store the result in Register B, in accordance with an embodiment of the present invention;



FIG. 19 shows another exemplary engine core with feedback in which the output of Register C is fed back to the first ALU such that the first ALU can operate on the contents of Register A and/or the contents of Register C and store the result in Register B, in accordance with an embodiment of the present invention;



FIG. 20 shows another exemplary engine core with feedback in which the output of Register B is fed back to the first ALU and the output of Register C is fed back to the first ALU and the second ALU such that the first ALU can operate on the contents of Register A, Register B, and/or Register C and store the result in Register B and the second ALU can operate on the contents of Register B and/or Register C and store the output in Register C, in accordance with an embodiment of the present invention;



FIG. 21 shows an exemplary engine core with both feedback and feed-forward such that each ALU can operate on any combination of the registers, in accordance with an embodiment of the present invention; and



FIG. 22 shows a representation of the improvement provided by dynamic overflow protection (scaling) compared with traditional static scaling in accordance with an embodiment of the present invention.




DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT


FIG. 1 is a conceptual block diagram of a programmable engine core in accordance with an embodiment of the present invention. Among other things, the programmable engine core includes a first register 110 (referred to as Register A), an arithmetic/logic unit (ALU) 120, a second register 130 (referred to as Register B), and a memory 140. The ALU 120 is programmed, configured, or otherwise designed to perform one or more algorithmic functions. Data can be moved from the memory 140 to Register A 110 to be operated upon by the engine core. A “move” instruction causes the data to be moved from Register A 110 through the ALU 120 to Register B 130, whereby the ALU 120 performs its predetermined algorithmic function(s) on the data. The data can be moved from Register B 130 into the memory 140.


In practice, a programmable engine core can be created with virtually any number of registers and ALUs. FIG. 2 is another conceptual block diagram showing additional details of a programmable engine core in accordance with an exemplary embodiment of the present invention. Generally speaking, the programmable engine core includes a control path and a data path. The control path includes an instruction (program) random-access memory (RAM), a program controller, a number of loop controllers, and an instruction decoder. The data path includes various registers, ALUs, and memory. The number of ALUs can be varied according to the needs of a particular implementation. In this example, the data path includes a feed-forward of Register A to all ALUs such that, for example, the first (leftmost) ALU can operate on the contents from Register A and store the result in Register B, the second ALU can operate on the contents from Register B and/or the contents of Register A and store the result in Register C, and the third ALU can operate on the contents from Register C and/or Register A and store the result in the subsequent register. It should be noted that such feed-forwards are not a requirement of the present invention. It should also be noted that feed-backs may be provided so that a particular ALU can operate on the output of a subsequent register.


Referring still to the programmable engine core of FIG. 2, a simple instruction set is typically used to control the operation of the engine. The simple instruction set is typically based on executable micro-code. The type of algorithm performed is determined by the ALUs (also referred to hereinafter as arithmetic units or AUs). The steady-state operation of the engine involves executing “move” instructions to move data from register to register through one or more arithmetic/logic units. In the course of performing the “move” instruction, data is operated upon by the arithmetic/logic unit in its path.


The control path provides two types of control, namely setup and datapath control for configuring and altering the ALUs for the desired algorithmic function, and timing control for executing either bounded loops (e.g., as typically used for FFT computations) or indefinite loops. Multiple nested loop counters are typically used for timing control.


It should be noted that multiple algorithms can typically be implemented by the same engine, provided the ALUs contain the necessary hardware for the various algorithms and provided multiple code segments are stored in the program memory (i.e., one for each algorithm). It should be noted that the ALUs are not required to be identical.


Various embodiments of the present invention will be described with reference to a programmable engine core designed for efficient implementation of Radix-2 and Radix-4 in-place butterfly computations and corresponding “twiddle” operations. For convenience, the programmable engine core may be referred to hereinafter as ER4. The following discussion focuses mainly on the Radix-4 capabilities. FIG. 3 shows the Radix-4 butterfly as known in the art.



FIG. 4 shows the ER4 configured for FFT/IFFT operation in accordance with an embodiment of the present invention. The ER4 is generally composed of four sections, namely data fetch/store (DFS), arithmetic unit (AU), configurable controller unit (CCU), and gain controller unit (GCU). The design of the ER4 engine is centered on the throughput of the AU and the access time of the DFS, in order to maximize the ER4 efficiency. The ER4 processes in-place a 4-point butterfly in 4 clock cycles. The DFS requires 4 clock cycles to fetch 4 data points and another 4 cycles to write them back in-place. The transform operation is thus preferably split into two, with each performing on half the memory and time-division-multiplexed onto the AU. An overview of the engine is shown in FIG. 5. It should be noted that the fourth multiplier is included to execute the twiddle operations. The timelines of the FFT operations give insight as to engine's operation, and are shown in FIG. 7 and FIG. 8.


The DFS unit, shown in FIG. 9, constantly accesses both data memory halves (referred to as Low and High XMEM) as well the Weights memory (referred to as WMEM). The data memory half access cycle is composed of 4 consecutive reads followed by 4 consecutive writes. DFS alternates accessing both Low and High XMEM memory halves. The Weights section is preferably a lookup table for one quarter of a sine waveform (π/2 radian), with values for the remaining portion of the sine waveform extrapolated from the quarter sine wave values. The lookup table is typically stored in two portions; each representing one eighth of the sine waveform. This allows for simultaneous access of the sine and cosine of a given angle in a single clock cycle. The angle of p/2 radian is handled separately. This speeding up of memory access is a mirror approach to the memory management of the data memory. The memory management is done this way to ensure that the memory access throughput is matching the data throughput through other parts of the engine. Data memory is preferably organized as two 4096×16 input ping-pong buffers, augmented by a single 4096×14 RAM used to carry arithmetic precision of all in-place calculations. This memory is referred to as In-Place memory, or MEMIN.


The AU operates on a set of 4-point inputs and performs the radix-4 butterfly operation, as shown in FIG. 6. Additionally, the AU preferably also performs the twiddle operation. The complex set of 4-point inputs is factored, through a group of adders, to 8 intermediate values that are used to generate the resultant in-place values (Zn in FIG. 3). Combinations of the intermediate values are sequenced through the final AU stage where the complex multiplications with the Weights are performed. Three multipliers are used to perform the transform operations, and an additional multiplier is used to perform the twiddle operations.


To allow for high internal precision, static word-length allocation, i.e. adding extra bits to reduce quantization effects and round-off errors, has traditionally been used. In the static allocation technique, in order to prevent overflows, pre-determined numbers of shifts are placed in pre-determined processing stages to reduce signal levels. The pre-determined shifts are assigned based on worst-case analysis of signal levels leading to a loss in processing dynamic range that can only be compensated for by increasing the number of processing bits. Preferred embodiments of the present invention, however, employ dynamic overflow protection, resulting in definite saving in the number of bits needed internally to achieve the same level of quantization reduction. Specifically, signal levels are scaled down only if an overflow is detected in any given stage. Among other things, dynamic overflow protection eliminates unneeded signal reduction in early processing stages and reduces the number of shifts performed. As a result, dynamic overflow protection achieves better quantization error reduction while relaxing the number of processing bits required. FIG. 22 shows a representation of the improvement provided by dynamic overflow protection (scaling) compared with traditional static scaling. The GCU monitors the AU output, as data is written in-place to memory, in order to determine if an overflow condition occurs (as well as the magnitude of the overflow condition). The main outputs of the GCU are div_by2 and div_by4 that are used to scale down the data as it is read out of the memory on the succeeding butterfly operation stage. The FrameClk input resets the GCU logic. Command CLR RSC x1xx xxxx also clears the GCU logic as well as CLR ALL (instructions are described below).


The ER4 includes four address generators (Adgen). Adgen0 is assigned to input memories, Adgen1 to output memories, and Adgen2 to weights/gain-scale memories. Adgen3 is a wild card and can be assigned to any memory in the system. Adgen3 is assigned through the CFG commands (described below). Note that an assignment of Adgen3 to In-Place memory (MEMIN high) via the CFG MEMIN command takes precedence over any assignment via the CFG MEMOUT command.


Table 1 shows data resource addresses for an embodiment of the present invention.

TABLE 1Data Resource AddressSourceDestinationCommonResourceSubsetAddressAddressSrc/destMEMINLow0001000010YHigh0001100011YX0Low0010000100YHigh0010100101YX1Low0011000110YHigh0011100111YX2Low0100001000YHigh0100101001YX3Low0101001010YHigh0101101011YLT101100NLT201101NLT301110NY001111NYn00001NMEMOUTLow1100011000YHigh1100111001YW1Low10000NHigh10011NW2Low10001NHigh10100NW3Low10010NHigh10101N


Table 2 shows the ER4 configuration memory map for an embodiment of the present invention.

TABLE 2Resources address mapNo.AddressMnemonicDescription00000 0000Ad0_stpcnt_LAdgen0 step count low byte10000 0001Ad0_stpcnt_HAdgen0 step count high byte20000 0010Ad0_Bascnt_LAdgen0 base count low byte30000 0011Ad0_Bascnt_HAdgen0 base count high byte40000 0100Ad1_stpcnt_LAdgen1 step count low byte50000 0101Ad1_stpcnt_HAdgen1 step count high byte60000 0110Ad1_Bascnt_LAdgen1 base count low byte70000 0111Ad1_Bascnt_HAdgen1 base count high byte80000 1000Ad2_stpcnt_LAdgen2 step count low byte90000 1001Ad2_stpcnt_HAdgen2 step count high byteA0000 1010Ad2_Bascnt_LAdgen2 base count low byteB0000 1011Ad2_Bascnt_HAdgen2 base count high byteC0000 1100Ad3_stpcnt_LAdgen3 step count low byteD0000 1101Ad3_stpcnt_HAdgen3 step count high byteE0000 1110Ad3_Bascnt_LAdgen3 base count low byteF0000 1111Ad3_Bascnt_HAdgen3 base count high byte100001 0000Ds_Ccnt[7:6] dsh_sel: data source selector into Highregisters[5:4] dsl_sel: data source selector into Low registers[3:0] ccnt: number of cycles per engine iteration110001 0001Mem_sel[7:6] w0sel: selects weights/gain-scale Constantsmemory[5:4] min_sel: selects input memory[3:2] mout_sel: selects output memory[1:0] mwt_sel: Reserved120001 0010IterL[7:0] number of iterations per operation low byte130001 0011Op_IterH[7:3] operation instruction[2:0] number of iterations per oeration high bits140001 0100Ad0_mskl[7:0] adgen0 mask LSB (maskl[7:0])15010101Ad0_mskh[7:0] adgen0 mask MSB (maskh[7:0]>160001 0110Ad0_mskhl[7:4] adgen0 maskh[11:8][3:0] adgen0 maskl[11:8]170001 0111Adgen_cfg[7] Cfg_Adg0: adgen0 addresses ½ or full inputmemory[6] Cfg_Adg1: adgen1 addresses ½ or full outputmemory[5] Cfg_Adg2: adgen2 addresses ½ or full Constantsmemory[4:2] Cfg_Adg3: configures Adgen3 to address highinput memory or high output memory or high gain-scale memory or high win memory.[1:0] Reserved180001 1000Adg_sbrvAdgens' subtract enable and digit-reverse addressenable:[3:0] enable digit-reversed output for adgen[3:0],respectively[7:4] enable subtracting icount from the offset reg.value when the corresponding bit for each adgen isset:[7] adgen3, [6] adgen2, [5] adgen1, [4] adgen01A0001 1010Adg_rvseAdgens' digit-reverse setting: 00 → 10-bit address,01 → 9-bit address, 10 → 8-bit address, 11 → 7-bitaddress[7:6] adgen3 adg_rvse setting[5:4] adgen2 adg_rvse setting[3:2] adgen1 adg_rvse setting[1:0] adgen0 adg_rvse setting1C0001 1100Ad1_mskl[7:0] adgen1 mask LSB (maskl[7:0])1D0001 1101Ad1_mskh[7:0] adgen1 mask MSB (maskh[7:0])1E0001 1110Ad1_mskhl[7:4] adgen1 maskh[11:8][3:0] adgen1 maskl[11:8]1F0001 1111240010 0100Ad2_mskl[7:0] adgen2 mask LSB (maskl[7:0])250010 0101Ad2_mskh[7:0] adgen2 mask MSB (maskh[7:0]>260010 0110Ad2_mskhl[7:4] adgen2 maskh[11:8][3:0] adgen2 maskl[11:8]2C0010 1100Ad3_mskl[7:0] adgenS mask LSB (maskl[7:0])2D0010 1101Ad3_mskh[7:0] adgen3 mask MSB (maskh[7:0])2E0010 1110Ad3_mskhl[7:4] adgen3 maskh[11:8][3:0] adgen3 maskl[11:8]2F0010 1111GC_cfg[2] CTL select (0 for auto), [1:0] Div_by4, Div_by2300011 0000Stb0_salExecution start address bits [7:0] for STB0 in IRAM310011 0001Stb0_sahExecution start address bits [11:8] for STB0 inIRAM320011 0010Stb1_salExecution start address bits [7:0] for STB1 in IRAM330011 0011Stb1_sahExecution start address bits [11:8] for STB1 inIRAM340011 0100Stb2_salExecution start address bits [7:0] for STB2 in IRAM350011 0101Stb2_sahExecution start address bits [11:8] for STB2 inIRAM360011 0110Stb3_salExecution start address bits [7:0] for STB3 in IRAM370011 0111Stb3_sahExecution start address bits [11:8] for STB3 inIRAM400100 0000Dif_cfgrData Interface configuration register


The following is the arithmetic used to design the ER4 AU for implementing the Radix-4 butterfly shown in FIG. 3. The in-place computation is performed on real points read, X[3:0], and written back as Y[3:0]. The intermediate set of real points Z[3:0] as well as Y0 are generated conveniently using only add and subtract operations.

Y0r=X0r+X1r+X2r+X3r=(X0r+X2r)+(X1r+X3r)   (1)
Y0i=X0i+X1i+X2i+X3i=(X0i+X2i)+(X1i+X3i)   (2)


The following are the real components of Z[3:0]

Z1r=X0r+X1i−X2r−X3i=(X1r−X2r)+(X1i−X3i)   (3)
Z2r=X0r+X2r−X1r−X3r=(X0r+X2r)−(X1i+X2r)   (4)
Z3r=X0r+X3i−X1i−X2r=(X0r−X2r)−(X1i−X3i)   (5)


The following are the imaginary components of Z[3:0]

Z1i=X0i−X1r−X2i+X3r=(X0i−X2i)−(X3r−X1r)   (6)
Z2i=X0i+X2i−X1i−X3i=(X0i+X2i)−(X1i+X3i)   (7)
Z3i=X0i+X1r−X2i−X3r=(X0i−X2i)−(X3r−X1r)   (8)


The following quantities are defined:

A0=X0r+X2r
A1=X0r−X2r
B0=X1r+X3r
B1=X1i−X3i
C0=X0i+X2i
C1=X0i−X2i
D0=X1i+X3i
D1=X3r−X1r


Thus, equations (1) through (8) can be re-written as follows:

Y0r=A0+B0
Z1r=A1+B1
Z2r=A0−B0
Z3r=A1−B1
Y0i=C0+D0
Z1i=C1+D1
Z2i=C0−D0
Z3i=C1−D1


It should be noted that each addition and subtraction term is used twice. The final operation of the AU is a complex multiplication of the Z terms with appropriate weights:

Y1=Z1*Wk
Y2=Z2*W2k
Y3=Z3*W3k

The complex multiplication has the form:

Yn(k)=[Znr(k)+j Zni(k)]*[cos(2πnk/N)−j sin(2πnk/N)],   (9)

where n is ε [1,2,3] as in equations (3) through (8) above. Four multiplies and two adds are required to produce the final result, as shown in equation (9). Four clock cycles are necessary to generate each Ynr and Yni. Z1, Z2 and Z3 are time-multiplexed into the complex multiply plus a forth cycle to generate Y0, which requires no multiply operation.


Table 3 shows a program example to implement the FFT function in accordance with an embodiment of the present invention. The purpose of this example is to demonstrate the type of assembly instructions required to program the engine and uses a readable mnemonic format which is not the actual instruction set. Instructions are described below. It should be noted that there are two categories of instructions, namely instructions to set up and configure the engine and instructions for data movement.

    • //***** Constants declaration *****//
    • N=1024
    • //***** Configuration and setup section *****//


START_EXEC:

TABLE 3Sample FFT ProgramCfgFFT$//*** this command also sets up ADG3,input and output memories, here weaccept the default settings. */CfgSTBfrmclk$//** start exec. When frame clock pulse arrives. */ClrALL$//*** reset all address generators and data reg.sCfgADG0_offsetN$//*** each FFT iteration we read loc's iand i + N from both high and lowmemories (MH and ML) */MovMH(i)X2L$//*** move MH(0) −> X2 ,content of loc. 0MovMH(i++)X3L$//*** move MH(1024) −> X3 .content of loc. 1024 */MovML(i)X0L$//*** move ML(0) −> X0 ,content of loc. 0MovML(i++)X1L$//*** move ML(1024) −> X1 .content of loc. 1024 */TogToggle mux input to AURep1024(//*** loop setup stage 0MovMH(i + 1)X2HMovLT1(k)W1H//*** fetch Wk and store in W1H reg.MovY0ML(i)$MovMH(i ++ 1)X3HMovLT2(k)W2H//*** fetch W2k and store in W2H reg.MovYnML(i++)$MovML(i + 1)X0HMovLT3(k)W3H//*** fetch W3k and store in W3H reg.MovYnMH(i)$MovML(i ++ 1)X1HMovYnMH(i++{circumflex over ( )})$Tog//*** Toggle mux input to AUMovMH(i)X2L//*** move MH(1) −> X2 ,content of loc. 0MovLT1(k)W1L//*** fetch Wk and store in W1L reg.MovY0ML(i)$MovMH(i++)X3LMovLT2(k)W2L//*** fetch Wk and store in W2L reg.MovYnML(i)$MovML(i)X0LMovLT3(k)W3L//*** fetch Wk and store in W3L reg.MovYnMH(i)$MovML(i++)X1LMovYnMH(i++)$Tog//*** Toggle mux input to AU)//*** stages 1-5ClrALL$//*** clear all counters and registersCfgADG0_offsetN/4$//** offset = 256MovML(i)X0L$MovML(i++)X1L$MovML(j++)X2L$MovML(j++)X3L$Rep5(Rep256(MovY0ML(i)//*** Write Y0 in-placeMovLT1(k)W1H//*** fetch Wk and store in W1H reg.MovMH(i)X0H$MovYnML(i++)//*** write Y1 in-placeMovLT2(k)W2H//*** fetch W2k and store in W2H reg.MovML(i++{circumflex over ( )})X1H$MovYnML(j++)//*** write Y2 in-placeMovLT3(k)W2H//*** fetch W3k and store in W3H reg.MovML(j++)X2H$MovYnML(j++)//*** write Y3 in-placeMovML(j++)X3HTog$//*** toggle input mux to AU from Xn1 to XnH. */MovY0MH(i)MovLT1(k)W1H//*** fetch Wk and store in W1H reg.MovMH(i)X0L$MovYnMH(i++)MovML(i++)X1L$MovLT2(k)W2L//*** fetch W2K and store in W2H reg.MovYnMH(j++)MovLT3(k)W2L//*** fetch W3k and store in W3H reg.MovML(j++)X2L$MovYnMH(j++)MovML(j++)X3L$) )


where i≡the current value of icounter in a given ADG, j≡the current value of jcounter in a given ADG, ++≡output is the sum of the specified counter and the offset register in a given ADG, {circumflex over ( )}≡increment the specified counter at the next clock cycle, and ML, MH≡configured input memories.


The following is sample working ER4 assembler code for performing a 4096 point FFT in accordance with an embodiment of the present invention:

2618// OPR STB0 ****** code for 4096 pt FFT ****0000// NOP ;226C// CFG MEMIN ;XMEM_h_addr=adg3,XMEM_h=MEMIN_h,XMEM_low=MEMIN_l0000// NOP;2000// CLR ALL0000// NOP;0000// NOP;%%%%%%%%%%%%% 1st STAGE %%%%%%%%%%%%%%%%%%%2611// OPR FFT211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP;0C00// MOV 0,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr0C01// MOV 1,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr /\/\/\/\/ MOV 0x400,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr /\/\/\/\/ MOV 0x400,adg3_offset /\/\/\0001// SKIP2521// RCMD 12 ; start_bfly, zero-out scratch-pad memory261F// SET STAGECLK ;0000// NOP ;440A// \——long MOV - m10080// /540B// \——long MOV - m20080// /4040// \——long MOV - m30080// /4141// \——long MOV - m40A98// /4200// -|——loop CONFIG LP0 (512 times)2001// -|4C4E// \——long MOV - m50394// /7D4F// \——long MOV - m60395// /64D4// \——long MOV - m7039E// /77F5// \——long MOV - m80980// /4C4A// \——long MOV - m90391// /7D4B// \——long MOV - m100392// /64D0// \——long MOV - m11039B// /77F1// \——long MOV (Eval.) - m120D80// /261F// SET STAGECLK ;0000// NOP ;0000// NOP %%%%%%%%%%%%% 2nd STAGE %%%%%%%%%%%%%%%%%%%0000// NOP *** we use 2 nested loops2500// RCMD 0; remove zero-out scratch-pad memory0C00// MOV 0,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr0C01// MOV 1,IA; indirect-wr addr0D01// MOV 1,[IA]; indirect-wr /\/\/\/\/ MOV 0x100,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D01// MOV 1,[IA]; indirect-wr /\/\/\/\/ MOV 0x100,adg3_offset /\/\/\0C08// MOV 8,IA; indirect-wr addr|########################|0D04// MOV 4,[IA]; indirect-wr|### Wts cntr offset ####|0C09// MOV 9,IA; indirect-wr addr|########################|0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x004,adg2_offset /\/\/\0000// NOP;211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP4002// -|###loop CONFIG LP1 (2-times) ########2002// -|4040// \——long MOV - m1 :> Mov ML(i),  X0L;0080// /4141// \——long MOV - m2 :> Mov ML(i++), X1L;0080// /4102// \——long MOV - m3 :> Mov ML(j++), X2L;0080// /4103// \——long MOV - m4 :> Mov ML(j++), X3L;0880// /4100// -|——loop CONFIG LP0 (256 times)2001// -|444C// \——long MOV - m50384// /754D// \——long MOV - m60385// /710E// \——long MOV - m70386// /712F// \——long MOV - m80980// /4450// \——long MOV - m903C1// /7551// \——long MOV - m100382// /7112// \——long MOV - m110383// /7313// \——long MOV (Eval.) - m120D80// /0000// NOP213F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP0000// NOP0C02// MOV 2,IA; indirect-wr addr|########################|0D00// MOV 0,[IA]; indirect-wr|### Xcntr Base_count####|0C03// MOV 3,IA; indirect-wr addr|########################|0D04// MOV 4,[IA]; indirect-wr /\/\/\/\/ MOV 0x400,adg0 bas_cnt /\/\/\0C0F// MOV F,IA; indirect-wr addr|### Ycntr Base_count####|0D04// MOV 4,[IA]; indirect-wr /\/\/\/\/ MOV 0x400,adg3 bas_cnt /\/\/\2400// --- toggle imux only0000// NOP26F2// LpEnd1;0001// SKIP261F// SET STAGECLK ;0000// NOP ;0000// NOP; %%%%%%%%%%%%% 3rd STAGE %%%%%%%%%%%%%%%%%%%0000// NOP0000// NOP *** we use 2 nested loops0C08// MOV 8,IA; indirect-wr addr|########################|0D10// MOV 10,[IA]; indirect-wr|### Wts cntr offset ####|0C09// MOV 9,IA; indirect-wr addr|########################|0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x010,adg2_offset /\/\/\0C00// MOV 0,IA; indirect-wr addr0D40// MOV 40,[IA]; indirect-wr0C01// MOV 1,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x040,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D40// MOV 40,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x040,adg3_offset /\/\/\0C03// MOV 3,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen0 base_count /\/\/\0C0F// MOV F,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen3 base_count /\/\/\211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP0000// NOP4008// -| ### Loop config LP 1 (8 times)  ###2002// -|4040// \——long MOV - m1 :> Mov ML(i),  X0L;0080// /4141// \——long MOV - m2 :> Mov ML(i++), X1L;0080// /4102// \——long MOV - m3 :> Mov ML(j++), X2L;0080// /4103// \——long MOV - m4 :> Mov ML(j++), X3L;0880// /4040// -|——loop CONFIG LP0 (64 times)2001// -|444C// \——long MOV - m50384// /754D// \——long MOV - m60385// /710E// \——long MOV - m70386// /712F// \——long MOV - m80980// /4450// \——long MOV - m903C1// /7551// \——long MOV - m100382// /7112// \——long MOV - m110383// /7313// \——long MOV (Eval.) - m120D80// /0000// NOP213F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP2D80// AAO 5,100 ; Add 100 to adgen0 and adgen3 base_count(80h x2)2400// --- toggle imux only0000// NOP26F2// LpEnd1;0001// SKIP261F// SET STAGECLK ;0000// NOP ;0000// NOP; %%%%%%%%%%%%% 4th STAGE %%%%%%%%%%%%%%%%%%%0000// NOP0000// NOP *** we use 2 nested loops0C08// MOV 8,IA; indirect-wr addr|########################|0D40// MOV 40, [IA]; indirect-wr|### Wts cntr offset ####|0C09// MOV 9,IA; indirect-wr addr|########################|0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x040,adg2_offset /\/\/\0C00// MOV 0,IA; indirect-wr addr0D10// MOV 10,[IA]; indirect-wr0C01// MOV 1,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x010,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D10// MOV 10,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x010,adg3_offset /\/\/\0C02// MOV 2,IA ;0D00// MOV 0,[IA]; CLR low byte of adgen0 base_count /\/\/\0C03// MOV 3,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen0 base_count /\/\/\0C0E// MOV E,IA ;0D00// MOV 0,[IA]; CLR low byte of adgen3 base_count /\/\/\0C0F// MOV F,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen3 base_count /\/\/\211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP0000// NOP4020// -| ### Loop config LP 1 (32 times)  ###2002// -|4040// \——long MOV - m1 :> Mov ML(i),  X0L;0080// /4141// \——long MOV - m2 :> Mov ML(i++), X1L;0080// /4102// \——long MOV - m3 :> Mov ML(j++), X2L;0080// /4103// \——long MOV - m4 :> Mov ML(j++), X3L;0880// /4010// -|——loop CONFIG LP0 (16 times)2001// -|444C// \——long MOV - m50384// /754D// \——long MOV - m60385// /710E// \——long MOV - m70386// /712F// \——long MOV - m80980// /4450// \——long MOV - m903C1// /7551// \——long MOV - m100382// /7112// \——long MOV - m110383// /7313// \——long MOV (Eval.) - m120D80// /0000// NOP213F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP2D20// AAO 5,40 ; Add 40 to adgen0 and adgen3 base_count (20h x2)2400// --- toggle imux only0000// NOP26F2// LpEnd1;0001// SKIP261F// SET STAGECLK ;0000// NOP ;0000// NOP; %%%%%%%%%%%%% 5th STAGE %%%%%%%%%%%%%%%%%%%0000// NOP0000// NOP *** we use 2 nested loops0C08// MOV 8,IA; indirect-wr addr|########################|0D00// MOV 00,[IA]; indirect-wr|### Wts cntr offset ####|0C09// MOV 9,IA; indirect-wr addr|########################|0D01// MOV 1,[IA]; indirect-wr /\/\/\/\/ MOV 0x100,adg2_offset /\/\/\0C00// MOV 0,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr0C01// MOV 1,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x004,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x004,adg3_offset /\/\/\0C02// MOV 2,IA ;0D00// MOV 0,[IA]; CLR low byte of adgen0 base_count /\/\/\0C03// MOV 3,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen0 base_count /\/\/\0C0E// MOV E,IA ;0D00// MOV 0,[IA]; CLR low byte of adgen3 base_count /\/\/\0C0F// MOV F,IA ;0D00// MOV 0,[IA]; CLR high byte of adgen3 base_count /\/\/\211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP0000// NOP4080// -| ### Loop config LP 1 (128 times)  ###2002// -|4040// \——long MOV - m1 :> Mov ML(i),  X0L;0080// /4141// \——long MOV - m2 :> Mov ML(i++), X1L;0080// /4102// \——long MOV - m3 :> Mov ML(j++), X2L;0080// /4103// \——long MOV - m4 :> Mov ML(j++), X3L;0880// /4004// -|——loop CONFIG LP0 (4 times)2001// -|444C// \——long MOV - m50384// /754D// \——long MOV - m60385// /710E// \——long MOV - m70386// /712F// \——long MOV - m80980// /4450// \——long MOV - m903C1// /7551// \——long MOV - m100382// /7112// \——long MOV - m110383// /7313// \——long MOV (Eval.) - m120D80// /0000// NOP213F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP2D08// AAO 5,08 ; Add 10 to adgen0 and adgen3 base_count (08h x2)2400// --- toggle imux only0000// NOP26F2// LpEnd1;0001// SKIP261F// SET STAGECLK ;0000// NOP ;0000// NOP; %%%%%%%%%%%%% 6th STAGE %%%%%%%%%%%%%%%%%%%0000// NOP0000// NOP *** we use 2 nested loops0C08// MOV 8,IA; indirect-wr addr|########################|0D00// MOV 00,[IA]; indirect-wr|### Wts cntr offset ####|0C09// MOV 9,IA; indirect-wr addr|########################|0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x00,adg2_offset /\/\/\0C00// MOV 0,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr0C01// MOV 0,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x004,adg0_offset /\/\/\0C0C// MOV C,IA; indirect-wr addr0D04// MOV 4,[IA]; indirect-wr0C0D// MOV D,IA; indirect-wr addr0D00// MOV 0,[IA]; indirect-wr /\/\/\/\/ MOV 0x004,adg3_offset /\/\/\0C02// MOV 2,IA ;0D00// MOV 0,[IA]; CLR low byte of adgen0 base_count /\/\/\0C03// MOV 3,IA ;0D00// MOV 0, [IA]; CLR high byte of adgen0 base_count /\/\/\0C0E// MOV E,IA ;0D00// MOV 0, [IA]; CLR low byte of adgen3 base_count /\/\/\0C0F// MOV F, IA ;0D00// MOV 0, [IA]; CLR high byte of adgen3 base_count /\/\/\211F// CLR RSC; clr cntrs & init. wts regs to .9990000// NOP0000// NOP//4200 // -| ### Loop config LP 1 (200 times)  ###//2002 // -|4040// \——long MOV - m1 :> Mov ML(i),  X0L;0080// /40C1// \——long MOV - m2 :> Mov ML(i+1), X1L;0080// /4082// \——long MOV - m3 :> Mov ML(j+1), X2L;0080// /4083// \——long MOV - m4 :> Mov ML(j+1), X3L;0880// /4200// -|——loop CONFIG LP0 (200 times)2001// -|444C// \——long MOV - m50384// /6CCD// \——long MOV - m60385// /688E// \——long MOV - m70386// /68AF// \——long MOV - m81980// /4450// \——long MOV - m903C1// /6CD1// \——long MOV - m100382// /6892// \——long MOV - m110383// /6A93// \——long MOV (Eval.) - m121D80// ///2D02 // AAO 5,02 ; Add 4 to adgen0 and adgen3 base_count (02h x2)//0000 // NOP//26F2 // LpEnd1;//0001 // SKIP04FF// GOTO 0xFF;0000// NOP


Table 4 shows and describes the instruction set for an exemplary embodiment of the present invention. Operational code (Opcode) is designed with multi-stage decoding. Standard instructions are 16-wide. Four instruction categories exist, encoded by Opcode <A>, as follows:

    • 00: configuration, setup and administration
    • 01: Multi-function extended (32-bit) instructions
    • 10: Immediate Move operations
    • 11: Reserved for expansion


The multi-tiered decoding is, in descending order, Op code<A>.Op code<D>.

TABLE 4Instruction SetOp codeOp codeOp codeOp code<A><B><C><D>MnemonicDescription000000xx xxxxNOPNo operation is executed.xxx000xx xxxxSKIPValid in odd addresses only, causesxxx1execution of even-addr. Instructiononly. PC increments on next clock10N[9:0]JMP NFetch next instruction at address =current address + N, where N is 2'scomplement01N[9:0]Goto NJump to address N in IRAM11{00,N[7:0]}Movi N, IAMove N to indirect address (IA) reg.11{01,N[7:0]}Movi N,Move N to dest. Specified by IA[IA]01XReserved100000 xxxx xxxxCLR ALLReset all datapath resources(counters, reg.'s . . . etc.){1, RSC[7:0]}CLR RSCReset a specific resource RSC001{001, N[5:0]}CFGConfigure Resource N as inputMemin Nmemory to AU{010, N[5:0]}CFGConfigure Resource N as outputMemout Nmemory to AU{011, N[5:0]}CFG MwtConfigure Resource N as inputNWeights/Constants memory to AU{100, N[5:0]}CFGConfigure Resource N as destinationMem_Destfor input memory (used in multi-Noperation instructions)[efficient toselect X-reg's]NOT IMPLEMENTED{101,N[5:0]}WR FLGWrite output flags register FLG asfollows:FLG5 <= N[5] . . . FLG0 <= N[0]{110,N[5:0]}CFGConfigure specialized connections:CONN[0] connects Memin High to MeminLow[5:1]TBD0100 0000 0000TogToggle mux input to AU{1, N[7:0]}RCMDRegistered command, described inTable 50110 0000 0000STOPStop execution, halts pc at currentvalue0 0000 0001GOStart immediate execution0 1111 0001Loop_end0Specifies the end of Loop 00 1111 0010Loop_end1Specifies the end of Loop 10 1111 0100Loop_end2Specifies the end of Loop 20 1111 1000Loop_end3Specifies the end of Loop 30 0111 0001Reserved0 0111 0010Reserved0 0111 0100Reserved0 0111 1000Reserved0 0001 0001OPR FFTfunction of AU = FFT Radix-40 0001 0010OPRfunction of AU = Pre-TwiddlePRTW0 0001 0011OPR IFFTfunction of AU = DFFT0 0001 0100OPR GSCfunction of AU = gain-scalemultiplication0 0001 0101OPR BRLSfunction of AU = Barrel Shift theOutput0 0001 0110OPRfunction of AU = Post- TwiddlePSTW0 0001 0111OPR FFT2function of AU = FFT Radix-20 0001 1000OPR STB0Enable STB0 as start of executiontrigger0 0001 1001OPR STB1Enable STB1 as start of executiontrigger0 0001 1010OPR STB2Enable STB2 as start of executiontrigger0 0001 1111OPR STB3Enable STB3 as start of executiontrigger0 0001 1011ALLSTBDisables all STBOFF0 0001 1100ALLSTBEnable all STBON0 0001 1110SETAssert the stageclk signalSTAGECLK1,adgN[7:0]AAO NSelected Adgen, by adg[2:0],[2:0]accumulate address base count iswritten with value N11Reserved10[13:10][9:8][7:0]MOVIMove immediate 8-bit data toAddrBytedataRSC.n dataresource (RSC) at byte positionpositionspecified by n. RSC is limited toX0 . . . X3 registers.For n = 0 −> D[7:0], n = 1 −> D[15:8],n = 2 −> D[23:16], n = 3 −> D[31:24]01Double-Word (32-bit) multiple-function instructions are described below in Table 611Reserved


CFG MEMIN Command


Six bits define the input memory configuration as follows:

    • 5: Address counter selector for XMEM high; 0→adgen0, 1→adgen3.1
      1 Adgen3 can also be configured with CFG MEMOUT. However, this instruction takes precedence.
    • 4-3: Data source selector for XMEM high (the memory that drives the X-registers.) [dsh_sel(2.:0)]
    • 2: Use Ymem CTR settings (bits 12-9) of the multi-move single instruction to control adgen3 when 1.
    • 1-0: Data source selector for XMEM low (the memory that drives the X-registers.) [dsl_sel(2:0)]


The data source selectors, for both high and low XMEM, decode as follows:

    • 00→In Place memory (MEMIN) Low
    • 01→In Place memory (MEMIN) High
    • 10→In Place memory−Optional Channel (usually is the same as MEMIN low)
    • 11→TBD


      CFG MEMOUT Command


Six bits select the memory destination (YMEM) of AU's Y-outputs as well as the address generator for the YMEM high portion.

    • 5-4: select the address generator for low YMEM as follows: [ymadr_sel]
      • 00→adgen1 (default, also drives high YMEM)
      • 01→adgen3
      • 10→adgen2
      • 11→adgen0
    • 3-2: select the address generator for high YMEM as follows: [ymadr_sel]
      • 00→adgen1 (default, also drives low YMEM)
      • 01→adgen3
      • 10→adgen2
      • 11→adgen0
    • 1-0: select YMEM data destination [ymm_sel(2:0)]


The data destinations for YMEM decode as follows:

      • 00→MEMIN
      • 01→MEMOUT
      • 10→MEM-PFP
      • 11→Misc. (TBD)


        CFG Mwt Command


Six bits are assigned to this command [5:0] but only [3:0] are used as follows:

    • 1-0: Select data source for constants (w0sel)
      • 0→Sine lookup table
      • 1→Gain Scale memory
      • 2→Windowing memory
      • 3→auxiliary memory
    • 3-2: adgen select for data source
      • 0→adgen2
      • 1→adgen1
      • 2→adgen0
      • 3→adgen3


        CLR RSC Command


Bits 7:0 individually reset and initialize engine resources as follows:

    • 0: adgen0
    • 1: adgen1
    • 2: adgen2
    • 3: adgen3
    • 4: All weights registers initialize to +1, tog_mux reset to 0 and X registers initialize to 0. The AU is also cleared by this bit.
    • 5: Toggle input multiplexer control to the Arithmetic Unit (AU)
    • 6: Cumulative Stage Gain Control counter
    • 7: TBA


The above bits are active high.


SHRO Command


This command executes a 2-bit right shift in the adgen offset register of all selected adgen's in N (bits 3:0). N is defined as follows:

    • 0: adgen0
    • 1: adgen1
    • 2: adgen2
    • 3: adgen3


An adgen shift is executed when the corresponding bit is set.


Adgen Accumulate Address Base_Count


This command adds 2×N[7:0] to the current content of address offset register in adgen(s) specified by adg[2:0] as follows:

    • Adg[0]→adgen0
    • Adg[1]→adgen1
    • Adg[2]→adgen3


A value of ‘1’ in corresponding adgen position causes the counter to update.


Loop Instructions


Loop instructions are specially designed to operate in a tight loop with no overhead clock cycles to administer the loop. A loop is started with the first instruction following a Loop Start instruction and ends with, either a Loop_end instruction or a field within the Multi-Move instruction. The Multi-Move instruction has a Loop Eval field (bit 26), which facilitates monitoring loop execution with zero overhead, this feature is available only within loop 0. Up to four loops can be nested. Loops 1-3 must use the Loop_Endi command to signal the end of the loop, while loop 0 may use the Loop_end0 instruction or the Loop Eval field. A loop must contain a minimum of 3 instructions in order to meet the timing requirements of a tight loop with no overhead. When multiple loops are used concentrically, the outermost should be loop 3 and the innermost should be loop 0.


Registered Command Instruction (RCMD)


This instruction facilitates the access to an 8-bit register that may be customized by the user. The value of N is directly written to the RCMD register. In the context of an FFT application, the 8 bits are defined as follows:

TABLE 5RCMD instructionBitFunctionDescription0Blank_SPMZero out scratch pad memory during reads1TBD2TBD3TBD4Start_bflySoft start of program execution5TBD6TBD7TBD


Multiple-Function 32-Bit Instructions


Multi-Move Single Instruction


There is no specific syntax for this instruction, but a combination of two or three move instructions compose this operation.

TABLE 6Specialized Instructions31-2928272625-2322-1918-1615-141312-98-5432-0000AddOfsTogLpEvVwWmemW01YYmemXmemYmemXmemXVyCTRDestSrcCTRCTRDestSrcDest.VxSettingSettingSetting010-Reserved111


31-29: OP Code for multiple-function Move instruction.


28: “Add Offset to i-counter” enable for X, Y and W counters. This bit, when set, along with the auto-increment bit, will cause the i-counter new value to equal the old value plus the offset register content. This bit is decoded in conjunction with each adgen's auto-increment bit.


27: Causes input mux to AU to toggle when set.


26: Loop evaluate bit to ensure smooth transitioning to the beginning of a loop.


25-23: Vw, Vy and Vx active-high bits that validate the move instructions from Weights/Constants memory to W registers, from AU's Y output to memory and from input memory to X registers.


22-19: control setting for address generator counter to Weights/Constants memory; used in W-to-register move instruction.


18-16: Destination address for W register. Decode is as follows:

[18:16]Register001W1 Low010W2 Low011W3 Low100W1 High101W2 High110W3 High000, 111Reserved


15-14: OP Code for multiple function instructions.


13: Source data for Y-to-memory move instruction, 0 for Y0 and 1 for Yn [Y is the Arith. Unit output].


12-9: control setting for address generator counter to output memory; used in Y-to-memory move instruction.


8-5: control setting for address generator counter to input memory; used in memory-to-X-register move instruction.


4: selects between high and low memories (MEMout) to which Y output is written (0=low and 1=high.)


3: selects between high and low memories (MEMin) from which data is fetched for writing to X registers (0=low and 1=high.)


2-0: X-register destination used in memory-to-X-register move instruction. Decode is as follows:

[2:0] Register000X0 Low001X1 Low010X2 Low011X3 Low100X0 High101X1 High110X2 High111X3 High


General Form of CTR Setting Bits:


[0] auto-increment of i-counter


[1] selection of i (1) or j (0) counter to connect to output


[3:2] addressing mode: 00→RSC(i) or j

    • 01→RSC(i+1) or j
    • 10→RSC(i++) or j
    • 11→RSC(i++1) or j


      where RSC≡Resource. FIG. 10 shows a memory address generation circuit in accordance with an embodiment of the present invention.
    • i≡the current value of icounter in a given ADG.
    • j=the current value of jcounter in a given ADG.
    • ++≡output is the sum of the specified counter and the offset register in a given ADG.


A 6-bit command is passed to the ADGEN and is defined as follows:

Ccntfunction0icnt ce1jcnt ce2ij_sel3add 14add offset5shift add_offset 2 bits to the right.


Loop Start Instructions

TABLE 7Loop Configuration Instruction31-2928-2019-1615-1413-0001x xxxxLoop ID01Loopxxxxrepeat count 010-Reserved111


31-29: OP Code for loop start and loop address instruction.


28-20: Unused bits.


19-16: Four concentric loops are available, Loop3-Loop0. These bits identify the loop being set up as follows:

[19-16]Loop no.00010001010100210003


15-14: OP Code for multiple function instructions.


13-0: This number specifies how many times this loop is repeated.


The following nomenclature is used in describing the Adgen desired behavior:

    • i≡the current value of icounter in a given ADG.
    • j≡the current value of jcounter in a given ADG.
    • ++≡output is the sum of the specified counter and the offset register in a given ADG.
    • {circumflex over ( )}≡increment the specified counter at the next clock cycle.
    • ML, MH≡configured input memories


The Data Interface Module (DIF) interfaces external data to either the ping-pong input buffers of the FFT or the single IFFT input buffer. This module's operation is controlled by a 4-bit configuration register: Dif_cfgr which is mapped at indirect address 0×40 (see Table 2).

Bit(s)MnemonicFunction2:0AmsbIdentifies the most-significant bitin the generated address to theinput memory buffer according tothe following map:000 → Daddr[6] 001 → Daddr[7]010 → Daddr[8] 011 →Daddr[9]100 → Daddr[10] 101 → Daddr[11]110, 111 → Daddr[12]Amsb corresponds to physicalmemory space with LSB addressbit connected to select betweenReal and Imaginary parts ofmemory.4:3Wrmode0 → input data is writtenexclusively to the real input memorybuffer and 0 is written into theimaginary input memory buffer,used address bits are Daddr[N:0]1 → input data is alternatedbetween the real and the imaginaryinput buffer memory, starting withthe imaginary buffer thenthe real buffer. Address bits usedare Daddr[N:1] and Daddr[0]is to select real/imaginary memory.2 → input data is alternatedbetween the real and the imaginaryinput buffer memory, startingwith the real buffer then theimaginary buffer. Address bitsused are Daddr[N:1] andDaddr[0] is to selectreal/imaginary memory.3 → input data is written toboth real and imaginary memorybuffers of the FFT and IFFT.7:5PhyamsbIdentifies the most-significantaddress bit in each half of theinput memory buffer required tofill in the received FFT frameaccording to the following map:000 → Daddr[6] 001 → Daddr[7]010 → Daddr[8] 011 →Daddr[9]100 → Daddr[10] 101 → Daddr[11]110, 111 → Daddr[12]


With reference to FIG. 11, the following is a discussion of barrel shifting operation. The OPR BRLS instruction invokes barrel shifting operation. Similar to the execution of an FFT/IFFT stage, this operation is setup as a zero-overhead loop of moving a barrel-shift component from BSRAM into W3L and W3H, simultaneous with in-place data moved to the register pairs X0L(re, im) and X0H(re, im). Transparent to the user is the fact that the shift component is added to the value of the cumulative gain-scale shift that accrues during the FFT in-place stage operations.


The Barrel Shifter is located inside the AU and shares its Y0 output, therefore, the results can be written to the AU's output resources. The Barrel Shifter serves to combine two functionalities. First, it compensates for the automatic overflow protection explained earlier. This function is done as an internal capability of the engine. Second, The Barrel Shifter can perform the exponent part of a large scale factor. These two functions are combined together in the Barrel Shifter. The Barrel Shifter is capable of shifting up to 12 positions to the left, no shift or up to 2 positions to the right. The shift instruction fetched from the BSRAM is coded as shown in Table 8. Vacated bits are filled with 0's on LSB side and sign-extended on the MSB side. Note that since the shift instruction code exceeds the maximum right shift, it is expected that the sum of this shift code and the gain scale count will yield a value in the range of −2 to +12, which is the range supported by the barrel shifter. If the supported range is exceeded, the maximum shift in the desired direction will apply.

TABLE 8Barrel Shifter EncodingShiftInstructionCodeAction00000No shift00001Shift to the Left 1 bit position00010Shift to the Left 2 bit positions00011Shift to the Left 3 bit positions00100Shift to the Left 4 bit positions00101Shift to the Left 5 bit positions00110Shift to the Left 6 bit positions00111Shift to the Left 7 bit positions01000Shift to the Left 8 bit positions01001Shift to the Left 9 bit positions01010Shift to the Left 10 bit positions01011Shift to the Left 11 bit positions01100Shift to the Left 12 bit positions11110Shift to the Right 2 bit positions11111Shift to the Right 1 bit position


The following is an exemplary loop of long move instructions for performing a barrel shift operation in an embodiment of the present invention:

OPR BRLS ;Tog$Mov BSR(i++), W0$Rep 1024 (Mov BSR(i{circumflex over ( )}), W0 ; Mov Y0, MH(i++{circumflex over ( )});Tog$Mov BSR(i++{circumflex over ( )}), W0;Mov Y0, ML(i{circumflex over ( )});Tog$ // Loop eval.)


It should be noted that WO corresponds to a value of 0 in bit positions 18-16 of the long move instruction. BSR is the barrel shift RAM and is addressed by ADGEN assigned to the weights memory.


The following is a discussion of post twiddle and gain scaling in receivers. The required Post-Twiddle terms are:

Re(v)=RP(v)+IP(v)*cos(πv/N)−RM(v)*sin(πv/N)
Re(N−v)=RP(N−v)−IP(N−v)*cos(πv/N)+RM(N−v)*sin(πv/N)
Im(v)=IM(v)−RM(v)*cos(πv/N)−IP(v)*sin(πv/N)
Im(N−v)=−IM(N−v)−RM(N−v)*cos(πv/N)−IP(N−v)*sin(πv/N)


The architecture of a discrete post twiddle implementation is shown in FIG. 12. Note that the structure has been included in the ER4 design and the twiddle is computed as the last stage in an FFT operation. A receiver's view of twiddle and gain-scale implementation is depicted in FIG. 13. Although ER4 can perform gain scale operations, in VDSL the frame time is too short for the engine to do the computation and keep an adequate spare margin. The addition of a pair of multipliers optimizes the gain scale and writing out of results as shown in FIG. 13. The timeline of operations done after the post-twiddle is shown in FIG. 14.


The AU generates Post-Twiddle outputs as follows:

Yni(v)=Z1r−B1
Yni(N−v)=−Z1r−B1


Given that the pair of points used are x(v) and x(N−v). Similarly for the real components:

Ynr(v)=Y0r−B0
Ynr(N−v)=Y0r+B0


The engine differentiates between the above pairs by recognizing a write from AU Y-output to in-place memory with addressed location (i) versus location (i++). This circuitry is invoked in Twiddle functions only.



FIG. 15 shows the twiddle function datapath in accordance with an embodiment of the present invention.



FIG. 16 shows the gain-scale and windowing datapath in accordance with an embodiment of the present invention.



FIG. 17 shows the timeline of Radix-2 FFT in accordance with an embodiment of the present invention.


As discussed above, the programmable engine core may include feed-backs and feed-forwards from certain registers back to previous ALUs. FIG. 18 shows one exemplary engine core with feedback in which the output of Register B is fed back to the first ALU such that the first ALU can operate on the contents of Register A and/or the contents of Register B and store the result in Register B. FIG. 19 shows another exemplary engine core with feedback in which the output of Register C is fed back to the first ALU such that the first ALU can operate on the contents of Register A and/or the contents of Register C and store the result in Register B. FIG. 20 shows another exemplary engine core with feedback in which the output of Register B is fed back to the first ALU and the output of Register C is fed back to the first ALU and the second ALU such that the first ALU can operate on the contents of Register A, Register B, and/or Register C and store the result in Register B and the second ALU can operate on the contents of Register B and/or Register C and store the output in Register C. FIG. 21 shows an exemplary engine core with both feedback and feed-forward such that each ALU can operate on any combination of the registers.


Thus, certain embodiments of the present invention include a programmable engine core. The programmable engine core typically includes one or more ALUs situated between registers or other storage constructs. The ALUs are programmed or otherwise configured to perform certain operations upon data that is moved into the ALUs. Different ALUs can be programmed or configured to perform different operations.


Certain embodiments of the present invention employ “ping-pong” buffers. Among other things, the ping-pong buffers allow data to be written into one buffer when data is being read from the other buffer, thereby facilitating parallel operations.


Certain embodiments of the present invention dynamically allocate scratchpad memory to the ping-pong input buffer. As shown in FIG. 9, there are preferably two 16-bit wide ping-pong memories, a 2-bit wide and a 12-bit wide scratch pad memory. This is a part of the memory management scheme within the engine. The scratch pad memory is used to enhance the internal precision of the engine without the need to increase the word-length across the board for all memory buffers. The scratch pad has the dynamic overflow protection bits and the extra precision bits. During processing stages, the scratch pad affords a wider word length for reduced round-off errors. The output stage rounds off and stores the results in the output memory. The 2-bit page of the scratch pad precedes and the 12-bit page from the rest of the scratch pad memory is appended to the ping-pong memory being used. The 2 bits are sign extension bits and the 12 bits increase the computational resolution. The scratch pad saves memory.


Certain embodiments of the present invention employ a dynamic overflow protection scheme to detect arithmetic overflow conditions. Specifically, there are some number of sign extension bits (greater than or equal to two sign extension bits), with one value (e.g., all zeros) used for positive values and another value (e.g., all ones) used for negative values. In the course of performing certain arithmetic computations, the sign extension bits are checked. If the value of the sign extension bits have changed, then an overflow condition exists, in which case the entire data set is typically scaled back. By using sign extension values of all zeros and all ones, the logic used to detect overflow conditions is relatively simple.


Certain embodiments of the present invention employ sine/cosine lookup tables to obtain sine/cosine values for various arithmetic computations. In preferred embodiments, rather than storing sine/cosine values for an entire wave, values are only stored for a portion of the wave (e.g., one eighth or one quarter), and missing values are computed from those stored values, specifically by taking advantage of the symmetries of the sine/cosine waves. Computations can be done in 1 clock cycle.


The present invention may be embodied in many different forms, including, but in no way limited to, programmable logic for use with a programmable logic device (e.g., a Field Programmable Gate Array (FPGA) or other PLD), discrete components, integrated circuitry (e.g., an Application Specific Integrated Circuit (ASIC)), or any other means including any combination thereof.


Hardware logic (including programmable logic for use with a programmable logic device) implementing all or part of the functionality previously described herein may be designed using traditional manual methods, or may be designed, captured, simulated, or documented electronically using various tools, such as Computer Aided Design (CAD), a hardware description language (e.g., VHDL or AHDL), or a PLD programming language (e.g., PALASM, ABEL, or CUPL).


Programmable logic may be fixed either permanently or transitorily in a tangible storage medium, such as a semiconductor memory device (e.g., a RAM, ROM, PROM, EEPROM, or Flash-Programmable RAM), a magnetic memory device (e.g., a diskette or fixed disk), an optical memory device (e.g., a CD-ROM), or other memory device. The programmable logic may be fixed in a signal that is transmittable to a computer using any of various communication technologies, including, but in no way limited to, analog technologies, digital technologies, optical technologies, wireless technologies (e.g., Bluetooth), networking technologies, and internetworking technologies. The programmable logic may be distributed as a removable storage medium with accompanying printed or electronic documentation (e.g., shrink wrapped software), preloaded with a computer system (e.g., on system ROM or fixed disk), or distributed from a server or electronic bulletin board over the communication system (e.g., the Internet or World Wide Web).


The present invention may be embodied in other specific forms without departing from the true scope of the invention. The described embodiments are to be considered in all respects only as illustrative and not restrictive.

Claims
  • 1. Apparatus for digital signal processing comprising: a first plurality of programmable filter elements, at least one of said first plurality of programmable filter elements having a first microcode control program for internal control of the programmable filter element; first programmable interconnection logic coupled to the first plurality of programmable filter elements for selectively combining, scaling, and accumulating output values from the first plurality of programmable filter elements and selectively providing accumulated values as inputs to the first plurality of programmable filter elements; and a first filter controller coupled to the first plurality of programmable filter elements and the first programmable interconnection logic, the first filter controller having a second microcode control program for external control of the first plurality of programmable filter elements and the first programmable interconnection logic.
  • 2. Apparatus according to claim 1, wherein the first programmable interconnection logic comprises: a plurality of registers, each register capable of being selectively coupled to at least one programmable filter element inputting data to the programmable filter element or receiving data from the programmable filter element.
  • 3. Apparatus according to claim 2, further comprising: a data memory coupled to at least one of the registers for outputting data to the register or receiving data from the register.
  • 4. Apparatus according to claim 3, wherein at least one of the plurality of registers can be selectively coupled to input data to a programmable filter element and receive data from the same programmable filter element.
  • 5. Apparatus according to claim 3, wherein at least one of the plurality of registers can be selectively coupled to input data to one programmable filter element and receive data from a different programmable filter element.
  • 6. Apparatus according to claim 3, wherein at least one of the plurality of registers can be selectively coupled to input data to multiple programmable filter elements.
  • 7. Apparatus according to claim 1, wherein the first filter controller comprises: an instruction memory for storing the second control program; and at least one instruction decoder coupled to the instruction memory for programming the first plurality of programmable filter elements and the first programmable interconnection logic based on the second control program.
  • 8. Apparatus according to claim 1, wherein the first filter controller comprises a plurality of program counters for running different iterations of the second control program for different filter elements.
  • 9. Apparatus according to claim 1, wherein the first filter controller comprises a plurality of loop counters for running different iterations of second control program loops for different filter elements.
  • 10. Apparatus according to claim 1, wherein the first programmable interconnection logic comprises: a multiplexer coupled to the first plurality of programmable filter elements for selectively driving output values received from the first plurality of programmable filter elements; a barrel shifter coupled to the multiplexer for receiving the values and selectively scaling the values according to a scaling factor programmed by the first filter controller; and at least one accumulator coupled to the barrel shifter for selectively accumulating scaled values from the barrel shifter.
  • 11. Apparatus according to claim 10, wherein the first programmable interconnection logic further comprises: programmable feedback logic coupled to the at least one accumulator and to the first plurality of filter elements for selectively providing the accumulated values as inputs to the first plurality of programmable filter elements.
  • 12. Apparatus according to claim 1, wherein at least one programmable filter element having a first microcode control program comprises: a second plurality of programmable filter elements; second programmable interconnection logic coupled to the second plurality of programmable filter elements for selectively combining, scaling, and accumulating output values received from the second plurality of programmable filter elements and selectively providing accumulated values as inputs to the second plurality of programmable filter elements; and a second filter controller coupled to the second plurality of programmable filter elements and the second programmable interconnection logic for controlling the second plurality of programmable filter elements and the second programmable interconnection logic according to the first control program.
  • 13. Apparatus according to claim 1, wherein at least one of the first plurality of programmable filter elements comprises: at least one memory for storing data samples and coefficients; a multiplier for multiplying data samples read from the at least one memory with corresponding coefficients read from the at least one memory; an accumulator for summing multiplier outputs; and control logic for controlling the at least one memory, the multiplier, and the accumulator, the control logic logically shifting the data samples read from the at least one memory and writing the logically shifted data samples back into the at least one memory so as to emulate a shift register.
  • 14. Apparatus according to claim 1, wherein the first filter controller allows each programmable filter element to operate independently to perform different filtering functions.
  • 15. Apparatus according to claim 1, wherein the first filter controller allows operation of multiple programmable filter elements to be combined to perform a single filtering function.
  • 16. Apparatus according to claim 1, wherein the first filter controller can implement a plurality of filters, each having a symbol rate, and wherein the repetitive execution, by the first filter controller, of a loop containing a number of single-clock instructions can be completed in the number of clocks that are required for execution of a symbol for the filter having the slowest symbol rate.
  • 17. Apparatus according to claim 16, wherein, during each symbol period of the slowest symbol rate filter, filters with faster symbol rates than the slowest symbol rate filter can operate on multiple symbols.
  • 18. Apparatus according to claim 16, wherein, during each symbol period of the slowest symbol rate filter, filters with faster symbol rates than the slowest symbol rate filter can complete execution of a symbol and then remain idle for the remainder of the symbol period.
  • 19. Apparatus according to claim 1, wherein each microcode instruction in the instruction set of the first filter controller contains a clock field, and wherein the first filter controller applies software-generated clocks to the individual filter elements based on the clock field.
  • 20. Apparatus according to claim 19, wherein a software-controlled clock can be generated by programming a value of one or zero in the clock field in each microcode instruction, such that the sequence of ones and zeros directly generate a plurality of symbol clocks at a frequency dictated by the sequence and the length of instruction loop.
  • 21. Apparatus according to claim 1, wherein symbol clocks applied to the plurality of filter elements are dynamically selected via software and the frequencies are determined by a field in the instruction set of the first filter controller.
  • 22. Apparatus according to claim 1, wherein each microcode instruction of the instruction set of the first filter controller contains a loop evaluation bit, and wherein the first filter controller evaluates the loop evaluation bit during the execution of each instruction.
  • 23. Apparatus according to claim 1, further comprising: a transceiver for transmitting and receiving communication signals, the transceiver providing signals to the plurality of programmable filter elements for digital signal processing and receiving processed signals from the plurality of programmable filter elements.
PRIORITY

This application claims priority from U.S. Provisional Patent Application No. 60/563,032 entitled PROGRAMMABLE ENGINE CORE FOR EXECUTING DIGITAL SIGNAL PROCESSING FUNCTIONS, filed on Apr. 16, 2004 in the names of Michael Hennedy and Ahmed Shalash, which is hereby incorporated herein by reference in its entirety.

Provisional Applications (1)
Number Date Country
60563032 Apr 2004 US