Image processing device, method for controlling the image processing device, and program
The image processing apparatus addresses inefficiencies in parameter saving by using a command list and register-based control to optimize task switching on shared hardware, enhancing flexibility and efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2026-03-24
AI Technical Summary
Existing image processing systems struggle to flexibly respond to changes in processing parameters when switching tasks on shared hardware resources, leading to inefficiencies and unnecessary parameter saving.
An image processing apparatus with control means that manages command execution via a command list and image processing means with registers, allowing for selective parameter saving based on a register list during task switching.
Enables flexible and efficient parameter saving, optimizing resource utilization and reducing unnecessary parameter saving during task changes on shared hardware.
Smart Images

Figure 0007834470000001 
Figure 0007834470000002 
Figure 0007834470000003
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing apparatus, a control method for an image processing apparatus, and a program.
Background Art
[0002] In recent years, there has been a demand for both improving processing performance and further reducing costs in various devices. These devices are equipped with certain types of computer systems, and the processing performance per manufacturing cost of the computer system can be said to be one of the factors determining the quality of the device.
[0003] For example, in a business-use copying machine, even when there are processing requests from multiple users on a network, a comfortable response to the users is required. On the other hand, in order to reduce the cost of the device, it is necessary to share hardware resources in various image processes to reduce the circuit scale. For example, in the image processing of a copying machine, a plurality of image processes (hereinafter referred to as an image processing execution unit) and an input / output control unit are connected in a ring shape, and for example, two processes, scanner image processing and general-purpose image processing, are executed by the same hardware resource, the image processing execution unit. Therefore, when there is a high-priority processing request (task) and the task being executed is interrupted to switch the task, the time required for saving and restoring the parameters of the processing being executed becomes an issue.
[0004] For example, during the execution of general-purpose image processing, when there is a high-priority scanner image processing request, the set parameters of the general-purpose image processing are saved, and then the parameters of the scanner image processing are set. Thus, when changing the process, the time for saving and setting parameters is required. In recent years, due to the multifunctionalization of image processing, the number of parameters for saving and setting has increased, and in order to speed up, shortening the time required for saving and setting parameters is also required. As a technique for improving this, for example, a method of saving and setting parameters with one command described in a command list has been proposed in image processing and data processing using a command list (see Patent Document 1). [Prior art documents] [Patent Documents]
[0005] [Patent Document 1] Japanese Patent Publication No. 2014-209801 [Overview of the Initiative] [Problems that the invention aims to solve]
[0006] However, in the method described in Patent Document 1, when changing to a higher-priority processing request, the input / output control unit needs to know in advance which parameters should be saved, making it impossible to flexibly respond to increases or decreases in parameters in the image processing execution unit. Furthermore, while saving all parameters eliminates the need for complex firmware control, it can result in the waste of saving unnecessary parameters that do not need to be saved when changing processing.
[0007] This invention has been made in view of these problems, and aims to enable flexible response to increases or decreases in image processing parameters when changing processing performed on shared hardware resources, and to enable appropriate parameter saving. [Means for solving the problem]
[0008] The image processing apparatus according to the present invention includes control means for controlling the execution of command related to image processing according to a command list for executing a series of data processing related to a task, and image processing means having registers in which parameters related to image processing are stored, and executing image processing according to the command input from the control means, wherein when the control means interrupts a first task that is currently being executed and switches from the first task to a second task, it outputs a save instruction command to the image processing means, and when the save instruction command is input to the image processing means, it generates a parameter command including the parameter stored in the register based on a register list indicating the register in which the parameter to be saved is stored, The control meansIt is characterized by outputting. [Effects of the Invention]
[0009] According to the present invention, when changing processing performed on shared hardware resources, it is possible to flexibly respond to increases or decreases in image processing parameters and to appropriately save parameters. [Brief explanation of the drawing]
[0010] [Figure 1] This figure shows an example configuration of an image processing apparatus according to the first embodiment. [Figure 2] This is a diagram illustrating the region configuration of DRAM. [Figure 3] This diagram illustrates an example of a command list. [Figure 4] This figure shows an example of the configuration of the image processing unit according to the first embodiment. [Figure 5] This is a diagram illustrating the command format. [Figure 6] This figure shows an example configuration of an image processing circuit according to the first embodiment. [Figure 7] This is a flowchart illustrating the operation of the image processing circuit according to the first embodiment. [Figure 8] This diagram illustrates an example of a register list to be saved. [Figure 9] This is a diagram illustrating an example of task information. [Figure 10] This is a flowchart illustrating the entire task switching sequence. [Figure 11] This is a flowchart explaining the task switching sequence (evacuation). [Figure 12] This is a flowchart explaining the task switching sequence (return). [Figure 13] This figure shows an example configuration of an image processing circuit according to the second embodiment. [Figure 14] This diagram illustrates an example of a task-specific register list. [Figure 15]It is a flowchart for explaining the operation of an image processing circuit according to a second embodiment.
Modes for Carrying Out the Invention
[0011] Hereinafter, embodiments of the present invention will be described based on the drawings.
[0012] (First Embodiment) FIG. 1 is a block diagram showing a configuration example of an image processing apparatus according to a first embodiment. The image processing apparatus includes a DRAM (Dynamic Random Access Memory) 101, a ROM (Read Only Memory) 102, an image processing unit 103, and a CPU (Central Processing Unit) 104. The DRAM 101, the ROM 102, the image processing unit 103, and the CPU 104 are communicably connected via a system bus 105. Further, the system bus 105 can be connected to an external I / F (interface) 106.
[0013] DRAM101 is a memory that holds image data input from an external I / F106 connected to a scanner, etc., and a set of commands corresponding to processing (hereinafter referred to as the "command list"). Figure 2 is a diagram illustrating the area configuration of DRAM101. DRAM101 has a command list area 201, an image data area 203, and a parameter save area 204. The command list area 201 is the area that stores the command list. The image data area 203 is the area that stores image data. The parameter save area 204 is the area where parameters are saved by the task switching sequence described later. Note that the parameter save area 204 of DRAM101 corresponding to a task may be allocated to a predetermined area for each task, or the area may be allocated dynamically. Figure 2 shows, as an example, the save area 205 allocated to the task before switching (the task currently running) and the save area 206 allocated to the task after switching (the interrupt task) when switching tasks. The initial parameter area 202 of the old task is the area that stores the initial parameters of the old task in the task switching. ROM102 is memory that holds programs and other data executed by CPU104.
[0014] The command list is generated by the CPU 104 according to tasks. The CPU 104 first sets the initial parameters for the image processing unit 103 corresponding to the task to be started first. Also, after confirming that an image in rectangular units (rectangular image) is stored in the DRAM 101, the CPU 104 notifies the image processing unit 103 to start the execution of image processing. Thereby, the image processing unit 103 inputs the image data held in the DRAM 101 and starts image processing. Usually, the image processing unit 103 divides the image data held in the DRAM 101 into processable rectangular images and performs image processing. Hereinafter, the divided rectangular image is also referred to as a "band image", and the image processing thereof is also referred to as "band processing". That is, the image processing unit 103 divides the image data held in the DRAM 101 into a plurality of band images and performs image processing in units of band images. When there is a processing request (task interruption) from the outside (for example, the external I / F 106) during image processing, the CPU 104 issues a task interruption instruction to the image processing unit 103. When receiving the task interruption instruction from the CPU 104, the image processing unit 103 executes a task switching sequence described later after the end of the band processing. Hereinafter, the task before switching (the task being executed) is also referred to as the "old task", and the task after switching (the interrupt task) is also referred to as the "new task". The details of the image processing unit 103 will be described later.
[0015] <Command list> The command list will be described. FIG. 3 is a diagram for explaining an example of the command list. The command list is stored in the DRAM 101. Each of the following commands is common to each command list. The command list shown in FIG. 3 is a basic operation program of a task by commands, and is a list in which a plurality of commands for realizing the basic operation are arranged in the processing order. The commands included in the command list include a parameter write command 310, a DRAM access command 320, a parameter read command 330, a synchronization command 340, a branch command 350, and an end command 360, etc. Each command will be described below.
[0016] The parameter write command 310 is a command used to set parameters in the image processing unit 103. The parameter write command 310 is, for example, a parameter command of type "write" as described later. By sending the parameter write command 310 directly to the image processing input / output unit 402 and the image processing execution unit 403, which will be described later, the parameters are set.
[0017] The DRAM access command 320 is a command used to transfer data stored in the DRAM 101 to the image processing unit 103 based on parameters set in advance by the parameter write command 310, etc. The DRAM access command 320 is mainly used to perform image processing. Note that the DRAM access command 320 will not proceed to the next command until the transfer of the number of data specified by the parameters has been completed.
[0018] The parameter read command 330 is a command that reads the parameters set in the image processing unit 103. The parameter read command 330 has a similar format to, for example, the parameter write command 610, and is a read-type parameter command. Since parameters can be read using the parameter read command 330, it can be used for parameter saving, analysis, debugging, etc.
[0019] The synchronization command 340 is a command that temporarily suspends the reading and transmission of the command list to the image processing unit 103. In other words, the synchronization command 340 continues to suspend the reading and transmission of new commands until all commands sent to the image processing execution unit 403 (described later) have been processed, thereby initializing the image processing pipeline. This makes it possible to create a state where, for example, a series of image processing steps have been completed.
[0020] Branch command 350 is a command used to reset the address in the command list. As shown in Figure 3, commands are normally processed in the "processing direction," but branch command 350 allows the program to return to the pointer specified by branch command 350, as illustrated by the arrow. Note that branch command 350 has a set number of repetitions, and once that number is reached, the program moves to the next command without resetting the address.
[0021] The termination command 360 is used to complete all data processing and notify the CPU 104 and external I / F 106 that the task is complete.
[0022] <Configuration of the image processing unit> Next, the image processing unit 103 will be described. Figure 4 is a block diagram showing an example configuration of the image processing unit 103. The image processing unit 103 includes an input / output control unit 420 that converts parameters and images into commands according to a command list, and an image processing execution unit 403 that performs image processing according to the commands.
[0023] First, the input / output control unit 420 will be described. The input / output control unit 420 includes a control unit 401, an image processing input / output unit 402, a backup instruction command storage unit 404, and a command list storage unit 405. The input / output control unit 420 is an example of a control means. The backup instruction command storage unit 404 stores backup instruction commands, which will be described later. The command list storage unit 405 stores a command list corresponding to the task.
[0024] The control unit 401 includes a command execution unit 417 that controls the execution of commands and a task information holding unit 410 that holds task information, and performs task management, command list management, and instructions to the image processing input / output unit 402. Specifically, the control unit 401 transmits the backup instruction command stored in the backup instruction command storage unit 404. The control unit 401 also decodes the command list stored in the command list storage unit 405 and sends instructions to the image processing input / output unit 402 and transmits the commands from the command list.
[0025] The image processing input / output unit 402 converts images and parameters into commands based on instructions from the control unit 401 and transmits them to the image processing execution unit 403. The image processing input / output unit 402 also converts the commands received from the image processing execution unit 403 into a desired format and writes them to an external location (e.g., DRAM 101). The image processing input / output unit 402 includes a command list input unit 416, an image data input unit 411, a command generation unit 412, a command input unit 406, a command output unit 413, an image data generation unit 414, and an image data output unit 415.
[0026] The command list input unit 416 receives a command list from the DRAM 101, which stores a command list for each task. The image data input unit 411 receives image data from the DRAM 101, which stores image data. The command generation unit 412 converts the image data input by the image data input unit 411 into commands and generates commands (image commands).
[0027] The command input unit 406 instructs the image processing execution unit 403 to input commands generated by the command generation unit 412 or commands stored in the command list storage unit 405. In the case of the task switching sequence (backup) described later, the backup instruction command stored in the backup instruction command storage unit 404 is input to the command input unit 406 according to the command execution unit 417. The command input unit 406 then transmits the input backup instruction command directly to the image processing execution unit 403.
[0028] The command output unit 413 receives commands output from the image processing execution unit 403. If the command from the image processing execution unit 403 is an image command, the command is output to the image data generation unit 414 and converted into image data. On the other hand, if the command from the image processing execution unit 403 is a parameter read command, the command is output externally and stored in the DRAM 101.
[0029] Furthermore, when a task is switched, the command output unit 413 receives the save instruction command (start) and the save instruction command (end), which will be described later, from the image processing execution unit 403. If the command from the image processing execution unit 403 is the save instruction command (start), which will be described later, the command output unit 413 initializes the internal counter, the read command counter 421. In this example, the count value of the read command counter 421 is initialized to 0. Here, the read command counter 421 is used to count the number of parameter read commands that are saved when a task is switched. The count value of the read command counter 421 is incremented each time a parameter read command is input until the command output unit 413 receives the save instruction command (end), which will be described later.
[0030] If the command from the image processing execution unit 403 is a save instruction command (end), the command output unit 413 stops counting the read command counter 421 and stores the count value at that time in the parameter save command count in the task information described later. If the count value of the read command counter 421 reaches the preset maximum number of read commands before the save instruction command (end) is input, no more parameter read commands can be saved, and the control unit 401 cancels the task switch. When the command output unit 413 outputs parameter read commands to the outside, it may store a certain amount of parameter read commands and burst transfer them to the DRAM 101. In this case, if the number of parameter read commands does not reach a certain amount, the insufficient number of parameter read commands can be generated with dummy data.
[0031] The image data generation unit 414 converts the command (image command) input by the command output unit 413 into image data in a predetermined format to be stored in the DRAM 101. The image data output unit 415 stores a certain amount of image data input by the image data generation unit 414 and burst transfers it to the DRAM 101.
[0032] Next, the image processing execution unit 403 will be described. The image processing execution unit 403 has image processing circuits 407, 408, 409 and an interconnect 410. Each of the image processing circuits 407 to 409 performs different image processing. For example, the image processing circuits 407 to 409 perform image processing such as color conversion and character recognition. In addition, in the task switching sequence (backup) described later, when the image processing circuits 407 to 409 receive a backup instruction command, they generate a parameter read command to be backed up. Note that Figure 4 shows an example with three image processing circuits 407 to 409, but the number of image processing circuits in the image processing execution unit 403 is not limited to this.
[0033] The interconnect 410 connects the image processing circuits 407 to 409 in a ring in the order of command transfer and transfers commands in that order. For example, if the image processing circuits 407 to 409 are connected in a ring in the order of 407, 408, and 409, a command output from the input / output control unit 420 is input to image processing circuit 407. Then, a command output from image processing circuit 407 is input to the next image processing circuit 408. Similarly, a command output from image processing circuit 408 is input to the next image processing circuit 409. This is repeated until the last command output from image processing circuit 409 is input to the input / output control unit 420 via the interconnect 410.
[0034] <Command Format> Referring to Figure 5, the command format of the commands generated by the input / output control unit 420 will be explained. The commands generated by the input / output control unit 420 include the parameter command shown in Figure 5(a), the image command shown in Figure 5(b), and the save instruction command shown in Figure 5(c). The commands shown in Figures 5(a) to 5(c) can be distinguished by referring to the identifier in the command header area. The details of each command shown in Figures 5(a) to 5(c) will be explained below.
[0035] The parameter command shown in Figure 5(a) is a command used to set and read parameters for the image processing circuits 407-409 shown in Figure 4. The header area 501 of the parameter command stores an identifier 503 representing the parameter command, an ID 504 indicating each module of the image processing unit 103, a parameter command type 505, and an address 506 corresponding to the ID. The data area 502 of the parameter command stores data 507 related to the parameters.
[0036] Parameter commands include, for example, a write type that sets parameters at a specified address in the image processing execution unit 403 (described later), a read type that reads parameters from a specified address, and a write-read type that performs both at once. For example, if type 505 contains the information "00", it indicates a write type; if it contains the information "01", it indicates a read type; and if it contains the information "11", it indicates a write-read type. Also, if ID 504 is set to an ID that accesses all modules of the image processing unit 103, it functions as a broadcast.
[0037] The image command shown in Figure 5(b) is a command that is processed by the image processing circuits 407-409 shown in Figure 4. The header area 511 of the image command optionally stores necessary secondary information in addition to the image data, such as an identifier 513 indicating the image command and position information 514 indicating the position of the image. The data area 512 of the image command stores the image data 515. The image data 515 is stored, for example, with RGB values in a defined format.
[0038] The backup instruction command shown in Figure 5(c) is a command stored in the backup instruction command storage unit 404 shown in Figure 4, and is a command that notifies the start or end of parameter backup. The backup instruction command includes a backup instruction command (start) that notifies the start of parameter backup and a backup instruction command (end) that notifies the end of parameter backup. The header area 521 of the backup instruction command (start) and the backup instruction command (end) stores an identifier 523 representing the backup instruction command and an ID 524 indicating each module or all modules of the image processing unit 103. In addition, the header area 521 of the backup instruction command (start) stores a backup start 525 indicating the start of parameter backup, and the header area 521 of the backup instruction command (end) stores a backup end 526 indicating the end of parameter backup. Note that the data area 522 of the backup instruction command is not necessary and can be omitted. While it is possible to include information corresponding to the backup start525 and backup end526 in identifier 523, for the sake of clarity in the following explanation, it will be assumed that this information is assigned to a separate area from identifier 523.
[0039] <Image Processing Circuit> Next, we will describe the image processing circuits 407 to 409. Figure 6 is a block diagram showing an example configuration of the image processing circuits 407 to 409.
[0040] Commands (input commands) output from the interconnect 410 shown in Figure 4 are input to the image processing control unit 610 of the image processing circuits 407-409. First, the ID interpretation unit 601 determines whether or not the input command is related to its own image processing circuits 407-409. If the ID interpretation unit 601 determines that the command is not related to the image processing circuits 407-409, the input command is output directly to the outside of the image processing circuits 407-409 as an output command. On the other hand, if the ID interpretation unit 601 determines that the command is related to its own image processing circuits 407-409, the input command is input to the command conversion unit 602.
[0041] The details of the image processing control unit 610 (command conversion unit 602) will be explained below with reference to the flowchart in Figure 7. In S701, the command conversion unit 602 refers to the identifiers 503, 513, and 523 stored in the input command and determines, based on the identifier, whether the input command is a parameter command, an image command, or a save instruction command. If the command conversion unit 602 determines that the input command is a parameter command, it proceeds to S702; if it determines that the input command is an image command, it proceeds to S708. If the command conversion unit 602 determines that the input command is a save instruction command, it proceeds to S711.
[0042] The operation when the input command is determined to be a parameter command in S701 is described below. In S702, the command conversion unit 602 refers to the type 505 stored in the input command and determines whether the command type is write type, read type, or write-read type. If the command conversion unit 602 determines that the input command type is write type, it proceeds to S703, and if it determines that the input command type is read type, it proceeds to S704. If the command conversion unit 602 determines that the input command type is write-read type, it proceeds to S705.
[0043] In S703, the command conversion unit 602 refers to the address 506 and data 507 stored in the input command and sets (writes) the corresponding parameters to the registers in the register unit 603. The registers in the register unit 603 are used for image processing in the image processing core unit 620. After the processing in S703 is completed, in S707, the command conversion unit 602 outputs the parameter command, which is the input command, as an output command.
[0044] In S704, the command conversion unit 602 refers to the address 506 stored in the input command and reads the parameter from the register in the register unit 603 corresponding to the address. Then, in S707, the command conversion unit 602 stores the parameter read in S704 into the data area 502 of the parameter command, which is the input command, and outputs it as an output command.
[0045] If the command conversion unit 602 determines that the input command type is write-read type, it performs the operations for read-type and write-type based on a single parameter command. Specifically, in S705, the command conversion unit 602 reads the parameter from the register in the register unit 603 corresponding to address 506 stored in the input command. Next, in S706, the command conversion unit 602 sets (writes) the data (parameter) 507 stored in the input command to the register in the register unit 603 corresponding to address 506 stored in the input command. Then, in S707, the command conversion unit 602 stores the parameter read in S705 into the data area 502 of the parameter command, which is the input command, and outputs it as an output command.
[0046] Next, we will explain the operation when it is determined in S701 that the input command is an image command. In S708, the command conversion unit 602 extracts the necessary data (image data 515) from the input command and sends the extracted image data to the image processing core unit 620. Then, in S709, the command conversion unit 602 receives the image processed image data from the image processing core unit 620 and converts the received image data into an image command. Finally, in S710, the command conversion unit 602 outputs the image command obtained in S709 based on the image processed image data as an output command.
[0047] Next, the operation when it is determined in S701 that the input command is a save instruction command will be explained. In S711, the command conversion unit 602 determines whether the input command is a save instruction command (start) that notifies the start of parameter saving. The command conversion unit 602 determines whether a save start 525, which indicates that it is a save instruction command (start), is stored in the header area 521 of the input command. If the command conversion unit 602 determines that the input command is a save instruction command (start) (YES in S711), it proceeds to S712. On the other hand, if the command conversion unit 602 determines that the input command is not a save instruction command (start), that is, a save instruction command (end) (NO in S711), it proceeds to S713.
[0048] In S712, the command conversion unit 602 outputs the input command, the save instruction command (start), as an output command.
[0049] In S713, the command conversion unit 602 stores the input command, the save instruction command (end), in the save instruction command holding unit 605. Then, in S714, the command conversion unit 602 generates a parameter read command by referring to each register in the register unit 603 based on the save target register list 604. In other words, the command conversion unit 602 reads parameters from the registers listed in the save target register list 604 and generates a parameter read command in which the read parameters are stored in the data area 502.
[0050] For example, suppose the registers in the register section 603 that store parameters are RegA, RegB, and RegC. If, of these, RegB and RegC are the registers that store parameters that should be saved, such as registers that undergo internal changes during image processing, then RegB and RegC will be listed in the registers to be saved list 604 as shown in Figure 8. The command conversion unit 602 retrieves parameters from RegB and RegC according to the listing in the registers to be saved list 604 and generates parameter read commands corresponding to RegB and RegC. Note that RegA, which is not a register to be saved, does not need to be listed in the registers to be saved list 604. If RegA is to be listed as well, then information indicating whether or not it is a register to be saved should be included in addition to its register information.
[0051] In S715, the command conversion unit 602 outputs the parameter read command generated in S714 as an output command. After the command conversion unit 602 has finished outputting parameter read commands corresponding to all the registers to be saved listed in the save target register list 604, it proceeds to S716. In S716, the command conversion unit 602 outputs the save instruction command (end) stored in the save instruction command holding unit 605 in S713 as an output command.
[0052] As a result of the processing described in S711 to S716, a parameter read command corresponding to the register where the parameter should be saved in the image processing circuit is inserted between the save instruction command (start) and the save instruction command (end) and propagated to the subsequent stage.
[0053] The image processing core unit 620 processes the image data output from the command conversion unit 602 based on the parameters stored in the registers of the register unit 603. The image processing core unit 620 then outputs the processed image data to the command conversion unit 602. The SRAM 630 is connected to the image processing control unit 610 and the image processing core unit 620 via an SRAM I / F for communication and is used for various purposes such as holding intermediate results and as a line buffer.
[0054] <Task Information> Referring to Figure 9, the task information stored in the task information storage unit 410 shown in Figure 4 will be explained. Figure 9 is a diagram illustrating an example of task information. As shown in the example in Figure 9, the task information storage unit 410 stores the following as task information for each task: priority, parameter save area base address, number of parameter save commands, image data address, number of image data, and command list pointer. Of the information included in the task information, the initial setup task information (priority and parameter save area base address) is necessary when a task interrupt occurs. In addition, of the information included in the task information, the automatically set task information (command list pointer, number of parameter save commands, image data address, and number of image data) is automatically set when a task is switched. Furthermore, the task information increases each time a task is generated from the CPU 104 or external I / F 106. For example, as shown in Figure 9, if a new task interrupt occurs while an old task is running, the task information for the new task is added. Task information that is no longer needed when a task is completed is deleted from the task information storage unit 410.
[0055] The following describes each item of the task information. Priority represents the priority of the task and is used to determine which task takes priority in the event of a task conflict. The parameter save area base address is the starting address when saving parameters to DRAM101. Parameter commands (parameter read commands) containing the saved parameters are stored sequentially from the register save area base address. The number of parameter save commands indicates the number of commands for which parameters have been saved to DRAM101 and is used to determine the number of commands to read when the task is resumed. The image data address indicates the position (pointer) of the image data when image processing was interrupted and is used to determine the position of the image data to read when the task is resumed. The number of image data is correlated with the image data address and represents the number of remaining image data when image processing was interrupted and is used to determine the number of image data to read when the task is resumed. The command list pointer indicates the position (pointer) of the command list when image processing was interrupted and is used to determine the position of the command list to read when the task is resumed.
[0056] The operation of the image processing unit 103 will be described below. First, the CPU 104 stores the task information (task information) for the task to be executed first in the task information storage unit 410. The task information set at this time is the initial task information shown in Figure 9. That is, the priority and the parameter save area base address. The command list pointer is not needed because it points to the starting address of the command list.
[0057] Next, the CPU 104 sets the parameters for the first task to be executed in the image processing unit 103. At a minimum, the DRAM address of the command list stored in the DRAM 101 is set. The command list is the basic operation program for the task, and is executed as the basic operation.
[0058] Next, the image processing unit 103 is started from the CPU 104. After startup, the command list input unit 416 reads the command list stored in the DRAM 101 according to the parameter (DRAM address) set by the CPU 104 and stores it in the command list storage unit 405. Then, the command execution unit 417 of the control unit 401 executes the commands in the command list held in the command list storage unit 405 in order. Here, the storage capacity of the command list storage unit 405 is arbitrary. The storage capacity of the command list storage unit 405 may be reduced by storing the command list in fixed amounts, or it may be set to a capacity that can store the entire command list. The operation will be explained below with reference to the command list shown in Figure 3.
[0059] First, the command execution unit 417 executes the parameter write commands 310 in order according to the command list. Each parameter write command 310 is sent to the command input unit 406, which then transmits the command as is to the image processing execution unit 403. The image processing execution unit 403 sets the parameters of the interconnect 410 and the image processing circuits 407-409 based on the parameter write commands 310 transmitted from the command input unit 406.
[0060] Next, the command execution unit 417 executes the DRAM access command 320. The control unit 401 issues an instruction to the image data input unit 411 to acquire an image. Upon receiving the instruction to acquire an image, the image data input unit 411 reads the image data stored in the DRAM 101 based on pre-set parameters (for example, the image data address and the number of image data). The image data read by the image data input unit 411 is converted into an image command as shown in Figure 5(b) by the command generation unit 412. The image command converted by the command generation unit 412 is sent to the command input unit 406 and transmitted to the image processing execution unit 403.
[0061] Image commands processed by the image processing execution unit 403 are received by the command output unit 413. The received image processed image commands are converted into image data in a format to be stored in the DRAM 101 by the image data generation unit 414, and output from the image data output unit 415 and stored in the DRAM 101. Once all image processing is complete, the command execution unit 417 proceeds to the next command of the DRAM access command 320.
[0062] Next, the command execution unit 417 executes the parameter read commands 330 in order according to the command list. Each parameter read command 330 is sent to the command input unit 406, which then sends the command as is to the image processing execution unit 403. The image processing execution unit 403 reads the parameters of the interconnect 410 and image processing circuits 407-409 based on the parameter read commands 310 sent from the command input unit 406. The read parameters are saved to the DRAM 101 from the command output unit 413 or held in a register (not shown). The read data (parameters) can then be used, for example, for debugging or analyzing internal data.
[0063] Next, the command execution unit 417 executes the synchronization command 340. This synchronization command 340 causes the command execution unit 417 to temporarily suspend reading and sending the command list, as described above, and the suspension continues until all commands sent to the image processing execution unit 403 have been processed. This allows the image processing pipeline to be initialized, so that, for example, a series of image processing steps can be completed.
[0064] Next, the command execution unit 417 executes a branch command 350. This branch command 350 returns the operation according to the command list back to the specified pointer in the command list (in the example shown in Figure 3, the position of the parameter write command 311). The number of times this branch command 350 is executed is set by a parameter, and when the set number of executions is reached, the command execution unit 417 moves on to the next command of the branch command 350 without returning to the specified pointer in the command list. The branch command indicates the end of band processing, and the "task switching sequence" described later is usually executed at this timing.
[0065] Finally, the command execution unit 417 executes the termination command 360. This termination command 360 completes all data processing and notifies the CPU 104 and external I / F 106 that the task is complete. The above describes the basic operation of the image processing unit 103.
[0066] <Task switching sequence (overall)> Next, we will explain the operation (task switching sequence) when an interruption for a new task (new task) occurs while an existing task (old task) is being executed in the image processing unit 103. Figure 10 is a flowchart illustrating the overall task switching sequence in this embodiment. It is assumed that in the image processing unit 103, the task information of the old task has already been stored in the task information holding unit 410, the parameter settings for the image processing execution unit 403 in the old task have been completed, and image processing is currently being executed.
[0067] When a new task interrupt occurs, in S1001, the task information of the new task is stored in the task information storage unit 410 by the CPU 104. In S1001, the initial task information of the new task shown in Figure 9, namely the priority and parameter save area base address for the new task, is stored in the task information storage unit 410 as the task information of the new task.
[0068] In S1002, the control unit 401 compares the priority of the task information of the new task and the old task and determines whether the priority of the new task is higher than that of the old task. If the control unit 401 determines that the priority of the new task is higher than that of the old task (YES in S1002), it proceeds to S1004. On the other hand, if the control unit 401 determines that the priority of the new task is not higher than that of the old task (NO in S1002), it proceeds to S1003. The timing of executing this S1002 process can usually be after the completion of band processing. By doing so, for example, the band image after the completion of band processing can be moved to a later processing stage (not shown), and the overall processing can be optimized. Also, if an interruption of a new task occurs during the band processing of the final band, task switching will not be performed until the image processing of the entire page is completed.
[0069] In S1003, the control unit 401 determines that the priority of the new task is not higher than that of the old task, and therefore does not perform a task switch. Instead, it waits for the image processing of all images (e.g., page by page) in the old task to be completed before switching to the new task. In other words, after the image processing of the old task is completely finished, the control unit 401 issues a command list switch instruction to the new task and starts the execution of the new task.
[0070] In S1004, the control unit 401, recognizing that the priority of the new task is higher than that of the old task, executes the task switching sequence (backup) shown in Figure 11 to back up the parameters of the old task and switch to the new task. Details of the task switching sequence (backup) will be described later.
[0071] After the task switching sequence (backup) processing is completed, at S1005, the control unit 401 reads the command list of the new task stored in DRAM 101 and executes the image processing for the new task, in the same manner as the operation of the image processing unit described above. At this time, the control unit 401, not the CPU 104, instructs the command list input unit 416 to obtain the command list of the new task. The command list input unit 416 reads the command list of the new task stored in DRAM 101 according to the set parameter (DRAM address) and stores it in the command list storage unit 405. Thereafter, the command execution unit 417 of the control unit 101 executes each command according to the command list of the new task stored in the command list storage unit 405, in the same manner as the operation of the image processing unit described above, and executes the image processing for the new task.
[0072] After the image processing for the new task is completed, at S1006, the control unit 401 executes the task switching sequence (return) shown in Figure 12, restoring the parameters of the old task and switching back to the old task. Details of the task switching sequence (return) will be described later.
[0073] After the task switching sequence (return) process is completed, in S1007, the control unit 401 returns the command list of the old task and starts executing the image processing of the old task that was interrupted, based on the task information of the old task stored in the task information holding unit 410.
[0074] <Task switching sequence (backup)> Referring to Figure 11, the task switching sequence (backup) in S1004 of Figure 10 will be explained. Figure 11 is a flowchart illustrating the task switching sequence (backup).
[0075] First, in S1101 to S1103, the control unit 401 saves the task information of the old task to the task information storage unit 410. Specifically, in S1101, the control unit 401 interrupts the execution of the command list of the old task. Next, in S1102, the control unit 401 obtains the address information (command list pointer) of the command list of the old task at the time of interruption and stores it in the task information storage unit 410 as the command list pointer of the old task's task information. Next, in S1103, the control unit 401 obtains the image data address and the number of remaining image data at the time of interruption of the command list of the old task and stores them in the task information storage unit 410 as the image data address and number of image data, respectively, of the old task's task information. The task information (command list pointer, image data address, and number of image data) stored in S1102 and S1103 is necessary when the old task is restored and is used in the task switching sequence (saving) process.
[0076] Next, in S1104, the control unit 401 instructs the command execution unit 417 to execute a save instruction command. Upon receiving the instruction, the command execution unit 417 transmits the save instruction command (start) stored in the save instruction command storage unit 404 to the image processing execution unit 403 via the image processing input / output unit 402. As a result, the image processing circuit of the image processing execution unit 403 shown in Figure 10 generates a parameter read command that holds the parameters to be saved from the image processing circuit. Subsequently, in S1105, the command execution unit 417 transmits the save instruction command (end) stored in the save instruction command storage unit 404 to the image processing execution unit 403 via the image processing input / output unit 402.
[0077] In S1106, the image processing input / output unit 402 receives the save command (start) transmitted in S1104 via the image processing execution unit 403. Upon receiving the save command (start) from the image processing execution unit 403, the image processing input / output unit 402 initializes the count value of the read command counter 421 in the command output unit 413. For example, the count value is initialized to 0.
[0078] In S1107, the command output unit 113 of the image processing input / output unit 402 receives a parameter read command generated and transmitted by the image processing execution unit 403 in response to the save instruction command (start) transmitted in S1104. In addition, each time a parameter read command is received from the image processing execution unit 403, the command output unit 413 increments the count value of the read command counter 421. This is to count the number of parameter read commands received after the save instruction command (start).
[0079] In S1108, the control unit 401 compares the count value of the read command counter 421 with the preset maximum number of read commands and determines whether the count value of the read command counter 421 has reached the maximum number of read commands. If the control unit 401 determines that the count value of the read command counter 421 has not reached the maximum number of read commands (YES in S1108), it proceeds to S1109. That is, if (count value of read command counter 421) < (maximum number of read commands), it proceeds to S1109.
[0080] On the other hand, if the control unit 401 determines that the count value of the read command counter 421 has reached the maximum number of read commands (NO in S1108), it terminates the task switching sequence (save) shown in Figure 11 and proceeds to S1003 shown in Figure 10. That is, if (count value of read command counter 421) ≥ (maximum number of read commands), the control unit 401 determines that the parameter read commands are outside the acceptable range for saving and terminates the task switching sequence (save). In other words, it prioritizes the execution of the old task without switching to a new task.
[0081] In S1109, the command output unit 413 of the image processing input / output unit 402 stores the parameter read command received from the image processing execution unit 403 in the parameter save area 204 of the DRAM 101. At this time, the command output unit 413 may store a certain amount of received parameter read commands and transfer them to the DRAM 101 in a burst. In this case, if the number of parameter read commands is not a certain amount, the missing number of parameter read commands can be generated using dummy data.
[0082] In S1110, the image processing input / output unit 402 determines whether or not it has received the save instruction command (end) transmitted in S1105 via the image processing execution unit 403. If the image processing input / output unit 402 determines that it has received the save instruction command (end) from the image processing execution unit 403 (YES in S1110), it notifies the control unit 401 that the saving of the old task's parameters is complete and proceeds to S1111.
[0083] On the other hand, if the image processing input / output unit 402 determines that it has not received a save instruction command (end) from the image processing execution unit 403 (NO in S1110), it proceeds to S1107. Therefore, the processes described above in S1107 to S1109 are repeatedly executed until the image processing input / output unit 402 determines that it has received a save instruction command (end) from the image processing execution unit 403.
[0084] In S1111, the control unit 401 sets the count value of the read command counter 421 to the number of parameter saving commands for the old task's task information and stores it in the task information holding unit 410.
[0085] Next, the initial setup of the new task is performed. In S1112, the control unit 401 sets parameters based on the task information (command list pointer) of the new task held in the task information holding unit 410 in order to switch from the command list of the old task to the command list of the new task. That is, the DRAM address of the command list of the new task stored in DRAM 101 is set. This allows the image processing of the new task to be executed. After the processing of S1112 is completed, the process proceeds to S1005 shown in Figure 10.
[0086] As explained above, by executing the task switching sequence (backup) shown in Figure 11, it becomes possible to retain the parameters, image data addresses, and number of image data when the old task is interrupted and the new task is switched over.
[0087] <Task switching sequence (return)> Referring to Figure 12, the task switching sequence (return) in S1006 of Figure 10 will be explained. Figure 12 is a flowchart illustrating the task switching sequence (return).
[0088] When the execution of a new high-priority task is completed and the task switching sequence (return) process begins, in S1201, the control unit 401 deletes the task information of the new task that is held in the task information holding unit 410.
[0089] In S1202, the control unit 401 restores the command list of the old task. At this time, the control unit 401 sets a parameter that indicates the position (pointer) of the command list of the old task before the task switch from the old task to the new task, based on the command list pointer of the old task information held in the task information holding unit 410.
[0090] In S1203, the control unit 401 restores the image position at the time the image processing of the old task was interrupted. Based on the image data address and number of image data of the old task held in the task information holding unit 410, the control unit 401 sets parameters indicating the image position in the image processing of the old task before the task switch from the old task to the new task.
[0091] Next, the parameters of the image processing circuits 407, 408, and 409 shown in Figure 6 are restored to their state before the task switch from the old task to the new task. First, in S1204, the control unit 401 instructs the command execution unit 417 to return to the old task. Upon receiving the instruction, the command execution unit 417 sets the initial parameters of the old task. Setting the initial parameters of the old task can be done, for example, by executing a parameter write command for the initial parameters of the old task that is included in the command list of the old task. Alternatively, for example, a parameter write command stored in the initial parameter area 202 of the old task shown in Figure 2 may be executed. This completes the setting of the initial parameters for executing the old task.
[0092] Next, the control unit 401 restores the parameters of the old task that were saved during the task switching sequence (save) process by executing the following loop processing. In S1205, the control unit 401 changes the type 505 of the header area 501 of the parameter read command saved during the task switching sequence (save) process to a write type, and changes it to a parameter write command. In S1206, the command execution unit 417 executes the parameter write command obtained by changing the type in S1205, and overwrites and sets the parameters set in S1204. In S1207, the control unit 401 determines whether the series of processes S1205 and S1206 has been executed a number of times corresponding to the number of parameter save commands of the old task's task information, and executes the loop processing until the count reaches the number of parameter save commands. In this way, the control unit 401 executes the number of parameter write commands corresponding to the number of parameter save commands, updating the address based on the parameter save area base address of the task information, until the restoration of all parameters saved in the old task is complete. Then, the parameter write commands are executed for the number of parameter save commands, and once all parameters saved in the old task have been restored, the process proceeds to S1007 as shown in Figure 10.
[0093] As explained above, by executing the task switching sequence (recovery) shown in Figure 12, when switching from the old task to the new task, it becomes possible to resume the image processing of the old task from the state in which the old task was interrupted.
[0094] In the DRAM region configuration shown in Figure 2, the command list region 201, image data region 203, and parameter storage region 204 are treated as separate regions. However, it goes without saying that if no data is lost, there is no need to separate the regions. Furthermore, the backup instruction command shown in Figure 5(c) uses a different format from the parameter command shown in Figure 5(a) or the image command shown in Figure 5(b). However, as long as the backup instruction command can be identified, it is acceptable to use the format shown in Figure 5(a) or Figure 5(b) with an area indicating that it is a backup instruction command. Furthermore, the explanation above described how parameters can be saved and restored in two tasks: the old task and the new task. However, it goes without saying that this is not limited to two tasks; even if processing requests for more tasks arise, it can be handled simply by increasing the task information shown in Figure 9.
[0095] According to this embodiment, when there are multiple processing requests to the shared image processing execution unit 403, the input / output control unit 420 automatically generates a parameter read command corresponding to the parameters that the image processing execution unit 403 should save, based on a save instruction command from the input / output control unit 420. The input / output control unit 420 does not need to know in advance the parameters of the image processing execution unit 403 that should be saved. As a result, it is possible to save parameters without excess or deficiency when switching from an old task to a new task, and it is possible to flexibly respond to increases or decreases in the parameters of the image processing execution unit 403, enabling appropriate and efficient parameter saving.
[0096] (Second embodiment) In the first embodiment, the parameters to be saved during task switching were determined according to the list of registers to be saved, 604, held by the image processing circuit. In the second embodiment, the parameters to be saved are determined by the parameters related to the task currently being executed (old task), the parameters required for the task after task switching (new task), and whether or not there have been internal changes in the registers. This makes it possible to save parameters more efficiently. Below, the differences between the second embodiment and the first embodiment described above will be explained, and other aspects will be the same as in the first embodiment and will not be explained further.
[0097] Figure 13 is a block diagram showing an example configuration of image processing circuits 407 to 409 according to the second embodiment. In Figure 13, components having the same function as those shown in Figure 6 are denoted by the same reference numerals. The image processing circuits 407 to 409 according to the second embodiment differ from the image processing circuits 407 to 409 according to the first embodiment shown in Figure 6 in that the command conversion unit 602 has a task-specific register list 1301 instead of the saved register list 604. Furthermore, the image processing circuits 407 to 409 according to the second embodiment differ from the image processing circuits 407 to 409 according to the first embodiment shown in Figure 6 in that the register unit 603 has a register monitoring unit 1302.
[0098] Task-specific register list 1301 stores information from task-specific register list 1401, which indicates the registers used by each task, as shown in an example in Figure 14. In this example, it is shown that the registers used for image processing in the old task are RegA, RegB, and RegC, and the registers used for image processing in the new task are RegB and RegC.
[0099] Furthermore, the register monitoring unit 1302 monitors whether any registers have changed from their initial values within a task, as shown in the internal change information 1402 for each register in Figure 14. In this example, RegA and RegB have not changed from their initial values, and only RegC has changed. For example, even if the register values at the start of a task are the same in the old and new tasks, there may be registers whose values are internally updated within a task (during the execution of the task). In such cases, saving the parameters only for the registers whose register values have been internally updated within a task enables more efficient parameter saving and restoration. The other functional blocks are the same as the functional blocks of the image processing circuit shown in Figure 6. A detailed explanation of those will be omitted.
[0100] Next, the details of the image processing control unit 610 (command conversion unit 602) will be explained with reference to the flowchart in Figure 15. The processes S1501 to S1510 in the flowchart shown in Figure 15 are the same as the processes S701 to S710 in the flowchart shown in Figure 7, which was described in the first embodiment. That is, in S1501, the command conversion unit 602 determines whether the input command is a parameter command, an image command, or a save instruction command based on the identifiers 503, 513, and 523 stored in the input command. If the command conversion unit 602 determines that the input command is a parameter command, it proceeds to S1502; if it determines that the input command is an image command, it proceeds to S1508. If the command conversion unit 602 determines that the input command is a save instruction command, it proceeds to S1511.
[0101] The operation when the input command is determined to be a parameter command in S1501 will be explained below. In S1502, the command conversion unit 602 refers to the type 505 stored in the input command and determines whether the command type is write type, read type, or write-read type. If the command conversion unit 602 determines that the input command type is write type, it proceeds to S1503, and if it determines that the input command type is read type, it proceeds to S1504. If the command conversion unit 602 determines that the input command type is write-read type, it proceeds to S1505.
[0102] In S1503, the command conversion unit 602 refers to the address 506 and data 507 stored in the input command and sets (writes) the corresponding parameters to the registers in the register unit 603. The registers in the register unit 603 are used for image processing in the image processing core unit 620. After the processing in S1503 is completed, in S1507, the command conversion unit 602 outputs the parameter command, which is the input command, as an output command.
[0103] In S1504, the command conversion unit 602 refers to the address 506 stored in the input command and reads the parameter from the register in the register unit 603 corresponding to the address. Then, in S1507, the command conversion unit 602 stores the parameter read in S1504 into the data area 502 of the parameter command, which is the input command, and outputs it as an output command.
[0104] In S1505, the command conversion unit 602 reads the parameter from the register in the register unit 603 corresponding to address 506 stored in the input command. Next, in S1506, the command conversion unit 602 sets (writes) the data (parameter) 507 stored in the input command to the register in the register unit 603 corresponding to address 506 stored in the input command. Then, in S1507, the command conversion unit 602 stores the parameter read in S1505 into the data area 502 of the parameter command, which is the input command, and outputs it as an output command.
[0105] Next, we will explain the operation when it is determined in S1501 that the input command is an image command. In S1508, the command conversion unit 602 extracts the necessary data (image data 515) from the input command and sends the extracted image data to the image processing core unit 620. Then, in S1509, the command conversion unit 602 receives the image processed image data from the image processing core unit 620 and converts the received image data into an image command. Finally, in S1510, the command conversion unit 602 outputs the image command obtained in S1509 based on the image processed image data as an output command.
[0106] Next, we will explain the operation when it is determined in S1501 that the input command is a save command. Similar to S711, in S1511, the command conversion unit 602 determines whether or not the input command is a save command (start). If the command conversion unit 602 determines that the input command is a save command (start) (YES in S1511), it proceeds to S1512. On the other hand, if the command conversion unit 602 determines that the input command is not a save command (start), that is, a save command (end) (NO in S1511), it proceeds to S1513.
[0107] In S1512, the command conversion unit 602 outputs the input command, the save instruction command (start), as an output command.
[0108] In S1513, the command conversion unit 602 stores the input command, the save instruction command (end), in the save instruction command holding unit 605.
[0109] Next, in S1514-S1516, the command conversion unit 602 converts the parameters to be saved into commands. In S1514, the command conversion unit 602 refers to the task-specific register list 1301 and selects one register from the registers used in the old task listed in the task-specific register list 1301 that has not been processed in the subsequent S1514-S1516 steps. Hereafter, this selected register will also be referred to as the "register to be processed". The command conversion unit 602 then determines whether the register to be processed is a register used in the new task, that is, whether it is a register used in both the old and new tasks. If the command conversion unit 602 determines that it is a register used in the new task, that is, a register used in both the old and new tasks (YES in S1514), it proceeds to S1515. On the other hand, if the command conversion unit 602 determines that it is not a register used in the new task (NO in S1514), it proceeds to S1517.
[0110] In S1515, the command conversion unit 602 refers to the register-specific internal change information in the register monitoring unit 1307 to determine whether or not there was an internal change in the register value of the register to be processed within the previous task. If the command conversion unit 602 determines that there was an internal change in the register value within the previous task (YES in S1515), it proceeds to S1516. On the other hand, if the command conversion unit 602 determines that there was no internal change in the register value within the previous task (NO in S1515), it proceeds to S1517.
[0111] In S1516, the command conversion unit 602 reads the parameter from the register to be processed and generates a parameter read command in which the read parameter is stored in the data area 502. In this way, the command conversion unit 602 generates a parameter read command corresponding to the register to be processed and outputs it as an output command.
[0112] In S1517, the command conversion unit 602 determines whether the processing described in S1514 to S1516 has been completed for all registers in the task-specific register list 1301. If the command conversion unit 602 determines that processing has been completed for all registers in the task-specific register list 1301 (YES in S1517), it proceeds to S1518. On the other hand, if the command conversion unit 602 determines that processing has not been completed for all registers in the task-specific register list 1301, i.e., that there are unprocessed registers (NO in S1517), it proceeds to S1514.
[0113] In this way, the command conversion unit 602 repeats the processing described in S1514 to S1516 for the registers in the task-specific register list 1301. As a result, the command conversion unit 602 generates and outputs parameter read commands to save parameters for registers that are used in both the old and new tasks and whose register values were internally changed in the old task. On the other hand, the command conversion unit 602 does not generate parameter read commands for registers that were used in the old task but not in the new task, and for registers that are used in both the old and new tasks but whose register values were not internally changed in the old task.
[0114] In S1518, the command conversion unit 602 outputs the escape instruction command (end) stored in the escape instruction command holding unit 605 in S1513 as an output command.
[0115] As described above, in this embodiment, the image processing circuit determines the parameters to be saved based on the parameters related to the task currently being executed (old task), the parameters required for the task after task switching (new task), and whether or not there have been parameter updates in the registers. This allows for flexible response to increases or decreases in parameters of the image processing execution unit 403, similar to the first embodiment, enabling appropriate and efficient parameter saving, and further enabling flexible parameter saving.
[0116] (Other embodiments of the present invention) The present invention can also be realized by supplying a program that implements one or more of the functions of the above-described embodiments to a system or device via a network or storage medium, and by a process in which one or more processors in the computer of that system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that implements one or more functions.
[0117] It should be noted that the embodiments described above are merely examples of how the present invention can be implemented, and the technical scope of the present invention should not be interpreted as being limited by them. In other words, the present invention can be implemented in various forms without departing from its technical concept or its main features. [Explanation of Symbols]
[0118] 101: DRAM 102: ROM 103: Image Processing Unit 104: CPU 401: Control Unit 402: Image Processing Input / Output Unit 403: Image Processing Execution Unit 404: Save Instruction Command Storage Unit 405: Command List Storage Unit 407, 408, 409: Image Processing Circuit 410: Task Information Holding Unit 417: Command Execution Unit 421: Read Command Counter 601: ID Interpretation Unit 602: Command Conversion Unit 603: Register Unit 604: Save Target Register List 605: Save Instruction Command Holding Unit 610: Image Processing Control Unit 620: Image Processing Core Unit 1301: Task-Specific Register List 1302: Register Monitoring Unit
Claims
1. A control means for controlling the execution of image processing commands according to a command list for executing a series of data processing tasks, The system includes a register for storing parameters related to image processing, and an image processing means that performs image processing according to the command input from the control means, When the control means interrupts the first task that is currently being executed and switches from the first task to the second task, it outputs a retreat instruction command to the image processing means. The image processing means is characterized in that, when the save instruction command is input, it generates a parameter command including the parameter stored in the register, based on a register list indicating the register in which the parameter to be saved is stored, and outputs it to the control means.
2. The image processing apparatus according to claim 1, further comprising a storage means for storing the parameter command output from the image processing means in response to the aforementioned evacuation instruction command.
3. When the control means returns to the first task, it outputs the parameter command output from the image processing means in response to the retreat instruction command to the image processing means. The image processing device according to claim 1 or 2, characterized in that the image processing means sets the parameter in the corresponding register based on the parameter command input from the control means.
4. The image processing apparatus according to claim 3, characterized in that when the control means returns to the first task, it changes the type of the parameter command output from the image processing means in response to the retreat instruction command to a write type and outputs it to the image processing means.
5. The retraction instruction command output by the control means includes a first retraction instruction command that notifies the start and a second retraction instruction command that notifies the end. The image processing device according to any one of claims 1 to 4, characterized in that the image processing means outputs the first retraction instruction command and the second retraction instruction command input from the control means to the control means, and inserts the generated parameter command between the first retraction instruction command and the second retraction instruction command and outputs it to the control means.
6. The image processing apparatus according to any one of claims 1 to 5, characterized in that when the save instruction command is input, the image processing means generates a parameter command corresponding to the register whose parameter was changed during the execution of the first task, based on the register list, and outputs it to the control means.
7. The image processing apparatus according to any one of claims 1 to 6, wherein the control means has a counter that counts the number of parameter commands output by the image processing means in response to the retraction instruction command, and when the count value of the counter reaches a preset value, the switching from the first task to the second task is canceled.
8. The image processing apparatus according to claim 7, characterized in that the control means initializes the count value of the counter when a first retreat instruction command notifying the start of the retreat instruction commands is input via the image processing means.
9. The image processing device according to any one of claims 1 to 8, wherein the image processing means maintains internal change information indicating whether the parameter stored in the register has been changed during the execution of the first task, and when the save instruction command is input, generates a parameter command corresponding to a register used in both the first task and the second task, and whose parameter was changed during the execution of the first task, based on the register list and the internal change information, and outputs it to the control means.
10. The aforementioned image processing means processes the image data in units of band images obtained by dividing the image into multiple parts. The image processing apparatus according to any one of claims 1 to 9, characterized in that the control means outputs the save instruction command after the image processing of the band image unit by the image processing means is completed.
11. A control method for an image processing apparatus, comprising: control means for controlling the execution of command related to image processing according to a command list for executing a series of data processing related to a task; and image processing means having a register for storing parameters related to image processing, and executing image processing according to the command input from the control means, The process includes the step of the control means outputting a retreat instruction command to the image processing means when interrupting a first task that is currently being executed and switching from the first task to a second task, A control method characterized by comprising the steps of: in response to the save instruction command, the image processing means generates a parameter command including the parameter stored in the register, based on a register list indicating the register in which the parameter to be saved is stored, and outputs it to the control means.
12. A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 1 to 10.
Citation Information
Patent Citations
Dual hardware channels and hardware context switching in a graphics rendering processor
EP0475421A2
Display system
JP1992299389A
Data processor and data processing system
JP1999133943A
Information processing device, information processing method, control device and control method
JP2014209801A
Data processing apparatus, control method therefor and program
JP2020101921A