FLEXIBLE MEMORY CHANNEL

Abstract: A memory channel means (2), transferring data streams between different blocks (1, 3-15) and an internal memory means (1) on a data chip, wherein said memory channel means (2) comprises several memory channels (MC1-MC6). Each channel has source and destination data stream interfaces, wherein each interface is connectable to different blocks (1, 3-15), and a flexible address generator (16, 19) generating source and destination addresses for the internal memory means (1), wherein the order of the data being transferred is changed.

Description: TITLE: FLEXIBLE MEMORY CHANNEL Field of the Invention The present invention relates generally to memory channel means, and more particularly to memory channel means comprising several memory channels transferring data streams between different blocks and an internal memory means on a data chip . Description of the Prior Art General purpose and special purpose chips comprise many different blocks such as a CPU, control circuits, I/O- ports, memory units, registers etc., exchanging data, usually by means of an internal bus. A bus is a set of connectors designed to transfer data either unidirectional- ly or bidirectionally . Some buses are dedicated buses, i.e. buses having a unique source and destination. Thus, if n blocks have to be interconnected by buses in all possible ways, n(n-l) dedicated buses are required. Generally, bus drivers and logic circuits are required to control the buses. These designs involve considerable costs, and therefore buses which can connect one of several sources to one of several destinations are used. However, this design with fewer buses requires more complex logic circuits and bus controllers. Traditional buses are classified as CPU-memory buses or I/O buses. I/O buses may be lengthy and interconnect many types of devices, having a wide range in the data bandwidth of the devices . On the other hand CPU-memory buses are short, high speed buses and designed to maximize CPU-memory bandwidth. Also single buses for both memory and I/O devices are available. DCAM™ - 101 from LSI Logic Corporation is a special purpose chip for digital still cameras. It contains different functions needed to preview, capture, compress, filter, store, transfer and display digital images. Consequently, the DCAM™ - 101 chip comprises several blocks and units, such as a CPU, memory units, different I/O interfaces, and control blocks etc., all of which exchange data through a traditional internal bus. Such a traditional bus enables only passive transmission of data between different blocks on the chip, i.e. the data is not manipulated in any way during the transfer. Summary of the invention The main object of the present invention is to provide an improved memory channel means in order to move data streams between different blocks on a chip and simultaneously manipulate the data being transferred. Another object of the invention is to change the order of the data within the data streams . A further object of the invention is to provide an improved memory channel means, which reduces the required memory capacity on the chip. Still another object of the invention is to obtain regular addressing schemes. An additional object of the invention is to provide memory channels and address generators operating in parallel and accessing the memory independent of each other . These and other objects, features and advantages of the invention are accomplished by a flexible memory channel means according to the invention, comprising several memory channels, each channel having source and destination data stream interfaces, wherein each interface is connectable to different blocks, and a flexible address generator generating source and destination addresses for the internal memory, and will be apparent from the following detailed description in conjunction with the drawings. Brief Description of the Drawings In order to explain the invention in more detail and the advantages and features of the invention references in the following detailed description of the preferred embodi- ment are made to the accompanying drawings, in which FIG 1 is a block diagram of a special purpose chip comprising a flexible memory channel means according to the invention, FIG 2 is a block diagram of an embodiment of the memory channel means in FIG 1 in further detail, FIG 3A is a block diagram of a first embodiment of a memory channel according to the invention, FIG 3B is a block diagram of a second embodiment of a memory channel according to the invention, FIG 4A is a block diagram of a first embodiment of an address generator according to the invention, FIG 4B is a block diagram of a second embodiment of an address generator according to the invention, FIG 5 is a table illustrating the method of address generation by the second embodiment of the address generator according to the invention, and FIG 6 is a table illustrating possible connections between data sources and destinations on the special purpose chip in FIG 1. Detailed Description of the Invention The present invention is a flexible memory channel means, transferring data streams between different blocks and an internal memory means on preferably a special purpose chip such as a chip for a digital imaging system. The chip for a digital imaging system serves only to illustrate an application for an embodiment of the flexible memory channel means according to the invention. Other embodiments of the invention are applicable to other applications. Further, in the following description, numerous specific details, such as the number of channels, registers, bits in each register and the different blocks on the chip are provided in detail in order to give a more thorough description of the present invention. However, it will be obvious for those skilled in the art that the present invention may be practiced without these specific details. Some well-known features are not described in detail so as not to make the present invention unclear. As shown in FIG 1 a special purpose chip such as a chip for a digital imaging system comprises different blocks capable of compressing color images from a CCD camera or video source using a compression algorithm such as JPEG. Most of the blocks on the chip operate as data sources, data destinations or both. An internal memory means or RAM 1 is accessed through a memory channel means 2 according to the invention, comprising several memory channels, MC1-MC6 in the embodiment. Each channel has source and destination data stream interfaces, each interface being connectable to different blocks, and a flexible address generator generating source and destination addresses for the internal memory. For example, input data are received via a CCD interface 3 or video interface 4, wherein the data are stored in the internal RAM 1 via the destination data stream interface of the first memory channel MCI, shown in FIG 2. Further, the stored data are read by a DCT (Discrete Cosine Transform) block 5 from the RAM 1 via the source data stream interface of the second memory channel MC2 for transformat on into DCT coefficients and quantization in a quantization block 6. Then, the quantized coefficients are the subject for variable length integer coding and Huffman entropy coding in a Symbol Huffman VLI block 7. The resulting symbols are converted into a bit stream in a bit stream block 8 and before the data stream is output to an external host via a host interface 9 the data stream is buffered in a FIFO block 10. The data stream is not necessarily transferred to an external host, but is stored in the RAM 1 via the destination data stream interface of the fourth memory channel MC4 for later retrieval . Some image operations require external memory support. Overloading of still images, such as putting a clock on the image, implies external memory accesses, wherein data are read from the external memory via an external RAM interface 11 and stored in the RAM 1 via for example the destination data stream interface of the second memory channel MC2. The overload operation is performed by a blitter 12. Image data are read from the RAM 1 via the source data stream interface of either of the second and the third memory channels MC2 and MC3 , and the data are manipulated by the blitter 12 and stored back in the RAM 1 via the destination data stream interface of the first and fourth memory channels MCI and MC4. In order to control the memory channel means 2, the RAM 1 and the other blocks on the chip, an on chip CPU 13, is provided. Additional memory units or RAMs 14 are provided for support of some of the blocks in order to make them operate properly and a general I/O interface 15 is also provided for the communication between the chip and other external I/O devices. As mentioned above, access to the internal RAM 1 is made through the memory channel means 2 according to the invention, comprising six memory channels in the embodiment. Ea^h memory channel has at lease two data stream interfaces - a source and a destination - and an associated address generator. The first, second and third memory channels MCI, MC2 , and MC3 are provided with advanced address generators, while the fourth, fifth and sixth memory channels MC4 , MC5 , and MC6 are provided with simple address generators. An embodiment of the memory channels MC4-MC6 provided with a simple address generator 16, an address decoder 17, and a data channel 18 is illustrated in FIG 3A, and an embodiment of the memory channels MC1-MC3 provided with an advanced address generator 19, an address decoder 20, and a data channel 21 is illustrated in FIG 3B. Additionally, each memory channel comprises control means, software and/or hardware for a suitable operation. This is, however, obvious for the man skilled in the art. The simple address generator generates consecutive source and destination addresses, while the advanced address generator provides more complicated address schemes . All address generators of the same kind - simple or advanced - have the same set of registers MCx_YYYy, wherein MCx is the Memory Channel x (x: 1-3 for advanced and 4-6 for simple generators) and YYYy is the kind of register. In the preferred embodiment of the invention the following registers are available in the advanced address generator 19 and the simple address generator 16, respectively, also shown in FIGs 4B and 4A. Additionally, an address calculator 22 is provided in the simple address generator 16 and an address calculator 23 is provided in the advanced address generator 19. Further, it is obvious for the man skilled in the art that each address generator comprises control means, software and/or hardware for a suitable operation. Advanced address registers (1-3) MCx_CNT : word counter (number of words to be transferred) MCx_PTR: address pointer (current address) MCx_STR0: stride value 0 MCx_CTRL : control register bit 0 - source/destination control 1 - destination 0 - source bit 1 - minor stride enable bit 2 - major stride enable bit 3 - mega stride enable MCx_CNTl : minor count (number of consecutive accesses) MCx_STRl : minor stride (added to the address pointer MCx_PTR every minor count access) MCx_CNT2 : major count (number of consecutive minor cycles) MCx_STR2 : major stride (added to the address pointer MCx_PTR after major count minor cycles) MCx__CNT3 mega count (number of consecutive major cycles) MCx_STR3 mega stride (added to the address pointer MCx_PTR after mega count major cycles) MCx SEL source/destination selection Simple address registers (4-6) MCx_CNT: word counter (number of words to be transferred) MCx_PTR: address pointer (current address) MCx_CTRL: control register bit 0 - source/destination control 1 - destination 0 - source MCx_SEL source/destination selection Thus, three different stride registers MCx_STRl, MCx_STR2 and MCx_STR3 can be loaded with stride values. The values are used by the address calculator 23 in the address generator 19 in order to provide the next address depending on the state of the stride unit. The state is controlled by three different stride counters, counting each time the address is updated and the subsequent lower stride counter is zero. When the counter is zero the counter is reloaded with a pre-stored start value. This is repeated until the transmission is completed, which is controlled by the current memory channel MC1-MC6. All registers are loaded in a particular order. The following order is preferred: 1. Load a stride 0 register MCx_STR0 2. Load a stride setting register MCx_CTRL 3. Load all (used) counter and stride registers MCx_CNTl , MCx_STRl , MCx_CNT2 , MCx_STR2 , MCx_CNT3 , and MCx_STR3. 4. Load a destination pointer register MCx_PTR. 5. Start the data transfer with the MCx_CNT register. When a value is written in the MCx_PTR register all stride counters are reloaded to an initial state. Further, when the MCx_CNT register is written a first stride update is pre-calculated in order to be ready when the memory channel starts the data transfer. This pre-calculation is performed, because the updated signal is received when the first address already is used. The update signal is generated by the memory channel when the channel has written the first transferred word in the RAM 1. After a complicated data transfer involving an advanced address generator 19 and the stride registers MCx_STRl-3 and when the channel is ready more words can be transferred by writing in the MCx_CNT again. In this case the internal state for all the stride registers is pre- served and the transfer continues. The state is restored if MCx_PTR is written before MCx_CNT is written. The word counter MCx_CNT of the memory channel counts the number of received words from the source - block or memory - and not the number of transferred words. Since the memory channel has a FIFO means, comprising a two step queue in the embodiment the counter value of the MCx_CNT does not give a reliable indication of a completed transfer. Therefore, the memory channel means 2 is provided with a memory channel status register MC_STATUS of 6 bits, wherein each bit is associated with a particular memory channel, e.g. bit 0 is associated with the first memory channel MCI. The bit is set if the transfer has been completed, or has not been initiated, and the bit is not set if a transfer is in progress. As mentioned above, access to the RAM 1 is performed by means of the memory channel means 2 and its memory channels having source and destination data stream interfaces, respectively, and its address generators. The simple address generator is capable of generating consecutive addresses. In order to initiate a data transfer between one of the blocks 3-15 and the RAM 1 on the chip, a transfer only requiring a simple address generation, a start address is generated and written in the MCx_PTR register and a start value is written in the word counter MCx_CNT. The data transfer progresses on a word by word basis in the embodiment. When the transfer is complete the associated bit in the memory channel status register MC_STATUS is set. In case of more complicated address schemes a memory channel provided with an advanced address generator (1-3) is used. The advanced address generator comprises counter means, wherein each counter means is associated with a stored stride value. The first counter means including the first counter register MCx_CNTl is decremented for every word transferred until it reaches zero, wherein a corresponding stride value stored in the first stride register MCx_STRl is added to the current address in the address register MCx_PTR. A stride state means generates control signals for the counter registers. The first counter register MCx_CNTl is reloaded with a predetermined value. At least one other counter is decremented every time its previous counter means reaches zero, wherein its associated stride value is added to the current address in the address register MCx_PTR and the consecutive counter means is reloaded with a predetermined value. In the preferred embodiment of the invention two additional counters MCx_CNT2 and MCx_CNT3 are provided, as described above. Hence, when MCx_CNTl becomes zero the second counter MCx_CNT2 is decremented. The MCx_CNT3 is decremented when the second counter becomes zero. If no one of the counters MCx_CNTl, MCx_CNT2 or MCx_CNT3 is zero a stride value stored in another stride register MCx_STR0 is added to the current address in the address register MCx_PTR. The address generator receives an update signal from the memory channel one cycle after the address is used, hence, the address is generated one cycle in advance. A few examples of address generations by means of an advanced address generator provided with stride registers are shown in a table 1 in FIG 5 and possible connections between data sources and destinations are illustrated by examples in a table 2 in FIG 6. Each memory channel MC1-MC6 operates in two different modes, source and destination. In a memory channel operating in the destination mode data is received from a block and transferred to the RAM 1. For each word transferred an update signal is generated in the memory channel and is sent to the address generator. A transfer counter in each memory channel counts the number of words read from the block connected to the particular channel into a FIFO queue means in the memory channel . As long as data is present in the FIFO the memory channel requests for a memory cycle and the address generator generates the next address. When a memory cycle is available for the memory channel a signal is received from a memory controller. In source mode the transfer counter counts the number of words read from the current memory channel into the FIFO. As long as data is present in the FIFO it is transferred to the connected block with a data rate suitable for the block. Although the invention has been described by way of a specific embodiment thereof it should be apparent that the present invention provides a flexible memory channel that fully satisfies the aims and advantages set forth above, and alternatives, modifications and variations are apparent to those skilled in the art.

Claims: CLAIMS 1. A memory channel means (2), transferring data streams between different blocks (1,3-15) and an internal memory means (1) on a data chip, c h a r a c t e r i z e d in that said memory channel means (2) comprises several memory channels (MC1-MC6), each channel having source and destination data stream interfaces, each interface being connectable to different blocks (1,3-15), and a flexible address generator (16,19) generating source and destination addresses (MCx_PTR) for the internal memory means (1) , causing a changed order of the data being transferred. 2. A memory channel means according to claim 1, c h a r a c t e r i z e d by an address generator (16) generating consecutive source and destination addresses (MCx_PTR) . 3. A memory channel means according to claim 1 or 2 , c h a r a c t e r i z e d by an address generator (19) , comprising counter means (MCx_CNTl-3 ) , wherein each counter means is associated with a stored stride value (MCx_STRl- 3), a first counter means (MCx_CNTl) which is decremented for each word transferred until it reaches zero, adding means adding said corresponding stride value (MCx_STRl) to said current address (MCx_PTR) , and reloading means reloading said first counter means (MCx_CNTl) with a predetermined value . 4. A memor / channel according to claim 3, c h a r a c t e r i z e d by an address generator (19) , comprising at least another counter means (MCx_CNT2, MCx_CNT3 ) , which is decremented every time its previous counter means (MCx_CNTl, MCx_CNT2 ) reaches zero, at least another adding means adding an associated stride value (MCx_STR2, MCx_STR3) to said current address (MCx_PTR) , and at least another reloading means reloading said another counter means (MCx_CNT2, MCx_CNT3 ) with a predetermined value .

Inventors: LUNDBERG STEFAN, SANDSTROEM STEFAN, LUNDBERG, STEFAN, SANDSTROEM, STEFAN
Applicants: AXIS AB
Application year: 1999
Main classification: G06F12
IPC codes: G06F12, G06F13, G06T1