WO2007110906A1 - データ処理装置 - Google Patents

データ処理装置 Download PDF

Info

Publication number
WO2007110906A1
WO2007110906A1 PCT/JP2006/306089 JP2006306089W WO2007110906A1 WO 2007110906 A1 WO2007110906 A1 WO 2007110906A1 JP 2006306089 W JP2006306089 W JP 2006306089W WO 2007110906 A1 WO2007110906 A1 WO 2007110906A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
entry
task
entries
storage element
Prior art date
Application number
PCT/JP2006/306089
Other languages
English (en)
French (fr)
Inventor
Takanobu Tsunoda
Hiroshi Tanaka
Original Assignee
Hitachi, Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi, Ltd filed Critical Hitachi, Ltd
Priority to US12/280,005 priority Critical patent/US20090320034A1/en
Priority to JP2008507296A priority patent/JP5024899B2/ja
Priority to PCT/JP2006/306089 priority patent/WO2007110906A1/ja
Publication of WO2007110906A1 publication Critical patent/WO2007110906A1/ja

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/10Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
    • G11C7/1006Data managing, e.g. manipulating data before writing or reading out, data bus switches or control circuits therefor
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C15/00Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C19/00Digital stores in which the information is moved stepwise, e.g. shift registers

Definitions

  • the present invention relates to a data processing device, and more particularly to a task state management method and a task fast search circuit capable of starting execution in a multitask data processing device capable of simultaneously executing a plurality of tasks.
  • Multitask control in such a device is generally realized by executing predetermined software on a data processing apparatus represented by an embedded processor that controls the device.
  • this software hereinafter referred to as task management program
  • this software has a scheduling policy that has been defined in advance in response to a predetermined switching factor such as an interrupt indicating the switching timing of the execution task. It has a function to select the task to be executed next.
  • multitask control which is processing overhead, has real-time characteristics, in particular like an embedded processor, that is, the response time until the start of task execution for an event input that causes a specific task to start. Guarantee is required. For this reason, there is a need for a new multi-task control implementation method that efficiently executes a task management program in addition to simply improving the performance of a data processing device.
  • Patent Documents 1 and 2 are examples of documents described in connection with processing of a task management program for realizing multitask control.
  • Patent Document 1 describes a reservation station (instruction buffer) of a multi-thread processor that supports out-of-order execution. Describes a technology that enables overtaking of instruction execution using the thread number and priority assigned to each instruction.
  • Patent Document 2 describes that a processor that processes multi-streams controls access to computing resources according to the priority of each stream, and the priority is dynamically set by off-chip input, software, or hardware. The technology that can be changed is described.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 2004-295195
  • Patent Document 2 Japanese Translation of Special Publication 2002-532801
  • the inventor of the present application has examined the processing contents of a task management program that realizes multitask control, and has also found the following problems to be solved from the viewpoint of improving execution efficiency.
  • the core of the functions of the task management program is a process of selecting one task from a task group in a state where the next task to be executed can be started.
  • This selection process is a search operation including a series of condition comparison and determination processes for all tasks based on the scheduling policy, and can be executed in parallel.
  • the search operation needs to be executed sequentially for the task group, so not only the processing speed decreases due to the increase in the number of tasks, but also It becomes difficult to guarantee real-time performance based on the worst value of the processing time of the task management program.
  • the present inventor guarantees the time sequence of task generation when considering the real-time property for tasks for which execution conditions are in place in priority control when executing generated and pooled tasks. Found the importance of.
  • An object of the present invention is to provide a data processing apparatus capable of guaranteeing a high-speed condition comparison determination process for selecting data and a time order of the selected data.
  • Another object of the present invention is to provide a data processing apparatus capable of realizing multi-task control with high efficiency and high real-time property.
  • a data processing device (100) uses a multi-bit storage element (800-0 to 800-m) having a data shift function and a data comparison function as one entry,
  • a storage element array (330) having a plurality of entries (333-0 to 333-255) is provided to enable data shift between corresponding bit positions.
  • a priority determination for identifying one entry among the plurality of entries with a predetermined priority based on a comparison result between the data inputted in common to the plurality of entries and the contents held in the storage elements constituting the entries. It has a circuit (340).
  • each entry has a data shift function and a data comparison function in units of storage elements, so that parallel comparison is possible by an associative memory function as a CAM (Content Addressable Memory).
  • an associative memory function as a CAM (Content Addressable Memory).
  • the invalid data entry can be prevented by the data shift between the entries, and the valid data can be packed and sequentially held in the entry. Become. Therefore, by holding newly added data in the last empty entry in the shift direction, it is possible to easily guarantee the time order in which the stored data is added according to the entry sequence. Since it is easy to guarantee the time order of entries uniquely, it is possible to identify the required data in consideration of the priority according to the time order for the search result by the CAM.
  • the predetermined priority is a rank relating to early and late of the order in which data is held in an entry holding significant data. This makes it easy to implement priority control that considers the time sequence for identifying entries.
  • the data processing device (100) has a multi-bit storage element (800-0 to 800-m) having a data shift function and a data comparison function as one entry,
  • a storage element array (300) having a plurality of entries (333-0 to 333-255) is provided so that data can be shifted in one direction between corresponding bit positions.
  • the entry has a new When responding to an operation command that holds new data, the time order of new data holding for the entry is controlled in the direction opposite to the arrangement in the data shift direction of the entry, and the holding data of the entry is invalidated.
  • a control circuit (310, 320, 350) that shifts the data of the upstream entry in the temporal order downstream from the invalidated entry by the number of invalidated entries when responding to the operation command to be invalidated. Further, based on a comparison result between search data that is commonly input to the plurality of entries and search target data held in a storage element that constitutes the entry, one entry of the plurality of entries with a predetermined priority. Is provided with a priority determination circuit (340). At this time, the predetermined priority is set to a predetermined rank in the temporal order.
  • each entry has a data shift function and a data comparison function in units of storage elements, so that parallel comparison is possible by the associative memory function. Then, when the data held in the middle entry becomes invalid, the data shift between the entries prevents the invalid data entry from existing in the middle, and the valid data is packed and sequentially held in the entry. Therefore, by holding newly added data in the empty entry at the end of the shift direction, it is possible to uniquely guarantee the time order in which the retained data is added according to the entry sequence. Since it is easy to guarantee the time order of entries uniquely, it is possible to identify the required data in consideration of the priority according to the time order for the search results by CAM. As a result, priority control in consideration of the time order for identifying entries can be performed quickly and easily.
  • the present invention has an empty entry position pointer (318-8) indicating the position of an entry that can hold new data.
  • an empty entry position pointer (318-8) indicating the position of an entry that can hold new data.
  • a multi-bit storage element having a data shift function is used as one table entry, and data can be shifted in one direction between corresponding bit positions of adjacent table entries.
  • a plurality of table entries are provided, and the table entries correspond to the entries of the storage element array on a one-to-one basis, and have a data table (360).
  • the data table entry corresponds to an entry in the storage element array
  • the data shift operation is synchronized with the data shift operation.
  • the data table outputs data held by a table entry corresponding to one entry identified by the priority determination circuit.
  • the output data is the result obtained by associative search.
  • an extended output interface (380) capable of outputting a comparison result with data to be searched in the storage element array, and a logical product of the comparison result in the storage element array
  • an extended input interface (370) that can input a higher-order comparison result. It is possible to expand the size of associative memory by parallelizing memory element arrays.
  • a data processing device (100) includes a processor unit (200) capable of executing a multitask control program and a plurality of arithmetic units to which tasks to be executed by the multitask control program are assigned. (400-l to 400-n) and a task management unit (300) that performs a process of selecting a task to be executed by the arithmetic unit.
  • the task management unit includes a storage element array (330), a control circuit (310, 320, 350), and a priority determination circuit (340).
  • the storage element array has a multi-bit storage element having a data shift function and a data comparison function as one entry, and has a plurality of entries so that data can be shifted in one direction between corresponding bit positions of adjacent entries.
  • the control circuit responds to an operation instruction from the processor unit that holds new task management information in the entry, the control circuit sets the time sequence of holding the new task management information for the entry in the data shift direction of the entry. Controls in the opposite direction to the array and invalidates the data of the upstream entry in the temporal order from the invalidated entry when responding to the operation command from the processor unit that invalidates the retained data of the entry. Data is shifted downstream by the number of entries.
  • the priority determination circuit has a predetermined priority based on a comparison result between search data input in common to the plurality of entries and search target data held in a storage element constituting the entry. Identify one entry.
  • the predetermined priority is set to a predetermined rank in the temporal order.
  • the data processing apparatus is formed on one semiconductor substrate.
  • each entry has a data shift function and a data comparison function in units of storage elements. Noh.
  • the task management information of the entry in the middle becomes invalid (when the corresponding task is completed), there can be no invalid task management information entry in the middle due to data shift between entries. Therefore, it is possible to pack valid task management information in order and keep it in entries sequentially. Therefore, by keeping newly added task management information in the last free entry in the shift direction, task management information according to the order of entries. It is possible to guarantee a unique order of the time that is added. Since it is easy to guarantee the time order of entries uniquely, it is possible to identify the required data by adding the priority according to the time order to the search results by CAM. As a result, priority control for task selection in consideration of the time order can be performed quickly and easily.
  • the task management unit outputs a task ID included in the task management information held by the entry identified by the priority determination circuit to the processor unit.
  • the processor unit causes a free arithmetic unit to process the task specified by the task ID.
  • the task management unit uses a plurality of bits of storage elements having a data shift function as one table entry, and shifts data in one direction between corresponding bit positions of adjacent table entries.
  • a plurality of table entries so that the table entries correspond to the entries of the storage element array in a one-to-one correspondence.
  • the data table entry is subjected to a data shift operation in synchronization with the data shift operation for the storage element array entry.
  • the data table also outputs the task ID for the table entry corresponding to one entry identified by the priority determination circuit.
  • FIG. 1 is a block diagram generally showing an example of a data processing device according to the present invention.
  • FIG. 2 is a format diagram showing an example of a task pool for multitask control.
  • FIG. 3 is a block diagram illustrating an example of a task management processor.
  • FIG. 4 is a block diagram showing an example of a main processor interface.
  • FIG. 5 is a block diagram showing an example of a task state management array.
  • FIG. 6 is a block diagram showing an example of a task state management entry.
  • FIG. 7 is a block diagram showing a first example of a task state management cell.
  • FIG. 8 is a block diagram showing a second example of a task state management cell.
  • FIG. 9 is a waveform diagram of terminals () SE1 and () SE2 in FIG.
  • FIG. 10 is a flowchart showing the first half of a task control flow in the main processor.
  • FIG. 11 is a flowchart showing the second half of the task control flow in the main processor.
  • FIG. 12 is a flowchart showing a specific example of array alignment processing by inter-entry shift shown in FIG.
  • FIG. 13 is a flowchart showing a specific example of the next task search process shown in FIG. 11.
  • FIG. 14 is a flowchart showing an array alignment control flow in the task management processor.
  • FIG. 15 is a flowchart showing a specific example of array update processing shown in FIG.
  • Task management processor (task management unit)
  • TID 0 to TID—k Task ID ST—0 to ST—k Task state
  • circuit elements constituting the data processing apparatus described below are formed on a single semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit technology such as a CMOS transistor or a bipolar transistor. Be done
  • FIG. 1 shows an example of a data processing apparatus according to the present invention.
  • the data processor 100 includes a main processor (processor unit) 200, a task management processor (task management unit) 300, n arithmetic units 400—1 to 400—n, n local memories 410—1 to 410—n, It consists of n local memory buses 420-l to 420-n, an internal bus 500, an arithmetic unit control bus 510, a peripheral module 600, a main memory interface 700, a main memory 710, and a main memory bus 720.
  • the main processor 200 has a unique instruction set similar to that of a general microprocessor, and operates the data processor according to various control programs (not shown) including a multitask control program stored in the main memory 710. To control.
  • the task management processor 300 cooperates with the multitask control program running on the main processor 200 to maintain the state of each task, and at the same time, selects a task to be executed next at task switching at a high speed and constant. Multitask control is made more efficient by executing in time.
  • the arithmetic units 400-l to 400-n indicate that the multitask control program operating on the main processor 200 has assigned an execution task to the arithmetic unit via the arithmetic unit control bus 510.
  • a predetermined task execution start request signal is received, the operation data stored in the local memory 410-1 to 410-n is read via the local memory bus 420-1 to 420-n and a predetermined process is executed.
  • the assigned task is executed by a series of operations for storing the operation result in the local memories 410-1 to 410-n again.
  • a predetermined task execution completion notification is transmitted to the main processor 200 via the arithmetic unit control bus 510.
  • the internal bus 500 includes a main processor 200, a task management processor 300, and an arithmetic unit 400.
  • the peripheral module 600 has a DMA transfer function for transferring data between the main memory 710 and the local memory 410-l to 410-n, a timer function as a reference time for task switching, and not shown. Various functions such as output device control are provided.
  • the main memory interface 700 controls access to the main memory 710 via the main memory interface 720.
  • the main memory 710 may be the same chip as the data processing apparatus 100 or a separate chip! /.
  • FIG. 2 shows an example of a task pool for multitask control that manages the status of each task.
  • the status of each task TASK0 to TASKk is represented by task management information.
  • the task management information includes, for example, task ID (TID—0 to TID—k), task status (ST—0 to ST—k). ), Execution priority 13 ⁇ 4 0 to 13 ⁇ 41 1, and preferential execution flag 1 ⁇ 0 to 1 ⁇ 1 are included.
  • Task management information in the data processing device 100 is stored in the task management processor 300.
  • the task ID is a code uniquely assigned to identify each task.
  • the task status is (1) the task is waiting for all conditions that can be executed (Waiting), and (2) all the conditions that can be executed are satisfied and waiting for the start of execution. This is a status code that indicates whether the status is (Ready) or (3) the task is being executed and is waiting for completion of execution (Running).
  • the execution priority is a code indicating the urgency of the task execution.
  • the execution flag indicates whether a condition group necessary for starting execution of the task, such as completion of execution of a task having a specific ID or completion of preparation of initial data, is established.
  • a task management program for realizing multitask control operates as follows.
  • a task group whose task status is "Ready” is executed next based on a predetermined scheduling policy such as the highest execution priority and the oldest task that has been added to the task pool. Select one task to be performed. In addition, it notifies the selected task of permission to start execution and updates the task status from “Ready” to “Running”.
  • Task pool off-chip memory 71 or peripheral circuit 600 Stored in the on-chip memory (not shown) and all task management control is implemented by the software of the main processor 200, it takes a long time to search the task pool required for task selection. In addition, the occurrence of access to the main memory, etc., and the search time increase according to the number of tasks held in the task pool, makes it difficult to ensure real-time performance.
  • the task management processor 300 is a circuit that enables efficient multitask control by guaranteeing the time order in addition to the parallel search operation depending on the number of tasks. The details of are explained.
  • FIG. 3 shows an example of the task management processor 300.
  • the task management processor 300 includes a main processor interface 310, an array access arbitration unit 320, a task state management array 330, a priority determination unit (priority determination circuit) 340, an array update control unit 350, a task ID table (data table). 360 and task management processor expansion interface 370, 380.
  • the main processor interface 310, the array access arbitration unit 320, and the array update control unit 350 constitute a control circuit that performs task management control using the storage element array in response to an operation command from the main processor 200.
  • 311 is an array access arbitration unit control node
  • 312 is a task state management array control bus
  • 313 is a task state management array search signal.
  • 314 and 315 are array update control unit control signals
  • 316 is a task ID table control bus.
  • 321-0 to 321-255 are task state management entry control signals
  • 331-0 to 331-255 are task state management entry comparison signals.
  • 341—0 to 341—255, 371—0 to 371—255, 391—0 to 391—255, 393—0 to 393—255 are task state management entry status signals
  • 342 is a priority determination signal
  • 351, 381, 392 and 394 are external array update control signals
  • 352 is an array update control signal 352.
  • the main processor interface 310 includes a control register group that defines the operation of the task management processor 300, and controls control register access between the internal bus 500 and the task management processor unit.
  • the task state management array 330 has 256 task state management entries. As a task pool configured by hardware, the task state management array 330 is reduced through the task state management array control node 312. At least the task status and execution priority of each task are stored, and task status management entry comparison signals 331-0 to 331-255 are output according to the contents of the task status management array search signal 313.
  • Each task state management entry comprises a multi-bit storage element having a data shift function and a data comparison function, and has a function as a CAM. As will be described in detail later, each task state management entry can be further shifted in data between corresponding bit positions of adjacent task state management entries.
  • the array access arbitration unit 320 is connected to the access control signal that arbitrates the array access arbitration unit control bus 311 from the main processor interface 310 and the array update control signal 352 from the array update control unit 350.
  • Task state management entry status signal generated by the task management processor expansion interface 370 based on the task status management entry status signal 391 0 to 391—255 output by the task management processor (not shown) adjacent to the left side)
  • the array access arbitration unit 320 controls read / write access to each task state management entry of the task state management array 330.
  • the instruction is given from the main processor interface 310, the task management processor expansion interface 370, and the array update control unit 350.
  • the array access arbitration unit 320 controls the read / write operation for the shift operation between task state management entries.
  • the priority determination unit 340 uses, for example, the entry 0 (333-0) as the highest priority from the comparison signal indicating the coincidence state among the task state management entry comparison signals 331-0 to 33 1-255. Select one entry according to the specified priority, such as entry 255 (333-255) as the lowest priority, and output a priority judgment signal 342 that identifies the selected entry. Furthermore, the priority determination unit 340 generates a task state management entry state generated by the task management processor extended interface 380 and output to a task management processor (not shown) adjacent to the downstream side (right side in the figure). Outputs task status management entry status signals 341-0 to 341-255, which are the sources of signals 393-0 to 393-255.
  • the task management processor extension interface 380 is a task management processor adjacent to the downstream side (right side of the figure). The determination result by the priority determination unit 340 can be output to a server (not shown).
  • the array update control unit 350 receives an array update request in the external array update control signal 381 generated by the task management processor extension interface 380 from the external array update control signal 394, or in the main processor interface 310. If there is an array update request in the array update control unit control signal 314 that reflects the control register setting, the array update control unit 320 and the task ID table 360 are updated via the array update control signal 352. Requests shift processing of task status management entries and corresponding task IDs based on the request contents. Furthermore, in addition to outputting the external array update control signal 351 reflecting the requested shift processing content as the external array update control signal 392 via the task management processor expansion interface 370, the array update control unit control signal 315 executes the shift processing execution. The presence or absence is notified to the main processor interface 310.
  • the task ID table 360 stores a task ID corresponding to each task stored in the task state management array 330 according to the task ID table control bus 316 as a task pool configured by hardware,
  • the task ID corresponding to the priority determination signal 342 output by the priority determination unit 340 is output to the task ID table control bus 316.
  • a shift process of the corresponding task ID is performed.
  • the task ID table 360 uses a multi-bit storage element having a data shift function as one table entry so that data can be shifted in one direction between corresponding bit positions of adjacent table entries. Has multiple table entries.
  • the task ID table 360 has a one-to-one correspondence between the table entries and the storage element array entries.
  • the entry (data table entry) in the task ID table 360 is subjected to a data shift operation in synchronization with the data shift operation for the entry in the storage element array.
  • the task ID table 360 outputs the task ID held by the table entry corresponding to one entry identified by the priority determination unit 340.
  • Task management processor expansion interfaces 370 and 380 are task status inter-entry reentry status signals 341-0 to 341-0 based on comparison signals 331-0 to 331-255 output from each task status management entry of the task status management array. Control to transmit 341-255 to the same task status management entry of the adjacent task management processor, or not to transmit it if necessary.
  • external array update control signals 394 and 392 that control the shift operation of the task state management entry are also transmitted between adjacent task management processors, and the task update management unit 350 causes the task state management entry contents to be adjacent to each other. Control so that there is no conflict between processors.
  • the same task state management entries of each task state management array can be logically combined and operated as a single entry, so the size of the entries can be scaled. It is possible to change to Needless to say, the task management processor expansion interface 370, 380, task state management entry state signal 341—0 to 341—255, 371 -0 to 371 -255, 391- 0 to 391-255, 393— 0 to 393—255, and part or all of the external array update control signals 351, 381, 392, 394 can be deleted to reduce the hardware scale of the task management processor 300.
  • the task status management entry status signals 391-0 to 391-255 from the previous stage indicate that the comparison results in the previous stage do not match, they are positioned as signals that limit the validity of the comparison results by the corresponding entries in the task status management array 330. It is done.
  • FIG. 4 shows a specific example of the main processor interface 310.
  • the main processor interface 310 includes a control register access control unit 317, a control register 318, and a control register access bus 319.
  • the control register access control unit 317 responds to an access request from the internal bus 500, and uses the control register 318, the array access arbitration unit control bus 311 and the task state management array control bus 312 via the control register access bus 319. It controls access to the task ID table 360 via the task status management array 330 and the task ID table control bus 316 via the route. Furthermore, according to the contents of control register 318, task status management array search signal 313 and array update control unit control signal 314 are output, and according to the contents of array update control unit control signal 315 and priority determination signal 342 , Update the contents of control register 318.
  • the control register 318 is a search request field 318-1, which indicates the presence / absence of a search request for the task state management array 330, and a code string including a predetermined task state and execution priority as a search key for the task state management array 330 Or a search key field 318-2 for storing a predetermined code for searching for an empty entry position in the task state management array 330, a search result valid field 318-2 indicating the validity of the search result, and if the search result is valid Task ID field 318-4, entry position field 318-5 for storing the task ID corresponding to each, and the entry position in the task state management array 330, and the array update control unit 350 requesting task state management entry shift processing Task status update array update request field 318-6, contents of the shift process, eg Specify the displacement force of "ONE SHOT" (performs one shift per request) or "FULL” (performs a maximum (number of entries—1) shifts per request) Task state management array update mode field to be executed 3
  • FIG. 5 shows a specific example of the task state management array.
  • the task state management array 330 includes an entry access control unit 332, 256 task state management entries 333-0 to 333-255, an inter-entry shift data bus 334-1 to 334-255, and an entry access bus 335.
  • each task state management entry has an enable field 333-0-1 to 333-255-1 that indicates whether the contents of the entry are valid, of the task information stored in the entry.
  • Task status field indicating the task status 333— 0— 2 to 333 — 255— 2
  • the entry access control unit 332 relays access from the task state management array control bus 312 to each task state management entry 333-0 to 333-255.
  • Task state management entries 333-0 to 333-255 with entry numbers 0 to 255 respectively are read, write, and shift operations specified by task state management entry control signals 321-0 to 321-255.
  • the contents of the entry are output to the entry access bus 335 in response to a request such as, or the predetermined data on the entry access bus 335, some! / Perform operations such as writing the contents to the entry (shift one step downstream).
  • the search request and search key on the task state management array search signal 313 the contents of the entry are checked for consistency with the search key, and the result is output to the task state management entry comparison signal 331-0 to 331-255. To do.
  • FIG. 6 shows an example of the task state management entry.
  • Task state management entry 333—1 is (m
  • Task state management cell 800 0-800 m
  • task state management cell comparison bus 811 the sum of the bit widths of the enable field 333-1 1, task status field 333-1 2, and execution priority field 333-1-3 shown in FIG. 5 is m + 1.
  • the task state management entry control signal 32 1 1 is the entry shift antenna 321—1, the entry access antenna 321—1-2, the task state management entry state signal 371—1 (see Figure 3). ) Force Generated adjacent array Entry match signal 321-1-3.
  • Each of the task state management cells 800-0 to 800-111 operates as a memory circuit with 1-bit shift and comparison functions, and includes the following input / output terminals.
  • LS, ZLS Task state management array system expressed in positive logic and negative logic, respectively.
  • SK, ZSK Search key input to cells expressed in positive logic and negative logic, respectively, corresponding to the relevant bit in the search key field included in the task state management array search signal 313 and its inversion Connect.
  • CB Expressed in negative logic, is a comparison output from the cell indicating the comparison result of 1-bit data input to the terminal SK and held in the cell.
  • Task state management cell comparison signal 81 Connect to the signal corresponding to the bit of 0—0 to 810—m.
  • the task state management cell comparison bus 811 is connected to the task state management cell comparison signals 810-0 to 810-m output from the (m + 1) task state management cells 800-0 to 800-m. This is a bus that is configured to be able to execute AND operation in negative logic expression by Yard OR.
  • the task state management entry comparison unit 820 displays an entry match state when the task state management cell comparison bus 81 1 and the adjacent array entry match signal 321—1-3 indicate a match state.
  • the task state management entry comparison signal 331 Output to 1.
  • the task state management entry comparison unit 820 can be positioned as an AND circuit.
  • task state management entries 333-2 to 333-254 can also be applied by appropriately associating the symbols in FIG.
  • the task state management entries 333-0 and 333-255 are each except that the shift data output SO is not connected and an appropriate fixed value (not shown) is input to the shift data input SI.
  • the configuration shown in Fig. 6 is applicable.
  • FIG. 7 shows a first example of the task state management cell
  • FIG. 8 shows a second example of the task state management cell.
  • the function of each input / output terminal is the same as that of the corresponding input / output terminal in Fig. 6.
  • the terminal ⁇ in FIG. 7 is an operation clock signal of a data processing device not shown in FIGS.
  • FIG. 7 shows a first example of the task state management cell
  • FIG. 8 shows a second example of the task state management cell.
  • the function of each input / output terminal is the same as that of the corresponding input / output terminal in Fig. 6.
  • the terminal ⁇ in FIG. 7 is an operation clock signal of a data processing device not shown in FIGS.
  • the terminals () SE1 and 0 SE2 in FIG. 8 are signals indicating that the rising edge and the
  • the task management processor 300 when performing multitask control in the data processing device 100, the task management processor 300 detailed in FIG. 3 to FIG. 9 is used from the multitask control program operating on the main processor 200.
  • the main points are summarized below.
  • the task management processor 300 stores at least a task ID, a task state, and an execution priority in the task pool, and the contents are set by the main processor 200.
  • the task status is specified by one of "Waiting”, “Ready”, or “Running”
  • the execution priority is specified by one of 0 (highest) to 255 (lowest).
  • execution priority the same execution priority may be set for multiple tasks.
  • the task status management entry 333—0 to 333—255 priority corresponds to the FIF O exit, and the oldest 333-0 in the time sequence is the highest and 333-255 is the lowest.
  • the entry priority is different for each entry, and is different from the execution priority. V, the priority is never duplicated! /.
  • Task completion The task status management entry that stores the task ID, task status, and execution priority of the task is invalidated.
  • Task interruption due to a predetermined switching factor such as an interrupt The task status of the corresponding task is updated from "Running" to "Ready".
  • FIG. 10 and FIG. 11 show a task control flow by the task management program operating on the main processor 200.
  • step F110 as the initialization of the task management processor 300, all task state management entries are invalidated and initial values are written to the control registers. However, a value 0 indicating entry 0 (333-0) is written in the empty entry pointer field 318-8.
  • the task management program monitors the state of the task management processor 300 (step F120), and waits until the state of the task management processor 300 becomes a non-busy state.
  • the task management processor 300 enters a non-busy state, the necessary processing is performed depending on whether a task addition or switching request is issued.
  • the task addition request is accepted (step F130)
  • a task ID and execution priority are assigned to the task
  • the task status management entry indicated by the empty entry pointer field 318-8 and the corresponding entry in the task ID table are assigned.
  • the contents are updated (step F131) and the contents of the empty entry pointer field 318-8 are incremented (step F132).
  • step F140 When a task switching request is received (step F140), the processing contents differ depending on the factor (step F150). First, if the request is due to task completion, the enable field of the task state management entry storing the completed task information is invalidated (step F151), and the empty entry pointer field 318-8 is decremented (Step F152) and array alignment processing (Step F153) for eliminating the misalignment inside the FIFO caused by the invalidation are sequentially executed. If the request is a predetermined task interruption request that is not a task completion, the task status in the task information corresponding to the task being executed is updated from “Running” to “Ready” (step F154).
  • the task state management array update request field 318-6 and the task state management array update mode field 318-7 are assigned an array by writing to the control register. Alignment request (step F210) and wait until array alignment processing is completed (step F220). The operation of the task management processor in response to the array alignment request will be described later with reference to FIGS.
  • step F155 When the task completion or suspension processing is completed, a task to be executed next is searched (step F155), and when one executable task is selected (step F160), The task status is updated from “Ready” to “Running” (step F161), and the task is notified of execution permission.
  • next task search (step F155) is as illustrated in FIG.
  • the search key field 318-2 a search key indicating a candidate for a task to be executed next, for example, the enable field is “valid”, the task status field is “Ready”, and the execution priority field is set.
  • Sets “0 (highest priority)” (step F310), and requests a search in the task state management array 330 by writing to the search request field 318-1 (step F320).
  • step F330 If the contents of the search result valid field 318—3 indicate that the search result is valid and valid next task information matching the search key is found (step F330), the task ID field 318—4 and the entry position field 318—5 Is received as the task ID and entry number corresponding to the task to be executed next (step F331). If no valid next task is found, the execution priority in the search key is sequentially incremented to 255 (lowest priority) and the search request is repeated (steps F340 and F341).
  • the task management processor 300 responding to the search request (step F320) in the task state management array 330 performs a search according to the search key and receives the comparison result 340 receives the entry priority of the comparison result.
  • the highest entry will be identified and given to task ID table 360.
  • the task management processor 300 can easily guarantee the time order of entries uniquely, the required task ID is identified by adding the priority according to the time order to the search results by the CAM. be able to. As a result, priority control of task selection in consideration of the time order can be performed quickly and easily.
  • the execution priority increment and the re-search request are not limited to the method in which the main browser processor processes all execution priorities as described above, but the execution priority within a predetermined range.
  • the search target and the processing of the main processor 200 are selected by adopting a method that automatically performs re-search in the task management processor 300 regardless of the main processor 200. It is also possible to reduce the load, realize flexible, real-time performance, and multitask control.
  • Array alignment means that when a task that is being executed is completed and the task information is deleted from the task state management entry in the task state management array that constitutes the FIFO, the valid entry is not found by shifting the adjacent entry. This process eliminates continuity. This makes it easy to guarantee the time order within the task state management array, and multitasking control is simplified by determining the next entry to which a task should be added because there are consecutive valid entries. As a result, the processing time for task switching can be reduced.
  • a search key including the contents of the search key field 318-2 is normally output as a task state management array search signal 313 (step F410), and the operation state of the task management processor is set to "non-display". Set to "Busy" state (step F411).
  • the search processing is executed, and the search result valid field 318-3, task ID field 318-4, entry position is executed according to the result.
  • Update the contents of field 318-5 step F340).
  • the array update control unit 350 updates the processor operating state to the “busy” state (step F421), and updates control.
  • a signal corresponding to the content of the signal is output to the array update control signal 35 2.
  • the array access arbitration unit 320 requests a shift operation to the task state management array 330 via the entry shift enable for the task state management entry to be shifted, and the shift process is executed. (Step F422).
  • the contents of the task ID table 360 are also updated consistent with the contents of the task state management array 330 in response to the array update control signal 352.
  • step F423 The content of the above shift operation is notified to the adjacent processor by the external array update control signal 351 (step F423).
  • the shift operation is executed without any contradiction among all the task management processors connected.
  • the processor operation state is updated to a “non-busy” state, and monitoring is performed for subsequent processing requests.
  • the main processor issues an array alignment request.
  • the array alignment request from the main processor is received via the task state management array update request field 318-6 (step F430)
  • the array update processing (step F431) described in detail below is executed.
  • a special search key whose enable field is "invalid” and whose task status field and execution priority field are both "comparison mask”.
  • the operation state of the task management processor 300 is updated to the “busy” state, and then the contents of the shift counter CNT in the array update control unit 350 are updated.
  • step F512 It is initialized to 0 (step F512), and the empty entry with the highest priority, that is, the entry number with the smallest entry number is searched for (empty entry) (step F513). Shift all task state management entries with the entry number (step F521), and transfer the contents of the shift operation to the adjacent processor.
  • Step F522 If “FULL” is specified in the task status management array update mode field 318-7 (step F530), the shift counter CNT is incremented (step F531), and the shift counter Repeat the search for empty entries until the CNT contents are 254, that is, (the number of entries in the task status management entry-1) (step F540) No empty entries exist, or shift 254 times in "FULL" mode
  • the operation state of the task management processor 300 is updated to the “non-busy” state (step F541), and the search key included in the task state management array search signal 313 is reset as the original search key. (Step F542) makes it possible to accept subsequent processing requests.
  • the task management program completes or suspends only one task at a time. As long as the rules regarding the order of use of task state management entries are observed, the task state can be changed by one entry shift operation. The misaligned state of the management array is resolved. Data processing device that avoids problems that may be included in the task management program In order to improve reliability, you should perform "FULL" shift regularly! /.
  • the main processor 200 and the task management processor 330 are not necessarily limited to being mounted on the same chip.
  • Array 330 and table 360 may be configured in the same or different arrays.
  • the present invention is not limited to the case where it is applied to task control, but can be widely applied to other data management that must be managed in consideration of real-time characteristics.

Abstract

 データシフト機能及びデータ比較機能を備える複数ビットの記憶素子を1エントリとし、隣接エントリの対応するビット位置間でデータシフトが可能となるよう複数エントリを有する記憶素子アレイ(330)を有する。更に、複数エントリに共通に入力されるデータと該エントリを構成する記憶素子に保持される内容との比較結果に基づき、所定の優先度により複数エントリのうちの1エントリを識別する優先度判定回路(340)を有する。途中のエントリの保持データが無効になったときエントリ間でのデータシフトによって無効データのエントリが途中に存在しないようにでき、有効なデータを詰めて順次エントリに保持させることが可能になり、データが保持された時間順序をエントリの並びに一致させることが容易になる。エントリの時間順序が一意に保証されるから、CAMによる検索結果に対して時間順序に従った優先度も加味して所要のデータを識別することができる。

Description

明 細 書
データ処理装置
技術分野
[0001] 本発明はデータ処理装置に関し、特に複数のタスクを同時に実行可能なマルチタ スク型データ処理装置における、タスク状態の管理方式、および実行開始可能なタス クの高速検索回路の実現に関する。
背景技術
[0002] 近年、画像 ·音声などのマルチメディア処理機能や、有線および無線通信機能を内 蔵したディジタル多用途ディスク (DVD)レコーダ等のデータ処理装置が広く一般的 に利用されるようになってきている。これらの機器においては、コーデック処理、無線 プロトコル処理、ユーザインタフェース処理などの複数のタスクを同時かつリアルタイ ムに高速処理可能であることがその機器のユーザピリティや価値そのものに直結する
[0003] このような機器におけるマルチタスク制御は、一般に機器を制御する組み込みプロ セッサに代表されるデータ処理装置上で所定のソフトウエアを実行することにより実現 される。通常このソフトウェア(以下、タスク管理プログラム)はオペレーティングシステ ムの一部であり、実行タスクの切り替えタイミングを示す割り込みなどの所定の切り替 え要因に呼応し、あら力じめ定義されたスケジューリングポリシーにしたカ^、、次に実 行すべきタスクを選択する機能を備える。本来のデータ処理との対比においては処 理オーバヘッドとなるマルチタスク制御には、とりわけ組み込みプロセッサのようにリア ルタイム性、すなわち特定のタスクを起動する要因となるイベント入力に対するタスク 実行開始までの応答時間の保証が必要となる。このため、データ処理装置の単純な 高性能化だけではなく、タスク管理プログラムを効率的に実行する新たなマルチタス ク制御の実装方式が求められて 、る。
[0004] マルチタスク制御を実現するタスク管理プログラムの処理にっ 、て記載された文献 の例として特許文献 1、 2がある。特許文献 1には、アウトォブオーダ実行をサポート するマルチスレッドプロセッサのリザべーシヨンステーション (命令バッファ)にお 、て、 命令毎に付加されたスレッド番号と優先度を利用して命令実行の追い越を可能にす る技術が記載される。特許文献 2には、マルチストリームを処理するプロセッサにおい て、ストリーム毎のプライオリティに応じて計算リソースへのアクセスを制御することが 記載され、プライオリティはオフチップ入力、ソフトウェア、又はハードウェアにより動的 に変更可能とする技術が記載される。
[0005] 特許文献 1:特開 2004— 295195号公報
特許文献 2:特表 2002— 532801号公報
発明の開示
発明が解決しょうとする課題
[0006] 本願発明者は、マルチタスク制御を実現するタスク管理プログラムの処理内容を検 討し、実行効率向上の観点力も以下の解決すべき課題を見出した。
[0007] 前記の通り、タスク管理プログラムの備える機能の核となるのは、次に実行すべきタ スクを実行開始可能な状態にあるタスク群から一つ選択する処理である。この選択処 理は、スケジューリングポリシーに基づいた全てのタスクに対する一連の条件比較' 判定処理を含む検索動作であり、本質的には並列実行可能である。これに対し、本 処理を一般的なマイクロプロセッサ上で実行する実装方式では、タスク群に対し検索 動作を逐次実行する必要があるため、タスク数の増加により処理速度が低下するだ けでなく、タスク管理プログラムの処理時間の最悪値に基づくリアルタイム性を保証す ることが困難になる。本発明者は、生成されてプールされたタスクを実行するときの優 先制御にお 、て、実行条件が整ったタスクに対してリアルタイム性を考慮するときタス ク生成の時間順序を保証することの重要性を見出した。
[0008] 本発明の一つの目的は、データを選択するための条件比較判定処理の高速ィ匕と 選択されるデータの時間順序を保証することができるデータ処理装置を提供すること にある。
[0009] 本発明の別の目的は、高効率でリアルタイム性の高 、マルチタスク制御を実現可 能なデータ処理装置を提供することにある。
[0010] 本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面 力 明らかになるであろう。 課題を解決するための手段
[0011] 本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記 の通りである。
[0012] 〔1〕本発明に係るデータ処理装置(100)は、データシフト機能及びデータ比較機 能を備える複数ビットの記憶素子(800— 0〜800—m)を 1エントリとし、隣接エントリ の対応するビット位置間でデータシフトが可能となるよう複数エントリ(333— 0〜333 — 255)を有する記憶素子アレイ(330)を有する。更に、前記複数エントリに共通に 入力されるデータと該エントリを構成する記憶素子に保持される内容との比較結果に 基づき、所定の優先度により複数エントリのうちの 1エントリを識別する優先度判定回 路(340)を有する。
[0013] 上記手段によれば、各エントリは記憶素子単位でデータシフト機能及びデータ比較 機能を備えるから、 CAM (Content Addressable Memory)としての連想記憶機能によ り並列比較が可能である。さらに、途中のエントリの保持データが無効になったときェ ントリ間でのデータシフトによって無効データのエントリが途中に存在しないようにでき 、有効なデータを詰めて順次エントリに保持させることが可能になる。従って、新たに 追加されるデータをシフト方向最後尾の空きエントリに保持させることにより、エントリ の並びに従ってその保持データが追加された時間順序を一意に保証することを容易 に実現することができる。エントリの時間順序を一意に保証することが容易であるから 、 CAMによる検索結果に対して時間順序に従った優先度も加味して所要のデータ を識別することができる。
[0014] 本発明の一つの具体的な形態として、前記所定の優先度は、有意のデータを保持 するエントリ中にお ヽてデータ保持が行なわれた順番の早遅に関する順位とされる。 これにより、エントリを識別するために時間順序を考慮した優先制御を容易に実現す ることがでさる。
[0015] 〔2〕本発明に係るデータ処理装置(100)は、データシフト機能及びデータ比較機 能を備える複数ビットの記憶素子(800— 0〜800—m)を 1エントリとし、隣接エントリ の対応するビット位置間で一方向にデータシフトが可能となるよう複数エントリ(333 —0〜333— 255)を有する記憶素子アレイ(300)を有する。更に、前記エントリに新 たなデータを保持させる操作指令に応答するとき、前記エントリに対する新たなデー タ保持の時間的順序をエントリのデータシフト方向の配列とは逆方向に制御すると共 に、エントリの保持データを無効化する操作指令に応答するとき、無効化されたェント リよりも時間的順序の上流側エントリのデータを無効化エントリ数分だけ下流側にデ ータシフトさせる制御回路(310、 320、 350)を有する。更に、前記複数エントリに共 通に入力される検索データと該エントリを構成する記憶素子に保持される被検索デ ータとの比較結果に基づき、所定の優先度により複数エントリのうちの 1エントリを識 別する優先度判定回路 (340)を備える。このとき、前記所定の優先度を、前記時間 的順序における所定順位とする。
[0016] 上記手段によれば、各エントリは記憶素子単位でデータシフト機能及びデータ比較 機能を備えるから、その連想記憶機能により並列比較が可能である。そして、途中の エントリの保持データが無効になったときエントリ間でのデータシフトによって無効デ ータのエントリが途中に存在しな 、ようにでき、有効なデータを詰めて順次エントリに 保持させることが可能になるから、新たに追加されるデータをシフト方向最後尾の空 きエントリに保持させることにより、エントリの並びに従ってその保持データが追加され た時間順序を一意に保証することができる。エントリの時間順序を一意に保証するこ とが容易であるから、 CAMによる検索結果に対して時間順序に従った優先度も加味 して所要のデータを識別することができる。それらにより、エントリを識別するために時 間順序を考慮した優先制御を高速に且つ容易に行うことができる。
[0017] 本発明の別の具体的な形態として、新たなデータ保持を可能とするエントリの位置 を示す空きエントリ位置ポインタ(318— 8)を有する。データを保持させるエントリの追 カロとエントリが保持するデータのシフト動作に応じて当該ポインタに対するインクリメン トとデクリメントを行なえばょ 、。
[0018] 本発明の更に別の具体的な形態として、データシフト機能を備える複数ビットの記 憶素子を 1テーブルエントリとし、隣接テーブルエントリの対応するビット位置間で一 方向にデータシフトが可能となるよう複数テーブルエントリを備えていて、前記テープ ルエントリが前記記憶素子アレイのエントリに一対一対応されて 、るデータテーブル ( 360)を有する。前記データテーブルエントリは前記記憶素子アレイのエントリに対す るデータシフト動作に同期したデータシフト動作される。前記データテーブルは前記 優先度判定回路で識別された 1エントリに対応するテーブルエントリが保有するデー タを出力する。出力されたデータが連想検索によって得られた結果となる。
[0019] 本発明の更に別の具体的な形態として、前記記憶素子アレイにおける被検索デー タとの比較結果を出力可能な拡張出力インタフェース(380)と、前記記憶素子アレイ における比較結果と論理積が採られる上位側比較結果を入力可能な拡張入力イン タフエース(370)とを有する。記憶素子アレイを並列させて連想記憶の規模を大きく する拡張が可能になる。
[0020] 〔3〕本発明に係るデータ処理装置(100)は、マルチタスク制御プログラムを実行可 能なプロセッサユニット (200)と、マルチタスク制御プログラムにより実行すべきタスク が割り当てられる複数の演算ユニット (400— l〜400—n)と、演算ユニットが実行す べきタスクの選択処理を行なうタスク管理ユニット(300)とを有する。前記タスク管理 ユニットは、記憶素子アレイ(330)と、制御回路(310, 320, 350)と、優先度判定回 路(340)とを有する。前記記憶素子アレイは、データシフト機能及びデータ比較機能 を備える複数ビットの記憶素子を 1エントリとし、隣接エントリの対応するビット位置間 で一方向にデータシフトが可能となるよう複数エントリを有する。前記制御回路は、前 記エントリに新たなタスク管理情報を保持させる前記プロセッサユニットからの操作指 令に応答するとき、前記エントリに対する新たなタスク管理情報保持の時間的順序を エントリのデータシフト方向の配列とは逆方向に制御すると共に、エントリの保持デー タを無効化する前記プロセッサユニットからの操作指令に応答するとき、無効化され たエントリよりも時間的順序の上流側エントリのデータを無効化エントリ数分だけ下流 側にデータシフトさせる。前記優先度判定回路は、前記複数エントリに共通に入力さ れる検索データと該エントリを構成する記憶素子に保持される被検索データとの比較 結果に基づき、所定の優先度により複数エントリのうちの 1エントリを識別する。前記 所定の優先度を、前記時間的順序における所定順位とする。データ処理装置は例え ば 1個の半導体基板に形成される。
[0021] 上記手段によれば、各エントリは記憶素子単位でデータシフト機能及びデータ比較 機能を備えるから、その連想記憶機能によりタスク管理情報に対する並列比較が可 能である。そして、途中のエントリのタスク管理情報が無効になったとき (対応タスクが 実行完了されたとき)エントリ間でのデータシフトによって無効なタスク管理情報のェ ントリが途中に存在しな 、ようにでき、有効なタスク管理情報を詰めて順次エントリに 保持させることが可能になるから、新たに追加されるタスク管理情報をシフト方向最後 尾の空きエントリに保持させることにより、エントリの並びに従ってタスク管理情報が追 カロされた時間順序を一意に保証することができる。エントリの時間順序を一意に保証 することが容易であるから、 CAMによる検索結果に対して時間順序に従った優先度 も加味して所要のデータを識別することができる。それらにより、時間順序を考慮した タスク選択の優先制御を高速に且つ容易に行うことができる。
[0022] 本発明の一つの具体的な形態として、前記タスク管理ユニットは、優先度判定回路 で識別されたエントリが保持するタスク管理情報に含まれるタスク IDを前記プロセッサ ユニットに出力する。プロセッサユニットはそのタスク IDで特定されるタスクを空いてい る演算ユニットに処理させる。
[0023] 本発明の更に具体的な形態として、前記タスク管理ユニットは、データシフト機能を 備える複数ビットの記憶素子を 1テーブルエントリとし、隣接テーブルエントリの対応 するビット位置間で一方向にデータシフトが可能となるよう複数テーブルエントリを備 えていて、前記テーブルエントリが前記記憶素子アレイのエントリに一対一対応され て 、るデータテーブルを有する。前記データテーブルエントリは前記記憶素子アレイ のエントリに対するデータシフト動作に同期したデータシフト動作される。前記データ テーブルは前記優先度判定回路で識別された 1エントリに対応するテーブルエントリ 力も前記タスク IDを出力する。
発明の効果
[0024] 本願において開示される発明のうち代表的なものによって得られる効果を簡単に説 明すれば下記の通りである。
[0025] すなわち、本発明に係るデータ処理装置によれば、データを選択するための条件 比較判定処理の高速化と選択されるデータの時間順序を保証することができ、例え ば、高効率でリアルタイム性の高 、マルチタスク制御を実現可能である。
図面の簡単な説明 [0026] [図 1]本発明によるデータ処理装置の一例を全体的に示すブロック図である。
[図 2]マルチタスク制御用タスクプールの一例を示すフォーマット図である。
[図 3]タスク管理プロセッサの一例を示すブロック図である。
[図 4]主プロセッサインタフェースの一例を示すブロック図である。
[図 5]タスク状態管理アレイの一例を示すブロック図である。
[図 6]タスク状態管理エントリの一例を示すブロック図である。
[図 7]タスク状態管理セルの第 1の例を示すブロック図である。
[図 8]タスク状態管理セルの第 2の例を示すブロック図である。
[図 9]図 8の端子 () SE1、 () SE2の波形図である。
[図 10]主プロセッサにおけるタスク制御フローの前半を示すフローチャートである。
[図 11]主プロセッサにおけるタスク制御フローの後半を示すフローチャートである。
[図 12]図 11に示されるエントリ間シフトによるアレイ整列処理の具体例を示すフロー チャートである。
[図 13]図 11に示される次タスク検索処理の具体例を示すフローチャートである。
[図 14]タスク管理プロセッサにおけるアレイ整列制御フローを示すフローチャートであ る。
[図 15]図 14に示されるアレイ更新処理の具体例を示すフローチャートである。
符号の説明
[0027] 100 データ処理装置
200 主プロセッサ(プロセッサユニット)
300 タスク管理プロセッサ(タスク管理ユニット)
400— 1〜400— n 演算ユニット
500 内部バス
510 演算ユニット制御バス
600 周辺モジユーノレ
700 主メモリインタフェース
710 主メモリ
TID— 0〜TID— k タスク ID ST—0〜ST—k タスク状態
PRI— 0〜PRI— k 実行優先度
FLG— 0〜FLG— k 実行フラグ
310 主プロセッサインタフェース
320 アレイアクセス調停ユニット
330 タスク状態管理アレイ
340 優先度判定ユニット (優先度判定回路)
350 アレイ更新制御ユニット
360 タスク IDテーブル(データテーブル)
370, 380 タスク管理プロセッサ拡張インタフェース
318 制御レジスタ
318-8 空きエントリポインタフィールド
330 タスク状態管理アレイ
332 エントリアクセス制御ユニット
333―。〜 333— 255 タスク状態管理エントリ
800— 0〜800— m タスク状態管理セル
発明を実施するための最良の形態
[0028] 以下、本発明に係るデータ処理装置の好適な一実施の形態について、添付図面 を参照しながら説明する。特に制限されないが、以下に説明するデータ処理装置を 構成する回路素子は、公知の CMOSトランジスタやバイポーラトランジスタ等の半導 体集積回路技術によって、単結晶シリコンのような 1個の半導体基板上に形成される
[0029] 図 1に、本発明によるデータ処理装置の一例が示す。データ処理装置 100は、主 プロセッサ(プロセッサユニット) 200、タスク管理プロセッサ(タスク管理ユニット) 300 、 n個の演算ユニット 400— 1〜400— n、 n個のローカルメモリ 410— 1〜410— n、 n 本のローカルメモリバス 420—l〜420—n、内部バス 500、演算ユニット制御バス 51 0、周辺モジュール 600、主メモリインタフェース 700、主メモリ 710、主メモリバス 720 により構成される。 [0030] 主プロセッサ 200は、一般的なマイクロプロセッサと同様の固有の命令セットを備え 、主メモリ 710に格納されたマルチタスク制御プログラムを含む各種制御プログラム( 図示せず)に従いデータ処理装置の動作を制御する。
[0031] タスク管理プロセッサ 300は、主プロセッサ 200上で動作するマルチタスク制御プロ グラムと協調し、各タスクの状態を保持するとともに、タスク切り替え時に次に実行す べきタスクの選択処理を高速かつ一定時間で実行することにより、マルチタスク制御 を効率化する。
[0032] 演算ユニット 400— l〜400—nは、演算ユニット制御バス 510を介して、主プロセッ サ 200上で動作するマルチタスク制御プログラムが当該演算ユニットに対し実行タス クを割り当てたことを示す所定のタスク実行開始要求信号を受信すると、ローカルメモ リ 410— 1〜410— nに格納された演算データをローカルメモリバス 420— 1〜420— nを経由して読み込み、所定の処理を実行し、演算結果を再びローカルメモリ 410— 1〜410— nに格納する一連の動作により、割り当てられたタスクを実行する。タスク の実行が完了すると、演算ユニット制御バス 510を経由し、主プロセッサ 200に対す る所定のタスク実行完了通知を送信する。
[0033] 内部バス 500は、主プロセッサ 200、タスク管理プロセッサ 300、演算ユニット 400
1〜400— n、ローカルメモリ 410— l〜410—n、周辺モジュール 600、主メモリイ ンタフェース 700を相互に接続し、データ転送を制御する。
[0034] 周辺モジュール 600は、主メモリ 710とローカルメモリ 410— l〜410—nとの間の データ転送を行う DMA転送機能や、タスク切り替えの基準時間とするタイマ機能、 図示しな!ヽ入出力装置の制御等の各種機能を備える。
[0035] 主メモリインタフェース 700は、主メモリインタフェース 720を介して主メモリ 710への アクセスを制御する。なお、主メモリ 710はデータ処理装置 100と同一チップであって も別々のチップであっても構わな!/、。
[0036] 以下、データ処理装置 100におけるマルチタスク制御の概要について述べる。図 2 に、各タスクの状態を管理するマルチタスク制御用タスクプールの一例を示す。各タ スク TASK0〜TASKkの状態はタスク管理情報によって表される。図 2にお!/、てタス ク管理情報は、例えば、タスク ID (TID— 0〜TID— k)、タスク状態(ST— 0〜ST— k )、実行優先度 1¾ 0〜1¾1 1 、ぉょび実行フラグ 1^ 0〜 1^ 1 を含 む。データ処理装置 100におけるタスク管理情報はタスク管理プロセッサ 300の内部 に格納される。
[0037] タスク IDは、各タスクを識別するため一意に割り当てられた符号である。タスク状態 は、当該タスクが、(1)実行可能となる条件がすべて成立するのを待っている状態( Waiting)、 (2)実行可能となる条件がすべて成立し実行開始許可を待って ヽる状態 (Ready)、または(3)タスクを実行中であり実行完了を待って ヽる状態 (Running)の いずれであるかを示す状態符号である。実行優先度は、当該タスク実行の緊急性を 示す符号である。実行フラグは、特定 IDをもつタスクの実行完了や初期データの準 備完了など、当該タスクの実行開始に必要な条件群の成立状態を示す。
[0038] マルチタスク制御を実現するタスク管理プログラムは以下のように動作する。
[0039] (1)新たにタスクを開始する場合、タスク IDおよび実行優先度を割り当てタスクブー ルに追加するとともに、当該タスクに対するタスク状態を" Waiting"に初期化し、すべ ての実行フラグをクリアする。
[0040] (2)実行中のタスクが完了した、あるいは実行中のタスクの実行時間が所定の時間 を超過したなど、タスク切り替えの必要なイベントが発生した場合、当該タスクを停止 させタスクプールから削除する、またはタスク状態を" Running"から" Ready"に更新 する。さらに、当該タスクの完了が他タスクの実行開始条件に指定されている場合に は、実行フラグを適切に更新するとともに、実行フラグが全て成立したタスクのタスク 状態を" Waiting"から" Ready"に更新する。
[0041] (3)タスク切り替え時、タスク状態が" Ready"であるタスク群から、例えば最も実行 優先度が高くかつ最も古くタスクプールに追加されたものなど所定のスケジューリング ポリシーに基づき、次に実行すべきタスクを 1つ選択する。さらに、選択したタスクに 対し実行開始許可を通知するとともに、タスク状態を" Ready"から" Running"に更 新する。
[0042] これらの動作のうち、本発明が主眼とするリアルタイム性が求められるデータ処理装 置においては、(3)のタスク切り替え時間が十分小さぐかつその最悪値が保証され ていることが最も重要である。タスクプールをオフチップのメモリ 71又は周辺回路 600 に含まれる図示を省略するオンチップメモリに格納し、タスク管理制御の全てを主プ 口セッサ 200のソフトウェアによって実装する場合には、タスク選択に必要なタスクプ ール内の検索に際しアクセス時間の大き 、主メモリ等へのアクセス発生すること、タス クプールに保持されたタスク数に応じて検索時間が増大することにより、リアルタイム 性を確保することが困難になる。これに対し、タスク管理プロセッサ 300は、タスク数 によらな 、並列検索動作に加え、時間順序を保証とすることにより効率的なマルチタ スク制御を可能とする回路であり、以下それによるタスク管理制御の詳細について説 明する。
[0043] 図 3に、タスク管理プロセッサ 300の一例を示す。タスク管理プロセッサ 300は、主 プロセッサインタフェース 310、アレイアクセス調停ユニット 320、タスク状態管理ァレ ィ 330、優先度判定ユニット (優先度判定回路) 340、アレイ更新制御ユニット 350、 タスク IDテーブル(データテーブル) 360、及びタスク管理プロセッサ拡張インタフエ ース 370、 380を備える。主プロセッサインタフェース 310、アレイアクセス調停ュ-ッ ト 320、及びアレイ更新制御ユニット 350は主プロセッサ 200からの動作指令に応答 して前記記憶素子アレイを用いたタスク管理制御を行う制御回路を構成する。 311は アレイアクセス調停ユニット制御ノ ス、 312はタスク状態管理アレイ制御バス、 313は タスク状態管理アレイ検索信号である。 314、 315はアレイ更新制御ユニット制御信 号、 316はタスク IDテーブル制御バスである。 321— 0〜321— 255はタスク状態管 理エントリ制御信号、 331— 0〜331— 255はタスク状態管理エントリ比較信号である 。 341— 0〜341— 255、 371— 0〜371— 255、 391— 0〜391— 255、 393— 0〜 393— 255はタスク状態管理エントリ状態信号、 342は優先度判定信号である、 351 、 381、 392、 394は外部アレイ更新制御信号、 352はアレイ更新制御信号 352であ る。
[0044] 主プロセッサインタフェース 310は、タスク管理プロセッサ 300の動作を定義する制 御レジスタ群を内包し、内部バス 500およびタスク管理プロセッサ内ユニットとの間の 制御レジスタアクセスを制御する。
[0045] タスク状態管理アレイ 330は、 256個のタスク状態管理エントリを有し、ハードウェア により構成されるタスクプールとして、タスク状態管理アレイ制御ノ ス 312を介して少 なくとも各タスクのタスク状態および実行優先度を格納するとともに、タスク状態管理 アレイ検索信号 313の内容に応じてタスク状態管理エントリ比較信号 331— 0〜331 — 255を出力する。各タスク状態管理エントリはデータシフト機能とデータ比較機能と を備える複数ビットの記憶素子力 成り、 CAMとしての機能を備える。詳細は後述す るが、各タスク状態管理エントリは更に、隣接するタスク状態管理エントリの対応する ビット位置間でデータシフトが可能とされる。
[0046] アレイアクセス調停ユニット 320は、主プロセッサインタフェース 310からのアレイァ クセス調停ユニット制御バス 311、およびアレイ更新制御ユニット 350からのアレイ更 新制御信号 352を調停したアクセス制御信号に、上流側(図の左側)に隣接するタス ク管理プロセッサ(図示せず)により出力されるタスク状態管理エントリ状態信号 391 0〜391— 255に基づいてタスク管理プロセッサ拡張インタフェース 370により生 成されるタスク状態管理エントリ状態信号 371—0〜371— 255を付加することで、タ スク状態管理エントリ制御信号 321— 0〜321— 255を出力する。要するに、アレイァ クセス調停ユニット 320は、タスク状態管理アレイ 330の各タスク状態管理エントリに 対するリード'ライトアクセスの制御を行う。その指示は主プロセッサインタフェース 31 0、タスク管理プロセッサ拡張インタフェース 370、アレイ更新制御ユニット 350から与 えられる。特に、アレイアクセス調停ユニット 320はアレイ更新制御ユニット 350からの エントリ更新指示に応答するときはタスク状態管理エントリ間のシフト動作のためのリ ード 'ライト動作を制御する。
[0047] 優先度判定ユニット 340は、前記のタスク状態管理エントリ比較信号 331— 0〜33 1— 255のうち一致状態を示す比較信号から、例えばエントリ 0 (333— 0)を最高優 先度、エントリ 255 (333— 255)を最低優先度とするなど、指定された所定の優先度 に従い 1つのエントリを選択し、選択されたエントリを識別する優先度判定信号 342を 出力する。さらに、優先度判定ユニット 340は、タスク管理プロセッサ拡張インタフエ ース 380が生成し、下流側(図の右側)に隣接するタスク管理プロセッサ(図示せず) に対して出力されるタスク状態管理エントリ状態信号 393— 0〜393— 255の元とな るタスク状態管理エントリ状態信号 341— 0〜341— 255を出力する。タスク管理プロ セッサ拡張インタフェース 380は、下流側(図の右側)に隣接するタスク管理プロセッ サ(図示せず)に対して、優先度判定ユニット 340による判定結果を出力することがで きる。
[0048] アレイ更新制御ユニット 350は、外部アレイ更新制御信号 394からタスク管理プロセ ッサ拡張インタフェース 380により生成される外部アレイ更新制御信号 381にアレイ 更新要求がある場合、もしくは主プロセッサインタフェース 310内の制御レジスタの設 定を反映するアレイ更新制御ユニット制御信号 314にアレイ更新要求がある場合、ァ レイ更新制御信号 352を経由し、アレイアクセス調停ユニット 320およびタスク IDテー ブル 360に対し、前記アレイ更新要求内容に基づくタスク状態管理エントリおよび対 応するタスク IDのシフト処理を要求する。さらに、要求したシフト処理内容を反映する 外部アレイ更新制御信号 351をタスク管理プロセッサ拡張インタフェース 370を介し て外部アレイ更新制御信号 392として出力するほか、アレイ更新制御ユニット制御信 号 315によりシフト処理実行の有無を主プロセッサインタフェース 310に通知する。
[0049] タスク IDテーブル 360は、ハードウェアにより構成されるタスクプールとして、タスク I Dテーブル制御バス 316に従 、、タスク状態管理アレイ 330に格納された各タスクに 対応するタスク IDを格納するとともに、優先度判定ユニット 340が出力する優先度判 定信号 342に対応するタスク IDをタスク IDテーブル制御バス 316に対し出力する。 また、タスク IDテーブル 360は、アレイ更新制御信号 352によりエントリ間シフト処理 が要求された場合、対応するタスク IDのシフト処理が行なわれる。即ち、図示は省略 するが、タスク IDテーブル 360は、データシフト機能を備える複数ビットの記憶素子を 1テーブルエントリとし、隣接テーブルエントリの対応するビット位置間で一方向にデ ータシフトが可能となるよう複数テーブルエントリを備えている。タスク状態管理アレイ 330のエントリとはビット数と比較機能を備えていない点が相違される。 CAM機能を 備えていてもよぐその場合には CAM機能を用いなければ良い。タスク IDテーブル 360は、前記テーブルエントリが前記記憶素子アレイのエントリに一対一対応されて いる。前記タスク IDテーブル 360のエントリ(データテーブルエントリ)は前記記憶素 子アレイのエントリに対するデータシフト動作に同期したデータシフト動作される。前 記タスク IDテーブル 360は前記優先度判定ユニット 340で識別された 1エントリに対 応するテーブルエントリが保有するタスク IDを出力する。 [0050] タスク管理プロセッサ拡張インタフェース 370、 380は、タスク状態管理アレイの各タ スク状態管理エントリから出力される比較信号 331—0〜331— 255に基づくタスク 状態間リエントリ状態信号 341—0〜341— 255を隣接するタスク管理プロセッサの 同一タスク状態管理エントリへと伝達するよう、もしくは必要により伝達しないよう制御 する。さらに、タスク状態管理エントリのシフト動作を制御する外部アレイ更新制御信 号 394、 392についても隣接するタスク管理プロセッサ間で伝達し、アレイ更新制御 ユニット 350によりタスク状態管理エントリの内容が隣接するタスク管理プロセッサ間 で矛盾しないよう制御する。これにより、タスク管理プロセッサ 300を複数連結した場 合に、各タスク状態管理アレイの同一タスク状態管理エントリを論理的に結合し、単 一のエントリとして動作させることができるため、エントリのサイズをスケーラブルに変 更することが可能となる。言うまでもなぐタスク管理プロセッサの連結機能が不要の 場合には、タスク管理プロセッサ拡張インタフェース 370、 380、タスク状態管理ェン トリ状態信号 341— 0〜341— 255、 371 -0~371 - 255, 391 -0~391 - 255, 393— 0〜393— 255、外部アレイ更新制御信号 351、 381、 392、 394の一部また は全部を削除することによりタスク管理プロセッサ 300のハードウェア規模を削減でき る。前段からの前記タスク状態管理エントリ状態信号 391— 0〜391—255が前段に おける比較結果不一致を示すときは、タスク状態管理アレイ 330における対応ェント リによる比較結果の有効性を制限する信号として位置付けられる。
[0051] 図 4に、主プロセッサインタフェース 310の具体例を示す。主プロセッサインタフエ一 ス 310は、制御レジスタアクセス制御ユニット 317、制御レジスタ 318、制御レジスタァ クセスバス 319により構成される。
[0052] 制御レジスタアクセス制御ユニット 317は、内部バス 500からのアクセス要求に応答 し、制御レジスタアクセスバス 319を経由した制御レジスタ 318、アレイアクセス調停 ユニット制御バス 311およびタスク状態管理アレイ制御バス 312を経由したタスク状 態管理アレイ 330、タスク IDテーブル制御バス 316を経由したタスク IDテーブル 360 に対するアクセスをそれぞれ制御する。さら〖こ、制御レジスタ 318の内容に応じ、タス ク状態管理アレイ検索信号 313、アレイ更新制御ユニット制御信号 314を出力すると ともに、アレイ更新制御ユニット制御信号 315、優先度判定信号 342の内容に応じ、 制御レジスタ 318の内容を更新する。
[0053] 制御レジスタ 318は、タスク状態管理アレイ 330に対する検索要求の有無を示す検 索要求フィールド 318— 1、タスク状態管理アレイ 330に対する検索キーとなる所定 のタスク状態および実行優先度を含む符号列、もしくはタスク状態管理アレイ 330内 の空きエントリ位置を検索する所定の符号を格納する検索キーフィールド 318— 2、 検索結果の有効性を示す検索結果有効フィールド 318— 3、検索結果が有効の場 合に対応するタスク ID、およびタスク状態管理アレイ 330内のエントリ位置をそれぞ れ格納するタスク IDフィールド 318—4、エントリ位置フィールド 318— 5、アレイ更新 制御ユニット 350によるタスク状態管理エントリのシフト処理要求の有無を示すタスク 状態管理アレイ更新要求フィールド 318— 6、前記シフト処理の内容、例えば" ONE SHOT" ( 1回の要求に対し 1回のシフトを実行する)または" FULL" ( 1回の要求に 対し最大 (エントリ数— 1)回のシフトを実行する)の 、ずれ力を指定するタスク状態管 理アレイ更新モードフィールド 318— 7、新規タスクを追加するタスク状態管理アレイ 内のエントリ位置を示す空きエントリポインタフィールド(空きエントリ位置ポインタ) 31 8— 8、タスク管理プロセッサ 300の動作状態、例えば"ビジー"または"非ビジー"を 示す動作状態フィールド 318 9からなる。
[0054] 図 5に、タスク状態管理アレイの具体例を示す。タスク状態管理アレイ 330は、ェント リアクセス制御ユニット 332、 256個のタスク状態管理エントリ 333— 0〜333— 255、 エントリ間シフトデータバス 334— 1〜334— 255、エントリアクセスバス 335から構成 される。さらに、各タスク状態管理エントリは、当該エントリの内容が有効であるかどう 力を示すイネ一ブルフィールド 333— 0—1〜333— 255— 1、当該エントリに格納さ れているタスク情報のうちタスク状態を示すタスク状態フィールド 333— 0— 2〜333 — 255— 2、および当該エントリに格納されているタスク情報のうち実行優先度を示す 実行優先度フィールド 333— 0— 3〜333— 255— 3を含む。
[0055] エントリアクセス制御ユニット 332は、タスク状態管理アレイ制御バス 312から各タス ク状態管理エントリ 333— 0〜333— 255へのアクセスを中継する。それぞれエントリ 番号0〜255をもっタスク状態管理ェントリ333— 0〜333— 255は、タスク状態管理 エントリ制御信号 321— 0〜321— 255で指定される読み出し、書き込み、シフト動作 などの要求に応じて当該エントリの内容をエントリアクセスバス 335に出力する、もしく はエントリアクセスバス 335上の所定のデータ、ある!/、はよりエントリ番号の大き!/、側 の隣接エントリの内容を当該エントリに書き込むなどの動作(下流への 1段シフト)を行 う。また、タスク状態管理アレイ検索信号 313上の検索要求および検索キーに従い、 当該エントリの内容と検索キーの一致性を検査し、その結果をタスク状態管理エントリ 比較信号 331— 0〜331— 255に出力する。
[0056] 図 6にタスク状態管理エントリの一例を示す。タスク状態管理エントリ 333— 1は、(m
+ 1)個のタスク状態管理セル 800— 0-800 m、タスク状態管理セル比較信号 81 0— 0〜810— m、タスク状態管理セル比較バス 811、タスク状態管理エントリ比較ュ ニット 820から構成される。ただし、図 5〖こ示すイネ一ブルフィールド 333— 1 1、タ スク状態フィールド 333— 1 2、実行優先度フィールド 333— 1—3のビット幅の和は m+ 1であるとする。また、特に制限されないが、タスク状態管理エントリ制御信号 32 1 1は、エントリシフトィ ーブノレ 321— 1 1、エントリアクセスィ ーブノレ 321— 1 - 2、タスク状態管理エントリ状態信号 371— 1 (図 3参照)力 生成される隣接アレイ エントリマッチ信号 321— 1 - 3からなる。
[0057] タスク状態管理セル800— 0〜800—111は、それぞれ 1ビットのシフトおよび比較機 能つき記憶回路として動作し、以下の入出力端子を備える。
(1) SE :正論理で表現されるセルへのシフトィネーブル入力であり、エントリシフトィ ネーブル 321— 1 - 1を接続する。
(2) EN:正論理で表現されるタスク状態管理アレイ制御バス 312を経由したセルへ のアクセスィネーブル入力であり、エントリアクセスィネーブル 321— 1 - 2を接続する
(3) SI :下位エントリからセルへのシフトデータ入力であり、エントリ間シフトデータバス 334— 2内の当該ビットに対応する信号を接続する。
(4) SO :上位エントリへのセルからのシフトデータ出力、すなわちセル内に保持され ている 1ビットデータそのものであり、エントリ間シフトデータバス 334—1内の当該ビッ トに対応する信号へ接続する。
(5) LS、 ZLS:それぞれ正論理および負論理で表現されるタスク状態管理アレイ制 御バス 312を経由したセルへの書き込みデータ(書き込み動作時)またはセルからの 読み出しデータ(読み出し動作時)であり、エントリアクセスバス 335に含まれるロード ストアデータフィールド内の当該ビットおよびその反転に対応する信号を接続する。
(6) SK、 ZSK:それぞれ正論理および負論理で表現されるセルへの検索キー入力 であり、タスク状態管理アレイ検索信号 313に含まれる検索キーフィールド内の当該 ビットおよびその反転に対応する信号を接続する。また、特に制限されないが、セル 内に保持されている 1ビットデータの内容に関わらず検索キーとの比較結果が常に 一致するよう、 SK= 1かつ ZSK= 1のような特殊な表現 (比較マスク)を利用してもよ い。
(7) CB:負論理で表現され、端子 SKへの入力とセル内に保持されて!ヽる 1ビットデ ータの比較結果を示すセルからの比較出力であり、タスク状態管理セル比較信号 81 0— 0〜810— mのうち当該ビットに対応する信号へ接続する。
[0058] タスク状態管理セル比較バス 811は、 (m+ 1)個のタスク状態管理セル 800— 0〜 800 - mから出力されるタスク状態管理セル比較信号 810— 0〜810— mに対し、ヮ ィヤードオアによる負論理表現での論理積演算を実行可能なように構成されたバス である。タスク状態管理エントリ比較ユニット 820は、タスク状態管理セル比較バス 81 1および隣接アレイエントリマッチ信号 321— 1 - 3が 、ずれも一致状態を示す場合 にエントリ一致状態をタスク状態管理エントリ比較信号 331— 1に出力する。タスク状 態管理エントリ比較ユニット 820は、論理積回路として位置付けることができる。
[0059] なお、タスク状態管理エントリ 333— 2〜333— 254についても図 6の符号を適切に 対応付けることにより、その構成を適用することが可能である。また、タスク状態管理 エントリ 333— 0、 333— 255は、それぞれシフトデータ出力 SOが未接続であること、 シフトデータ入力 SIに適切な固定値(図示せず)が入力されている点を除き、図 6の 構成を適用可能である。
[0060] 以下、タスク状態管理セルの内部回路構成を説明する。図 7にはタスク状態管理セ ルの第 1の例を示し、図 8にはタスク状態管理セルの第 2の例を示す。ここで、各入出 力端子の機能は図 6内の対応する入出力端子のそれと一致する。ただし、図 7にお ける端子 φは図 1から図 6には図示されていないデータ処理装置の動作クロック信号 であり、図 8の端子 () SE1、 0 SE2は、図 9に例示されるように、 SE= 1力つ動作クロ ック信号 Φの立ち上がりエッジ、立ち下がりエッジであることを示す信号である。図 7 の第 1の例においては、検索キー入力として(SK= 1かつ ZSK=0)または(SK=0 かつ ZSK= 1)を設定可能であり、単純な一致比較のみ実行可能である。これに対 して図 8の第 2の例では、上記に加え(SK= 1かつ ZSK= 1)を設定可能であり、セ ル内に保持されている 1ビットデータの内容に関わらず比較結果が常に一致する、比 較マスク動作を実行可能である。
[0061] ここで、データ処理装置 100においてマルチタスク制御を実行するにあたり、主プロ セッサ 200上で動作するマルチタスク制御プログラムから、図 3乃至図 9で詳述したタ スク管理プロセッサ 300を利用する際の要点を以下にまとめる。
[0062] (1)タスク管理プロセッサ 300内には、タスクプールのうち少なくともタスク ID、タスク 状態、実行優先度が格納され、その内容は主プロセッサ 200により設定される。特に 制限されないが、タスク状態は" Waiting", "Ready", "Running"のいずれか、実 行優先度は 0 (最高)〜255 (最低)の ヽずれかにより指定される。実行優先度は複数 タスクに同一実行優先度が設定されて良いものとする。
(2)タスク状態管理アレイ 330を構成し、シフト機能を有する 256個のタスク状態管理 エントリ 333— 0〜333— 255は、各エントリにその情報を保持されたタスク間の時間 順序を保証する First— In— First— Out (FIFO)として動作するよう、エントリの利用 順序が規定される。即ち、途中のタスク状態管理エントリ 333— 0〜333— 255のタス ク管理情報が無効になったときタスク状態管理エントリ間での下流への 1段データシ フトによって無効なタスク管理情報のタスク状態管理エントリが途中に存在しないよう にでき、有効なタスク管理情報を詰めて順次タスク状態管理エントリに保持させること が可能になるから、新たに追加されるタスク管理情報をシフト方向最後尾の空きェン トリに保持させることにより、タスク状態管理エントリの並びに従ってタスク管理情報が 追加された時間順序を一意に保証することができる。
(3)タスク状態管理ェントリ333— 0〜333— 255の優先度(ェントリ優先度)は、 FIF Oの出口に相当し時間順序の最も古い 333— 0が最も高ぐ 333— 255が最も低い。 エントリ優先度はエントリ毎に相違され、実行優先度とは相違され、複数エントリにつ V、てその優先度が重複されることはな!/、。
(4)特に制限されないが、タスク切り替え要因は以下の 2つである。(4 a)タスクの完 了:該当タスクのタスク ID、タスク状態、実行優先度が格納されていたタスク状態管理 エントリは無効化される。(4 b)割り込みなどの所定の切り替え要因によるタスクの 中断:該当タスクのタスク状態は" Running"から" Ready"に更新される。
[0063] 図 10及び図 11に、主プロセッサ 200上で動作するタスク管理プログラムによるタス ク制御フローを示す。まず、ステップ F110においてタスク管理プロセッサ 300の初期 化として、全てのタスク状態管理エントリの無効化、および制御レジスタへの初期値の 書き込みを行う。ただし、空きエントリポインタフィールド 318— 8にはエントリ 0 (333— 0)を示す値 0を書き込む。
[0064] 初期化が完了すると、タスク管理プログラムはタスク管理プロセッサ 300の状態を監 視し (ステップ F120)、タスク管理プロセッサ 300の状態が非ビジー状態になるまで 待機する。タスク管理プロセッサ 300が非ビジー状態になると、タスクの追加および切 り替え要求の有無により、それぞれ必要な処理を行う。タスクの追加要求を受理する と (ステップ F130)、当該タスクに対しタスク IDおよび実行優先度を割り当て、空きェ ントリポインタフィールド 318— 8が示すタスク状態管理エントリおよび対応するタスク I Dテーブル内のエントリの内容を更新する (ステップ F131)とともに、空きエントリボイ ンタフィールド 318— 8の内容をインクリメントする(ステップ F132)。
[0065] タスクの切り替え要求を受理した場合には (ステップ F140)、その要因により処理内 容が異なる (ステップ F150)。まず、当該要求がタスク完了によるものである場合、完 了したタスク情報の格納されているタスク状態管理エントリのイネ一ブルフィールドを 無効化(ステップ F151)、空きエントリポインタフィールド 318— 8をデクリメント(ステツ プ F152)、前記無効化により生じた FIFO内部の不整列状態を解消するアレイ整列 処理 (ステップ F153)を順次実行する。また、当該要求がタスク完了でない所定のタ スク中断要求である場合、実行中のタスクに対応するタスク情報のうちタスク状態を" Running"から" Ready"に更新する(ステップ F154)。なお、エントリ更新処理(ステ ップ F154)には、タスク状態管理アレイ更新要求フィールド 318— 6、およびタスク状 態管理アレイ更新モードフィールド 318— 7に対する制御レジスタ書き込みによるァレ ィ整列要求 (ステップ F210)、およびアレイ整列処理完了までの待機 (ステップ F220 )を含む。アレイ整列要求に対するタスク管理プロセッサの動作については、図 14及 び図 15を用いて後述する。
[0066] タスクの完了または中断処理が完了すると、次に実行すべきタスクを検索し (ステツ プ F155)、実行可能なタスクが 1つ選択された場合には (ステップ F160)、当該タス クのタスク状態を" Ready"から" Running"に更新し (ステップ F161)、タスクに対し 実行許可を通知する。
[0067] このうち、次タスク検索 (ステップ F155)の詳細は図 13に例示されるとおりである。ま ず、検索キーフィールド 318— 2に、次に実行対象となるタスクの候補を示す検索キ 一、例えばイネ一ブルフィールドが"有効"、かつタスク状態フィールドが" Ready"、 かつ実行優先度フィールドが" 0 (最高優先度) "を設定し (ステップ F310)、検索要求 フィールド 318— 1への書き込みによりタスク状態管理アレイ 330内の検索を要求す る (ステップ F320)。検索結果有効フィールド 318— 3の内容が検索結果有効を示し 、検索キーに適合する有効な次タスク情報が発見された場合 (ステップ F330)、タス ク IDフィールド 318—4およびエントリ位置フィールド 318— 5の内容を次に実行すベ きタスクに対応するタスク ID、エントリ番号として受理する (ステップ F331)。有効な次 タスクが発見されなカゝつた場合は、検索キー内の実行優先度を 255 (最低優先度)ま で順次インクリメントし、検索要求を繰り返す (ステップ F340、 F341)。
[0068] ここで、タスク状態管理アレイ 330内の検索要求 (ステップ F320)に応答するタスク 管理プロセッサ 300は検索キーに従って検索を行ない、比較結果を受け取る 340は その比較結果に対し、エントリ優先度の最も高いエントリを識別し、これをタスク IDテ 一ブル 360に与えることになる。要するに、タスク管理プロセッサ 300側では、エントリ の時間順序を一意に保証することが容易であるから、 CAMによる検索結果に対して 時間順序に従った優先度も加味して所要のタスク IDを識別することができる。これに より、時間順序を考慮したタスク選択の優先制御を高速に且つ容易に行うことができ る。
[0069] なお、実行優先度のインクリメントおよび再検索要求については、前述のように主プ 口セッサがすべての実行優先度にわたり処理する方式のほか、所定の範囲の実行優 先度のみ検索対象とする、ある ヽは主プロセッサ 200によらずタスク管理プロセッサ 3 00内で自動的に再検索を実行する方式を採用することにより、検索に要する時間お よび主プロセッサ 200の処理負荷を削減し、柔軟かつリアルタイム性の高!、マルチタ スク制御を実現することも可能である。
[0070] 続いて、図 14及び図 15を用いてタスク管理プロセッサにおけるアレイ整列制御フロ 一について説明する。アレイの整列とは、実行中のタスクが完了し、当該タスク情報 が FIFOを構成するタスク状態管理アレイ内のタスク状態管理エントリから削除される 場合に、隣接エントリをシフトすることにより有効エントリの不連続性を解消する処理 である。これにより、タスク状態管理アレイ内での時間順序の保証が容易になる、有 効なエントリが連続するため次にタスクを追加すべきエントリが一意に決定することな どにより、マルチタスク制御が単純ィ匕されるとともに、タスク切り替えに係る処理時間を 削減できる。
[0071] タスク管理プロセッサ 300が起動すると、通常は検索キーフィールド 318— 2の内容 を含む検索キーをタスク状態管理アレイ検索信号 313として出力し (ステップ F410) 、タスク管理プロセッサの動作状態を"非ビジー"状態に設定する (ステップ F411)。 その後、検索要求フィールド 318— 1を通して主プロセッサ力もの検索要求を受理し た場合には、検索処理を実行しその結果に応じて検索結果有効フィールド 318— 3 、タスク IDフィールド 318— 4、エントリ位置フィールド 318— 5の内容を更新する(ス テツプ F340)。
[0072] 隣接するタスク管理プロセッサ力も外部アレイ更新制御信号 381を受理すると (ステ ップ F420)、アレイ更新制御ユニット 350はプロセッサ動作状態を"ビジー"状態に更 新し (ステップ F421)、更新制御信号の内容に応じた信号をアレイ更新制御信号 35 2に出力する。この信号を受けたアレイアクセス調停ユニット 320は、シフト対象となる タスク状態管理エントリに対しエントリシフトィネーブルを経由してタスク状態管理ァレ ィ 330に対するシフト動作を要求し、シフト処理が実行される (ステップ F422)。また、 タスク IDテーブル 360の内容についても、アレイ更新制御信号 352に呼応しタスク状 態管理アレイ 330の内容と矛盾なく更新される。上記のシフト動作内容は、外部ァレ ィ更新制御信号 351により隣接プロセッサに対して通知する (ステップ F423)ことによ り、連結されている全てのタスク管理プロセッサ間で矛盾なくシフト動作が実行される 。シフト動作が完了すると、プロセッサ動作状態を"非ビジー"状態に更新し後続の処 理要求が入力されるのを監視する。
[0073] CPUタスク管理プログラムのバグやノイズ等による誤動作によってエントリの時間順 序が保証できなくなったとき、主プロセッサはアレイ整列要求を発行する。タスク状態 管理アレイ更新要求フィールド 318- 6を介して主プロセッサからのアレイ整列要求 を受理すると (ステップ F430)、以下に詳述するアレイ更新処理 (ステップ F431)を 実行する。図 15に例示されるように、まず、空きエントリを検索するため、ィネーブル フィールドが"無効"、かつタスク状態フィールドおよび実行優先度フィールドカ^、ず れも"比較マスグ'である特殊な検索キーをタスク状態管理アレイ検索信号 313として 出力し (ステップ F510)、タスク管理プロセッサ 300の動作状態を"ビジー"状態に更 新する。続いて、アレイ更新制御ユニット 350内のシフト回数カウンタ CNTの内容を 0 に初期化し (ステップ F512)、空きエントリのうち最も優先度の高い、すなわちエントリ 番号の小さ 、空きエントリを検索する (ステップ F513)。空きエントリが存在する場合 ( ステップ F520)、当該エントリ以上のエントリ番号をもつ全てのタスク状態管理エントリ をシフトし (ステップ F521)、そのシフト動作内容を隣接プロセッサに対して通知する( ステップ F522)。タスク状態管理アレイ更新モードフィールド 318— 7に" FULL"が 指定されている場合 (ステップ F530)、シフト回数カウンタ CNTをインクリメントし (ステ ップ F531)、シフト回数カウンタ CNTの内容が 254、すなわち(タスク状態管理ェント リのエントリ数— 1)となるまで空きエントリの検索以降を繰り返す (ステップ F540)。空 きエントリが存在しない、または" FULL"モードで 254回シフト動作を実行すると、タ スク管理プロセッサ 300の動作状態を"非ビジー"状態に更新し (ステップ F541)、タ スク状態管理アレイ検索信号 313に含まれる検索キーを本来の検索キーとして再設 定する (ステップ F542)ことにより、後続の処理要求を受理可能となるようにする。
[0074] ところで、タスク管理プログラムが一度に完了もしくは中断させるタスクはたかだか 1 タスクであり、タスク状態管理エントリの利用順序に関する規定を遵守する限りにおい ては、 1回のエントリ間シフト動作によりタスク状態管理アレイの不整列状態は解消す る。タスク管理プログラムの内包する可能性のある不具合を回避し、データ処理装置 の信頼性を向上させるため、定期的に" FULL"シフトを実行するとよ!/、。
[0075] 以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、 本発明はそれに限定されるものではなぐその要旨を逸脱しない範囲において種々 変更可能であることは言うまでもな 、。
[0076] 例えば、主プロセッサ 200とタスク管理プロセッサ 330は必ずしも同一チップに搭載 される場合に限定されない。アレイ 330とテーブル 360は同一アレイ又は別アレイの 何れで構成してもよい。 産業上の利用可能性
[0077] 本発明はタスク制御に適用される場合に限定されず、リアルタイム性を考慮して管 理しなければならないその他のデータ管理に広く適用することができる。

Claims

請求の範囲
[1] データシフト機能及びデータ比較機能を備える複数ビットの記憶素子を 1エントリと し、隣接エントリの対応するビット位置間でデータシフトが可能となるよう複数エントリ を有する記憶素子アレイと、
前記複数エントリに共通に入力されるデータと該エントリを構成する記憶素子に保 持される内容との比較結果に基づき、所定の優先度により複数エントリのうちの 1ェン トリを識別する優先度判定回路と、を備えるデータ処理装置。
[2] 前記所定の優先度は、有意のデータを保持するエントリ中にお!、てデータ保持が 行なわれた順番の早遅に関する順位とされる請求項 1記載のデータ処理装置。
[3] データシフト機能及びデータ比較機能を備える複数ビットの記憶素子を 1エントリと し、隣接エントリの対応するビット位置間で一方向にデータシフトが可能となるよう複 数エントリを有する記憶素子アレイと、
前記エントリに新たなデータを保持させる操作指令に応答するとき、前記エントリに 対する新たなデータ保持の時間的順序をエントリのデータシフト方向の配列とは逆方 向に制御すると共に、エントリの保持データを無効化する操作指令に応答するとき、 無効化されたエントリよりも時間的順序の上流側エントリのデータを無効化エントリ数 分だけ下流側にデータシフトさせる制御回路と、
前記複数エントリに共通に入力される検索データと該エントリを構成する記憶素子 に保持される被検索データとの比較結果に基づき、所定の優先度により複数エントリ のうちの 1エントリを識別する優先度判定回路と、を有し、
前記所定の優先度を、前記時間的順序における所定順位とするデータ処理装置。
[4] 新たなデータ保持を可能とするエントリの位置を示す空きエントリ位置ポインタを有 する請求項 3記載のデータ処理装置。
[5] データシフト機能を備える複数ビットの記憶素子を 1テーブルエントリとし、隣接テー ブルエントリの対応するビット位置間で一方向にデータシフトが可能となるよう複数テ 一ブルエントリを備えていて、前記テーブルエントリは前記記憶素子アレイのエントリ に一対一対応されるデータテーブルを有し、
前記データテーブルエントリは前記記憶素子アレイのエントリに対するデータシフト 動作に同期したデータシフト動作され、
前記データテーブルは前記優先度判定回路で識別された 1エントリに対応するテ 一ブルエントリが保有するデータを出力する請求項 4記載のデータ処理装置。
[6] 前記記憶素子アレイにおける被検索データとの比較結果を出力可能な拡張出カイ ンタフェースと、前記記憶素子アレイにおける比較結果と論理積が採られる上位側比 較結果を入力可能な拡張入力インタフ ースとを有する請求項 5記載のデータ処理 装置。
[7] マルチタスク制御プログラムを実行可能なプロセッサユニットと、マルチタスク制御プ ログラムにより実行すべきタスクが割り当てられる複数の演算ユニットと、演算ユニット が実行すべきタスクの選択処理を行なうタスク管理ユニットとを有するデータ処理装 置であって、
前記タスク管理ユニットは、データシフト機能及びデータ比較機能を備える複数ビッ トの記憶素子を 1エントリとし、隣接エントリの対応するビット位置間で一方向にデータ シフトが可能となるよう複数エントリを有する記憶素子アレイと、
前記エントリに新たなタスク管理情報を保持させる前記プロセッサユニットからの操 作指令に応答するとき、前記エントリに対する新たなタスク管理情報保持の時間的順 序をエントリのデータシフト方向の配列とは逆方向に制御すると共に、エントリの保持 データを無効化する前記プロセッサユニットからの操作指令に応答するとき、無効化 されたエントリよりも時間的順序の上流側エントリのデータを無効化エントリ数分だけ 下流側にデータシフトさせる制御回路と、
前記複数エントリに共通に入力される検索データと該エントリを構成する記憶素子 に保持される被検索データとの比較結果に基づき、所定の優先度により複数エントリ のうちの 1エントリを識別する優先度判定回路と、を有し、
前記所定の優先度を、前記時間的順序における所定順位とするデータ処理装置。
[8] 前記タスク管理ユニットは、優先度判定回路で識別されたエントリが保持するタスク 管理情報に含まれるタスク IDを前記プロセッサユニットに出力する請求項 7記載のデ ータ処理装置。
[9] 前記タスク管理ユニットは、データシフト機能を備える複数ビットの記憶素子を 1テ 一ブルエントリとし、隣接テーブルエントリの対応するビット位置間で一方向にデータ シフトが可能となるよう複数テーブルエントリを備えていて、前記テーブルエントリは前 記記憶素子アレイのエントリに一対一対応されるデータテーブルを有し、
前記データテーブルエントリは前記記憶素子アレイのエントリに対するデータシフト 動作に同期したデータシフト動作され、
前記データテーブルは前記優先度判定回路で識別された 1エントリに対応するテ 一ブルエントリから前記タスク IDを出力する請求項 8記載のデータ処理装置。
[10] 前記タスク管理ユニットは、新たなデータ保持を可能とするエントリの位置を示す空 きエントリ位置ポインタを有する請求項 9記載のデータ処理装置。
[11] 前記記憶素子アレイにおける被検索データとの比較結果を出力可能な拡張出カイ ンタフェースと、前記記憶素子アレイにおける比較結果と論理積が採られる上位側比 較結果を入力可能な拡張入力インタフ ースとを有する請求項 10記載のデータ処 理装置。
[12] 1個の半導体基板に形成されて成る請求項 1、 3又は 7記載のデータ処理装置。
PCT/JP2006/306089 2006-03-27 2006-03-27 データ処理装置 WO2007110906A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US12/280,005 US20090320034A1 (en) 2006-03-27 2006-03-27 Data processing apparatus
JP2008507296A JP5024899B2 (ja) 2006-03-27 2006-03-27 データ処理装置
PCT/JP2006/306089 WO2007110906A1 (ja) 2006-03-27 2006-03-27 データ処理装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/306089 WO2007110906A1 (ja) 2006-03-27 2006-03-27 データ処理装置

Publications (1)

Publication Number Publication Date
WO2007110906A1 true WO2007110906A1 (ja) 2007-10-04

Family

ID=38540846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/306089 WO2007110906A1 (ja) 2006-03-27 2006-03-27 データ処理装置

Country Status (3)

Country Link
US (1) US20090320034A1 (ja)
JP (1) JP5024899B2 (ja)
WO (1) WO2007110906A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009217503A (ja) * 2008-03-10 2009-09-24 Hitachi Ltd 計算機システム、計算機制御方法及び計算機制御プログラム

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8201177B2 (en) * 2007-11-19 2012-06-12 International Business Machines Corporation Scheduling a workload based on workload-related variables and triggering values
US8255908B2 (en) * 2007-12-19 2012-08-28 Nokia Corporation Managing tasks in a distributed system
JP6445718B2 (ja) * 2015-04-14 2018-12-26 華為技術有限公司Huawei Technologies Co.,Ltd. プロセス管理方法、装置、およびデバイス
US20180025289A1 (en) * 2016-07-20 2018-01-25 Qualcomm Incorporated Performance Provisioning Using Machine Learning Based Automated Workload Classification
US20180024859A1 (en) * 2016-07-20 2018-01-25 Qualcomm Incorporated Performance Provisioning Using Machine Learning Based Automated Workload Classification

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004326767A (ja) * 2003-04-25 2004-11-18 Internatl Business Mach Corp <Ibm> マルチスレッド・プロセッサにおいて命令スレッドのインタリービングをランダム化するための方法および装置
JP2005078450A (ja) * 2003-09-01 2005-03-24 Oki Electric Ind Co Ltd タスク制御方法とタスク切替装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4710933A (en) * 1985-10-23 1987-12-01 Texas Instruments Incorporated Parallel/serial scan system for testing logic circuits
US4872169A (en) * 1987-03-06 1989-10-03 Texas Instruments Incorporated Hierarchical scan selection
DE69227664T2 (de) * 1991-10-15 1999-04-22 Hewlett Packard Co Hardwarekonfiguriertes Betriebssystemkern für einen Multitaskprozessor
US6055649A (en) * 1997-11-19 2000-04-25 Texas Instruments Incorporated Processor test port with scan chains and data streaming
JP2001075820A (ja) * 1999-09-07 2001-03-23 Oki Electric Ind Co Ltd リアルタイムos装置
JP2006040149A (ja) * 2004-07-29 2006-02-09 Toshiba Corp 半導体集積回路装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004326767A (ja) * 2003-04-25 2004-11-18 Internatl Business Mach Corp <Ibm> マルチスレッド・プロセッサにおいて命令スレッドのインタリービングをランダム化するための方法および装置
JP2005078450A (ja) * 2003-09-01 2005-03-24 Oki Electric Ind Co Ltd タスク制御方法とタスク切替装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009217503A (ja) * 2008-03-10 2009-09-24 Hitachi Ltd 計算機システム、計算機制御方法及び計算機制御プログラム

Also Published As

Publication number Publication date
JPWO2007110906A1 (ja) 2009-08-06
US20090320034A1 (en) 2009-12-24
JP5024899B2 (ja) 2012-09-12

Similar Documents

Publication Publication Date Title
JP4119945B2 (ja) タスク処理装置
JP3778573B2 (ja) データプロセッサ及びデータ処理システム
US8683093B2 (en) Memory system having high data transfer efficiency and host controller
US7096296B2 (en) Supercharge message exchanger
US7502896B2 (en) System and method for maintaining the integrity of data transfers in shared memory configurations
US20070162640A1 (en) Method and system for efficient context swapping
JP4127848B2 (ja) タスク処理装置
JP5024899B2 (ja) データ処理装置
JPWO2009022371A1 (ja) タスク処理装置
JP4585647B2 (ja) パイプラインメモリシステムにおける複数のターゲットへの複数の未解決要求のサポート
JP2012008919A (ja) 情報処理装置
US11392407B2 (en) Semiconductor device
JP4168281B2 (ja) 並列処理システム、インタコネクションネットワーク、ノード及びネットワーク制御プログラム
US20120221831A1 (en) Accessing Common Registers In A Multi-Core Processor
US7805579B2 (en) Methods and arrangements for multi-buffering data
CN109426562B (zh) 优先级加权轮转调度器
JP2006268753A (ja) Dma回路及びコンピュータシステム
JP2000163310A (ja) マイクロプロセッサ
US8706923B2 (en) Methods and systems for direct memory access (DMA) in-flight status
US10853123B2 (en) Memory module
KR20090016645A (ko) 컴퓨터의 입력을 모니터링하는 방법과 장치
JP5058116B2 (ja) ストリーミングidメソッドによるdmac発行メカニズム
US6708259B1 (en) Programmable wake up of memory transfer controllers in a memory transfer engine
JP4451010B2 (ja) プログラマブルコントローラ
US7882322B2 (en) Early directory access of a double data rate elastic interface

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 06730037

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2008507296

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 12280005

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 06730037

Country of ref document: EP

Kind code of ref document: A1