1. Field of the Invention
The present invention relates to a data processing apparatus including a logic circuit and a processor, and to a data processing method for use in the logic circuit.
2. Description of the Related Art
In recent years, due to an increase in the scale of LSI (large-scale integrated circuit) development, reuse of design assets has been implemented. In such a situation, design assets with high performance, high functionality, and capability to expand functions have been highly required. In addition, in place of design assets whose entire configuration is constituted by hardware, hardware-software-cooperation data processing apparatuses including not only hardware but also software constituted by software executed by a processor have been developed.
Generally, in hardware-software-cooperation data processing apparatuses, processing to be frequently performed, processing requiring high-speed performance, and the like are often performed by a hardware portion, and processing not to be frequently performed, processing for maintaining downward compatibility, and the like are often performed by a software portion. Accordingly, hardware-software-cooperation data processing apparatuses achieve high performance, high functionality, and high expandability.
In addition, as described in US Patent Application Publication No. 2004/0187122, a technology for achieving more efficient thread scheduling of software is available.
Here, a case where task processing that requires synchronous processing between hardware and software is performed in hardware-software-cooperation data processing is considered. Normally, software processing (processor processing) is superior to hardware processing in terms of flexibility and expandability. However, software processing requires a considerably long processing time. Thus, in a case where a task that requires synchronous processing is subjected to software processing in a hardware-software-cooperation data processing apparatus, when the software processing is performed, hardware processing enters a wait state and stalls in order to achieve synchronization until the software processing is terminated. Thus, in a hardware-software-cooperation data processing apparatus, due to insufficient realization of the performance of hardware, the throughput may be reduced, and required system performance may not be satisfied.
In light of the aforementioned disadvantages, according to an aspect of the present invention, the throughput of hardware-software-cooperation data processing is improved. In addition, according to another aspect of the present invention, the wait time of a logic circuit is reduced while a processor is executing processing requested by the logic circuit.
According to an aspect of the present invention, a data processing apparatus is provided which includes a logic circuit and a processor. The data processing apparatus includes a holding unit configured to hold task information that is being executed by the logic circuit, wherein, while executing a first task, the logic circuit requests the processor to execute processing, wherein the logic circuit executes a second task while the processor is executing the requested processing, and wherein, after the processor issues a result of the processing, the logic circuit receives from the holding unit task information on the first task and executes the first task.
According to another aspect of the present invention, while the processor is executing the requested processing, the logic circuit interrupts the first task and executes the second task. Moreover, according to another aspect of the present invention, after the processor issues the result of the processing, the logic circuit interrupts the second task, receives from the holding unit the task information on the first task, and executes the first task.
Furthermore, according to yet another aspect of the present invention, after terminating the first task, the logic circuit receives from the holding unit task information on the second task and resumes the second task. Additionally, according to another aspect of the present invention, the logic circuit may have a pipeline structure. Moreover, according to another aspect of the present invention, the logic circuit executes image forming processing.
According to still yet another aspect of the present invention, the apparatus may further include a comparing unit configured to compare priority levels of tasks, wherein, when a priority level of the first task is higher than a priority level of the second task, after the processor issues the result of the processing, the logic circuit receives from the holding unit the task information on the first task and executes the first task.
Furthermore, according to still yet another aspect of the present invention, a data processing method is provided for use in a logic circuit. Here, the method includes saving task information on a first task when a processor is requested to execute processing while the first task is being executed; executing a second task while the processor is executing the requested processing; and restoring the saved task information on the first task in order to execute the first task after the processor issues a result of the processing.
According to another aspect of the present invention, while the processor is executing the requested processing, the first task is interrupted, and the second task is executed. Still further, according to another aspect of the present invention, after the processor issues the result of the processing, the second task is interrupted, and the saved task information on the first task is restored in order to execute the first task.
Moreover, according to another aspect of the present invention, the method may also include saving task information on the interrupted second task; and restoring the saved task information on the second task in order to resume the second task after the first task is terminated. Also, according to yet another aspect of the present invention, the method may also include comparing priority levels of tasks, when a priority level of the first task is higher than a priority level of the second task, after the processor issues the result of the processing, the saved task information on the first task is restored in order to execute the first task.
Furthermore, according to another aspect of the present invention, a computer readable medium is provided containing computer-executable instructions for processing data in a logic circuit. Here, the medium includes computer-executable instructions for saving task information on a first task when a processor is requested to execute processing while the first task is being executed; computer-executable instructions for executing a second task while the processor is executing the requested processing; and computer-executable instructions for restoring the saved task information on the first task in order to execute the first task after the processor issues a result of the processing.
Further features and aspects of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Embodiments, features and aspects of the present invention will now be herein described with reference to the drawings.
Referring to
The image forming unit 100 is constituted by a logic circuit (hardware). The image forming unit 100 reads a display list from the memory 107. In addition, the image forming unit 100 adds an ID to the read display list, and informs the context write-back unit 105 of generation of the new display list ID. The ID may be generated by the image forming unit 100 or may be generated by software that controls the image forming unit 100.
The image forming unit 100 performs processing in accordance with an instruction described in the read display list. When detecting an instruction that cannot be processed in the display list, the image forming unit 100 requests the processor 101 to perform the processing. In addition, after the processor 101 terminates the processing, the image forming unit 100 receives a result of the processing. In addition, the image forming unit 100 supplies to the context read unit 104 and the context write-back unit 105 the display list ID that is being executed by the image forming unit 100.
The image forming unit 100 stops processing in accordance with a processing stop signal issued by the context read unit 104, invalidates information in accordance with a processing invalidation signal, and supplies to the context information holding unit 102 context information on the display list that is being executed. Information invalidated in accordance with a processing invalidation signal affects a processing result stored in the image forming unit 100.
In accordance with an instruction from the context write-back unit 105, the image forming unit 100 receives context information on a display list stored in the context information holding unit 102. Then, the image forming unit 100 sets the received context information into an internal register as context information on a display list to be executed. After display list processing is terminated, the image forming unit 100 deletes the display list ID added to the display list, and informs the context write-back unit 105 of the deleted display list ID.
The processor 101 receives a processing request from the image forming unit 100, and analyzes the processing contents. On the basis of an analysis result, the processor 101 acquires necessary data from the memory 107 and performs processing. The processing (processor processing) by the processor 101 is realized when the processor 101 executes a program (software) for the corresponding processing. After completing the processing corresponding to the processing request, the processor 101 issues a processing result to the image forming unit 100.
The context information holding unit 102 stores context information, which is task information on a task that is being executed, supplied from the image forming unit 100. In accordance with a write control signal supplied from the context read unit 104, the context information holding unit 102 stores therein the context information on a display list that is being executed supplied from the image forming unit 100. In addition, in accordance with a read control signal supplied from the context write-back unit 105, the context information holding unit 102 supplies to the image forming unit 100 the context information that is stored in the context information holding unit 102.
The processor processing detector 103 detects that the image forming unit 100 has requested the processor 101 to perform processing. The processor processing detector 103 monitors whether or not a signal line used for transferring processing from the image forming unit 100 to the processor 101 changes. When detecting transfer of processing, the processor processing detector 103 informs the context read unit 104 that a processing request has been issued to the processor 101.
The context read unit 104 generates a signal for designating a place in which context information supplied from the image forming unit 100 to the context information holding unit 102 is to be stored. The context read unit 104 receives from the image forming unit 100 a display list ID that is being executed. In addition, the context read unit 104 receives from the processor processing detector 103 a signal indicating that a processing request has been issued to the processor 101.
The context read unit 104 receives from the context write-back unit 105 a context read instruction signal. In a case where the context read unit 104 receives the context read instruction signal, after reading of context information is completed, the context read unit 104 issues a context read termination signal to the context write-back unit 105.
In addition, the context read unit 104 issues to the image forming unit 100 a processing stop signal for instructing stopping of processing and a processing invalidation signal for instructing invalidation of processing. In addition, the context read unit 104 issues to the context information holding unit 102 a signal for designating a place in which context information supplied from the image forming unit 100 to the context information holding unit 102 is to be stored.
The context write-back unit 105 controls writing back of context information from the context information holding unit 102 to the image forming unit 100. The context write-back unit 105 receives from the image forming unit 100 a new display list ID, a terminated display list ID, and a display list ID that is being executed, and specifies the priority order of the display lists.
The context write-back unit 105 receives from the processor processing termination detector 106 a display list ID for which processor processing is terminated, and compares the priority level of the display list that is being executed by the image forming unit 100 with the priority level of the display list for which processing by the processor 101 is terminated. If the priority level of the display list for which processing by the processor 101 is terminated is higher, the context write-back unit 105 issues to the context read unit 104 a context read instruction signal. After receiving a context read termination signal from the context read unit 104, the context write-back unit 105 issues to the image forming unit 100 a context write-back instruction signal, and issues to the context information holding unit 102 a signal designating context information to be read.
The processor processing termination detector 106 detects that a processing result is issued from the processor 101 to the image forming unit 100. The processor processing termination detector 106 monitors a signal between the processor 101 and the image forming unit 100. When detecting that processing by the processor 101 is terminated in accordance with an issued processing result, the processor processing termination detector 106 issues to the context write-back unit 105 a display list ID added to the processing result. The memory 107 stores therein a display list to be processed, data necessary for processing, and a processing result.
In the explanation given above, the processor processing detector 103 and the processor processing termination detector 106 detect issue of a processing request and termination of the processing in accordance with signals exchanged via a signal line between the image forming unit 100 and the processor 101. However, the present invention is not limited to this. The processor processing detector 103 and the processor processing termination detector 106 may implement a program (software) to be executed by the processor 101 so that issue of a processing request and termination of the processing can be detected.
The image forming unit 100 processes a display list acquired by object graphic description to generate a pixel. In the display list, drawing objects included within the original object graphic description are sorted into an ascending order in a sub-scanning line direction (y-coordinate) and are recorded. In addition, the display list includes, as an edge table, edge information on each object and, as a level table, the relationship (an arithmetic method) between level information associated with each edge and a pixel at the same coordinates at another level. In addition, the display list includes, as a fill table, information for determining the color inside an object. As information for determining the color of an object, data and processing for generating color are designated. In some cases, as information for determining the color of an object, performing reading of a bitmap or decompression of a compressed image and fetching a desired pixel from the result may be designated.
Referring to
An instruction executor 201 accesses a system bus to read a display list. The instruction executor 201 interprets an instruction stream within the read display list, and issues an internal command to the pipeline modules 202 to 205.
In accordance with the internal command issued by the instruction executor 201, an edge processing unit 202 reads edge information included in the display list, and extracts edge information on a drawing object for each scanning line. After sorting the extracted edge information into an ascending order in a scanning line direction (x-coordinate), the edge processing unit 202 transfers to a level priority determination unit 203, which is disposed in the subsequent stage in the pipeline structure, the edge information as a message.
In accordance with the internal command issued by the instruction executor 201, the level priority determination unit 203 reads a level table included in the display list and edge information generated by the edge processing unit 202. The level priority determination unit 203 determines, in accordance with the read level table and edge information, the priority of each level and an activated pixel range (that affects drawing) for each scanning line. In addition, the level priority determination unit 203 sorts, on the basis of the priority order, information on the activated pixel range for each scanning line. The level priority determination unit 203 transfers to a fill color data determination unit 204, which is disposed in the subsequent stage in the pipeline structure, pixel range information constituted by the sorted information on the activated pixel range and information on the relationship with a pixel at another level.
In accordance with the internal command issued by the instruction executor 201, the fill color data determination unit 204 reads a fill table included in the display list and the pixel range information generated by the level priority determination unit 203, and determines the color of an activated pixel for each level on the basis of the read fill table and pixel range information. The fill color data determination unit 204 transfers to a pixel compositing unit 205, which is disposed in the subsequent state in the pipeline structure, color information on the activated pixel together with the pixel range information transferred from the level priority determination unit 203.
The pixel compositing unit 205 generates the final color of a pixel in accordance with the internal command issued by the instruction executor 201. The pixel compositing unit 205 generates the final color of the pixel by executing an arithmetic operation for determining color for each pixel in accordance with the pixel range information at each level generated by the level priority determination unit 203 and the color information on the pixel determined by the fill color data determination unit 204.
A pixel output unit 206 outputs to a connected external apparatus the pixel generated by the pixel compositing unit 205. A bus access arbitration unit 207 performs arbitration and sequencing for access to the system bus from the edge processing unit 202, the level priority determination unit 203, the fill color data determination unit 204, and the pixel compositing unit 205, and relays the access to the system bus.
In the image forming unit 100, an extension unit may be added to each of the edge processing unit 202, the level priority determination unit 203, the fill color data determination unit 204, and the pixel compositing unit 205 in accordance with performance and cost required for the system. In addition, an image decompressor 210 may be added to the fill color data determination unit 204, and an extension unit may be added to the image decompressor 210.
In the example shown in
The image decompressor 210 is an extender module that supports, for example, Joint Photographic Experts Group (JPEG), which is capable of handling a compressed image when the color of a pixel is determined. The edge processing extension unit 211 is an extender module corresponding to PostScript (PS), and the edge processing extension unit 212 is an extender module corresponding to Graphics Device Interface (GDI). The image decompression extension unit 213 is an extender module corresponding to Joint Bi-level Image experts Group (JBIG).
When an internal command requiring a function that is not provided in the edge processing unit 202, the level priority determination unit 203, the fill color data determination unit 204, or the pixel compositing unit 205 is issued by the instruction executor 201, the image forming unit 100 is capable of requesting the processor 101 to perform processing. For example, the edge processing unit 202 has, as a basic function, a processing function for a linear segment. In this case, although the edge processing unit 202 has processing functions of the edge processing extension modules 211 and 212, the edge processing unit 202 does not have a processing function for a spline curve, such as a Bezier curve. When the instruction executor 201 detects an instruction requiring processing for a Bezier curve in a display list, the instruction executor 201 issues to the edge processing unit 202 an internal command for processing the Bezier curve. When receiving the internal command, the edge processing unit 202 requests the processor 101 to perform the processing for the Bezier curve. After receiving an execution result from the processor 101, the edge processing unit 202 performs processing for the next edge.
Although the edge processing unit 202 has been explained as an example, the level priority determination unit 203, the fill color data determination unit 204, or the pixel compositing unit 205 is capable of requesting the processor 101 to perform processing using a function that is not provided in the level priority determination unit 203, the fill color data determination unit 204, or the pixel compositing unit 205.
Referring to the example image formation flow shown in
Then, data necessary for description of a graphic object to be subjected to image formation is identified, and display list generation 32 is performed. It is preferable that display list generation 32 be performed as a software module executed by a host processor. In display list generation 32, object graphic description represented by one or more than one of a well-known graphic description language, graphic library call, and other application inherent formats is converted into a display list.
The acquired display list is normally written to display list store 33. In general, display list store 33 is formed within a random-access memory (RAM). However, instead of being formed within the RAM, display list store 33 may be formed within the memory 107 that is locally provided in a pixel sequential rendering apparatus 34 (see
Display list store 33 is read by the pixel sequential rendering apparatus 34 (see
Referring to
A selector 401 is provided for an input context for a display list ID “1” (not shown). The selector 401 selects and outputs context information CII supplied from the image forming unit 100 or information RI1 on a register file 411 in accordance with a control signal CTLA issued from the context read unit 104. The register file 411 holds context information for the display list ID “1” selected by the selector 401.
A selector 402 is provided for an input context for a display list ID “2” (not shown). The selector 402 selects and outputs context information CII supplied from the image forming unit 100 or information RI2 on a register file 412 in accordance with a control signal CTLA issued from the context read unit 104. The register file 412 holds context information for the display list ID “2” selected by the selector 402.
A selector 403 is provided for an input context for a display list ID “3” (not shown). The selector 403 selects and outputs context information CII supplied from the image forming unit 100 or information RI3 on a register file 413 in accordance with a control signal CTLA issued from the context read unit 104. The register file 413 holds context information for the display list ID “3” selected by the selector 403.
A selector 420 is provided to output context information CIO. The selector 420 selects one of the register files 410, 411, 412, and 413 in accordance with a control signal CTLB issued from the context write-back unit 105, and issues to the image forming unit 100 context information stored in the selected register file 410, 411, 412, or 413.
Although the context information holding unit 102 that is capable of handling four display list IDs is shown as an example in
An example operation of the image forming apparatus according to this embodiment is described next. In the description given below, a case where at most four display list IDs can be provided will be explained. For the sake of easier explanation, a switching operation between two display lists will be explained.
Referring back to
The image forming unit 100 constantly supplies to the context read unit 104 and the context write-back unit 105 the display list ID “0” of the display list that is being executed inside the image forming unit 100 ((3) and (2)). The image forming unit 100 also constantly supplies to the context information holding unit 102 context information on the display list that is being executed (4). When detecting an instruction that cannot be processed by the image forming unit 100 in the display list that is being executed, the image forming unit 100 issues to the processor 101 a processing request including the display list ID “0” (5), and interrupts the processing on the display list.
When detecting that the image forming unit 100 has requested the processor 101 to perform the processing, the processor processing detector 103 informs the context read unit 104 that a processing request has been issued to the processor 101 (6). When receiving the report (signal) from the processor processing detector 103, the context read unit 104 outputs to the context information holding unit 102 a signal (CTLA) instructing storing of the context information on the display list ID “0” that is being executed by the image forming unit 100 (7).
When the instruction to store the context information on the display list ID “0” is given by the context read unit 104, the context information holding unit 102 stores into the register file 410 the context information that is constantly supplied from the image forming unit 100.
After interrupting the processing on the display list of the display list ID “0”, the image forming unit 100 confirms that the register files 411 to 413 are not used, and reads a new display list from the memory 107 (8). The image forming unit 100 adds a display list ID “1” to the read display list, and informs the context write-back unit 105 of the added new display list ID “1” (9). The image forming unit 100 performs processing in accordance with an instruction described in the display list to which the display list ID “1” is added. Here, the image forming unit 100 constantly supplies to the context read unit 104 and the context write-back unit 105 the display list ID “1” of the display list that is being executed inside the image forming unit 100 ((10) and (9)). The image forming unit 100 also constantly supplies to the context information holding unit 102 context information on the display list (11).
When the image forming unit 100 generates a new display list ID as described above, the context write-back unit 105 receives a report about the new display list ID from the image forming unit 100, and manages the display list ID inside the context write-back unit 105 in order to specify the priority order of display lists. Management of display list IDs may be performed by hardware or software. In this embodiment, a newly generated display list ID is managed in a First-In First-Out (FIFO) method, and a display list generated earlier has a higher priority. In addition, in this embodiment, a display list ID is newly generated when a new display list is generated, and the display list ID is deleted when processing on the display list is terminated. Thus, in this embodiment, the display list ID “0” has a higher priority than the display list ID “1”.
After the processing for the command (processing request) received from the image forming unit 100 is terminated, the processor 101 issues to the image forming unit 100 a processing result including the display list ID “0” (12).
When detecting that the processor 101 has issued the processing result to the image forming unit 100, the processor processing termination detector 106 reads the display list ID “0” included in the processing result. The processor processing termination detector 106 issues the read display list ID to the context write-back unit 105 (13).
When receiving the display list ID from the processor processing termination detector 106, the context write-back unit 105 compares the received display list ID with an ID of the display list that is being executed by the image forming unit 100, and determines the priority levels of the display list IDs. Here, since the received display list ID “0” has a priority level higher than that of the display list ID “1” that is being executed by the image forming unit 100, the context write-back unit 105 issues a read instruction signal to the context read unit 104 (14).
When receiving a read instruction signal from the context write-back unit 105, the context read unit 104 issues to the image forming unit 100 a processing stop signal instructing stopping of the processing on the display list ID “1” that is currently being executed (15). In addition, the context read unit 104 issues to the context information holding unit 102 a control signal (CTLA) for storing the context information on the display list ID “1” (16).
Then, after storing of the context information is terminated, the context read unit 104 issues to the image forming unit 100 a processing invalidation signal for the display list that is being executed (17). In addition, the context read unit 104 issues to the context write-back unit 105 a context read termination signal (18). In addition, the context read unit 104 stops issuing a processing stop signal to the image forming unit 100.
When receiving the context read termination signal from the context read unit 104, the context write-back unit 105 issues the display list ID “0” (CTLB) to the context information holding unit 102 (19). In addition, the context write-back unit 105 issues a context write-back instruction signal to the image forming unit 100 (20).
When receiving the context write-back instruction signal from the context write-back unit 105, the image forming unit 100 sets the context information supplied from the context information holding unit 102 (21) inside the image forming unit 100 to continue the processing on the display list ID “0”.
Then, after all the processing on the display list ID “0” is terminated, the image forming unit 100 informs the context write-back unit 105 of deletion of the display list ID “0” (22).
As described above, when the image forming unit 100 issues a processing request to the processor 101 so that processing using a processing function that is not provided in the image forming unit 100 can be performed, the image forming unit 100 switches a context to perform processing on another display list. That is, the image forming unit 100 performs, in parallel with processing by the processor 101, processing on another display list without entering a wait state or stalling. After the processing by the processor 101 is terminated, the image forming unit 100 continues processing on the original display list by switching again to the context in which the processor 101 is requested to perform processing. Thus, the wait time of the image forming unit 100 is reduced, and the throughput is improved.
The throughput of the image forming apparatus according to this embodiment is described next with reference to
As execution conditions of processing shown in
In
In
It is noted that the foregoing embodiments are merely examples for carrying out the present invention. Therefore, the technical scope of the present invention should not be restrictively construed by the embodiments. That is, the present invention may be implemented by various other forms without departing from the technical ideas and main features of the present invention.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all modifications, equivalent structures and functions.
This application claims the benefit of Japanese Application No. 2005-313096 filed Oct. 27, 2005, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2005-313096 | Oct 2005 | JP | national |