The present invention relates to a drawing device that carries out information processing on vector graphics data expressed as a set of pieces of drawing information, such as vertex coordinates and color information of a graphic. More particularly, it relates to management of cache processing on data at a time of drawing vector graphics data on a display device.
A graphics drawing device typically carries out a process of, when a drawing command from a computing unit, such as a CPU, is issued, acquiring vector graphics data from an external storage unit, and carrying out a drawing process on the basis of this data and a process of displaying bit map data which is the result of the drawing process on a display device. For example, as shown in patent reference 1, by disposing a temporary storage unit for temporarily storing data from an external storage unit in a drawing device, the amount of data transfer between the external storage unit and the drawing device can be reduced and the drawing speed of the graphics drawing device can be improved.
Further, there is a case in which a cache for temporarily storing bit map data drawn is disposed between a drawing device and a display device, such as a monitor or a printer. Because the drawing process can be eliminated and the bit map data can be displayed on the display device by extracting the data from the data stored in this cache, the drawing speed is improved when the cost of the drawing process is high. In patent reference 2 and so on, the above-mentioned cache is called a font cache, and the target to be drawn is bit map data about characters having a high probability of being drawn repeatedly in many cases. As a method of deploying data into caches in this font cache, there are an LRU (Least Recently Used) method as described in patent reference 2, an FIFO method as described in patent reference 3, and a method for counting the frequency with which each of data is called and sorting these data according to the frequency, as described in patent references 4 and 5. The above-mentioned methods are aimed at improving the cache hit ratio, thereby improving the speed of the drawing process.
A problem is, however, that the method of selecting a cache only optimizes the access method of accessing the memory for the temporary storage unit disposed in the above-mentioned drawing device, and the temporary storage unit does not have an optimal cache structure for data that are called repeatedly. Another problem is that while a suggestion about the above-mentioned method of selecting a cache is offered for the font cache, the cache hit ratio is low when using any of the LRU method and the FIFO method as described respectively in patent reference 2 and patent reference 3. A further problem is that the circuit scale becomes large easily in the case of using the method for counting the frequency with which each of data is called and sorting these data according to the frequency, as described in patent references 4 and 5.
The present invention is made in order to solve the problems, and it is therefore an object of the present invention to provide a drawing device that can prevent the circuit scale thereof from being enlarged and improve the drawing speed.
In accordance with the present invention, there is provided a drawing device that generates image data to be displayed on a display device by using vector graphics data stored in an external storage unit, the drawing device including: a drawing unit responsive to a drawing command which includes a pointer pointing to vector graphics data stored in the external storage unit and which is outputted from an arithmetic device, for generating bit map data from the vector graphics data pointed to by the pointer; a cache unit for caching vector graphics data stored in the external storage unit; and a vector graphics data management unit having a management table for holding the pointer and a priority rank of a cache to the cache unit, for managing cached data in the cache unit on the basis of the management table and for carrying out transfer control of vector graphics data used by the drawing unit, in which the cache unit caches vector graphics data pointed to by a pointer whose priority rank held by the management table is high, and the vector graphics data management unit also manages a pointer whose priority rank is lower than that of the pointer pointing to the vector graphics data cached by the cache unit in the management table.
The drawing device in accordance with the present invention has the management table for holding the pointer and the priority rank of the cache to the cache unit, and also manages a pointer whose priority rank is lower than that of the pointer pointing to the vector graphics data cached by the cache unit. As a result, the drawing device can prevent the circuit scale thereof from being enlarged and improve the drawing speed.
Hereafter, in order to explain this invention in greater detail, the preferred embodiments of the present invention will be described with reference to the accompanying drawings.
The arithmetic device 10 can consist of a CPU or the like that issues a drawing command including a pointer pointing to vector graphics data stored in the external storage unit 30, and the external storage unit 30 can be a DRAM or a hard disk drive unit for storing vector graphics data therein. The display device 40 can be a liquid crystal display monitor, a projector, a printer, or the like for producing an information display.
The host bus interface unit 21 in the drawing device 20 is a block for interpreting a drawing command from the arithmetic device 10, the drawing unit 22 is a block for interpreting vector graphics data and performing drawing, the cache unit 23 is a storage unit disposed in the drawing device, for temporarily storing data from the external storage unit 30 and making it possible for the data to be reused, and the vector graphics data management unit 24 is a block for managing an exchange of data between the drawing device and the external storage unit 30 or the cache unit 23.
Pinter information about a pointer pointing to vector graphics data stored in the external storage unit 30 is included in a drawing command from the arithmetic device 10, and the host bus interface unit 21 issues a request to acquire data to the vector graphics data management unit 24 according to the pointer information. When the data exists in the cache unit 23, the vector graphics data management unit 24 reads the data from the cache unit 23. In contrast, when the data does not exist in the cache unit, the vector graphics data management unit reads the data from the external storage unit 30 and transfers the data to the host bus interface unit 21. When receiving the vector graphics data from the vector graphics data management unit 24, the host bus interface unit 21 transfers the data to the drawing unit 22, and the drawing unit 22 performs a drawing process based on the data and causes the display device 40 to display a bitmapped image thereon.
The vector graphics data management unit 24 has a management table 25, a table management unit 26, and a memory interface unit 27. The management table 25 is a table used for carrying out cache management of vector graphics data, and the table management unit 26 is a block for referring to and managing this management table 25. The memory interface unit 27 is a block for acquiring data from the cache unit 23 and the external storage unit 30 according to a request from the table management unit 26, and transferring the data to the host bus interface unit 21.
When, in step ST3, determining that no invalid pointer data is included in the management table, the table management unit sets the rank of the target pointer data to an insertion rank set to the management table 25 (step ST4). When determining that invalid pointer data is included in the management table, the table management unit compares the rank of the first-ranked invalid pointer data with the insertion rank (step ST5). When the insertion rank is higher than the rank of the first-ranked invalid pointer data, the table management unit shifts to step ST4, like in the case in which no invalid pointer is included in the management table (when NO in step ST3), the table management unit sets the rank of the target pointer to the insertion rank. In contrast, when, in step ST5, the insertion rank is lower than the rank of the first-ranked invalid pointer data, the table management unit sets the rank of the target pointer to the rank of the first-ranked invalid pointer (step ST6). In contrast, when, in step ST2, determining that the target pointer data is included in the management table 25, the table management unit compares the rank of the target pointer with the insertion rank (step ST7). When determining that the insertion rank is lower than the rank of the target pointer as the result of the comparison, the table management unit increases the rank of the target pointer by one rank (step ST8). In contrast, when determining that the insertion rank is higher than the rank of the target pointer, the table management unit sets the rank of the target pointer to a rank higher than the insertion rank (step ST9).
Although it is most desirable that the above-mentioned insertion rank 105 is set to be close to a branch point where the drawing device decides whether or not the vector graphics data pointed to by the pointer is cached to the cache unit 23, as shown in
Although it is most desirable that when a drawing command for drawing vector graphics data pointed to by a data pointer whose rank is lower than the insertion point is issued for the above-mentioned management table 25, the rank of the above-mentioned data pointer in the management table 25 is set to a rank which is one rank higher than the insertion point, as shown in
In the example shown in
The configuration shown in
In accordance with the LRU method as shown in patent reference 2, the cache hit ratio of a cache for data used widely is improved, while in accordance with the FIFO method as shown in patent reference 3, the cache hit ratio of a cache for data used locally is improved. The method in accordance with the present invention has the characteristics of the above-mentioned two methods, and maintains the cache hit ratios high for both data used widely and data used locally.
In the case of sorting data according to the frequency with which each of the data is called, as shown in patent references 4 and 5, local vector graphics data are hard to cache. Further, because it is necessary to sort data by using any of the methods, the scale of an actual implementation of each of the methods is large than that in accordance with the present invention.
As previously explained, because in accordance with Embodiment 1, there is provided a drawing device that generates image data to be displayed on a display device by using vector graphics data stored in an external storage unit, the drawing device including: a drawing unit responsive to a drawing command which includes a pointer pointing to vector graphics data stored in the external storage unit and which is outputted from an arithmetic device, for generating bit map data from the vector graphics data pointed to by the pointer; a cache unit for caching vector graphics data stored in the external storage unit; and a vector graphics data management unit having a management table for holding the pointer and a priority rank of a cache to the cache unit, for managing cached data in the cache unit on the basis of the management table and for carrying out transfer control of vector graphics data used by the drawing unit, in which the cache unit caches vector graphics data pointed to by a pointer whose priority rank held by the management table is high, and the vector graphics data management unit also manages a pointer whose priority rank is lower than that of the pointer pointing to the vector graphics data cached by the cache unit in the management table, the drawing device can prevent the circuit scale thereof from being enlarged and improve the drawing speed.
Further, because in the drawing device according to Embodiment 1, when receiving a drawing command, the vector graphics data management unit searches through the management table to determine whether a pointer included in the drawing command exits in the management table, and, when determining that the pointer exists in the management table, compares the rank of the pointer with a predetermined insertion rank and, when the insertion rank is lower than the rank of the pointer, increases the rank of the pointer by one rank, the drawing device can improve the cache hit ratio.
In addition, because in the drawing device according to Embodiment 1, when receiving a drawing command, the vector graphics data management unit searches through the management table to determine whether a pointer included in the drawing command exits in the management table, and, when determining that the pointer exists in the management table, compares the rank of the pointer with a predetermined insertion rank and, when the insertion rank is higher than the rank of the pointer, sets the rank of the pointer to a rank higher than the insertion rank, the drawing device can improve the cache hit ratio.
Further, because in the drawing device according to Embodiment 1, when receiving a drawing command, the vector graphics data management unit searches through the management table to determine whether a pointer included in the drawing command exits in the management table, and, when determining that the pointer does not exist in the management table and no invalid pointer is included in the management table, sets the pointer to a predetermined insertion rank, the drawing device makes it easy for vector graphics data drawn locally and frequently to be stored in the cache unit.
In addition, because in the drawing device according to Embodiment 1, when receiving a drawing command, the vector graphics data management unit searches through the management table to determine whether a pointer included in the drawing command exits in the management table, and, when determining that the pointer does not exist in the management table and an invalid pointer is included in the management table, compares the rank of the first-ranked invalid pointer with a predetermined insertion rank and, when the insertion rank is lower than the rank of the first-ranked invalid pointer, sets the pointer to the rank of the first-ranked invalid pointer, otherwise, sets the pointer to the insertion rank, the drawing device can make the management of the caches appropriate when an invalid pointer is included in the management table.
Further, because in the drawing device according to Embodiment 1, when the pointer included in the drawing command does not exist in the management table, the vector graphics data management unit sets an insertion rank where a pointer is set to the management table to be close to a branch point where the vector graphics data management unit decides whether or not vector graphics data pointed to by the pointer is cached to the cache unit, the drawing device can optimize the management of the caches.
Although the drawing device that is constructed in such a way as to automatically all of the management of caches is shown in above-mentioned Embodiment 1, an embodiment in which when a user manages caches, a drawing device enables the user to make a setting for inhibiting an interchange of caches will be shown hereafter. Because the drawing device in accordance with Embodiment 2 has the same structure as that in accordance with
For example, in a case in which an external storage unit 30 having very slow data fetch performance exists and vector graphics data is stored in the external storage unit 30, the vector graphics data management unit can secure any data to the cache unit 23 by simply fixing the rank of the data in the management table 25, and therefore the drawing device can accomplish the acquisition of the above-mentioned data by issuing a request to acquire the data to the external storage device 30 only once.
As previously explained, because in the drawing device according to Embodiment 2, the vector graphics data management unit sets the priority rank of either one of pointers in the management table to a fixed rank, the vector graphics data management unit can continue to hold specific vector graphics data in the cache unit.
Although only an inhibition against an interchange of the ranks of pointers in the cache is imposed on specific data in above-mentioned Embodiment 2, the user is enabled to generate a management table 25 in advance, and set this management table to be an initial management table 25 when, for example, characters used widely, such as alphabetic characters, can be predicted in advance. With the above-mentioned structure, the drawing device can improve the cache hit ratio in its initial state.
While the invention has been described in its preferred embodiments, it is to be understood that an arbitrary combination of two or more of the embodiments can be made, various changes can be made in an arbitrary component in accordance with any one of the embodiments, and an arbitrary component in accordance with any one of the embodiments can be omitted within the scope of the invention.
As mentioned above, the graphics drawing device in accordance with the present invention caches vector graphics data and is aimed at improving the drawing speed, and is suitable for displaying vector graphics data in applications to built-in displays which use vector graphics data, such as a display used in railroad applications, a vehicle-mounted display, a display for industrial use, an AV display, an operation panel of a household electrical appliance, an operation panel of a portable terminal, and a printer.
10 arithmetic device, 20 drawing device, 21 host bus interface unit, 22 drawing unit, 23 cache unit, 24 vector graphics data management unit, 25 management table, 26 table management unit, 27 memory interface unit, 30 external storage unit, 40 display device.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2011/003201 | 6/7/2011 | WO | 00 | 9/16/2013 |