Japanese Patent Application No. 2004-380984, filed on Dec. 28, 2004, is hereby incorporated by reference in its entirety.
The present invention relates to a memory controller, a display controller, and a memory control method.
A computer generally uses data or an address of which the number of bits is a power of two, such as 8 bits or 16 bits. On the other hand, a display device such as a liquid crystal display (LCD) generally uses pixel data of which the number of bits is not a power of two.
The pixel data in the RGB666 format is 18-bit data, and is not data of which the number of bits is a power of two. It is desirable that the pixel data be data of which the number of bits is a power of two, such as 16 bits (e.g. RGB565 format), so that a computer can easily process the data. However, since only 65,536 colors can be represented when the pixel data is 16 bits, high-definition image representation cannot be realized. Therefore, the RGB666 format as shown in
As the technology of storing pixel data in such an RGB format that the number of bits is not a power of two in a memory, the following related-art technologies can be given.
In a first related-art technology, as shown in
In a second related-art technology (JP-A-2003-223134), as shown in
In a third related-art technology, as shown in
Moreover, the third related-art technology has a problem in which it is difficult to deal with the number of RGB formats (bit modes). Specifically, since the third related-art technology uses a special memory having a word length of 36 bits, while addressing can be simplified for the RGB666 (18 bpp) format as shown in
A first aspect of the invention relates to a memory controller which controls access to a memory which stores pixel data, the memory controller comprising:
a splitter which divides input pixel data, in which the number of bits of a first color component is I1 bits, the number of bits of a second color component is I2 bits, and the number of bits of a third color component is I3 bits, into a basic data portion and an extension data portion, the number of bits of the first color component being J1 bits, the number of bits of the second color component being J2 bits, and the number of bits of the third color component being J3 bits (J1+J2+J3=2M) in the basic data portion, and the number of bits of the first color component being K1 bits, the number of bits of the second color component being K2 bits, and the number of bits of the third color component being K3 bits (K1+K2+K3=2N) in the extension data portion; and
an address generator which generates access addresses for writing the basic data portion into a basic data storage region of the memory and writing the extension data portion into an extension data storage region of the memory.
A second aspect of the invention relates to a display controller, comprising:
the above memory controller; and
a display device interface which performs interface processing between the display controller and a display device.
A third aspect of the invention relates to a display controller, comprising:
the above memory controller; and
at least one memory in which the basic data storage region and the extension data storage region are allocated.
A fourth aspect of the invention relates to a method of controlling a memory which stores pixel data, the method comprising:
dividing input pixel data, in which the number of bits of a first color component is I1 bits, the number of bits of a second color component is I2 bits, and the number of bits of a third color component is I3 bits, into a basic data portion and an extension data portion, the number of bits of the first color component being J1 bits, the number of bits of the second color component being J2 bits, and the number of bits of the third color component being J3 bits (J1+J2+J3=2M) in the basic data portion, and the number of bits of the first color component being K1 bits, the number of bits of the second color component being K2 bits, and the number of bits of the third color component being K3 bits (K1+K2+K3=2N) in the extension data portion; and
writing the basic data portion into a basic data storage region of the memory and writing the extension data portion into an extension data storage region of the memory.
The invention may provide a memory controller, a display controller, and a memory control method capable of increasing the memory utilization efficiency and simplifying memory addressing.
One embodiment of the invention provides a memory controller which controls access to a memory which stores pixel data, the memory controller comprising:
a splitter which divides input pixel data, in which the number of bits of a first color component is I1 bits, the number of bits of a second color component is I2 bits, and the number of bits of a third color component is I3 bits, into a basic data portion and an extension data portion, the number of bits of the first color component being J1 bits, the number of bits of the second color component being J2 bits, and the number of bits of the third color component being J3 bits (J1+J2+J3=2M) in the basic data portion, and the number of bits of the first color component being K1 bits, the number of bits of the second color component being K2 bits, and the number of bits of the third color component being K3 bits (K1+K2+K3=2N) in the extension data portion; and
an address generator which generates access addresses for writing the basic data portion into a basic data storage region of the memory and writing the extension data portion into an extension data storage region of the memory.
According to one embodiment of the invention, the input pixel data is divided into the basic data portion, in which the first, second, and third color components are respectively J1 bits, J2 bits, and J3 bits, and the extension data portion, in which the first, second, and third color components are respectively K1 bits, K2 bits, and K3 bits. The basic data portion is written into the basic data storage region of the memory, and the extension data portion is written into the extension data storage region of the memory. According to one embodiment of the invention, the basic data portion satisfies the relationship “J1+J2+J3=2M”, and the extension data portion satisfies the relationship “K1+K2+K3=2N”. Therefore, the utilization efficiency of the memory in which the basic data portion and the extension data portion are allocated can be increased. Moreover, addressing can be simplified when requesting access to the memory.
With this embodiment,
the first color component, the second color component, and the third color component may be respectively an R component, a G component, and a B component; and
when pixel data in an RGB666 format, in which I1=I2=I3=6, is input, the splitter may divide the pixel data in the RGB666 format into a basic data portion in an RGB565 format, in which J1=5, J2=6, and J3=5, and an extension data portion in which K1=1, K2=0, and K3=1.
Therefore, even when pixel data in the RGB666 format of which the total number of bits is not a power of two is input, the pixel data can be efficiently stored in the memory. Moreover, since the basic data portion is in the RGB565 format, the basic data portion may be used for other applications such as the subtractive color mode.
With this embodiment,
the first color component, the second color component, and the third color component may be respectively an R component, a G component, and a B component; and
when pixel data in an RGB888 format, in which I1=I2=I3=8, is input, the splitter may divide the pixel data in the RGB888 format into a basic data portion in an RGB565 format, in which J1=5, J2=6, and J3=5, and an extension data portion in which K1=3, K2=2, and K3=3.
Therefore, even when pixel data in the RGB888 format of which the total number of bits is not a power of two is input, the pixel data can be efficiently stored in the memory. Moreover, since the basic data portion is in the RGB565 format, the basic data portion may be used for other applications such as the subtractive color mode.
With this embodiment, when pixel data in an RGB565 format, in which I1=5, I2=6, and I3=5, is input, the input pixel data in the RGB565 format may be written into the basic data storage region.
Therefore, when pixel data in the RGB565 format is input, the pixel data can be efficiently stored in the memory. Moreover, it becomes possible to deal with input of pixel data in different formats, such as the RGB666 format and the RGB565 format, the RGB888 format and the RGB566 format, or the RGB666 format, the RGB888 format, and the RGB566 format.
This embodiment may include a multiplexer which selects pixel data output from one of access request blocks requesting access to the memory, and outputs the selected pixel data to the splitter.
This enables addressing to be simplified when write requests are issued from the access request blocks, for example.
This embodiment may include: a combiner which combines the basic data portion stored in the basic data storage region and the extension data portion stored in the extension data storage region, and outputs pixel data in which the number of bits of the first color component is I1 bits, the number of bits of the second color component is I2 bits, and the number of bits of the third color component is I3 bits.
This enables the basic data portion stored in the basic data storage region and the extension data portion stored in the extension data storage region to be automatically combined.
This embodiment may include a demultiplexer which outputs the pixel data output from the combiner to one of access request blocks which request access to the memory.
This enables addressing to be simplified when read requests are issued from the access request blocks, for example.
With this embodiment, in a subtractive color mode, the basic data portion stored in the basic data storage region may be read and output as pixel data in the subtractive color mode.
This enables the subtractive color mode to be realized by using a simple configuration and simple processing.
With this embodiment, in a complementary color mode, the basic data portion stored in the basic data storage region may be read in order to generate pixel data in the complementary color mode including the basic data portion and a complementary color data portion.
This enables the complementary color mode to be realized by using a simple configuration and simple processing.
With this embodiment, the complementary color data portion may be generated based on the read basic data portion.
This simplifies the processing of generating the complementary color data portion.
With this embodiment, in the complementary color mode, the generated complementary color data portion may be written into the extension data storage region.
This makes it possible to store and retain the generated complementary color data portion.
Another embodiment of the invention provides a display controller comprising:
any of the above memory controllers; and
a display device interface which performs interface processing between the display controller and a display device.
This embodiment may include a host interface connected with a host processor through a 2R-bit bus and performing interface processing between the display controller and the host processor.
A further embodiment of the invention provides a display controller comprising:
any of the above memory controllers; and
at least one memory in which the basic data storage region and the extension data storage region are allocated.
The basic data storage region and the extension data storage region may be allocated in different memories, such as allocating the basic data storage region in a first memory and allocating the extension data storage region in a second memory, or the basic data storage region and the extension data storage region may be allocated in an identical (single) memory.
A still further embodiment of the invention provides a method of controlling a memory which stores pixel data, the method comprising:
dividing input pixel data, in which the number of bits of a first color component is I1 bits, the number of bits of a second color component is I2 bits, and the number of bits of a third color component is I3 bits, into a basic data portion and an extension data portion, the number of bits of the first color component being J1 bits, the number of bits of the second color component being J2 bits, and the number of bits of the third color component being J3 bits (J1+J2+J3=2M) in the basic data portion, and the number of bits of the first color component being K1 bits, the number of bits of the second color component being K2 bits, and the number of bits of the third color component being K3 bits (K1+K2+K3=2N) in the extension data portion; and
writing the basic data portion into a basic data storage region of the memory and writing the extension data portion into an extension data storage region of the memory.
Note that the embodiments described hereunder do not in any way limit the scope of the invention defined by the claims laid out herein. Note also that not all of the elements of these embodiments should be taken as essential requirements to the means of the present invention.
Configuration
A display controller 10 includes a host interface (I/F) 12. In the specification and the drawings, the term “interface” may be appropriately abbreviated as “I/F”. The host I/F 12 performs interface processing between the display controller 10 and a host CPU 13 (host processor in a broad sense). In more detail, the host I/F 12 performs processing of transmitting or receiving a command, data (pixel data), or status to or from the host CPU 13. The host I/F 12 and the host CPU 13 are connected through an 8-bit or 16-bit (2R-bit in a broad sense) bus (data bus, address bus, or data/address bus), for example. The host CPU 13 controls the entire electronic instrument (e.g. portable telephone or portable information instrument) provided with the display controller 10, performs MPEG decode-encode processing, or performs baseband engine processing. The display controller 10 may include a circuit which performs MPEG decode-encode processing.
The display controller 10 includes a display device I/F 14 (LCD I/F). The display device I/F 14 performs interface processing between the display controller 10 and a display device 15 (display driver or display panel). In more detail, the display device I/F 14 performs processing of transmitting pixel data (image data, video data, or still image data) to the display device 15, processing of generating various control signals for the display device 15, or the like.
The display controller 10 includes a graphic engine 16 (image processing circuit). The graphic engine 16 performs image processing such as image rotation (mirror) processing, scaling (expansion-reduction) processing, or filter processing (gamma correction). In more detail, pixel data (image data) input from the host CPU 13 or pixel data obtained by a capturing operation of a camera (not shown) is written into memories 20 and 22. The graphic engine 16 performs image processing such as rotation processing or scaling processing for the pixel data stored in the memories 20 and 22. The pixel data after image processing is written into the memories 20 and 22, transferred to the host CPU 13 through the host I/F 12, or transferred to the display device 15 through the display device I/F 14.
The display controller 10 includes a memory controller 30. The memory controller 30 controls access (read or write access) to the memories 20 and 22. Specifically, the memory controller 30 arbitrates between accesses from access request blocks (peripheral circuits) such as the host I/F 12, the display device I/F 14, and the graphic engine 16. The memory controller 30 generates a read address or a write address of the memories 20 and 22, and reads or writes data (pixel data) from or into the memories 20 and 22.
The display controller 10 includes the memories 20 and 22 (VRAMs). The memories 20 and 22 store pixel data (image data, RGB data, or YUV data) or the like. The memories 20 and 22 are memories having a word length of 2P bits (e.g. 32 bits, 64 bits, or 128 bits), and may be configured by using a DRAM, an SRAM, or the like.
The memories 20 and 22 may be built-in memories provided in the display controller 10 as shown in
The memory controller 30 includes a splitter 40. The splitter 40 (dividing circuit) performs processing of dividing pixel data into a basic data portion (data portion of basic bits) and an extension data portion (data portion of extension bits). Suppose that pixel data (image data), in which the number of bits of an R component (first color component in a broad sense) is I1 bits, the number of bits of a G component (second color component in a broad sense) is I2 bits, and the number of bits of a B component (third color component in a broad sense) is I3 bits, is input (e.g. I1+I2+I3=2M+2N; I1, I2, I3, M, and N are integers). In this case, the splitter 40 divides the input pixel data into a basic data portion, in which the number of bits of the R (red) component is J1 bits, the number of bits of the G (green) component is J2 bits, and the number of bits of the B (blue) component is J3 bits (J1+J2+J3=2M), and an extension data portion, in which the number of bits of the R component is K1 bits, the number of bits of the G component is K2 bits, and the number of bits of the B component is K3 bits (K1+K2+K3=2N) (J1, J2, J3, K1, K2, and K3 are integers). The memory controller 30 writes the basic data portion obtained by division into the basic data storage region (memory 20), and writes the extension data portion into the extension data storage region (memory 22). It should be understood that the case of dividing pixel data into three or more portions instead of dividing pixel data into two portions is also included within the scope of the invention.
The memory controller 30 includes a combiner 50. The combiner 50 (combining circuit) performs processing of combining the basic data portion and the extension data portion of the pixel data. In more detail, the combiner 50 combines the basic data portion stored in the basic data storage region of the memory 20 and the extension data portion stored in the extension data storage region of the memory 22. The combiner 50 then outputs the pixel data in which the number of bits of the R component is I1 bits, the number of bits of the G component is I2 bits, and the number of bits of the B component is I3 bits.
The memory controller 30 includes an address generator 60. The address generator 60 (address generation circuit) generates access addresses (write address or read address) for accessing the memories 20 and 22. In more detail, the address generator 60 generates access addresses for writing the basic data portion into the basic data storage region and writing the extension data portion into the extension data storage region. The address generator 60 generates access addresses for reading the basic data portion from the basic data storage region and reading the extension data portion from the extension data storage region.
The memory controller 30 includes a memory I/F 70 and a memory I/F 72. The memory I/F 70 performs interface processing between the memory controller 30 and the memory 20, and the memory I/F 72 performs interface processing between the memory controller 30 and the memory 22. The memory I/F 70 and the memory I/F 72 include a circuit which generates control signals for the memories 20 and 22, a circuit which absorbs the difference in access cycle among various types of memories such as an SRAM and a DRAM, and the like. The memory I/F may be provided in a number corresponding to the number of physically divided memories, the number of banks, or the like.
Operation
The operation according to one embodiment of the invention is described below.
According to one embodiment of the invention, pixel data in various formats such as RGB888, RGB666, and RGB565 can be input as described above. However, 24-bit pixel data in the RGB888 format and 18-bit pixel data in the RGB666 format are data of which the number of bits is not a power of two.
On the other hand, the host CPU 13 uses data or an address of which the number of bits is a power of two, such as 8 bits or 16 bits. When special memories are not used as the memories 20 and 22, the word length of the memories 20 and 22 is the number of bits which is a power of two. Therefore, a problem occurs in which the memory utilization efficiency is decreased, addressing of the host CPU 13 becomes complicated, or special memories having a word length of which the number of bits is not a power of two must be used as the memories 20 and 22, as described with reference to the related-art technologies shown in
In a portable telephone or the like, the host CPU 13 must perform various types of processing in addition to the baseband engine processing. Therefore, if addressing becomes complicated as shown in
In order to solve such a problem, one embodiment of the invention uses the method shown in FIGS. 8 to 11.
In the RGB666 format input mode, the host CPU 13 writes pixel data in the RGB666 format by transmitting the pixel data to the host I/F 12 according to the signal waveform as shown in
Specifically, the input pixel data is in the RGB666 format in which the R component is I1=6 bits, the G component is I2=6 bits, and the B component is I3=6 bits, as shown in
The address generator 60 generates an access address (write address) for writing the basic data portion (R5 to R1, G5 to G0, and B5 to B1) into the basic data storage region. The memory I/F 70 writes the basic data portion into the basic data storage region of the memory 20 based on the access address. The address generator 60 generates an access address for writing the extension data portion (R0 and B0) into the extension data storage region. The memory I/F 72 writes the extension data portion into the extension data storage region of the memory 22 based on the access address.
In the RGB888 format input mode, the host CPU 13 writes pixel data in the RGB888 format by transmitting the pixel data to the host I/F 12 according to the signal waveform as shown in
Specifically, the input pixel data is in the RGB888 format in which the R component is I1=8 bits, the G component is I2=8 bits, and the B component is I3=8 bits, as shown in
In the RGB565 format input mode, the host CPU 13 writes pixel data in the RGB565 format by transmitting the pixel data to the host I/F 12 according to the signal waveform as shown in
In this case, the input pixel data is in the RGB565 format in which the R component is I1=5 bits, the G component is I2=6 bits, and the B component is I3=5 bits, as shown in
According to one embodiment of the invention, since the pixel data is stored in the memory in a regular arrangement as shown in FIGS. 8 to 13, addressing is facilitated. Therefore, the configuration of the address generator 60 can be simplified. Specifically, according to one embodiment of the invention, the address generator 60 may generate the address A0 as the address of the basic data portions of the first and second pixel data D0 and D1, generate the address A1 as the address of the basic data portions of the third and fourth pixel data D2 and D3, and the like. Therefore, addressing can be simplified in comparison with the related-art technology shown in
When dealing with the number of RGB formats (bit modes) by using a method of using a special memory having a word length of which the number of bits is not a power of two as in the related-art technology shown in
According to one embodiment of the invention, as shown in FIGS. 8 to 13, when dealing with the number of RGB formats, addressing can be simplified for all the RGB formats. For example, simple addressing as shown in
According to one embodiment of the invention, pixel data can be stored while efficiently utilizing the memory, as shown in
According to one embodiment of the invention, an ordinary memory having a word length of which the number of bits is a power of two can be used as the memory in which the basic data storage region or the extension data storage region is allocated. Therefore, the manufacturing process and the type of memory used are not limited, so that cost of the memory controller and the display controller can be reduced. In the related-art technology using a special memory as shown in
According to one embodiment of the invention, when writing pixel data into the memories 20 and 22, the pixel data is automatically divided into the basic data portion and the extension data portion by the splitter 40, and the basic data portion and the extension data portion are respectively written into the basic data storage region and the extension data storage region. When reading pixel data from the memories 20 and 22, the basic data portion and the extension data portion stored in the basic data storage region and the extension data storage region are read and automatically combined by the combiner 50. Therefore, the host CPU 13 need not take into consideration that pixel data is divided into the basic data portion and the extension data portion and stored in the divided state. Therefore, the memory utilization efficiency can be increased without increasing the processing load imposed on the host CPU 13.
According to one embodiment of the invention, the basic data portion is in the general RGB565 format, as shown in FIGS. 8 to 13. Therefore, the number of bits can be converted (subtractive color processing) from the RGB666 format or the RGB888 format to the RGB565 format without correcting the memory data by merely removing the extension data portion from the pixel data in the RGB666 format or the RGB888 format (by merely omitting the extension data portion).
Detailed Configuration Example
The input of the multiplexer 80 is connected with the outputs of the host I/F 12 and the graphic engine 16 (access request blocks in a broad sense) through a 24-bit width ((I1+I2+I3)-bit width) bus, and the output of the multiplexer 80 is connected with the input of the splitter 40 through a 24-bit width bus. The output of the splitter 40 is connected with the input of the memory I/F 70 through a 16-bit width ((J1+J2+J3)-bit width) basic data portion transfer bus, and the output of the splitter 40 is connected with the input of the memory I/F 72 through an 8-bit width ((K1+K2+K3)-bit width) extension data portion transfer bus.
The output of the memory I/F 70 is connected with the input of the combiner 50 through a 16-bit width basic data portion transfer bus, and the output of the memory I/F 72 is connected with the input of the combiner 50 through a 8-bit width extension data portion transfer bus. The output of the combiner 50 is connected with the input of the demultiplexer 82 through a 24-bit width bus, and the output of the demultiplexer 82 is connected with the inputs of the host I/F 12, the display device I/F 14, and the graphic engine 16 through a 24-bit width bus.
In the RGB888 format input mode, signal lines of all the bits of the 24-bit width bus are used. In the RGB666 format input mode, signal lines of the lower-order 18 bits of the 24-bit width bus are used. In the RGB565 format input mode, the signal lines of the lower-order 16 bits are used.
The multiplexer 80 selects pixel data output from one of the host I/F 12 and the graphic engine 16 (access request blocks in a broad sense) requesting access to the memories 20 and 22. The multiplexer 80 outputs the selected pixel data to the splitter 40. In more detail, the arbiter 84 arbitrates between the access requests from the host I/F 12 and the graphic engine 16. When the arbiter 84 approves the access request from the host I/F 12, the multiplexer 80 outputs the pixel data from the host I/F 12 to the splitter 40. When the arbiter 84 approves the access request from the graphic engine 16, the multiplexer 80 outputs the pixel data from the graphic engine 16 to the splitter 40.
The splitter 40 divides the input pixel data into a basic data portion and an extension data portion, and outputs the basic data portion to the memory I/F 70 through the 16-bit width bus. The memory I/F 70 writes the basic data portion into the basic data storage region of the memory 20. The splitter 40 outputs the extension data portion to the memory I/F 72 through the 8-bit width bus. The memory I/F 72 writes the extension data portion into the extension data storage region of the memory 22.
The memory I/F 70 outputs the basic data portion read from the basic data storage region of the memory 20 to the combiner 50 through the 16-bit width bus. The memory I/F 72 outputs the extension data portion read from the extension data storage region of the memory 22 to the combiner 50 through the 8-bit width bus. The combiner 50 combines the basic data portion and the extension data portion, and outputs pixel data obtained by combination to the demultiplexer 82.
The demultiplexer 82 outputs the pixel data output from the combiner 50 to one of the host I/F 12, the display device I/F 14, and the graphic engine 16 (access request blocks in a broad sense) requesting access to the memories 20 and 22. In this case, the arbiter 84 arbitrates among the access requests.
The host CPU 13, the display device I/F 14 (display device 15), and the graphic engine 16 can access the memories 20 and 22 through the splitter 40 or the combiner 50 by providing the multiplexer 80 and the demultiplexer 82 as shown in
Subtractive color mode and complementary color mode
According to one embodiment of the invention, conversion of the number of bits in a subtractive color mode or a complementary color mode can be easily realized. In the subtractive color mode in which the number of bits of pixel data is reduced, the basic data portion stored in the basic data storage region is read and output as pixel data in the subtractive color mode.
In
According to one embodiment of the invention, only the basic data portion in the RGB565 format stored in the basic data storage region is read in the subtractive color mode without reading the extension data portion (2 bpp) stored in the extension data storage region. The read basic data portion is output as the pixel data in the subtractive color mode. It is possible to deal with the case of displaying a screen consisting only of characters in the display device 15 in the subtractive color mode by outputting the pixel data in the subtractive color mode to the display device I/F 14, for example.
In the related-art technologies shown in
According to one embodiment of the invention, the basic data portion stored in the basic data storage region is read in the complementary color mode in order to generate pixel data in the complementary color mode including the basic data portion and a complementary color data portion.
In
In this case, a complementary color generator 90 generates the complementary color data portion based on the basic data portion, as shown in
The complementary color data portion may be generated based on the basic data portion, or may be generated irrespective of the basic data portion. When generating the complementary color data portion irrespective of the basic data portion, the complementary color generator 90 may output fixed bit values as the complementary color data portion.
In the complementary color mode, the generated complementary color data portion may be written into the extension data storage region without rewriting the read basic data portion into the basic data storage region. In
The invention is not limited to the above-described embodiments. Various modifications and variations may be made within the scope of the invention. For example, the terms (e.g. host CPU, R component, G component, and B component) cited in the description in the specification or the drawings as the terms in a broad sense or in a similar sense (e.g. host processor, first color component, second color component, and third color component) may be replaced by the terms in a broad sense or in a similar sense in another description in the specification or the drawings.
The configurations of the memory controller and the display controller according to the invention are not limited to the configurations described with reference to
Although only some embodiments of the present invention have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the embodiments without materially departing from the novel teachings and advantages of this invention. Accordingly, all such modifications are intended to be included within scope of this invention.
Number | Date | Country | Kind |
---|---|---|---|
2004-380984 | Dec 2004 | JP | national |