Circular buffer access device, system and method
By organizing the cyclic buffer into multiple buffer subsets and reorganizing the iterative process, the performance and power consumption problems of iterative processing operations in embedded processing systems are solved, and more efficient parallel processing and data sharing are achieved.
Patent Information
- Application Number
- CN202310055613.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-21
- Filing Date
- 2023-01-16
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2043-01-16
AI Technical Summary
Existing embedded processing systems have performance and power consumption problems when performing iterative processing operations, such as LMS adaptive FIR filters, especially performance bottlenecks and high power caused by dependencies and sequential execution between iterative steps. Consumption.
By organizing the cyclic buffer into multiple buffer subsets and loading data into a cyclic buffer using memory loading commands with offset parameters and subset parameters, implementing data sharing between parallel processing of data and iterative steps , reorganize the iterative process to facilitate parallel execution and data reuse.
Improves the parallelism and data sharing of iterative operations, reduces latency between iterative steps, improves processing performance and reduces power consumption.
Smart Images

Figure CN116483442B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to using circular buffers to perform processing operations, such as iterative processing operations. Background Art
[0002] Processing systems (such as embedded processors) may frequently perform iterative processing operations. For example, the least mean square (LMS) processing algorithm is an iterative algorithm and is the most widely used adaptive filter algorithm in the fields of control systems, adaptive channel equalization, adaptive beamforming, etc.
[0003] For example, an N-tap LMS adaptive finite impulse response (FIR) filter can be implemented iteratively using three steps. In the first step, a FIR calculation can be performed, for example, according to:
[0004]
[0005] Where x is the input signal and b is the coefficient of the FIR filter. Next, the error calculation is performed, for example according to:
[0006] e n = r[n]–y[n],
[0007] where r is the desired signal. The third iterative step is to update the FIR coefficients, for example, according to:
[0008] b n+1 (k) = b n (k)+e n *x(nk), k=0, 1, ...., N-1.
[0009] The performance and power consumption of iterative operations, such as the widely used LMS adaptive FIR filter, are factors to be considered for microcontrollers (MCUs), digital signal processors (DSPs), and especially embedded processors. Such processing systems can often be implemented as a system on a chip (SOC). Summary of the invention
[0010] In one embodiment, a device includes a circular buffer and a control circuit, the circular buffer being organized into a plurality of buffer subsets in operation and the control circuit being coupled to the circular buffer. The control circuit is operative to respond to receipt of a memory load command having an offset parameter and a subset parameter to load a set of data into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and loading the set of data into the circular buffer using the identified set of buffer addresses, wherein the offset parameter indicates a data offset and the subset parameter indicates a subset of the plurality of subsets into which the circular buffer is organized.
[0011] In one embodiment, a system includes: a processing core and a memory, the memory being coupled to the processing core. The memory has a set of registers, and in operation, the set of registers is organized into a circular buffer having a plurality of buffer subsets. In operation, the memory responds to receipt of a memory load command having an offset parameter and a subset parameter from the processing core to load a set of data into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and using the identified set of buffer addresses to load the set of data into the circular buffer, wherein the offset parameter indicates an offset parameter of a data offset and the subset parameter indicates a subset of the plurality of buffer subsets into which the circular buffer is organized.
[0012] In one embodiment, a method includes organizing a circular buffer into a plurality of buffer subsets, and executing a memory load command to load a data set into the circular buffer. The memory load command has an offset parameter and a subset parameter, the offset parameter indicating a data offset and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized. Executing the memory load command includes identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter, and loading the data set into the circular buffer using the identified set of buffer addresses. .
[0013] In one embodiment, the contents of a non-transitory computer-readable medium configure a processing device to perform a method. The method includes: organizing a circular buffer into a plurality of buffer subsets, and executing a memory load command to load a set of data into the circular buffer. The memory load command has an offset parameter and a subset parameter, the offset parameter indicating a data offset and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized. Executing the memory load command includes: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter, and loading the set of data into the circular buffer using the identified set of buffer addresses. .
[0014] In one embodiment, a method includes: organizing a circular buffer into a plurality of buffer subsets, and filtering a sequence of data samples. The filtering includes iteratively: generating an error signal, executing a load command to load a data subset of the data sequence into the circular buffer, updating filter coefficients based on the data stored in the circular buffer, and generating an output signal based on the data stored in the circular buffer. The load command has an offset parameter and a subset parameter, the offset parameter indicating the data offset and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized. Executing the load command includes: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter, and using the identified set of buffer addresses to load the data subset of the data sequence into the circular buffer.
[0015] In one embodiment, an apparatus includes: a memory and a processing circuit device coupled to the memory. The processing circuit device organizes the memory into a circular buffer having a plurality of buffer subsets and filters a sequence of data samples in operation. The filtering includes iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets that the circular buffer is composed of, executing the load command including: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; using the identified set of buffer addresses to load the subset of data samples of the sequence of data samples into the circular buffer; updating filter coefficients based on the data samples stored in the circular buffer; and generating an output signal based on the data samples stored in the circular buffer.
[0016] In one embodiment, a system includes a processing core and a memory coupled to the processing core, the memory having a register set. The processing core, in operation, organizes the register set into a circular buffer having a plurality of buffer subsets and filters a sequence of data samples. The filtering includes iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the load command including: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; using the identified set of buffer addresses to load the subset of data samples of the sequence of data samples into the circular buffer; updating filter coefficients based on data samples stored in the circular buffer; and generating an output signal based on the data samples stored in the circular buffer.
[0017] In one embodiment, the content of a non-transitory computer-readable medium configures a processing device to execute a method, the method comprising: organizing a circular buffer into a plurality of buffer subsets; filtering a sequence of data samples, the filtering comprising iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; loading the subset of data samples of the sequence of data samples into the circular buffer using the identified set of buffer addresses; updating filter coefficients based on the data samples stored in the circular buffer; and generating an output signal based on the data samples stored in the circular buffer. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Non-limiting and non-exhaustive embodiments are described with reference to the following figures, wherein like reference numerals refer to like parts in the various views unless the context indicates otherwise. The sizes and relative positions of the elements in the figures are not necessarily drawn to scale. For example, the shapes of the various elements are selected, enlarged, and positioned to improve the readability of the drawings. For ease of identification in the drawings, specific shapes of the drawn elements have been selected. In addition, for ease of illustration, some elements known to those skilled in the art are not shown in the drawings. One or more embodiments are described below in conjunction with the drawings, wherein:
[0019] Figure 1 is a functional block diagram of an embodiment of an electronic device or system having a memory and a memory management circuit according to an embodiment;
[0020] Figure 2 and Figure 3 is a conceptual block diagram illustrating an example configuration of a circular buffer in accordance with various embodiments.
[0021] Figure 4 and Figure 5 is a flow chart illustrating an example embodiment of a method of loading data into a circular buffer.
[0022] Figure 6 is a conceptual diagram illustrating an example data set associated with an N-tap LMS adaptive FIR filter.
[0023] Figures 7 to 14 is a conceptual diagram illustrating an example of data loaded into a circular buffer according to various embodiments.
[0024] Fig.15 is a conceptual diagram of a conventional implementation of an N-tap LMS adaptive FIR filter.
[0025] Fig.16 is a flow chart illustrating an example embodiment of implementing an N-tap LMS adaptive FIR filter using a memory load instruction that takes up a cycle slip. DETAILED DESCRIPTION
[0026] The following description, together with the accompanying drawings, sets forth certain specific details in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the disclosed embodiments may be practiced in various combinations without one or more of these specific details, or with other methods, components, devices, materials, etc. In other cases, structures or components well known to be associated with the environment of the present disclosure, including but not limited to: interfaces, power supplies, physical component layouts, processing cores, non-volatile memory, memory controllers, loop buffers, etc., are not displayed or shown in order to avoid unnecessary confusion in the description of the embodiments. In addition, the various embodiments may be methods, systems, or devices.
[0027] Throughout the specification, claims and drawings, unless the context indicates otherwise, the following terms adopt the meanings clearly associated with this document. The term "herein" refers to the specification, claims and drawings associated with this application. The phrases "in one embodiment", "in another embodiment", "in various embodiments", "in some embodiments", "in other embodiments" and other variations thereof refer to one or more features, structures, functions, limitations or characteristics of the present disclosure, and are not limited to the same or different embodiments unless the context indicates otherwise. As used herein, the term "or" is an inclusive "or" operator and is equivalent to the phrase "A or B, or both" or "A or B or C, or any combination thereof", and is listed together with additional elements treated in the same manner. Unless the context indicates otherwise, the term "based on" is not exclusive and allows for additional features, functions, aspects or limitations based on undescribed features. In addition, throughout the specification, the meanings of "one", "an" and "the" include singular and plural references.
[0028] Figure 1 1 is a functional block diagram of an embodiment of an electronic device or system 100 of the type to which the embodiments to be described are applicable. The system 100 includes one or more processing cores or circuits 102. The processing core 102 may include, for example, one or more processors, state machines, microprocessors, MCUs, DSPs, programmable logic circuits, discrete circuits, logic gates, registers, etc., and various combinations thereof. The processing core 102 may control: the overall operation of the system 100, the execution of applications by the system 100, security operations performed by the system 100, etc.
[0029] The system 100 includes one or more memories, such as one or more non-volatile memories 106 and one or more volatile memories 108, which may store, for example, all or part of instructions and data related to the system 100, applications, and control of operations performed by the system 100. One or more of the memories 106, 108 may include a memory array 111, which may be occupied in whole or in part by one or more processes executed by the system 100, such as one or more processes executed by the processor 102, in operation.
[0030] As shown, the volatile memory 108 includes a plurality of general registers 109, which are organized into one or more circular buffers 110, such as circular buffers 110a to 110j. Although the circular buffers are illustrated as being implemented using a set of general registers, the circular buffers may be implemented using dedicated registers of the volatile memory 108, regions of a memory array, separate memory arrays, etc. The circular buffers may be occupied in operation by one or more processes executed by the system 100 (e.g., one or more iterative processes executed by the processor 102).
[0031] As shown, system 100 includes one or more non-volatile memory controllers 112 for controlling access of processing core 102 to non-volatile memory 106 , and one or more volatile memory controllers 114 for controlling access of processing core 102 to volatile memory 108 , such as access to circular buffer 110 .
[0032] As shown, the volatile memory controller or circuit 114 includes one or more loop buffer access managers or circuits 120 for managing access to the loop buffer 110, such as managing read and write operations to the loop buffer occupied during processing operations of the processing core 102. Such operations can include operations that are part of an iterative process, such as operations performed in the implementation of an LMS adaptive FIR filter. Compared to traditional methods of performing such iterative processes, managing access to data in the loop buffer during the execution of operations associated with the iterative process can promote reduced power consumption and improved performance. For example, managing access to data in the loop buffer can promote parallel processing of a sequence of iterative operations and reuse of data stored during the execution of the sequence of iterative operations.
[0033] The system 100 may include one or more interfaces 150 (e.g., wireless communication interfaces, wired communication interfaces, controller interfaces, etc.), and other functional circuit blocks 160, which may include antennas, power supplies, sensors (e.g., image sensors, audio sensors, accelerometers, pressure sensors, temperature sensors, encoders, etc.), controllers (e.g., traction motor controllers, etc.), and a main bus system 170. The main bus system 170 may include one or more data, address, power, and / or control buses coupled to various components of the system 100. The system 100 may also include additional bus systems, such as a bus system 172 that communicatively couples the non-volatile memory 106 and the non-volatile memory controller 112, and a bus system 174 that communicatively couples the volatile memory 108 and the volatile memory controller 114.
[0034] Figure 1 Embodiments of the system 100 may include more components than shown, may include fewer components than shown, may combine the components shown or separate the components shown, and various combinations thereof. For example, instead of having a separate volatile memory 108 and a volatile memory controller 114, the volatile memory 108 of the system 100 may be modified to include a volatile memory controller 114, which may be divided into a volatile memory circular buffer control circuit and a control circuit for controlling other modes of storing data in the volatile memory (e.g., a streaming memory control circuit). In another example, the non-volatile memory 106 may include a memory organized into one or more circular buffers. In another example, the processing core 102 may have embedded registers organized into one or more circular buffers. The system 100 may include a system on a chip (SoC), discrete chips coupled together, etc., or various combinations thereof.
[0035] Figure 22 is a conceptual diagram illustrating the organization of multiple buffers into a circular buffer 210. An embedded processor (e.g., a RISC V processor) may have multiple general registers (e.g., 32 registers) that may be accessed linearly using indexes from 0 to 31. Each register may have a size of 32 bits. In one embodiment, multiple general registers may be used to implement the circular buffer 210 as buffers in the circular buffer 210. As shown, the circular buffer 210 includes eight registers r0, r1, ..., r7, which are organized as a first subset 232 (subset 0) of four buffers (as shown, the four buffers are registers r0, r1, r2, and r3) and a second subset 234 (subset 1) of four buffers (as shown, the four buffers are registers r4, r5, r6, and r7). If each buffer has a size of 32 bits and each data segment is 32 bits, each subset of the buffers 232, 234 stores four 32-bit data segments.
[0036] The subsets 232, 234 of buffers have a starting buffer 236, as shown, register r0 is the starting buffer or register 236 for the first subset of buffers 232, and register r4 is the starting buffer or register 236 for the second subset of buffers 234. The circular buffer address index has an address increment direction, as shown in the clockwise increment direction. The data sliding direction, opposite to the address increment direction, as shown in the counterclockwise direction, can be used to slide data before loading the data into the destination buffer of the circular buffer, as discussed in more detail below.
[0037] Figure 2 The conceptual diagrams are merely examples of organizations of circular buffers that may be employed in various embodiments. For example, a circular buffer may include fewer than or more than eight buffers (e.g., registers), and may include more than two subsets of buffers (registers). For example, a circular buffer may include 12 buffers organized into three subsets of four buffers.
[0038] In some embodiments, multiple circular buffers may be used, such as Figure 1 (circular buffers 110a to 110i) and Figure 3 As shown, Figure 3 2 is a conceptual diagram illustrating the organization of multiple buffers or registers into multiple circular buffers 210a, 210b. The circular buffers 210a, 210b may be similar to Figure 2 The buffers may be organized in the manner of a circular buffer 210, or may be organized in a different manner (eg, including 12 buffers with 3 subsets).
[0039] The memory load instruction Idcs that uses loop sliding to load data into the loop buffer can take the following form:
[0040] Idcs%rd,[%rx],#idx
[0041] Where the parameter %rd is a parameter that identifies the destination circular buffer associated with instruction Idcs (e.g., Figure 2 The parameter [%rx] is an offset parameter identifying an address offset associated with the instruction Idcs, and the parameter #idx is a buffer subset (e.g., Figure 2 The parameters %rd, [%rx], #idx may be indices and may be used to determine a buffer of the circular buffer in which data associated with the memory load instruction is to be stored. In some embodiments, the parameter %rd may be omitted, for example, when the destination circular buffer is otherwise known (e.g., when only one circular buffer is employed). The size of the data to be loaded may correspond to the size of the buffer subset in the destination circular buffer. For example, when the memory load instruction is associated with 128 bits of data (e.g., four 32-bit words), the subset of the circular buffer may include four 32-bit buffers or registers.
[0042] Figure 4 An embodiment of a method 400 of loading data into a circular buffer is illustrated, for example, Figure 1 The circular buffer access manager 120 may use this method to load data into a circular buffer (eg Figure 1 in the circular buffer 110a). Figure 5 The diagram shows the identification of which to load e.g. Figure 4 The method 400 may be employed in an embodiment of the method 512 of buffering a circular buffer of data. Figure 6 is a conceptual diagram illustrating an example memory mapping of a data set of 32-bit words and coefficients associated with an N-tap adaptive LMS FIR filter. Figures 7 to 14 is a conceptual diagram illustrating an example of storing data in a loop buffer in response to a memory load instruction. Figures 1 to 3 and Figures 6 to 14 To describe Figure 4 and Figure 5 .
[0043] The method 400 starts at 402 and proceeds to 404. At 404, the method 400 receives a memory load command or instruction (such as an instruction Idcs having a buffer parameter %rd, an offset parameter [%rx], and a subset parameter #idx) to load four 32-bit data words into the circular buffer, or a total of 128 bits. For example, the memory load instruction may be a load Figure 6 In response to receiving a memory load instruction, method 400 proceeds from 404 to 406 .
[0044] At 406, method 400 determines the loop buffer associated with the received memory load instruction. For example, method 400 may use parameter %rd to Figure 1 One of the loop buffers 110a through 110j is identified as the loop buffer into which the data associated with the memory load instruction is to be loaded. From 406 , method 400 proceeds to 408 .
[0045] At 408, the method 400 determines an address offset associated with the received memory load instruction. For example, the method 400 may use the parameter %rx to determine the address offset associated with the memory load instruction, e.g. Figure 6 The data set mapped to the address offset is 0x0, 0x4, 0x8 or 0xC. From 408, method 400 proceeds to 410.
[0046] At 410, method 400 determines a buffer subset of the identified circular buffer associated with the received memory load instruction. The buffer subset may have a size that is the same as the size of the data associated with the memory load instruction, such as the size of four 32-bit buffers. For example, method 400 may use parameter %Idx to Figure 2 Subset 0 232 or subset 1 234 of is identified as a buffer subset associated with a memory load instruction, e.g. Figure 6 The data set mapping in the subset address 0x10, 0x20, 0x30 .... For example, the subset address 0x10 may correspond to the buffer subset 1 234, the subset address 0x20 may correspond to the buffer subset 0 232, the subset address 0x30 may correspond to the buffer subset 1 234, etc. The method 400 proceeds from 410 to 412.
[0047] At 412, based on the address offset determined at 408 and the buffer subset identified at 410, method 400 identifies a buffer of the identified circular buffer into which the data associated with the received memory load instruction is to be written. For example, this may be done using Figure 5The method 400 is completed by the method 512. From 412, the method 400 proceeds to 414.
[0048] At 414 , the method 400 writes the data associated with the memory load instruction into the identified buffer of the identified circular buffers determined at 412 . From 414 , the method 400 proceeds to 416 .
[0049] At 416, method 400 determines whether there is more data to load. When method 400 determines that there is more data to load, method 400 returns to 404 to wait for another memory load instruction. When method 400 does not determine that there is more data to load, method 400 proceeds to 418, where method 400 may terminate or may perform other processing, such as processing associated with the data stored in the identified circular buffer.
[0050] Figure 4 Embodiments of method 400 may not include all of the illustrated actions, may include additional actions, may combine actions, may split actions, and may perform actions in various orders. For example, actions 406, 408, 410 may be performed in various orders, in parallel, or in combination, and action 406 may be omitted, such as when only a single circular buffer is used, etc.
[0051] Figure 5 An embodiment of a method 512 of determining a buffer in an identified circular buffer into which data associated with a memory load instruction is to be written is illustrated. The data may be, for example, Figure 4 Action 412 of method 400 is employed.
[0052] The method 512 starts at 520 and proceeds to 522. At 522, the method 512 determines whether the address offset associated with the received memory load instruction is consistent with a boundary buffer of a buffer subset in the circular buffer associated with the memory load instruction. Figure 6 , when the address offset is 0x0, method 512 can determine at 522: the address offset associated with the received memory load instruction is consistent with the boundary of the buffer subset, and can determine: when the address offset is 0x4, 0x8 or 0xC, the address offset is not consistent with the boundary of the buffer subset in the circular buffer.
[0053] When it is determined at 522 that the address offset is consistent with a boundary of a buffer subset in the circular buffer, method 512 proceeds to 524, where the method sets the buffer of the identified buffer subset as the buffer into which the data associated with the memory load instruction is to be loaded. From 524, method 512 proceeds to 530, where the method provides the buffer address of the identified circular buffer to method 400 for loading the data associated with the memory load instruction at 414.
[0054] Figure 7 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[0], which is Figure 6 The address is 0x0; x[1], which is in Figure 6 The address is 0x4; x[2], which is in Figure 6 The address is 0x8; and x[3], which is in Figure 6 The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x0, and the subset parameter #idx identifies the subset of buffer subset 0 232 in the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x0 indicates that the address is 0x0 ( Figure 6 The data of x[0] in the subset 0 232 will be stored in the boundary buffer 236 (which corresponds to Figure 7 Thus, the offset is consistent with the boundary buffer 236, and the data is loaded into the buffers of the identified subset in the buffer subset 0 232, where x[0] is loaded into buffer r0, x[1] is loaded into buffer r1, x[2] is loaded into buffer r2, and x[3] is loaded into buffer r3.
[0055] Figure 8 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[4], which is Figure 6 The address is 0x0; x[5], which is in Figure 6 The address is 0x4; x[6], which is in Figure 6 The address is 0x8; and x[7], which is in Figure 6 The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x0, and the subset parameter #idx indicates the subset of buffer subset 1 234 in the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x0 indicates that the address is 0x0 ( Figure 6The data of x[4] in the subset 1 234 will be stored in the boundary buffer 236 (which corresponds to Figure 8 Thus, the offset is consistent with the boundary buffer 236, and the data is loaded into the buffers of the identified subset in the buffer subset 1 234, where x[4] is loaded into buffer r4, x[5] is loaded into buffer r5, x[6] is loaded into buffer r6, and x[7] is loaded into buffer r7.
[0056] When it is not determined at 522 that the address offset is consistent with a boundary of a buffer subset in the circular buffer, method 512 proceeds to 526, where the data associated with the address of the address offset is consistent with a boundary buffer of the identified buffer subset in the circular buffer. For example, the data can be shifted in a sliding direction opposite to the indexing direction of the circular buffer until the data associated with the address of the address offset is consistent with the boundary buffer, such as by one buffer address. The method proceeds from 526 to 528, where the method sets a buffer in which to load data associated with the memory load instruction based on the consistency of the data associated with the address offset and the boundary buffer. Method 512 proceeds from 528 to 530, where the method provides the buffer address determined based on the rearrangement of the data to method 400 for loading data associated with the memory load instruction at 414.
[0057] Fig. 9 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[0], which is Figure 6 The address is 0x0; x[1], which is in Figure 6 The address is 0x4; x[2], which is in Figure 6 The address is 0x8; and x[3], which is in Figure 6 The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x4, and the subset parameter #idx identifies the subset of buffer subset 0 232 in the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x4 indicates that the address is 0x4 ( Figure 6 The data of x[1] in the subset 0 232 will be stored in the boundary buffer 236 (which corresponds to Fig. 9232). Therefore, the offset is not consistent with the boundary buffer 236, and the data is shifted by one register to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 0 232. Due to the shift, data x[1] is loaded into buffer r0 instead of buffer r1, data x[2] is loaded into buffer r1 instead of buffer r2, data x[3] is loaded into buffer r2 instead of buffer r3, and data x[0] is loaded into buffer r7 instead of buffer r3.
[0058] Fig.10 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[4], which is Figure 6 The address is 0x0; x[5], which is in Figure 6 The address is 0x4; x[6], which is in Figure 6 The address is 0x8; and x[7], which is in Figure 6 The address is 0xC. The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x4, and the subset parameter #idx identifies the subset of buffer subset 1 234 of the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x4 indicates that the address is 0x4 ( Figure 6 The data of x[5] in the subset 1 234 will be stored in the boundary buffer 236 (which corresponds to Fig.10 Therefore, the offset is not consistent with the boundary buffer 236, and the data is shifted by one register to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 1 234. Due to the shift, data x[5] is loaded into buffer r4 instead of buffer r5, data x[6] is loaded into buffer r5 instead of buffer r6, data x[7] is loaded into buffer r6 instead of buffer r7, and data x[4] is loaded into buffer r3 instead of buffer r4.
[0059] Fig.11 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[0], which is Figure 6 The address is 0x0; x[1], which is in Figure 6 The address is 0x4; x[2], which is in Figure 6 The address is 0x8; and x[3], which is in Figure 6The address is 0xC. The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x8, and the subset parameter #idx identifies the subset of buffer subset 0 232 of the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x8 indicates that the address is 0x8 ( Figure 6 The data of x[2] in the subset 0 232 will be stored in the boundary buffer 236 (which corresponds to Fig.11 232). Therefore, the offset is not consistent with the boundary buffer 236, and the data is shifted by two registers to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 0 232. Due to the shifting, data x[2] is loaded into buffer r0 instead of buffer r2, data x[3] is loaded into buffer r1 instead of buffer r3, data x[1] is loaded into buffer r7 instead of buffer r1, and data x[0] is loaded into buffer r6 instead of buffer r0.
[0060] Fig.12 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[4], which is Figure 6 The address is 0x0; x[5], which is in Figure 6 The address is 0x4; x[6], which is in Figure 6 The address is 0x8; and x[7], which is in Figure 6 The address is 0xC. The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0x8, and the subset parameter #idx identifies the subset of buffer subset 1 234 of the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0x8 indicates that the address is 0x8 ( Figure 6 The data of x[6] in the subset 1 234 will be stored in the boundary buffer 236 (which corresponds to Fig.12 Thus, the offset is not consistent with the boundary buffer 236, and the data is shifted by two registers to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 1 234. Due to the shift, data x[6] is loaded into buffer r4 instead of buffer r6, data x[7] is loaded into buffer r5 instead of buffer r7, data x[5] is loaded into buffer r3 instead of buffer r5, and data x[4] is loaded into buffer r2 instead of buffer r4.
[0061] Fig.13is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[0], which is Figure 6 The address is 0x0; x[1], which is in Figure 6 The address is 0x4; x[2], which is in Figure 6 The address is 0x8; and x[3], which is in Figure 6 The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0xC, and the subset parameter #idx identifies the subset of buffer subset 0 232 of the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0xC indicates that the address is 0xC ( Figure 6 The data of x[3] in the subset 0 232 is stored in the boundary buffer 236 (which corresponds to Fig.13 232). Therefore, the offset is not consistent with the boundary buffer 236, and the data is shifted by three registers to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 0 232. Due to the shifting, data x[3] is loaded into buffer r0 instead of buffer r3, data x[2] is loaded into buffer r7 instead of buffer r2, data x[1] is loaded into buffer r6 instead of buffer r1, and data x[0] is loaded into buffer r5 instead of buffer r0.
[0062] Fig.14 is a conceptual diagram illustrating an example of data storage in response to a memory load instruction Idcs to load the following data into a circular buffer: x[4], which is Figure 6 The address is 0x0; x[5], which is in Figure 6 The address is 0x4; x[6], which is in Figure 6 The address is 0x8; and x[7], which is in Figure 6 The buffer parameter %rd identifies the buffer 210 as the destination circular buffer, the offset parameter %rx identifies the address offset as 0xC, and the subset parameter #idx identifies the subset of buffer subset 1 234 of the circular buffer as the buffer subset associated with the memory load instruction Idcs. The address offset 0xC indicates that the address is 0xC ( Figure 6 The data of x[7] in the subset 1234 is stored in the boundary buffer 236 (which corresponds to Fig.14Thus, the offset is not consistent with the boundary buffer 236 and the data is shifted by three registers to make the offset consistent with the boundary buffer 236 before the data is loaded into the buffer of the identified subset of buffer subset 1 234. Due to the shifting, data x[7] is loaded into buffer r4 instead of buffer r7, data x[6] is loaded into buffer r3 instead of buffer r6, data x[5] is loaded into buffer r2 instead of buffer r5, and data x[4] is loaded into buffer r1 instead of buffer r4.
[0063] Figure 6 Additional data for a data set (e.g., x[8] to x
[11] , ..., x[N-4] to x[N-1]) can be loaded into the circular buffer using a memory load instruction (e.g., Idcs) to replace previous data (e.g., increment subset parameters). Other data and variables can be loaded into additional circular buffers, such as Figure 6 In some embodiments, multiple circular buffers may be used to store input data x[0] to x[N-1] instead of overwriting the data.
[0064] Traditionally, the N-tap LMS adaptive filter is an iterative process, which includes the following three steps in each iteration:
[0065] (1) Perform FIR calculations, for example, according to:
[0066]
[0067] (2) Calculate the error according to the following:
[0068] e n = r[n] - y[n]; and
[0069] (3) Update the FIR coefficients according to the following formula:
[0070] b n+1 (k) = b n (k)+e n *x(nk), k=0, 1, ..., N-1, where x is the input signal value, b is the coefficient of the FIR filter, and r is the desired output signal (e.g., a reference signal). Fig.15 is a conceptual diagram illustrating the traditional implementation of an FIR filter. The (n-1)th iteration of the LMS includes calculating y[n-1] and updating the coefficients b n as follows:
[0071] y[n-1]=(x[n-1]*b n-1 [0]+x[n-2]*b n-1[1]+x[n-3]*b n-1 [2]+x[n-4]*b n-1 [3]+x[n-5]*b n-1 [4]+x[n-6]*b n-1 [5]+x[n-7]*b n-1 [6]+x[n-8]*b n-1 [7])
[0072] e n-1 =r[n-1]-y[n-1]
[0073] b n (k) = b n-1 (k)+e n-1 *x(n-1-k) / / / k=0, 1,..., 7
[0074] The (n)th iteration of LMS involves calculating y[n] and updating the coefficients bn+1 as follows:
[0075] y[n]=(x[n]*bn[0]+x[n-1]*bn[1]+x[n-2]*bn[2]+x[n-3]*bn[3]+x[n]*vn[4]+x[n-5]*bn[5[+x[n-6]*bn[6]+x[n-7]*bn[7])
[0076] en=r[n]-y[n]
[0077] bn+1(k)=bn(k)+en*x(nk) / / / k=0, 1,..., 7
[0078] It can be seen that each step of each iteration depends on the previous step - the error calculation depends on the FIR calculation, and the coefficient update depends on the error calculation. These dependencies can cause performance issues because the steps are executed sequentially rather than in parallel, and although some of the same input signals are used, these values are not shared between steps, which can lead to high power consumption.
[0079] As described above, managing access to data in a circular buffer may facilitate parallel processing of an iterative sequence of operations and reuse of stored data during execution of the iterative sequence of operations. Fig.16 An embodiment of a method 1600 for executing an N-tap LMS adaptive FIR filter using a memory load instruction with loop sliding is illustrated, which facilitates parallel execution of iterative steps and data sharing between iterative steps and between iterations. For example, Fig.16 The method can be Figure 1Execute under the control of the processing core 102 to access one or more circular buffers 110a to 110j using the circular buffer access manager 120. For convenience, reference will be made to Figures 1 to 15 for description Fig.16 .
[0080] As discussed in more detail below, compared with the traditional FIR filter implementation, iteration n of method 1600 is reorganized and includes:
[0081] (1) Determine the error of the nth iteration. For example, according to
[0082] e n = r[n] - y[n];
[0083] (2) Update the coefficients of the (n + 1)th iteration. For example, according to:
[0084] B n+1 (k) = b n (k) + e n * x(n - k) / / / k = 0, 1,...., N - 1; and
[0085] (3) Perform the FIR calculation of the (n + 1)th iteration. For example, according to:
[0086] y[n + 1] = b n+1 [k] * x[n - k + 1].
[0087] The reorganization brings two potential benefits. First, parallelism can be adopted because the calculation of y[n] does not need to wait for the completion of the b n calculation. Second, the y[n] and b n calculations share most of the input values x[n - 1], x[n - 2],..., x[n - 6]. Using circular shifting to load data into the circular buffer solves the sampling delay of the coefficients and FIR results in the iteration.
[0088] Method 1600 starts at 1602 and proceeds to 1604. At 1604, an LMS adaptive FIR filter routine (for example) is called by an application executed on one of the processing cores in the processing core 102, such as processing received signals or sensor samples to generate an output signal (for example, decoding the received signal; generating a control signal based on the signal received from the encoder to control a traction motor, etc.). Method 1600 proceeds from 1604 to 1606.
[0089] Due to the recombination of the iteration, an initial FIR result y[0] needs to be generated before the iteration. At 1606, the initial input data (for example, x[0] to x[7]) is loaded into the circular buffer (for example, Figure 7 and Figure 8 This can be accomplished, for example, by using one or more Idcs commands with an address offset indicating that no data sliding is to be performed. Figure 7 and Figure 8 The discussed Idcs command can be used to load initial data into the circular buffer. The method proceeds from 1606 to 1608. At 1608, method 1600 generates an initial FIR result y[0]. This can be done in a conventional manner using a MAC function of a digital signal processor. For example, a conventional MAC function with the following mnemonics and semantic representations can be used:
[0090] mac ACC,{%rx0,%rx1,%rx2,%rx3},{%ry0,%ry1,%ry2,%ry3}
[0091]
[0092] From 1608, method 1600 proceeds to 1610, where method 1600 initializes the address offset used with the memory load instruction to a value for the first iteration of method 1600. For example, the address offset may be initialized to a value indicating that the data is consistent before it is stored in the circular buffer. Figure 7 and Figure 8 , the offset address may be initialized to 0x0. From 1610 , method 1600 proceeds to 1612 .
[0093] At 1612, method 1600 determines the error e n For iteration n, which may be performed in a conventional manner. For example, the result y[n] may be compared to or combined with (eg, subtracted from) the reference signal r[n]. From 1612, method 1600 proceeds to 1614.
[0094] At 1614, method 1600 loads the input data into the buffer subset of the circular buffer. For example, this can be done by using the buffer, offset and subset parameters according to Figure 4 and Figure 5 The method 1600 proceeds from 1614 to 1616. In some cases (e.g., when the offset parameter indicates that the data is consistent with the subset), when the data value x(-1) is not stored in the loop by the previous Idcs operation, an additional load instruction can be used to load the data value x(-1).
[0095] At 1616, method 1600 updates coefficient b using the data already loaded into the circular buffer. n+1, for example, using an MLA function of a digital signal processor, storing the updated coefficients, and generating a result y[n+1], for example, using a MAC function as described above. The MLA function may be a conventional MLA function with the following mnemonic and semantic representation:
[0096] mla{%rd0,%rd1,%rd2,%rd3},{%rs0,%rs1,%rs2,%rs3},%rs4
[0097] rd0=round(rd0+rs0*rs4)
[0098] rd1=round(rd1+rs1*rs4)
[0099] rd2=round(rd2+rs2*rs4)
[0100] rd3=round(rd3+rs3*rs4).
[0101] Input data for updating coefficients in the MLA function may be obtained from a subset of registers rearranged to take into account time delays, and input data for generating result signals in the MAC function may be obtained from a subset of registers into which the circular buffer is organized. Fig. 9 and Fig.10 , where there is an inconsistent address 0x4, the MLA function uses the data in the rearranged register subset {r7, r0, r1, r2} or the data in the rearranged register subset {r3, r4, r5, r6}, and the MAC function uses the data in the subset of register subset 0 232 {r0, r1, r2, r3} or the data in the subset of register subset 1 234 {r4, r5, r6, r7}.
[0102] From 1616, the method 1600 proceeds to 1618, where the method determines whether there are more subsets of data to be loaded into the circular buffer and processed. When the method determines at 1618 that there are more subsets to be loaded and processed, the method 1600 increments the subset parameter and returns to 1614 to load the next subset of data for processing. When the method does not determine at 1618 that there are more subsets to be loaded and processed, the method 1600 increments the subset parameter and proceeds to 1620. For example, referring to Figure 2, the circular buffer 210 is organized into two subsets, buffer subset 0 232 and buffer subset 1 234. When Idcs has a subset parameter #Idx indicating that subset 0 232 is executed at 1614, the method will determine at 1618 that there is an additional subset (subset 1 234) to load and process, and will return to 1614. When Idcs has a subset parameter #Idx indicating that subset 1 234 is executed at 1614, the method will not determine at 1618 that there is an additional subset to load and process, and will proceed to 1620.
[0103] At 1620, method 1600 determines whether the number of iterations n is equal to the number of taps N-1. When method 1600 determines at 1618 that the number of iterations n is not equal to the number of taps N-1 (at 1620, no), method 1600 increments n and returns to 1612 to perform the next iteration. When method 1600 determines at 1618 that the number of iterations n is equal to the number of taps N-1 (at 1618, yes), method 1600 proceeds to 1622, where method 1600 increments an offset parameter, initializes n, and returns to 1612 to perform the next iteration. The size of the offset parameter increment is related to the size of the data used in the LMS FIR filter. For example, referring to Figure 6 , if the data size is a word, the increment of the offset parameter can be 0x4; if the data size is a half word, the increment of the offset parameter can be 0x2.
[0104] Fig.16 Embodiments of method 1600 may include more actions than shown, may include fewer actions than shown, may combine or separate actions, or perform actions in various orders. For example, in some embodiments, action 1616 may be divided into multiple actions. In another example, in some embodiments, for example, when the offset parameter is fixed, action 1622 may be omitted.
[0105] In one embodiment, a device includes: a circular buffer that is organized into a plurality of buffer subsets in operation; and a control circuit coupled to the circular buffer, wherein the control circuit in operation responds to receipt of a memory load command having an offset parameter and a subset parameter to load a data set into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and, using the identified set of buffer addresses to load the data set into the circular buffer, wherein the offset parameter indicates a data offset and the subset parameter indicates a subset of the plurality of subsets into which the circular buffer is organized. In one embodiment, the circular buffer includes a set of registers, and the plurality of buffer subsets include respective register subsets of the set of registers. In one embodiment, the device includes a volatile memory having a set of registers. In one embodiment, the buffers of the circular buffer are registers, and the circular buffer is organized into a first subset of four registers and a second subset of four registers. In one embodiment, the registers are 32-bit registers, and the data set includes four 32-bit words. In one embodiment, the apparatus comprises: a second circular buffer, which is organized into a plurality of buffer subsets in operation, wherein the control circuit is coupled to the second circular buffer, the memory load, command includes a buffer parameter identifying a destination circular buffer and the control circuit is operative to respond to receipt of the memory load command with the buffer parameter identifying the second circular buffer by loading a set of data into the second circular buffer. In one embodiment, the buffer addresses of the buffers in the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of an offset parameter is a buffer address and identifying a set of buffer addresses of the circular buffer comprises: comparing the value of the offset parameter with a buffer address of a starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, the control circuit identifies the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses. In one embodiment, wherein: in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses comprises: subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter. In one embodiment, the apparatus operates to implement a finite impulse response (FIR) filter using a circular buffer to store input data to the FIR filter.
[0106] In one embodiment, a system includes: a processing core; and a memory coupled to the processing core, the memory having a set of registers, the set of registers being organized in operation into a circular buffer having a plurality of buffer subsets, wherein the memory is responsive in operation to receipt of a memory load command having an offset parameter and a subset parameter from the processing core to load a set of data into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and using the identified set of buffer addresses to load the set of data into the circular buffer, wherein the offset parameter indicates a data offset and the subset parameter indicates a subset of the plurality of buffer subsets into which the circular buffer is organized. In one embodiment, the circular buffer is organized into a first subset of four registers and a second subset of four registers. In one embodiment, the registers are 32-bit registers and the set of data includes four 32-bit words. In one embodiment, buffer addresses of buffers of the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer address, a value of an offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer includes: comparing the value of the offset parameter with a buffer address of a starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, the control circuit identifies the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses. In one embodiment, in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses includes: subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter.
[0107] In one embodiment, a method includes: organizing a circular buffer into a plurality of buffer subsets; and, executing a memory load command to load a data set into the circular buffer, the memory load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the memory load command including: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and loading the data set into the circular buffer using the identified set of buffer addresses. In one embodiment, the buffers of the circular buffer are registers, and the circular buffer is organized into a first subset of four registers and a second subset of four registers. In one embodiment, the registers are 32-bit registers and the data set includes four 32-bit words. In one embodiment, the buffer addresses of the buffers of the circular buffer are indexed in a first circular direction, the subsets of the plurality of subsets have corresponding starting buffers, the value of the offset parameter is a buffer address and identifying the set of buffer addresses of the circular buffer includes: comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, the method includes: in response to comparing the value of the indicating offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter being consistent, identifying the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified buffer address set. In one embodiment, the method includes: in response to comparing the value of the indicating offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter being inconsistent, subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter. In one embodiment, the method includes: implementing a finite impulse response (FIR) filter, wherein the data set is input data to the FIR filter.
[0108] In one embodiment, the contents of a non-transitory computer-readable medium configure a processing device to perform a method, the method comprising: organizing a circular buffer into a plurality of buffer subsets; and, executing a memory load command to load a data set into the circular buffer, the memory load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the memory load command comprising: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and using the identified set of buffer addresses to load the data set into the circular buffer. In one embodiment, the buffer addresses of the buffers of the circular buffer are indexed in a first circular direction, the subsets of the plurality of subsets have corresponding starting buffers, the value of the offset parameter is a buffer address, and identifying the set of buffer addresses of the circular buffer comprises: comparing the value of the offset parameter with a buffer address of a starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, the contents comprise instructions that, when executed by the processing device, cause the processing device to perform the method.
[0109] In one embodiment, a method includes: organizing a circular buffer into a plurality of buffer subsets; filtering a sequence of data samples, the filtering including iteratively: generating an error signal; executing a load command to load a data subset of the data sequence into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the load command including: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and loading the data subset of the data sequence into the circular buffer using the identified set of buffer addresses; updating filter coefficients based on data stored in the circular buffer; and generating an output signal based on the data stored in the circular buffer. In one embodiment, the buffers of the circular buffer are registers, and the circular buffer is organized into a first subset of four registers and a second subset of four registers. In one embodiment, the buffer addresses of the buffers in the circular buffer are indexed in a first circular direction, the subsets of the plurality of subsets have corresponding starting buffers, the value of the offset parameter is a buffer address, and identifying the set of buffer addresses of the circular buffer includes: comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, the method includes: in response to comparing the value of the indicating offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter being consistent, identifying the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses. In one embodiment, the method includes: in response to comparing the value of the indicating offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter being inconsistent, subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter. In one embodiment, filtering includes: implementing a finite impulse response (FIR) filter.
[0110] In one embodiment, a device includes: a memory and a processing circuit device coupled to the memory. The processing circuit device organizes the memory into a circular buffer having a plurality of buffer subsets and filters a sequence of data samples in operation. The filtering includes iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets that the circular buffer is composed of, executing the load command includes: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; using the identified set of buffer addresses to load the subset of data samples of the sequence of data samples into the circular buffer; updating filter coefficients based on data samples stored in the circular buffer; and generating an output signal based on data samples stored in the circular buffer. In one embodiment, the memory includes a plurality of registers, the buffer of the circular buffer is a register of the plurality of registers, and the circular buffer is organized into a first subset of registers of the plurality of registers and a second subset of registers of the plurality of registers. In one embodiment, the circular buffer comprises eight registers of the plurality of registers, the first register subset of the plurality of registers comprises four registers of the plurality of registers, and the second register subset of the plurality of registers comprises four registers of the plurality of registers. In one embodiment, the buffer addresses of the buffers of the circular buffer are indexed in a first circular direction, the subsets of the plurality of subsets have corresponding starting buffers, the value of the offset parameter is a buffer address, and identifying the buffer address set of the circular buffer comprises: comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, the processing circuit device is in operation: in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, identifying the address of the buffer of the buffer subset indicated by the subset parameter as the identified buffer address set. In one embodiment, the processing circuit device is in operation: in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, subtracting the value of the offset parameter from the corresponding address of the buffer of the buffer subset indicated by the subset parameter. In one embodiment, filtering includes implementing a finite impulse response (FIR) filter. In one embodiment, iterations of filtering include executing a plurality of load commands.
[0111] In one embodiment, a system includes a processing core and a memory coupled to the processing core, the memory having a register set. The processing core, in operation, organizes the register set into a circular buffer having a plurality of buffer subsets and filters a sequence of data samples. The filtering includes iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the load command including: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and using the identified set of buffer addresses to load the subset of data samples of the sequence of data samples into the circular buffer; updating filter coefficients based on data samples stored in the circular buffer; and generating an output signal based on the data samples stored in the circular buffer. In one embodiment, buffer addresses of buffers in a circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer address, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises comparing the value of the offset parameter with a buffer address of the starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, the processing core identifies the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses. In one embodiment, in response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses comprises subtracting the value of the offset parameter from corresponding addresses of the buffers of the buffer subset indicated by the subset parameter. In one embodiment, filtering comprises implementing a finite impulse response (FIR) filter.
[0112] In one embodiment, the contents of a non-transitory computer-readable medium configure a processing device to perform a method, the method comprising: organizing a circular buffer into a plurality of buffer subsets; and filtering a sequence of data samples, the filtering comprising iteratively: generating an error signal; executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of the plurality of subsets into which the circular buffer is organized, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; and using the identified set of buffer addresses to load the subset of data samples of the sequence of data samples into the circular buffer; updating filter coefficients based on the data samples stored in the circular buffer; and generating an output signal based on the data samples stored in the circular buffer. In one embodiment, the buffer addresses of the buffers in the circular buffer are indexed in a first circular direction, the subsets of the plurality of subsets have corresponding starting buffers, the value of the offset parameter is a buffer address, and identifying the set of buffer addresses of the circular buffer comprises: comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter. In one embodiment, filtering includes implementing a finite impulse response (FIR) filter.In one embodiment, the content includes instructions for execution by a processing device.
[0113] Some embodiments may take the form of or include a computer program product. For example, according to one embodiment, a computer-readable medium including a computer program is provided, which is suitable for performing one or more of the above methods or functions. The medium may be a physical storage medium, such as a read-only memory (ROM) chip, or a disk, such as a digital versatile disk (DVD-ROM), a compact disk (CD-ROM), a hard disk, a memory, a network or a portable media item read by an appropriate drive or through an appropriate connection, including encoded with one or more bar codes or other related codes stored on one or more such computer-readable media, and readable by a suitable reader device.
[0114] In addition, in some embodiments, some or all of the methods and / or functionality may be implemented or provided in other ways, such as at least partially in firmware and / or hardware, including but not limited to one or more application-specific integrated circuits (ASICs), digital signal processors, discrete circuits, logic gates, standard integrated circuits, controllers (e.g., by executing appropriate instructions, and including microcontrollers and / or embedded controllers), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), etc., as well as devices that employ RFID technology and various combinations thereof.
[0115] The various embodiments described above can be combined to provide further embodiments. These and other changes can be made to the embodiments in light of the above detailed description. In general, in the following claims, the terms used should not be interpreted as limiting the claims to the specific embodiments disclosed in the specification and claims, but should be interpreted as including all possible embodiments and the full range of equivalents thereto to which the claims are entitled. Therefore, the claims are not limited by the present disclosure.
Claims
1. A device comprising: A circular buffer, wherein in operation, the circular buffer is organized by a plurality of buffer subsets; as well as A control circuit is coupled to the circular buffer, wherein the control circuit is operative to respond to receipt of a memory load command having an offset parameter and a subset parameter to load a set of data into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; as well as loading the set of data into the circular buffer using the identified set of buffer addresses, The offset parameter indicates a data offset, and the subset parameter indicates a subset of a plurality of subsets organized into the circular buffer. 2 . The apparatus of claim 1 , wherein the circular buffer comprises a set of registers, and the plurality of buffer subsets comprise respective subsets of registers of the set of registers.
3. The device of claim 2, comprising a volatile memory having the set of registers.
4. The apparatus of claim 2, wherein the buffers of the circular buffer are registers, and the circular buffer is organized by a first subset of four registers and a second subset of four registers.
5. The apparatus of claim 4, wherein the register is a 32-bit register and the data set comprises four 32-bit words.
6. The device according to claim 1, comprising: a second circular buffer, the second circular buffer being organized in operation from a plurality of buffer subsets, wherein the control circuit is coupled to the second circular buffer, the memory load command including a buffer parameter identifying a destination circular buffer, and the control circuit is operative to respond to receipt of the memory load command with the buffer parameter identifying the second circular buffer by loading a data set into the second circular buffer.
7. The apparatus of claim 1 , wherein buffer addresses of buffers in the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the subset of buffers indicated by the subset parameter.
8. The apparatus of claim 7, wherein: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, the control circuit identifies the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified buffer address set.
9. The apparatus according to claim 8, wherein: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses includes: subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter.
10. The apparatus of claim 1, wherein the apparatus is operable to implement a finite impulse response (FIR) filter using the circular buffer to store input data to the FIR filter.
11. A system comprising: Processing core; as well as a memory coupled to the processing core, the memory having a set of registers, the set of registers being organized in operation as a circular buffer having a plurality of buffer subsets, wherein the memory is operative to respond to receipt of a memory load command having an offset parameter and a subset parameter from the processing core to load a set of data into the circular buffer by: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; as well as loading the set of data into the circular buffer using the identified set of buffer addresses, The offset parameter indicates a data offset, and the subset parameter indicates a subset of a plurality of buffer subsets organized into the circular buffer.
12. The system of claim 11, wherein the circular buffer is organized by a first subset of four registers and a second subset of four registers.
13. The system of claim 12, wherein the register is a 32-bit register and the data set comprises four 32-bit words.
14. The system of claim 11, wherein buffer addresses of buffers in the circular buffer are indexed in a first circular direction, subsets of the plurality of subsets have corresponding starting buffer addresses, the value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
15. The system of claim 14, wherein: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, the processing core identifies the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified buffer address set.
16. The system of claim 14, wherein: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses includes: subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter.
17. A method comprising: A plurality of buffer subsets are organized into a circular buffer; as well as Executing a memory load command to load a set of data into the circular buffer, the memory load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of a plurality of subsets organized into the circular buffer, executing the memory load command comprising: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; as well as The set of data is loaded into the circular buffer using the identified set of buffer addresses.
18. The method of claim 17, wherein the buffer addresses of buffers of the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
19. The method according to claim 17, comprising: A finite impulse response (FIR) filter is implemented, wherein the data set is input data of the FIR filter.
20. The method of claim 17, wherein the buffers in the circular buffer are registers, and the circular buffer is organized by a first subset of four registers and a second subset of four registers.
21. The method of claim 20, wherein the register is a 32-bit register and the data set comprises four 32-bit words.
22. The method according to claim 18, comprising: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, identifying the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses.
23. The method according to claim 22, comprising: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter do not coincide, the value of the offset parameter is subtracted from the corresponding address of the buffer of the buffer subset indicated by the subset parameter.
24. An apparatus comprising: Memory; as well as processing circuitry coupled to the memory, wherein the processing circuitry, in operation: organizing the memory into a circular buffer having a plurality of buffer subsets; as well as Filtering a sequence of data samples, the filtering comprising iteratively: Generates an error signal; Executing a load command to load a subset of data samples of a sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of a plurality of subsets organized into the circular buffer, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on the value of the offset parameter and the value of the subset parameter; and loading the subset of data samples of the sequence of data samples into the circular buffer using the identified set of buffer addresses; updating the filter coefficients based on the data samples stored in the circular buffer; and An output signal is generated based on the data samples stored in the circular buffer.
25. The apparatus of claim 24, wherein the memory comprises a plurality of registers, the buffer in the circular buffer is a register in the plurality of registers, and the circular buffer is organized by a first subset of registers in the plurality of registers and a second subset of registers in the plurality of registers.
26. The apparatus of claim 25, wherein the circular buffer comprises eight registers of the plurality of registers, a first subset of registers of the plurality of registers comprises four registers of the plurality of registers, and the second subset of registers of the registers comprises four registers of the plurality of registers.
27. The apparatus of claim 24, wherein the buffer addresses of buffers in the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
28. The apparatus of claim 27, wherein the processing circuitry, in operation: In response to the comparing indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are consistent, identifying the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses.
29. The apparatus of claim 27, wherein the processing circuitry, in operation: In response to the comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter do not coincide, the value of the offset parameter is subtracted from the corresponding address of the buffer of the buffer subset indicated by the subset parameter.
30. The apparatus of claim 24, wherein the filtering comprises implementing a finite impulse response (FIR) filter.
31. The apparatus of claim 24, wherein iterations of filtering include executing a plurality of load commands.
32. A non-transitory computer readable medium having contents for configuring a processing device to perform a method comprising: A plurality of buffer subsets are organized into a circular buffer; as well as Executing a memory load command to load a set of data into the circular buffer, the memory load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of a plurality of subsets organized into the circular buffer, executing the memory load command comprising: identifying a set of buffer addresses of the circular buffer based on a value of the offset parameter and a value of the subset parameter; as well as The set of data is loaded into the circular buffer using the identified set of buffer addresses.
33. The non-transitory computer readable medium of claim 32, wherein the buffer addresses of buffers in the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
34. The non-transitory computer-readable medium of claim 32, wherein the contents include instructions that, when executed by the processing device, cause the processing device to perform the method.
35. A method comprising: A plurality of buffer subsets are organized into a circular buffer; as well as Filtering a sequence of data samples, the filtering comprising iteratively: Generates an error signal; Executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of a plurality of subsets organized into the circular buffer, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on the value of the offset parameter and the value of the subset parameter; and loading a subset of data samples of the sequence of data samples into the circular buffer using the identified set of buffer addresses; updating filter coefficients based on the data samples stored in the circular buffer; and An output signal is generated based on the data samples stored in the circular buffer.
36. The method of claim 35, wherein the buffers of the circular buffer are registers, and the circular buffer is organized by a first subset of four registers and a second subset of four registers.
37. The method of claim 35, wherein buffer addresses of buffers in the circular buffer are indexed in a first circular direction, a subset of the plurality of subsets has a corresponding starting buffer, a value of the offset parameter is a buffer address, and identifying a set of buffer addresses of the circular buffer comprises: The value of the offset parameter is compared to a buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
38. The method of claim 37, comprising: In response to the comparing indicating that the value of the offset parameter is consistent with the address of the starting buffer of the buffer subset indicated by the subset parameter, identifying the addresses of the buffers of the buffer subset indicated by the subset parameter as the identified set of buffer addresses.
39. The method of claim 37, comprising: In response to the comparison indicating that the value of the offset parameter does not coincide with the address of the starting buffer of the buffer subset indicated by the subset parameter, the value of the offset parameter is subtracted from the corresponding address of the buffer of the buffer subset indicated by the subset parameter.
40. The method of claim 35, wherein the filtering comprises: Implement a finite impulse response FIR filter.
41. A system comprising: Processing core; as well as a memory coupled to the processing core, the memory having a set of registers, wherein the processing core is operable to: organizing the register set into a circular buffer having a plurality of buffer subsets; as well as Filtering a sequence of data samples, the filtering comprising iteratively: Generates an error signal; Executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset of a plurality of subsets organized into the circular buffer, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on the value of the offset parameter and the value of the subset parameter; and loading a subset of data samples of the sequence of data samples into the circular buffer using the identified set of buffer addresses; updating filter coefficients based on the data samples stored in the circular buffer; and An output signal is generated based on the data samples stored in the circular buffer.
42. The system of claim 41, wherein: The buffer addresses of the buffers in the circular buffer are indexed in a first circular direction, a subset of multiple subsets has a corresponding starting buffer address, the value of the offset parameter is the buffer address, and identifying the buffer address set of the circular buffer includes comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
43. The system of claim 42, wherein: In response to comparing the value indicating the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter to be consistent, the processing core identifies the address of the buffer of the buffer subset indicated by the subset parameter as the identified buffer address set.
44. The system of claim 42, wherein: In response to a comparison indicating that the value of the offset parameter and the address of the starting buffer of the buffer subset indicated by the subset parameter are inconsistent, identifying the set of buffer addresses includes: subtracting the value of the offset parameter from the corresponding addresses of the buffers of the buffer subset indicated by the subset parameter.
45. The system of claim 41, wherein the filtering comprises implementing a finite impulse response (FIR) filter.
46. A non-transitory computer readable medium having content configured to configure a processing device to perform a method comprising: A plurality of buffer subsets are organized into a circular buffer; as well as Filtering a sequence of data samples, the filtering comprising iteratively: Generates an error signal; Executing a load command to load a subset of data samples of the sequence of data samples into the circular buffer, the load command having an offset parameter and a subset parameter, the offset parameter indicating a data offset, and the subset parameter indicating a subset organized into a plurality of subsets of the circular buffer, executing the load command comprising: identifying a set of buffer addresses of the circular buffer based on the value of the offset parameter and the value of the subset parameter; and loading the subset of data samples of the sequence of data samples into the circular buffer using the identified set of buffer addresses; updating filter coefficients based on the data samples stored in the circular buffer; and An output signal is generated based on the data samples stored in the circular buffer.
47. A non-transitory computer-readable medium according to claim 46, wherein the buffer addresses of the buffers in the circular buffer are indexed in a first circular direction, the subsets of the multiple subsets have corresponding starting buffers, the value of an offset parameter is a buffer address, and identifying the set of buffer addresses of the circular buffer includes comparing the value of the offset parameter with the buffer address of the starting buffer of the buffer subset indicated by the subset parameter.
48. The non-transitory computer readable medium of claim 47, wherein the filtering comprises implementing a finite impulse response (FIR) filter.
49. The non-transitory computer-readable medium of claim 46, wherein the content comprises instructions executed by the processing device.
