A memory, such as a random access memory (RAM), is a form of data storage. The memory may have an array of blocks addressable using address bits to access the blocks during a reading or writing operation. A RAM allows data to be accessed in any random order.
In radar applications, by way of example, large amounts of data are written into a memory in an interleaved manner. This data must be de-interleaved before being fed to Fast Fourier Transform (FFT) accelerators, and then the data must be reordered again prior to a second stage of FFT processing. Data is organized in an array of memory blocks in an interleaved manner along its dimensions.
The memory is generally accessed using a direct memory access (DMA) controller having an address counter that jumps a programmable jump width of, for example, 2, 4, or 8 bytes, in the memory address space. This access method is disadvantageous in that it normally does not a permit burst access in which data is transferred in one contiguous sequence. Instead, multiple processing cycles are required to complete a reading or writing operation.
The present disclosure is directed to an apparatus comprising a memory having an array of blocks addressable using address bits, and more specifically, to an apparatus comprising a memory and a permutation circuit that is coupled to the memory and is configured to permutate the address bits such that during a memory access blocks of data are rearranged virtually. By permutating the address bits, data being written/read to/from the memory may be effectively interleaved or de-interleaved. This permutation is configured at the beginning of the memory access and allows standard burst accesses to be used for a data block transfer, which increases the speed of the transfer considerably.
A standard memory address is 32-bits wide and may appear as follows: A31 A30 A29 A28 A27 . . . A9 A8 A7 A6 A5 A4 A3 A2 A1 A0.
An address bit permutation operation involves permutating groups of the memory address bits, where a group may be one or more address bits. For example, the groups of address bits of the standard memory address shown above may be permutated by interchanging the group of address bits A6 A5 A4 with the group of address bits A1 A0 as follows: A31 A30 A29 A28 A27 . . . A9 A8 A7 A1 A0 A3 A2 A6 A5 A4 (underlining added for illustration).
Another example is shown in
Memory 210B-1, which has not been subject to address bit permutation, represents the memory 210 as the data is actually stored, that is in an interleaved manner. Memory 210 is generally written/read across one row at a time, that is, first in the x-axis direction and then in the y-axis direction. More specifically, blocks of row 0 are written/read across (first humidity 0, then temperature 1, then light 2, and then pressure 3), then blocks of row 1 are written/read across (first humidity 0, then temperature 1, then light 2, and then pressure 3), etc. Each writing/reading of a row involves a combination of the different types of data, and thus in this case the data is written/read in an interleaved manner.
Address bit permutation logic circuit 220 permutates the address bits by interchanging x-address bits A1 A0 with y-address bits A4 A3 A2, such that rows x1 x0 are interchanged with columns y2 y1 y0. The result is the data appearing to be organized as illustrated in memory 210B-2.
Memory 210B-2 illustrates how the blocks are organized virtually when memory access occurs after address bit permutation, that is, the blocks appear to be organized in a de-interleaved manner. As mentioned above, memory 210 is generally written/read across one row at a time, that is, first in the x-axis direction and then in the y-axis direction. When memory 210B-2 is read in this manner, blocks of row 0 are read across (humidity blocks 0 only), then blocks of row x1 are read across (temperature blocks 1 only), etc. Data is thus read in a de-interleaved manner such that data blocks of a same type may be read more efficiently in sequence using a burst access method.
A result of the address permutation is that even though the physical memory 210 is actually being read first in the x-axis direction and then in the y-axis direction, the effect is that the order in which the dimensions are read appears to be different. That is, the memory 210 instead appears to be read first in the y-axis direction and then in the x-axis direction.
Memory 310B-1, which has not been subject to address bit permutation, represents the memory 310 as the data is actually stored, that is in an interleaved manner. Blocks of row 0 are written/read across (first humidity 0, then temperature 1, then light 2, and then pressure 3 blocks), then blocks of row 1 are written/read across (comprising a mix of humidity 0, temperature 1, light 2, and pressure 3 blocks), etc. Each writing/reading of a row results in a combination of different types of data, and thus in this case the data is written/read in an interleaved manner.
Address bit permutation logic circuit 320 permutates the address bits by interchanging groups of address bits as shown in the figure to result in memory 310B-2. The result is the data appearing to be organized as illustrated in memory 310B-2.
Memory 310B-2 illustrates how the blocks are organized virtually when memory access occurs after address bit permutation, that is, the blocks appear to be organized in a de-interleaved manner. Similar to memory 210 of
A result of the address bit permutation is that even though the physical memory 310 is actually being read first in the x-axis direction, then in the y-axis direction, and then in the z-axis direction, the effect is that the order in which the dimensions are read appears to be different. The memory 310 appears to be read first in the y-axis direction, then the z-axis direction, and then the x-axis direction.
Address bit permutation logic circuit 420 permutates the address bits by interchanging groups of address bits as shown. After reading the foregoing descriptions of the two-dimensional example shown in
It is optimal if the memory is sized such that its array has 2N number of blocks, where N is a number of the respective dimension. For example the four-dimensional array described above has a size of 16×8×4×2 blocks, that is 24×23×22×21, where 4 is the number of the fourth dimension, three the number of the third dimension, etc. It is possible for one or more dimensions of an array of blocks to have a size other than 2N, but additional considerations may be necessary.
While the address bit permutation circuit has been described as being at particular locations or in particular quantities in circuit 500A and 500B, the disclosure is not meant to be limited in these respects. The address bit permutation circuit may be at any suitable location and in any suitable quantity.
Address bit permutation circuit 620 comprises multiplexer 622, permutation selector 624, and an optional segment selector 626 (described below with respect to
Only one of the bus masters during a memory access is selected to enable a device coupled thereto to address memory 610. In this particular exemplary embodiment, multiplexer 622 selects between permutation x assigned to bus master y, and permutation 0 assigned to bus master 0. As discussed above, data may be written in one order and read in a different order. More specifically, data may be first written to memory 610 in an interleaved manner using bus master y with the address bits being un-permutated, and then read from memory using bus master 0 in a de-interleaved manner by permutating the address bits.
The address bit permutation circuit 620 is configured to rearrange virtually blocks of data identified by an address having a size 2N bytes, wherein N represents a number of least significant bits of the address bits not being subject to permutation. Referring to
During dynamic selection, a permutation selection is made for each memory access. Selection Unit B selects information from Selection Unit A; Selection Unit A selects a particular permutation, bus master, and read/write operation from lookup table in accordance with bus master tag and read/write control information received over control lines. There are many ways to organize permutation options in the lookup table, and thus the disclosure is not intended to be limited to the particular table shown in
Alternatively, during static selection, the same permutation selection is not made for each memory access but instead remains the same. Permutation selector 624 selects a permutation statically via software using a static control bit(s). In this case Selection Unit B selects SW permutation, in which case Selection Unit A for the bus master tag, read/write control information, and lookup table is ignored.
The permutation selection number setting is generally mirrored for all memory blocks throughout memory 610 because the addresses repeat themselves. This mirroring effect is not always desired. It may be that in some cases address bits should be permutated for only particular segments of the memory, a segment being defined as one or more memory blocks. A segment selector 626 (shown in
Initially, in step 710, address bits are provided.
At step 730, the address bits are permutated such that during a memory access blocks of data are rearranged virtually.
Optionally, at step 720, any memory segments to be rearranged virtually are selected such that less than all of the blocks of data are rearranged. As discussed above with respect to
Data interleaving/de-interleaving is used in many applications. Examples include radar applications, where perhaps eight ADCs are read in a round-robin fashion. The data from each of the ADCs is interleaved (e.g., 12345678 12345678 12345678 12345678) and must be de-interleaved (e.g., 1111 2222 3333 4444 5555 6666 7777 8888) before FFT processing. Data must then be reordered again before a second FFT processing. Data reordering is accomplished by permutating the address bits of the memory. Reordering data in this manner avoids address jumps and increments, which requires multiple processing cycles. The memory can therefore be more efficiently copied for feeding to FFT accelerators using DMA with burst access.
While the foregoing has been described in conjunction with exemplary embodiment, it is understood that the term “exemplary” is merely meant as an example, rather than the best or optimal. Accordingly, the disclosure is intended to cover alternatives, modifications and equivalents, which may be included within the scope of the disclosure.
Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that a variety of alternate and/or equivalent implementations may be substituted for the specific embodiments shown and described without departing from the scope of the present application. This application is intended to cover any adaptations or variations of the specific embodiments discussed herein.
Number | Name | Date | Kind |
---|---|---|---|
4446530 | Tsuboka | May 1984 | A |
4689823 | Wojcik et al. | Aug 1987 | A |
4727474 | Batcher | Feb 1988 | A |
4733187 | Shimazaki et al. | Mar 1988 | A |
4870491 | Ishii | Sep 1989 | A |
4882683 | Rupp et al. | Nov 1989 | A |
5095525 | Almgren et al. | Mar 1992 | A |
5247632 | Newman | Sep 1993 | A |
5379264 | Kobayashi et al. | Jan 1995 | A |
6604166 | Jana et al. | Aug 2003 | B1 |
7170432 | Ettorre | Jan 2007 | B2 |
20020184467 | Saen et al. | Dec 2002 | A1 |
20030001853 | Obayashi | Jan 2003 | A1 |
20030061461 | Circello | Mar 2003 | A1 |
20070240139 | Osada | Oct 2007 | A1 |
20070247644 | Tsumura | Oct 2007 | A1 |
20080049719 | Andreev | Feb 2008 | A1 |
20080209159 | Kim et al. | Aug 2008 | A1 |
20110302333 | Barry et al. | Dec 2011 | A1 |
20120250777 | Peron et al. | Oct 2012 | A1 |
Number | Date | Country |
---|---|---|
31 32 225 | May 1984 | DE |
36 87 218 | Apr 1993 | DE |
38 87 135 | Jul 1994 | DE |
H02-44445 | Feb 1990 | JP |
H06-295335 | Oct 1994 | JP |
2000-231513 | Aug 2000 | JP |
2002-312344 | Oct 2002 | JP |
2002-366425 | Dec 2002 | JP |
2003-084751 | Mar 2003 | JP |
Number | Date | Country | |
---|---|---|---|
20150026420 A1 | Jan 2015 | US |