WO1998013759A1 - Data processor and data processing system - Google Patents

Data processor and data processing system Download PDF

Info

Publication number
WO1998013759A1
WO1998013759A1 PCT/JP1996/002819 JP9602819W WO9813759A1 WO 1998013759 A1 WO1998013759 A1 WO 1998013759A1 JP 9602819 W JP9602819 W JP 9602819W WO 9813759 A1 WO9813759 A1 WO 9813759A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
task
selector
register
data processor
Prior art date
Application number
PCT/JP1996/002819
Other languages
French (fr)
Japanese (ja)
Inventor
Shigezumi Matsui
Susumu Kaneko
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 PCT/JP1996/002819 priority Critical patent/WO1998013759A1/en
Priority to JP51547898A priority patent/JP3778573B2/en
Priority to TW085114272A priority patent/TW332272B/en
Publication of WO1998013759A1 publication Critical patent/WO1998013759A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context
    • G06F9/462Saving or restoring of program or task context with multiple register sets

Definitions

  • the present invention relates to a data processor, and more particularly to a multitasking or task switching technique in a data processor, and is applied to, for example, a data processor that processes a plurality of tasks in a pipeline, and a data processing system to which the data processor is applied. It is about effective technology. Background art
  • Pipelining improves the throughput of data processing by dividing one large process into multiple processing elements and executing new processing one after another at the time required for each processing element, that is, at the pipeline pitch. It is. For example, when the control processing for executing one instruction is divided into each processing of instruction fetch, instruction decode, operation, memory access, and register store, each of the above processing is regarded as one pipeline stage. Instruction fetch is performed for each pipeline (pipeline bit) of two pipeline stages, and apparently one instruction is executed at one pipeline pitch.
  • a data processor with a single-path scalar architecture can execute multiple instructions simultaneously with multiple pipelines.
  • inter-instruction dependencies such as a data conflict state in which an instruction uses the execution result of another instruction. If it turns out to shift data conflicts into instructions to be executed in parallel, some of the pipelines will stop executing instructions and wait for the other instruction to complete.
  • Considering the use of the pipeline vacated by the data conflict for the execution of another task it is necessary to shorten the processing time associated with task switching and minimize the disruption of the pipeline. What has to be done has been made clear by the present inventors.
  • the data processor can be equipped with a cache memory to speed up operand access. If the cache memory cache line is corrupted, the corresponding memory contents must be rewritten. For example, if only the data processor occupies the main memory, the rewritten content may be reflected in the main memory only when the cache line is replaced. Such an operation is referred to as a light stroke.
  • a DMA (Direct Memory Access) controller connected to the outside of the data processor reads an incorrect data from the main memory in which the rewriting of the cache memory is not reflected in the main memory, and reads the data from the main memory. There is a risk of transfer. Such a problem is called a cache coherency problem.
  • a write-through method that performs a memory write operation every time a cache hit is performed during a memory write operation is adopted for the cache memory.
  • the cache memory can be made into a non-locking configuration using a light buffer.
  • the data processor uses up the data transfer capability of the bus connecting the DMA controller and main memory for cache coherency. As a result, when high-speed data transfer is performed by the DMA controller, there is a problem that the data transfer speed is limited.
  • an operation that does not maintain cache coherency is performed.
  • Techniques for detecting and writing back at that time can be employed. For example, if the data controller detects an operation (bus snoop) for read access to the data stored in the cache memory, the data processor interrupts the operation of writing back the data, and then the DMA transfer is performed. Enable. However, the burden on the data processor of detecting operations that do not maintain cache coherency increases.
  • An object of the present invention is to provide a data processor that can reduce processing associated with task switching and improve data processing capability.
  • an instruction fetch (10) fetches an instruction, and an instruction latched in an instruction register (11) is decoded by an instruction decoder (12). Instruction execution based on the decoding result
  • the data processor (1) in which the unit (13) executes the instructions includes a program storage area (160, 170) and a memory (16) for sequentially reading the instructions stored in that area.
  • a plurality of task buffers (16, 17) respectively provided with the respective instruction buffers, and register means dedicated to the respective task buffers and arranged in the instruction execution unit.
  • the task buffers have their own unique pointers, and the instruction execution unit has a unique register means assigned to each task buffer. Therefore, the task to be executed is in accordance with the instruction program program. Saves or restores the interrupted normal instruction processing execution state (eg, the value of the program counter or general-purpose register) when switching between the normal instruction processing and the swap buffer processing according to the task buffer program. It does not require processing to access the stack area of the external memory. This achieves faster task switching and reduced processing associated with task switching, contributing to an improvement in the data processing capability of the data processor.
  • interrupted normal instruction processing execution state eg, the value of the program counter or general-purpose register
  • the instruction execution unit outputs an instruction signal (LIR) for latching an instruction in the instruction register, and the selector supplies the instruction signal to an instruction picture unit or a task buffer selected by the switching control means.
  • the instruction feature may update the instruction to be supplied to the instruction register based on the instruction signal, and the task buffer may update the bus instruction based on the instruction signal. This control facilitates the task buffer control.
  • the switching control means switches the selector to the previous instruction based on the result of decoding the instruction supplied from the task buffer selected by the switching control means to the instruction decoder. You can return to the selected state of the bird. That is, in consideration of the completion of the selected step task processing to return to the normal instruction processing and the completion of the step task processing with the highest priority, as shown in FIG.
  • an interrupt disable signal IH
  • the switching control means (19) selects the task sofa (16, 17) as in a data processor (1A) illustrated in FIG.
  • the selector (18) is returned to the selected state of the instruction fetch unit by the control signal ICNT corresponding to the acceptance of the interrupt by the instruction execution unit (13), and the previous task buffer is selected. What is necessary is just to save the state.
  • the data processor (1) can be provided with a data cache memory (15) between the instruction execution unit and the outside. As shown in FIG. 20, this data processor is connected to a memory via a bus (4). Connected to multiple peripheral circuits (2, 5) to form a data processing system. At this time, when a DMA transfer control program or a DMA transfer and data conversion control program is set in the task buffer, the load on the data processor for solving the problem of cache coherency can be reduced. That is, in a state where the processing task of the processor is switched to the DMA transfer control processing via the selector or the like, the function as the DMA controller is realized by the execution unit.
  • an address signal or access control information for DMA transfer control always uses a data cache memory. I will pass.
  • the cache memory adopts the write knock method, even if the DMA transfer is started in a state where the rewrite of the cache memory is not reflected in the external memory, such an external memory is used.
  • the data not reflected in the memory is read from the cache memory to the instruction execution unit and transferred.
  • the data processor detects a DMA transfer operation that does not maintain cache coherency, does not need to perform a write-back operation in advance when it detects a DMA transfer operation, and does not need to maintain cache coherency.
  • the processing load of the data processor for detecting the sending operation can be reduced.
  • the transfer data is once read into the data processor.
  • the task switching means can also be applied to superscalar data processors (1B, 1C) illustrated in FIGS. 14 and 16.
  • the instruction latch (11A, 11B) latched to the instruction register (11A, 11B) is decoded by the instruction decoder (12A, 12B), and the instruction execution unit (13A, 13B) is decoded.
  • a plurality of instruction execution control sequences for executing the instruction are provided, and
  • a data processor (1B, 1C) including an instruction fetch unit (10) for fetching and capable of executing a plurality of instructions in parallel with the plurality of instruction execution control sequences is stored in a program storage area and the program storage area.
  • this data processor as well, it is possible to switch between normal instruction processing and swap task processing by using one instruction execution control system. Can be achieved and pipeline disruption can be minimized. C Therefore, the high data processing capability originally intended by superscalar architectures can be guaranteed.
  • a single-pass power processor that can execute a plurality of instructions in parallel
  • the instructions included in the respective instruction execution control sequences Based on the results of decoding instructions from the decoder, examine the dependencies between instructions to determine whether parallel execution of instructions by different instruction execution control sequences is possible, and depend on the execution results of other instructions.
  • a conflict management unit (25) that delays the execution of the instruction to be executed will be provided.
  • the switching control means causes the contention management unit to execute a specific instruction due to a data conflict or the like.
  • execution is delayed, by causing the selector (18) to select a task buffer in response to the control signal 250 for notifying the execution, the processing is interrupted by one of the instruction execution control systems or by the pipe. Instruction processing can be switched to step processing, and the instruction execution control sequence can be used effectively. In particular, when switching tasks, as described above, it is not necessary to save the execution state of normal instruction processing that is interrupted halfway. Can be migrated to.
  • the contention state such as the data conflict is determined by the contention management unit (25) based on the result of the instruction decode. At this time, the instruction whose processing is to be delayed has already been decoded. After that, the process is switched to the swap task process. However, if the normal instruction process in which the process is interrupted and the swap task process in which the process is started use the same instruction register and instruction decoder, then 17 As illustrated in Figure 7, pipe
  • FIG. D In order to avoid any disturbance in the pipeline at the time of switching from the normal instruction processing to the step task processing due to the data conflict described above, as shown in FIG. D) is an instruction execution control system dedicated to swap task processing.
  • the data processor (1D) includes a plurality of task buffers (16, 17) each having a program storage area and a bus node for sequentially reading instructions stored in that area.
  • the specific task A second selector (26) connected to the instruction register for the task, and selectively outputting the output of the instruction decoder corresponding to the specific instruction execution unit and the output of the instruction decoder for the specific task to the specific instruction.
  • a third selector (27) connected to the execution unit, and a different instruction execution control sequence based on instruction decoding results from instruction decoders included in the respective instruction execution control sequences. Investigate whether or not parallel execution of instructions is possible by examining the dependencies between the instructions, delay the execution of a specific instruction that depends on the execution result of another instruction, and delay the execution of the specific instruction.
  • a conflict management unit (25) for causing the selector of (3) to select the instruction decoder for the specific task; and causing the first selector to select the instruction fetch unit in the initial state and a second selector.
  • FIG. 1 is a block diagram of a data processor according to a first embodiment of the present invention
  • Fig. 2 is a block diagram of an example of an instruction program.
  • FIG. 3 is a block diagram showing a first example of a swap task buffer
  • FIG. 4 is a block diagram showing a second example of a swap task buffer
  • FIG. 5 is a block diagram showing a third example of a swap task buffer.
  • FIG. 6 is a block diagram showing a fourth example of the swap task buffer
  • FIG. 7 is an explanatory diagram of an example of a register set included in the instruction execution unit
  • FIG. 8 is related to the first embodiment. Explanatory drawing of an example of a task switching operation in a data processor
  • FIG. 9 is an explanatory diagram of an example of a switching operation between normal instruction processing and interrupt processing.
  • FIG. 10 is an example timing chart showing a relationship between task switching and a pipeline in the data processor according to the first embodiment.
  • FIG. 11 is an operation timing chart of an example of the data processor according to the first embodiment in which no interrupt is accepted during the step task.
  • FIG. 12 is a block diagram of a data processor according to a second embodiment of the present invention.
  • FIG. 13 is an operation timing chart of an example of the data processor according to the second embodiment for receiving an interrupt during a swap task;
  • FIG. 14 is a block diagram of a data processor according to a third embodiment of the present invention.
  • FIG. 15 is an example timing chart showing the contents of control and task switching control when a data conflict occurs in the data processor according to the third embodiment.
  • FIG. 16 is a block diagram of a data processor according to a fourth embodiment of the present invention.
  • FIG. 17 is a timing chart showing the contents of task switching control when a data conflict occurs in the data processor according to the fourth embodiment.
  • FIG. 18 is a block diagram of a data processor according to a fifth embodiment of the present invention.
  • FIG. 19 is a timing chart showing the task switching control performed by the data processor according to the fifth embodiment when a data conflict occurs
  • FIG. 20 is an example block diagram of a data processing system to which the data processor of the present invention is applied.
  • FIG. 21 is an explanatory diagram showing an example of a sunset based on the DMA transfer control and data conversion control program.
  • FIG. 22 is an explanatory diagram showing an example of the minimum unit of the program description of the DMA transfer control and data conversion control program.
  • FIG. 23 is a block diagram of an example of a data processing system including a cache memory employing a write-back method and a DMA controller arranged outside the data processor.
  • BEST MODE FOR CARRYING OUT THE INVENTION FIG. 1 shows a block diagram of a data processor according to the first embodiment of the present invention.
  • the data processor 1 shown in FIG. 1 is formed on one semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.
  • 10 is the instruction fetch unit
  • 11 is the instruction register
  • Reference numeral 9 denotes a switching control circuit
  • reference numeral 20 denotes a circuit block that generically refers to built-in peripheral modules.
  • the instruction execution unit 13 includes a program counter PC, a general-purpose register GR, a register set S1, S2 individually assigned to each of the swap task buffers 16 and 17, and an interrupt. Includes control circuit 131, sequence control circuit 132, arithmetic circuit 133, etc.
  • the instruction register 11, the instruction decoder 12 and the instruction execution unit 13 advance the processing in units of pipeline stages, and execute the pipeline processing of the instructions.
  • the operation cycles of the instruction register 11, the instruction decoder 12 and the instruction execution unit 13 are synchronized with the operation reference clock signal (not shown) of the processor 1 by the sequence control circuit 13 2. Control.
  • the instruction execution unit 13 is externally interfaced through a data cache memory 15 connected to the internal bus BUS, although not particularly limited.
  • the target of data cache memory cache is external memory 2 and so on.
  • the cache memory 15 is illustrated as a circuit block including a cache memory, a cache tag, and a cache controller (not shown).
  • the cache data section holds a part of the data held in the external memory 2 or the like.
  • the cache evening section is cash —Retain a part of the address (addressless) as a cache tag in association with the data held by Yube.
  • the cache controller outputs the hit data to the internal bus BUS from the cache bus, or the hit data as a new entry in the cache bus. Write in the evening.
  • this cache controller performs processing for writing back the contents of the cache data rewritten by the cache hit to the external memory 2 or the like only when the cache line is replaced. This is done by writing back.
  • the program counter PC has an instruction address to be executed next.
  • the instruction state 10 is not particularly limited, but is not limited to an instruction predicted to be executed in the future based on the value of the program count PC (for example, an instruction specified by the program count PC and a plurality of instructions subsequent thereto). Instruction).
  • the instruction to be fetched is stored in the external memory 3 without any particular limitation.
  • an instruction cache memory 14 is arranged between the external memory 3 and the instruction fetch unit 10.
  • the instruction cache memory 14 is shown as a circuit block including a cache controller, a cache controller, and a cache controller (not shown).
  • the cache part stores a part of the instructions stored in the external memory 3 or the like.
  • the cache tag section holds the address section (address tag) as a cache flag in association with the instruction held by the cache data section.
  • Cache control is a command In the case of a cache hit in the memory access by the cut 10, the instruction held by the cache memory is transferred to the instruction fetch unit 10 .In the case of a cache miss, the instruction is read from the external memory 3. To give the instruction Fetish 10.
  • the instruction fetch unit 10 is not particularly limited, but is first-in first-out.
  • (First-in ⁇ First-out) It has a buffer function, and can prefetch instructions for multiple codes for the value of the program counter PC.
  • four-stage latches 100 A to 100 D are arranged in series, and directly connected to the external via selectors 101 A to 101 C without passing through the preceding latch.
  • the instruction from the instruction cache memory 14 can be fetched.
  • Reference numeral 102 denotes a control circuit for fetching instructions, which outputs the address of the instruction to be fetched based on the value of the program counter PC, and precedes the instruction input by the instruction, thereby providing a first-out instruction.
  • the latch is held at 100 A to 100 D.
  • the output is performed from the 100 A to 100 D ft.
  • the latch 100 A I 00 D latches the instruction every two words ⁇ , and the instruction decoder 12 decodes the instruction one word at a time. In response to this, the output of the data latch 100D is divided into a low-order word and a high-order word by the selector 103 and output.
  • Each of the step task buffers 16 and 17 has a pointer for sequentially reading out the instructions stored in the program storage areas 160 and 170 and the storage areas 160 and 170, respectively. 16 1 and 17 1.
  • the swap task buffer 16 can be written to its program storage area 160 by the execution unit 13 via the internal bus BUS.
  • the swap task buffer 17 has a serial interface controlled by the instruction execution unit 13 (the control lines are shown in the figure). Writing to the program storage area 170 is enabled via 21).
  • the shift register and the selector are assumed to be storage areas 160 (170), and a shift register having a plurality of parallel human output type latches LAT cascaded and respective latches are provided.
  • a selector SEL that selects one bit at a time from the parallel output of LAT and outputs it in parallel, and a selector that selects the output of each latch LAT to the SEL in order from the upper or lower side via the selector SEL. Evening 1 60 (1 70). For example, if n stages of latches LAT each having m bits are provided, the instruction can be sequentially output m times in units of n bits.
  • FIG. 4 shows a configuration in which the number of stages of the latch LAT is different from that of FIG.
  • a RAM Random Access Memory
  • Pointer 161 generates an access address to RAM.
  • Instruction execution unit 13 controls writing to RAM.
  • FIG. 5 shows a RAM (Random Access Memory) consisting of a memory cell array MCA 1 in which dynamic memory cells or static memory cells are arranged in a matrix and an address decoder ADEC 1 is used as a storage area 160.
  • Pointer 161 generates an access address to RAM.
  • Instruction execution unit 13 controls writing to RAM.
  • FIG. 1 Random Access Memory
  • a ROM Read Only Memory
  • the swap task buffers 16 and 17 store a program composed of an instruction sequence for implementing one integrated process. A single unit of processing performed by a specific instruction sequence If it is defined as a task, a processing program related to a specific task is stored (for example, a processing program for DMA transfer, a processing program for data compression / decompression, etc. are set. Loading of the processing program to 16 and 17 is not particularly limited, but can be performed via the serial interface 21 or the instruction execution unit 13 at the time of system initialization such as power-on reset. it can.
  • the selector 18 selects one of the swap task buffers 16 and 17 and the instruction fetch unit 10 and connects it to the instruction register 11.
  • the connection control is performed by the switching control circuit 19.
  • the switching control circuit 19 causes the selector 18 to select the instruction feature 10 at the time of the initialization reset of the data processor 1, and thereafter, a predetermined event generated inside and outside, for example, the built-in peripheral circuit module 2
  • the selector 18 selects the output of the swap task buffer 16 or 17 in accordance with the interrupt signal 22 from 0 and the notification signal 23 of the occurrence of a predetermined event outside.
  • the swap task buffer to be selected is determined by the control circuit 19 by switching the correspondence table between the event source and the swap task buffer, or the P4 step is performed for each event generation notification signal. Task buffers can be allocated and controlled.
  • the instruction execution unit 13 outputs an instruction signal LIR that causes the instruction register 11 to latch an instruction.
  • the instruction register 11 latches the instruction in synchronization with the instruction signal LIR.
  • the selector 18 supplies the instruction signal LIR to the instruction fetch unit 10 or the swap task buffers 16 and 17 selected by the switching control circuit 19.
  • the instruction fetch unit 10 updates the instruction to be supplied to the instruction register 11 based on the instruction signal.
  • the task buffers 16 and 17 receive the instruction signal LIR.
  • the bus terminals 161 and 171 are updated based on the instruction signal LIR.
  • the bus task 16 1 or 17 1 of the swap task buffer 16 or 17 selected by the selector 18 is sequentially updated, and the instruction corresponding to the value of the bus task is stored in the storage areas 160 and 170. Will be supplied to the Order Regis Evening 11.
  • the end of the execution of the program stored in the swap task buffers 16 and 17 is switched by the end signal 120 output when the instruction executed at the end of the program is decoded by the instruction decoder 12 and output.
  • the control circuit 19 recognizes. Upon receiving the decoded result (end signal 120), the switching control circuit 19 returns the selector 18 to the selected state of the instruction feature 10.
  • FIG. 7 shows an example of a register configuration of the instruction execution unit 13.
  • General-purpose Regis U GR includes Regis U SR, R0 to R15. SR is assigned to station overnight, address registers R0 to R7 are assigned to evening register and address register evening, and R8 to R15 are assigned to evening register and address register evening, stack Assigned to Poin Yu and others.
  • the resist evening set S 1 includes the resist evening S 1 SR, S 1 R 0 to S 1 R 7, and the resist evening set S 2 includes the resist evening S 2 SR, S 2 R 0 to S 2 R 7. Including, these register sets S 1 and S 2 are used in place of the register registers SR and R 0 to R 7 of the general-purpose register GR and have unique register addresses.
  • the register set S1 is dedicated to the execution of the program stored in the swap task buffer 16 and the register set S2 is dedicated to the execution of the program stored in the swap task buffer 17.
  • the registers SR and R0 to R7 in the general-purpose register GR are assigned to execute the instructions output from the instruction fetch unit 10.
  • the instruction execution unit 13 uses the registers SR and R0 to R15 for executing the instruction, and the instruction output from the swap task buffer 16 is used.
  • the instruction execution unit 13 uses the registers S1SR and S1R0 to S1R7 for instruction execution, and when an instruction output from the swap task buffer 17 is selected, the instruction is executed.
  • the execution unit 13 uses the registers S2SR and S2R0 to S2R7 for executing instructions.
  • the swap buffers 16 and 17 have their own unique pointers 16 1 and 17 1, respectively, and the unique registry buffers assigned to the respective swap task buffers 16 and 17. Since it has sets S 1 and S 2, when the task to be executed is switched between the instruction fetch unit 10 and the swap task sniffer 16, 17, the program counter PC and the register GR are switched. There is no need to perform any processing to access the storage area such as the external memory 2 to save or restore the value of.
  • FIG. 8 shows an example of task switching operation.
  • the execution of the program (swap task 1) stored in the swap task buffer 16 is requested by the signal 23, for example.
  • the switching control circuit 19 switches the selection state by the selector 18 to the skip buffer 16 in synchronization with the switching of the pipeline stage.
  • the swap task buffer 16 instructs and outputs the first instruction of the swap task 1 in synchronization with the instruction # 3 LIR by the pin register 161, and the instruction register 11 latches it. I do.
  • the instruction execution unit 13 is When executing a task, the register set S1 specified by the instruction description of the task is used.
  • the switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10.
  • the values of the program counter PC; status register SR, data, and address register R0 to R7 are maintained as they were immediately before switching to the top task 1.
  • the registers R8 to R15 are not used. Therefore, even when switching to normal instructions, memory access for return is not required.
  • a memory access for saving and restoring is required every time switching is performed. Memory access for saving and restoring is a task switching or pipeline switching overhead.
  • FIG. 10 shows an example of the state of the pipeline at the time of switching between the normal instruction processing and the step task 1.
  • the pipeline stage in the data processor 1 of this embodiment has five pipeline stages, and the pipeline stages in the normal instruction processing include instruction fetch (In), instruction decode (Dn), and operation (En). , Memory access (An) and register store (Sn).
  • the pipeline stages in the swap task are instruction transfer (C s), instruction decode (D s), operation (E s), memory access (As), and register store (S s).
  • step task 1 when execution of step task 1 is requested in pipeline stage m, the switching control circuit 19 switches to pipeline stage m + 1.
  • the instruction corresponding to the first instruction of the swap task 1 is transferred to the instruction register 11 (C s 1).
  • C s instruction register 11
  • the processing is advanced one by one for each pipeline stage.
  • the instruction execution unit 13 uses the general-purpose register GR for execution of normal instruction processing, but uses the register S1 for execution of the swap task 1. Which register evening to use is determined by each command description.
  • the end signal 120 is supplied to the switching control circuit 19.
  • the switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10 at the pipeline stage n + 1, whereby the instruction register unit 11 is provided at the instruction register 11 after the pipeline stage n + 1. Instructions are supplied from 0.
  • memory access for restoration is not required when switching to normal instruction processing.
  • the interrupt control circuit 1331 is supplied with an interrupt request signal IRQ shown as a representative.
  • the interrupt control circuit 131 accepts an interrupt request according to the interrupt priority set for the interrupt control circuit.
  • the switching control circuit 19 enables the interrupt acceptance inhibition signal INH while the swap task buffer 16 or 17 is selected by the selector 18 to enable the interrupt control circuit 1.
  • the interrupt control circuit 131 does not accept any interrupt request when the interrupt disable signal INH is enabled. Therefore, When executing a task according to the program of the swap task buffer 16 or 17, the data processor 1 does not switch tasks until the execution of the task is completed. In other words, the task executed by the program stored in the step task buffer 16 or 17 is given the highest execution priority.
  • the interrupt control circuit 13 1 suspends the execution of the current instruction and stores the contents of the program counter PC, status register SR, data and address register R 0 to R 15 into the external memory 2, etc. And then branch to the accepted interrupt request processing program.
  • FIG. 11 shows an operation example when an interrupt is not accepted during the swap task as described above. If there is an interrupt request during normal processing, the program returns to the normal processing after saving the return address, etc., then branches to interrupt processing. When the interrupt processing is completed, it returns to normal processing.
  • the switching control circuit 19 causes the swap task buffer 16 to be selected, and is immediately shifted to the execution of the swap task 1. While the swap task 1 is being executed, the interrupt disable signal I ⁇ is enabled, so that even if there is an interrupt request, no interrupt request is accepted during that time. The interrupt request that has been disabled is accepted after the interrupt disable signal I_ ⁇ is disabled after the execution of swap task 1 is completed.
  • branching to interrupt processing first, the return address of the interrupted normal instruction processing and the value of the register are saved, and then the processing branches to interrupt processing. After interrupt processing is completed, the saved information is restored, and then the process returns to normal instruction processing.
  • FIG. 12 shows a second embodiment of the data processor according to the present invention.
  • the data processor 1 shown in the figure can be assigned while executing the task by the program stored in the swap task buffer 16 or 17.
  • the difference from the data processor 1 in FIG. The other points are the same as those in FIG. 1, and the same reference numerals are given to the circuit blocks having the same functions, and detailed description thereof will be omitted.
  • the interrupt control circuit 1331 when the interrupt control circuit 1331 receives the interrupt request, it enables the interrupt control signal ICNT and supplies it to the switching control circuit 19 described above.
  • the switching control circuit 19 instructs the selection state by the selector 18 to an instruction.
  • the information for specifying the swap task buffers 16 and 17 selected immediately before switching is saved.
  • the evacuation destination is desirably an evacuation latch (not shown) inside the switching control circuit 19. It may be saved in the stack area such as the external memory 2, but in that case, when returning from the interrupt processing to the step task, an external bus access cycle must be started to restore the step task selection information. This is because the return to the step task processing is delayed.
  • Figure 13 shows an example of operation when an interrupt is accepted during the swap task. If there is an interrupt request in the middle of normal instruction processing, the program returns to the return address, etc., branches to interrupt processing, and the interrupt processing ends. Then, after performing the return processing, it returns to the normal instruction processing.
  • the switching control circuit 19 causes the selector 18 to select the swap task buffer 16 and immediately proceeds to the execution of the swap task 1.
  • the interrupt control circuit 1331 can receive an interrupt even during execution of the swap task 1, and upon receiving the interrupt, enables the interrupt control signal ICNT and supplies it to the switching control circuit 19.
  • the switching control circuit 19 switches the selection state of the selector 18 to the instruction fetch unit 10 and controls the switching task selection information for identifying the swap task buffer selected at that time. evacuate. Then, the instruction execution unit 13 that has accepted the interrupt saves the return address and the register information of the normal instruction processing in which the processing has been interrupted earlier to the stack area (S1), and then branches to the interrupt processing program. I do. When the interrupt processing is completed (T 1), the interrupt control signal ICNT is disabled, and the switching control circuit 19 causes the interrupted swap task 1 according to the saved swap task selection information. Resume execution of. When the last instruction of the swap task 1 is decoded by the instruction decoder 12, an end signal 120 is given to the switching control circuit 19, whereby the switching control circuit 19 switches the selector 18.
  • the control circuit 19 first switches the selector 18 to the swap task buffer 16 based on the fact that the step task selection information has been saved. Because you can.
  • FIG. 14 shows a third embodiment of the data processor according to the present invention.
  • the data processor 1B shown in FIG. 1 has a single-pass color architecture, and can execute a plurality of instructions in parallel by two pipelines. That is, the instruction latch unit 11A decodes the instruction latched to the instruction register 11A with the instruction decoder 12A, and the instruction execution unit 13A executes the instruction.
  • the instruction execution unit 13B decodes the instruction latched in 1B by the instruction decoder 12B, and the instruction execution unit 13B has a second instruction execution control sequence for executing the instruction.
  • Pipeline processing performed in the first instruction execution control sequence is referred to as pipe 0, and pipeline processing performed in the second instruction execution control sequence is referred to as pipe1.
  • LIRA is an instruction latch instruction signal for the instruction register 11A
  • LIRB is an instruction latch instruction signal for the instruction register 11B, and corresponds to the instruction signal LIR.
  • the instruction execution units 13A and 13B respectively have dedicated sequence control circuits 13A and 13B and arithmetic circuits 13A and 13B.
  • Dependencies between instructions such as data conflicts between pipes 0 and 1 are detected by the conflict management unit 25 based on the decoded results of the instruction decoders 12A and 12B.
  • the contention management unit 25 determines whether or not parallel execution of instructions by the nove 0 and the pipe 1 is possible based on the result of decoding the instructions from the instruction decoders 12A and 12B.
  • the dependency relationship is examined, and the sequence control circuits 1332A and 1332B are controlled by the control signals ARBA and ARBB so as to delay the execution of an instruction that depends on the execution result of another instruction.
  • Interrupt control circuit 13 1, program counter PC, general-purpose register G
  • R is shared by both instruction execution units 13A and 13B.
  • Regis Evening sets S 1 and S 2 are dedicated to instruction execution unit 13 B.
  • the details are the same as those of the data processor in Fig. 1.
  • the selector 18, the switching control circuit 19, and the swap task buffers 16 and 17 correspond to the instruction execution control sequence of the instruction register 11B. It is located.
  • an instruction fetch unit 10 an instruction cache memory 14, a built-in peripheral module 20, a data cache memory 15 and the like are provided.
  • components having the same functions as those of the first [# 1] are denoted by the same reference characters and their detailed description is omitted.
  • both swap task buffers 16 and 17 are designed so that the program is initially loaded via the internal bus BUS.
  • FIG. 15 shows an example of the contents of control and task switching control when a data conflict occurs in the data processor 1B.
  • the conflict management unit 25 detects a data conflict at the decode stage ( ⁇ 1 + 1) of the instruction latched to the instruction register 11A or 11B at the pipeline stage m, it is executed later.
  • the execution of the instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is obtained. That is, the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 4) can be used at the operation stage (E n) of the pipe 1 at the stage (m + 4).
  • the pipeline stage of Pive 1 is NOP.
  • the switching control circuit 19 switches the selection state of the selector 18 to the skip buffer 16 at the pipeline stage m + 4,
  • pipe 1 The instruction for the first instruction of step 1 is transferred to the instruction register 11B (Cs1).
  • Cs1 the instruction register 11B
  • the instruction execution unit 13B uses the register set S1 to execute the step task 1. Which register evening to use is determined by each command description as in the above example.
  • an end signal 120 is supplied to the switching control circuit 19.
  • the switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10 at the pipeline stage n + 1, whereby the instruction register 11 B is stored in the instruction register 11 B after the pipeline stage n + 1 of the pipe 1. Instruction is supplied from fetish unit 10. As a result, normal instruction processing is resumed in pipe 1. As described above, switching to normal instruction processing does not require memory access for restoration. As described above, there is no disturbance in the pipeline when task switching is performed between normal instruction processing and step 1.
  • FIG. 16 shows a fourth embodiment of the data processor according to the present invention.
  • the data processor 1C shown in the figure has a single-path scalar architecture like the data processor 1B, and can execute a plurality of instructions in parallel by two pipelines.
  • the difference from the data processor 1B is that the occurrence of data conflicts during normal instruction processing by pipes 0 and 1 is one of the factors for switching to the step task.
  • the conflict management unit 25 switches a control signal 250 synchronized with the occurrence of a data conflict and a control circuit 19 Give to.
  • the switching control circuit 19 performs the swap task 1 using the free space of the pipe 1 in the normal instruction processing due to the data conflict.
  • FIG. 17 illustrates the contents of the task switching control when a data conflict occurs.
  • the conflict management unit 25 detects a data conflict at the decode stage (m + 1) of the instruction latched at the instruction register 11A and 11B respectively at the pipeline stage m, it is executed later.
  • Execution of the instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is available. That is, until the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 4) becomes available at the operation stage (E n) of the pipe 1 at the stage (m + 4), the pipe 1 Execution of the normal instruction processing in the pipeline stage is stopped.
  • the instruction is notified to the instruction execution unit 13B by the control signal ARBB.
  • the competition management unit 25 activates the control signal 250 and supplies it to the switching control circuit 19.
  • the switching control circuit 19 causes the selector 18 to select the step task buffer 16 in response thereto.
  • the pipeline stage m + 1 ⁇ ! At 11 + 5, pipe 1 can process swap task 1.
  • the period allowed for the processing of the swap task 1 is the period when the normal instruction processing of the pipe 1 is interrupted by the data conflict, and the period is controlled by the conflict management unit 25 and the control signal 25 Reflected in 0
  • the control signal 250 is deactivated, the selected state of the selector 18 is returned to the original selected state of the normal instruction processing (the selected state of the instruction fetch unit 10).
  • step task 1 When switching tasks, as described above, it is possible to proceed to step task 1 without having to save the program counter PC and the registry SR, R0 to R7.
  • the instruction execution unit 13B uses the register set S1 to execute the swap task 1. Which register is to be used is determined by each command description as in the above example.
  • the conflict management unit 25 also has In the same manner as described above, a tacon conflict is detected, and the result of the register store (S n) of the pipe 0 in the pipeline stage (m + 7) is calculated in the same manner as that of the pipe 1 in the stage (m + 7). Execution of normal instruction processing in the pipeline stage of pipe 1 is halted until it becomes available in (E n). Instead, pipe 1 is processing swap task 1.
  • control signal 250 may be used as a control signal that defines the timing for actually processing the swap task selected by the signals 22 and 23.
  • FIG. 18 shows a fifth embodiment of the data processor according to the present invention.
  • the data processor 1D shown in the figure has a space scalar architecture like the data processor 1B, and can execute a plurality of instructions in parallel by two pipelines.
  • Data processor 1D is connected to pipe 0 and pipe 1 in the same way as data processor 1C.
  • the occurrence of data conflict during normal instruction processing is considered as one of the switching factors to the step task, and the instruction register 11c dedicated to the step task executed at that time is It is different from the processor 1C in that it has an instruction decoder 12C.
  • the instruction register 11 C input is selected by the selector 26, and the output of the instruction decoder 12 B or 12 C is selected by the selector 27.
  • the conflict management unit 25 supplies a control signal 250 enabled in synchronization with the occurrence of the data conflict to the switching control circuit 19 and the selector 27.
  • the selector 27 selects the output of the instruction decoder 12C
  • the control signal LIRB is also supplied to the instruction register 11C
  • the instruction register 11B retains the currently held instruction.
  • instruction register 11C is enabled to latch new instructions according to control signal LIRB.
  • the switching control circuit 19 connects the swap task buffer 16 or 17 to the instruction register 11 C by the selector 26 by the control signal 250 in the enable state. Which connection is to be made may be selectable or fixed. For example, at the time of initialization reset of the data processor, it is possible to determine what to select according to the operation mode determined.
  • the pipe 1 has its own instruction register 11C and instruction decoder 12C.
  • instruction decoder 12C When resuming the execution of an instruction whose execution has been interrupted by a data conflict, it is not necessary to start over from the instruction fetch unlike the data processor 1C. The pipeline is not disturbed immediately. The rest of the configuration is the same as that of the processor 1C, and a detailed description of the configuration will be omitted.
  • Figure 19 shows the data processor 1 when a data conflict occurs.
  • the contents of the task switching control performed in D are illustrated.
  • the conflict management unit 25 detects a data conflict in the decode stage (m + 1) of the instruction latched in the instruction register 11A and 11B at the pipeline stage m, the instruction is executed later.
  • the instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is obtained. That is, until the result of the register store (Sn) of Pipe 0 at the pipeline stage (m + 4) becomes available at the operation stage (En) of Pipe 1 at the stage (m + 4). Then, the execution of the normal instruction processing in the pipeline stage of the knoop 1 is stopped.
  • NOP non-operation
  • the pipe 1 can perform the processing of the step task 1.
  • the period allowed for the processing of swap task 1 is the period when the normal instruction processing of pipe 1 is interrupted by the data conflict, and the period is controlled by the conflict management unit 15 and is controlled by the control signal 250.
  • the selected state of the selector 18 is returned to the original selected state of the normal instruction processing (the selected state of the instruction fetch unit 10) by being reflected and inactivating the signal 250.
  • the instruction execution unit 13 B Uses the registry set S1 to execute the swap task 1. Which register is to be used is determined by the description of each command as in the above example.
  • the conflict management unit 25 also removes data conflicts in the decode stages (m + 4) of the instructions latched in the instruction registers 11A and 11B, respectively, in the pipeline stage # 1 + 3.
  • the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 7) is performed in the same manner as the performance of the pipe 1 at the stage (m + 7).
  • Execution of normal instruction processing in the pipeline stage of pipe 1 is halted until it becomes available in stage (E n). Instead, pipe 1 is processing swap task 1.
  • FIG. 20 shows an example of a data processing system to which the data processor 1 is applied.
  • the external memory 4 and the input / output circuit 5 are representatively connected to an external bus 4 of the processor 1.
  • the external bus 4 includes an address bus ABUS, a data bus DBUS and a control bus CBUS.
  • a swap task buffer 16 of the data processor 1 stores a DMA transfer control and data conversion control program.
  • the start of the DMA transfer control and data conversion control program is an interrupt signal 230 assigned to one of the control signals 23. This interrupt signal 230 is supplied from the input / output circuit 5.
  • FIG. 21 shows an example of a task according to the DMA transfer control and data conversion control program.
  • the processing program of the data processor 1 switches to the DMA transfer control and data conversion control program stored in the swap task buffer 16.
  • Can be The task processed by this program reads data from the input / output circuit 5 and The read data is subjected to data conversion (for example, compression or coordinate conversion) by the instruction execution unit 13, and the converted data is written and controlled in a predetermined area of the memory 2.
  • the read address and the write address are sequentially updated by the program for each data transfer and data conversion.
  • Fig. 22 shows an example of the minimum unit of the program description of such a DMA transfer control and data conversion control program.
  • task switching using the swap task buffer does not require evacuation processing like normal interrupt processing and does not disrupt the pipeline, so it can respond quickly to events that occur. .
  • the DMA transfer control program when the DMA transfer control program is set in the step task buffers 16 and 17, compared with the system configuration illustrated in FIG.
  • the burden on the data processor 1 for solving the cache coherency problem can be reduced.
  • the DMA controller 6 when the cache memory 15 adopts the write-back method, the DMA controller 6 starts DMA transfer without rewriting the cache memory 15 in the external memory.
  • the processor 1E constantly monitors the start of the DMA transfer operation that does not maintain cache coherency, and when it detects this, a write-back operation is performed in advance. Must be performed, and the data processor 1 E must be responsible for processing for detecting an operation that does not maintain cache coherency.
  • the data is read from the cache memory 15 to the instruction execution unit 13 and transferred.Therefore, the data processor 1 detects the operation that does not maintain cache coherency. There is no need to bear. In the DMA transfer control function realized by the data processor 1, the data transfer is read into the processor 1 every day.
  • the number of swap task buffers is not limited to the above embodiment and can be changed as appropriate.
  • the cache memory is not limited to a configuration in which the data cache memory and the instruction cache memory are separated, and may be a unified cache memory used for both instructions and data.
  • the number of pipeline stages is not limited to the five stages in the above embodiment.
  • the number of pipes that can be operated in parallel in the single-path power processor is not limited to two, but may be more.
  • the content of the swap task can be applied as needed and is not limited. Industrial applicability
  • the data processor according to the present invention includes various types of data processing systems, particularly systems in which tasks are frequently switched, It can be widely applied to systems that require improved capabilities, for example, a computer system for controlling embedded devices equipped with a digital camera for transferring image data and data compression as a step task. can do.

Abstract

A data processor (1) in which an instruction fetching unit (10) fetches an instruction, an instruction decoder (12) interprets the instruction latched in an instruction register (11), and an instruction executing unit (13) executes the instruction based on the results of interpretation by the decoder (12). One of task buffers (16 and 17) each provided with a program storing area (160 and 170) and a pointer (161 and 171) for successively reading out instructions stored in the areas (160 and 170) or the unit (10) is selected through a selector (18). The selection by the selector (18) is controlled by a switching control means (19) in accordance with an internally or externally generated event. Register means (S1 and S2) used exclusively for the task buffers (16 and 17) are provided in the instruction executing unit (13) so as to make the saving of the internal state of the unit (13) unnecessary when the task is switched by selecting a program stored in one task buffer from the outside. Therefore, the speed of switching the task is improved and the burden of the data processor (1) at the time of switching the task is reduced.

Description

明 細 書 データプロセッサ及びデータ処理システム  Description Data processor and data processing system
技術分野 Technical field
本発明は、 データプロセッサ、 更にはデータプロセッサにおけるマル チタスキング若しくはタスク切換え技術に関し、例えば複数のタスクを パイプライン的に処理するデータブロセッサ、そしてそのデータプロセ ッサを適用したデータ処理システムに適用して有効な技術に関するも のである。 背景技術  The present invention relates to a data processor, and more particularly to a multitasking or task switching technique in a data processor, and is applied to, for example, a data processor that processes a plurality of tasks in a pipeline, and a data processing system to which the data processor is applied. It is about effective technology. Background art
デ一夕プロセッサによるデータ処理を高速化する技術としてパイプ ライン処理がある。パイプライン処理は、 一つの大きな処理を複数の処 理要素に分割し、 各処理要素に必要な時間即ちパイプラインピッチで 次々に新しい処理を実行することにより、データ処理のスループッ トを 向上させるものである。例えば、 一つの命令を実行するための制御処理 を、 命令フェッチ、 命令デコード、 演算、 メモリアクセス及びレジス夕 ス トァの各処理に分けた場合、前記夫々の処理を一つのパイプラインス テージとし、 一つのパイブラィンステージのピヅチ (パイプラインビッ チ) 毎に命令フエツチを行って、 見掛け上、 一つの命令を 1パイプライ ンピッチで実行していく。  There is a pipeline process as a technology for speeding up data processing by a data processor. Pipelining improves the throughput of data processing by dividing one large process into multiple processing elements and executing new processing one after another at the time required for each processing element, that is, at the pipeline pitch. It is. For example, when the control processing for executing one instruction is divided into each processing of instruction fetch, instruction decode, operation, memory access, and register store, each of the above processing is regarded as one pipeline stage. Instruction fetch is performed for each pipeline (pipeline bit) of two pipeline stages, and apparently one instruction is executed at one pipeline pitch.
このようなパイプライン処理の途上で、タスク切換えを行う場合には、 後から、現在実行中のタスクに復帰できるように、 プログラムカウンタ、 ステータスレジス夕及びデ一夕レジス夕などの値をスタック領域に退 避する処理を行わなければならない。 しかしながら、そのような退避処理には少なからず時間を要するため、 パイプラインに乱れを生ずることになる。特に、 複雑な処理を行う場合 には、プログラム実行状態を局所的に見ても夕スク切換えが頻繁に生ず ることになる。 これにより、 折角パイブライン処理を採用しても、 思う ようにデ一夕処理のスループッ トを向上させることができなくなる。 特閧昭 6 2— 2 3 7 5 3 1号公報には、複数のプログラムを時分割で 実行する場合に、 割り込みでは処理が複雑になるから、 プログラム R 0 Mとプログラムカウン夕を 2組み設け、各組における R O Mアクセス夕 イ ミングをずらし、セレクタで交互に R O Mの出力を選択して命令レジ ス夕に命令を供給する様にし、 これによつて、 複数のプログラムを簡単 に時分割で実行できるようにする技術が示されている。 When task switching is performed during such pipeline processing, the values of the program counter, status register, and data register are stored in the stack area so that the task that is currently being executed can be returned later. Must be saved. However, such an evacuation process takes a considerable amount of time, which may cause disruption in the pipeline. In particular, when performing complex processing, even if the program execution state is viewed locally, frequent switchovers will occur. As a result, the throughput of the overnight processing cannot be improved as expected even if the special pipeline processing is adopted. The Japanese Patent Publication No. 6 2—2 3 7 5 3 1 provides two sets of programs R 0 M and program counters, because when multiple programs are executed in a time-sharing manner, the processing is complicated by interrupts. In this case, the timing of ROM access in each group is shifted, the output of the ROM is alternately selected by the selector, and the instruction is supplied to the instruction register. Thus, a plurality of programs can be easily executed in a time-division manner. The enabling technology is shown.
これは、クロック信号に基づいてプログラムを準に交互に切り替えて プログラムを完全時分割で実行させるための技術であり、複数のプログ ラムを見掛け上、 単に並列的に実行する場合を想定しており、 特定のィ ベントがデ一夕プロセッサの内外で発生するのに応じて夕スクを切り 替えることについては考慮されていない。機器制御などに汎用的に利用 されるデ一夕プロセッサでは少なく ともそれを考慮し、タスク切換えに 際してパイプラインの乱れ等を小さく し、スループッ トを向上すること が要求される。  This is a technology to execute programs in a complete time-sharing manner by quasi-alternatively switching programs based on a clock signal.It is assumed that multiple programs are apparently executed simply in parallel. It does not consider switching evenings as specific events occur inside or outside the processor. A data processor generally used for equipment control, for example, needs to consider at least that, reduce the turbulence of the pipeline when switching tasks, and improve throughput.
また、 ス一パスカラアーキテクチャーのデ一夕プロセッサは、 複数の 命令を複数のパイプラインによって同時に実行することができる。この ようなデ一夕プロセッサにおいて、ある命令が他の命令の実行結果を利 用するようというようなデータコンフリク 卜の状態に代表される命令 相互問の依存関係を管理しなければならない。並列実行されるべき命令 にデ一タコンフリク トを^ずることが明らかになった場合、複数のパイ プラインの一部は命令実行を停止して他方の命令実行の完了を待つこ とになる。このようにデ一夕コンフリク トによって空いたパイプライン を別のタスクの実行に利用することを考慮すると、 やはり、 タスク切換 えに伴う処理時間を短く してパイプラインの乱れを最小限に抑えなけ ればならないことが本発明者によって明らかにされた。 In addition, a data processor with a single-path scalar architecture can execute multiple instructions simultaneously with multiple pipelines. In such a data processor, it is necessary to manage inter-instruction dependencies such as a data conflict state in which an instruction uses the execution result of another instruction. If it turns out to shift data conflicts into instructions to be executed in parallel, some of the pipelines will stop executing instructions and wait for the other instruction to complete. And Considering the use of the pipeline vacated by the data conflict for the execution of another task, it is necessary to shorten the processing time associated with task switching and minimize the disruption of the pipeline. What has to be done has been made clear by the present inventors.
また、デ一夕プロセッサはオペランドアクセスを高速化するためにキ ャッシュメモリを搭載することができる。キャッシュメモリのキヤヅシ ユラインが害き換えられると、それに対応されるメモリの内容も書き換 えられなければならない。例えばデータプロセッサのみが主メモリを占 有しているなら、キャッシュラインのリプレースが行われるときだけ前 記書き換えられた内容を主メモリに反映させればよい。このような動作 をライ 卜ノ ソクと称する。  The data processor can be equipped with a cache memory to speed up operand access. If the cache memory cache line is corrupted, the corresponding memory contents must be rewritten. For example, if only the data processor occupies the main memory, the rewritten content may be reflected in the main memory only when the cache line is replaced. Such an operation is referred to as a light stroke.
しかしながら、 デ一夕プロセッサの外部に接続された D M A ( Direct Memory Access )コン 卜ローラは、 キャッシュメモリの書き換えが主メモ リに反映されていない誤ったデ一夕を主メモリから読出してデ一夕転 送を行う虞がある。 このような虞をキヤッシュ ·コヒ一レンシの問題と 称し、 これを解消するために、 メモリライ 卜動作時にキヤッシュヒッ ト であっても、その都度メモリライ ト動作を行うライ トスルー方式をキヤ ッシュメモリに採用すると共に、ライ トノ ッファを用いてキヤヅシュメ モリをノンプロッキング構成にすることができる。 ところが、 キヤヅシ ュ ·コヒ一レンシのために、 メモリライ 卜動作が頻発すると、 データプ 口セッサは D M Aコン 卜ローラと主メモリを接続するバスのデ一夕転 送能力をキヤヅシュ 'コヒーレンシのために使い切ってしまい、 D M A コントロ一ラによって高速のデータ転送を行うとき、そのデータ転送速 度が制限されてしまうという問題を生ずる。  However, a DMA (Direct Memory Access) controller connected to the outside of the data processor reads an incorrect data from the main memory in which the rewriting of the cache memory is not reflected in the main memory, and reads the data from the main memory. There is a risk of transfer. Such a problem is called a cache coherency problem.To solve this problem, a write-through method that performs a memory write operation every time a cache hit is performed during a memory write operation is adopted for the cache memory. At the same time, the cache memory can be made into a non-locking configuration using a light buffer. However, when memory write operations frequently occur due to cache coherency, the data processor uses up the data transfer capability of the bus connecting the DMA controller and main memory for cache coherency. As a result, when high-speed data transfer is performed by the DMA controller, there is a problem that the data transfer speed is limited.
そこで、 ライ トスルーを採用せず、 ライ トバック方式でキャッシュ - コヒーレンシを保っために、キャッシュコヒーレンシを保たない動作を 検出し、その時点でライ トバックさせる技術を採用することができる。 例えば、 データプロセッサは、 D M Aコントローラがキャッシュメモリ に蓄積されているデータをリードアクセスする動作 (バス · スヌープ) を検出すると、 そのデ一夕をライ トバックする動作を割り込ませ、 その 後で、 D M A転送を可能にする。 しかしながら、 データプロセッサは、 キャッシュコヒーレンシを保たない動作を検出するための負担が増す ことになる。 Therefore, in order to maintain cache-coherency in a write-back manner without employing write-through, an operation that does not maintain cache coherency is performed. Techniques for detecting and writing back at that time can be employed. For example, if the data controller detects an operation (bus snoop) for read access to the data stored in the cache memory, the data processor interrupts the operation of writing back the data, and then the DMA transfer is performed. Enable. However, the burden on the data processor of detecting operations that do not maintain cache coherency increases.
本発明の目的は、 タスクの切換えに伴う処理を軽減でき、 データ処理 能力を向上させることができるデ一夕プロセッサを提供することにあ る。  SUMMARY OF THE INVENTION An object of the present invention is to provide a data processor that can reduce processing associated with task switching and improve data processing capability.
本発明の別の 的は、タスク切換えに際してパイプラインの乱れを最 小限に抑えることができるデ一夕プロセッサを提供することにある。 本発明の更に別の目的は、スーパスカラアーキテクチャーのデ一夕プ ロセッサにおいて、デ一夕コンフリク 卜によって空いたパイプラインを 別のタスクの実行に切り替えて有効利用できるようにすることにある。 本発明のその他の目的は、ライ トバヅク方式のキヤヅシュメモリを内 蔵するとき、 D M A転送に際してキヤッシュ 'コヒ一レンシを保たせる ための負担を最小限に抑えることができるデータプロセッサを提供す る とにある。  Another object of the present invention is to provide a data processor which can minimize the disturbance of the pipeline at the time of task switching. It is still another object of the present invention to provide a super-scalar architecture data processor that can switch a pipeline vacated by a data conflict to another task to be used effectively. Another object of the present invention is to provide a data processor capable of minimizing the load for maintaining cache coherency during DMA transfer when a write-back type cache memory is incorporated. .
本発明の前記ならびにその他の Π的と新規な特徴は本明細書の以下 の記述から明らかにされるであろう。 発明の開示  The above and other objective and novel features of the present invention will become apparent from the following description of the present specification. Disclosure of the invention
本発明において、 第 1図に例示されるように、 命令フエツチュニッ ト ( 1 0 ) が命令をフェッチし、 命令レジス夕 ( 1 1 ) にラッチされた命 令を命令デコーダ ( 1 2 ) が解読し、 その解読結果に基づいて命令実行 ユニッ ト ( 1 3 ) が命令を実行するデータプロセッサ ( 1 ) は、 プログ ラムの格納領域 ( 1 6 0 , 1 7 0 ) とその領域に格納され命令を順次読 出すためのボイン夕 ( 1 6 1 , 1 7 1 ) とを夫々が備えた複数個のタス クバヅファ ( 1 6, 1 7 ) と、 前記夫々の夕スクバッファ毎に専用化さ れ、 前記命令実行ュニッ 卜に配置されたレジスタ手段 ( S 1 , S 2 ) と、 前記複数個のタスクバヅファと命令フエツチュニヅ 卜との中から-一つ を選択的に前記命令レジス夕に接続するセレクタ ( 1 8 ) と、 初期状態 において前記セレクタに前記命令フエツチュニッ トを選択させると共 に、内部又は外部で発生されるィベン トに従って前記セレク夕を選択制 御する切換え制御手段 ( 1 9 ) と、 前記命令実行ュニッ 卜の制御に基づ いて前記複数個のタスクバッファの全部又は一部をデ一夕書き込み" J 能に外部とィン夕フェースするインタフェース手段 ( 2 1 , B U S ) と を含む。 In the present invention, as illustrated in FIG. 1, an instruction fetch (10) fetches an instruction, and an instruction latched in an instruction register (11) is decoded by an instruction decoder (12). Instruction execution based on the decoding result The data processor (1) in which the unit (13) executes the instructions includes a program storage area (160, 170) and a memory (16) for sequentially reading the instructions stored in that area. A plurality of task buffers (16, 17) respectively provided with the respective instruction buffers, and register means dedicated to the respective task buffers and arranged in the instruction execution unit. (S 1, S 2); a selector (18) for selectively connecting one of the plurality of task buffers and the instruction feature to the instruction register; and Switching control means (19) for selecting an instruction feature and for selectively controlling the selector according to an internally or externally generated event; and controlling the plurality of instructions based on the control of the instruction execution unit. Tasks Isseki de all or part of § write "outside fin to J ability evening and a face to interface means (2 1, BUS).
前記タスクバッファは夫々固有のポィン夕を有し、命令実行ュニッ ト は夫々のタスクバッファに割り当てられた固有のレジス夕手段を冇す るから、 実行すべきタスクが、 命令フヱツチュニッ トのプログラムに従 つた通常命令処理とタスクバッファのプログラムに従ったスワップ夕 スク処理との間で切換えられるとき、中断される通常命令処理の実行状 態(例えばプログラムカウンタや汎用レジス夕の値) を退避したり復帰 したりするために外部メモリのスタック領域をアクセスする処理を必 要としない。 これにより、 タスク切換えの高速化と、 タスク切換えに伴 う処理の軽減とが達成され、データプロセッサのデータ処理能力向上に 寄与する。  The task buffers have their own unique pointers, and the instruction execution unit has a unique register means assigned to each task buffer. Therefore, the task to be executed is in accordance with the instruction program program. Saves or restores the interrupted normal instruction processing execution state (eg, the value of the program counter or general-purpose register) when switching between the normal instruction processing and the swap buffer processing according to the task buffer program. It does not require processing to access the stack area of the external memory. This achieves faster task switching and reduced processing associated with task switching, contributing to an improvement in the data processing capability of the data processor.
前記命令レジス夕、 命令デコーダ及び命令実行ュニッ トが、 パイブラ ィンステージ単位で処理を進めて命令をパイプライン処理を行う場合、 上記により、 パイプラインの乱れを最小限に抑えることができる。 前記命令実行ュニッ トは、前記命令レジス夕に命令をラッチさせる指 示信号 (L I R ) を出力し、 前記セレクタは、 その指示信号を前記切換 え制御手段が選択する命令フヱツチュニッ 卜又はタスクバッファに供 給し、命令フエヅチュ二ッ トは命令レジス夕に供給すべき命令をその指 示信号に基づいて更新し、前記タスクバッファは前記ボイン夕をその指 示信号に基づいて更新することができる。 この制御は、 前記タスクバッ ファのボイン夕制御を容易化する。 In the case where the instruction register, the instruction decoder and the instruction execution unit perform the pipeline processing of the instruction by advancing the processing in units of the pipeline stage, the above-mentioned arrangement can minimize the disturbance of the pipeline. The instruction execution unit outputs an instruction signal (LIR) for latching an instruction in the instruction register, and the selector supplies the instruction signal to an instruction picture unit or a task buffer selected by the switching control means. The instruction feature may update the instruction to be supplied to the instruction register based on the instruction signal, and the task buffer may update the bus instruction based on the instruction signal. This control facilitates the task buffer control.
前記スヮップタスク処理から通常命令処理への復帰の手法として、前 記切換え制御手段が選択したタスクバッファから命令デコーダに供給 された命令の解読結果に基づいて当該切換え制御手段が前記セレクタ を前 ^命令フェツチュニッ 卜の選択状態に戻すようにできる。即ち、 選 ばれたスヮップタスク処理の完了を以つて、通常命令処理に復帰させる スヮップタスク処理を最優先に完了させることを考慮した場合、第 1 図に例示されるように、 前記切換え制御手段は、 前記タスクバッファの 選択に呼応して、命令実行ュニッ 卜に入力される割り込み信号を無効化 する割り込み禁止信号 ( I N H ) を出力するとよい。 これにより、 スヮ ップタスク処理中において割込み要求は受け付けられない。  As a method of returning from the step task processing to the normal instruction processing, the switching control means switches the selector to the previous instruction based on the result of decoding the instruction supplied from the task buffer selected by the switching control means to the instruction decoder. You can return to the selected state of the bird. That is, in consideration of the completion of the selected step task processing to return to the normal instruction processing and the completion of the step task processing with the highest priority, as shown in FIG. In response to the selection of the task buffer, it is preferable to output an interrupt disable signal (INH) that invalidates the interrupt signal input to the instruction execution unit. Thus, no interrupt request is accepted during the step task processing.
割り込み受け付けを許容する場合、第 1 2図に例示されるデータプロ セッサ ( 1 A ) のように、 前記切換え制御手段 ( 1 9 ) は、 前記タスク ノ ソファ( 1 6、 1 7 )を選択しているとき、前記命令実行ュニヅ ト ( 1 3 )による割り込みの受け付けに対応される制御信号 I C N Tにより前 記セレクタ ( 1 8 ) を命令フエツチュニッ 卜の選択状態に戻すと共に、 その 前のタスクバッファの選択状態を退避させればよい。  When accepting an interrupt, the switching control means (19) selects the task sofa (16, 17) as in a data processor (1A) illustrated in FIG. In this case, the selector (18) is returned to the selected state of the instruction fetch unit by the control signal ICNT corresponding to the acceptance of the interrupt by the instruction execution unit (13), and the previous task buffer is selected. What is necessary is just to save the state.
データプロセッサ ( 1 ) は、 前記命令実行ュニッ トと外部との問にデ —夕キャッシュメモリ ( 1 5 ) を備えることができる。 このデ一夕プロ セッサは、 第 2 0図に例示されるように、 バス (4 ) を介してメモリ等 の複数の周辺回路 ( 2, 5 ) に接続されてデータ処理システムを構成す る。 このとき、 前記タスクバッファに D M A転送制御プログラム若しく は D M A転送及びデ一夕変換制御プログラムを設定した場合、キヤッシ ュコヒーレンシの問題を解决するためのデータプロセッサの負担を軽 減することができる。 すなわち、 デ一夕プロセヅサの処理タスクがセレ クタ等を介して D M A転送制御処理に切換えられた状態において、 D M Aコントローラとしての機能は実行ュニヅ 卜が実現することになる。従 つて、 データプロセッサの外部メモリ間、 或いは外部メモリと外部の入 出力回路間で D M Aデ一夕転送を制御する場合、 D M A転送制御のため のアドレス信号若しくはアクセス制御情報は必ずデータキャッシュメ モリを通ることになる。換言すれば、 キャッシュメモリがライ トノ ック 方式を採用する場合に、デ一夕キャッシュメモリの書き換えが外部メモ リに反映されていない状態で D M A転送が開始されても、そのような外 部メモリに反映されていないデータはデ一夕キヤッシュメモリから命 令実行ュニッ 卜に読み込まれて、 転送されることになる。 これにより、 デ一夕プロセヅサは、キヤッシュコヒーレンシを保たない D M A転送動 作を検出するとともに検出したときには予じめライ トバック動作を行 なわせることを要せず、キャッシュコヒーレンシを保たない D M A fc送 動作を検出するというデータプロセッサの処理負担を軽減することが できる。当然デ一夕プロセッサで実現する D M A転送制御機能において、 転送データは一旦データプロセッサに読み込まれることになる。 The data processor (1) can be provided with a data cache memory (15) between the instruction execution unit and the outside. As shown in FIG. 20, this data processor is connected to a memory via a bus (4). Connected to multiple peripheral circuits (2, 5) to form a data processing system. At this time, when a DMA transfer control program or a DMA transfer and data conversion control program is set in the task buffer, the load on the data processor for solving the problem of cache coherency can be reduced. That is, in a state where the processing task of the processor is switched to the DMA transfer control processing via the selector or the like, the function as the DMA controller is realized by the execution unit. Therefore, when DMA transfer is controlled between an external memory of a data processor or between an external memory and an external input / output circuit, an address signal or access control information for DMA transfer control always uses a data cache memory. I will pass. In other words, when the cache memory adopts the write knock method, even if the DMA transfer is started in a state where the rewrite of the cache memory is not reflected in the external memory, such an external memory is used. The data not reflected in the memory is read from the cache memory to the instruction execution unit and transferred. As a result, the data processor detects a DMA transfer operation that does not maintain cache coherency, does not need to perform a write-back operation in advance when it detects a DMA transfer operation, and does not need to maintain cache coherency. The processing load of the data processor for detecting the sending operation can be reduced. Naturally, in the DMA transfer control function realized by the data processor, the transfer data is once read into the data processor.
上記タスク切換え手段は、第 1 4図及び第 1 6図に例示されるスーパ スカラ形式のデータプロセッサ ( 1 B , 1 C ) にも応用できる。 すなわ ち、 命令レジス夕 ( 1 1 A, 1 1 B ) にラツチした命令を命令デコーダ ( 1 2 A , 1 2 B ) で解読して命令実行ュニッ ト ( 1 3 A , 1 3 B ) が その命令を実行する命令実行制御系列を複数系列備えると共に、命令を フェツチする命令フェツチュニッ ト ( 1 0 ) を含み、 複数の命令を前記 複数の命令実行制御系列で並列実行可能なデ一夕プロセッサ ( 1 B、 1 C )は、 プログラムの格納領域とその領域に格納され命令を順次読出す ためのポインタとを夫々が備えた複数個のタスクバッファ ( 1 6、 1 7 ) と、 前記夫々のタスクバッファ毎に専用化され、 特定の前記命令実 行ュ二、ソ 卜に配置されたレジス夕手段 (S 1 , S 2 ) と、 前記複数個の タスクバッファと命令フェッチユニッ トとの中から一つを選択して前 記特定の命令実行ュニッ 卜に対応される命令レジス夕に接統するセレ クタ ( 1 8 ) と、 初期状態において前記セレクタに前記命令フヱツチュ ニッ 卜を選択させると共に、内部又は外部で発生されるィベン卜に従つ て前記セレクタを選択制御する切換え制御手段 ( 1 9 ) とを有する。 こ のデータプロセッサにおいても、一方の命令実行制御系を利用して通常 命令処理とスワップタスク処理を切換えられるので、 上記同様、 タスク 切換えの高速化とタスク切換えに伴うデータプロセッサの ^担軽減と を達成でき、 また、 パイプラインの乱れも最小限に抑えることができる c したがって、スーパスカラアーキテクチャが本来企図する高いデ一タ処 理能力を保証することができる。 The task switching means can also be applied to superscalar data processors (1B, 1C) illustrated in FIGS. 14 and 16. In other words, the instruction latch (11A, 11B) latched to the instruction register (11A, 11B) is decoded by the instruction decoder (12A, 12B), and the instruction execution unit (13A, 13B) is decoded. A plurality of instruction execution control sequences for executing the instruction are provided, and A data processor (1B, 1C) including an instruction fetch unit (10) for fetching and capable of executing a plurality of instructions in parallel with the plurality of instruction execution control sequences is stored in a program storage area and the program storage area. A plurality of task buffers (16, 17) each provided with a pointer for sequentially reading instructions, and a dedicated instruction execution unit and software dedicated to each task buffer. And a plurality of task buffers and an instruction fetch unit are selected from the plurality of register means (S 1, S 2) arranged in the unit, and are adapted to the specific instruction execution unit. A selector (18) connected to the instruction register, causing the selector to select the instruction picture unit in an initial state, and selectively controlling the selector according to an event generated internally or externally; And a switching control means (1 9). In this data processor as well, it is possible to switch between normal instruction processing and swap task processing by using one instruction execution control system. Can be achieved and pipeline disruption can be minimized. C Therefore, the high data processing capability originally intended by superscalar architectures can be guaranteed.
複数の命令を並列実行可能なス一パス力ラデー夕プロセッサにおい て、データコンフリク 卜のような命令相互の依存関係をハードウエアに よって調停する場^、前記夫々の命令実行制御系列に含まれる命令デコ ーダからの命令解読結果に基づいて、相互に異なる命令実行制御系列に よる命令の並列実行が可能か否かについてそれら命令相互間の依存関 係を調べ、他の命令の実行結果に依存する命令の突行を遅らせる競合 ¾ 理ュニヅ ト ( 2 5 ) を備えることになる。  In a single-pass power processor that can execute a plurality of instructions in parallel, when the dependency between instructions such as data conflicts is arbitrated by hardware, the instructions included in the respective instruction execution control sequences Based on the results of decoding instructions from the decoder, examine the dependencies between instructions to determine whether parallel execution of instructions by different instruction execution control sequences is possible, and depend on the execution results of other instructions. A conflict management unit (25) that delays the execution of the instruction to be executed will be provided.
このとき、 前記切換え制御手段は、 第 1 6図に例 されるように、 デ 一夕コンフリク トなどによって前記競合管理ュニッ トが特定の命令の 実行を遅らせるとき、それを通知する制御信号 2 5 0に応答して前記セ レク夕 ( 1 8 ) にタスクバッファを選択させることにより、 処理が中断 される一方の命令実行制御系若しくはパイブによる通常命令処理をス ヮップ夕スク処理に切換えることができ、命令実行制御系列を有効利用 することができる。特にタスク切換え時には前述の通り、 途中で中断さ れる通常命令処理の実行状態の退避を要しないから、命令実行制御系列 の空き時間が短い場合にも効率的にタスク切換えを行ってスヮップ夕 スク処理に移行することができる。 At this time, as shown in FIG. 16, the switching control means causes the contention management unit to execute a specific instruction due to a data conflict or the like. When execution is delayed, by causing the selector (18) to select a task buffer in response to the control signal 250 for notifying the execution, the processing is interrupted by one of the instruction execution control systems or by the pipe. Instruction processing can be switched to step processing, and the instruction execution control sequence can be used effectively. In particular, when switching tasks, as described above, it is not necessary to save the execution state of normal instruction processing that is interrupted halfway. Can be migrated to.
前記データコンフリク 卜等の競合状態は命令デコ一ド結果に基づい て競合管理ュニッ 卜 ( 2 5 ) が判定し、 そのとき、 処理が遅延されるべ き命令は既にデコードを終了している。 その後で、 スワップタスク処理 に切換えられるが、 処理が中断される通常命令処理と、 それに代えて処 理が開始されるスヮップタスク処理とが相互に同じ命令レジス夕及び 令デコーダを用いる場合には、 第 1 7図に例示されるように、 パイプ The contention state such as the data conflict is determined by the contention management unit (25) based on the result of the instruction decode. At this time, the instruction whose processing is to be delayed has already been decoded. After that, the process is switched to the swap task process. However, if the normal instruction process in which the process is interrupted and the swap task process in which the process is started use the same instruction register and instruction decoder, then 17 As illustrated in Figure 7, pipe
1におけるパイプラインステージ mの命令フエッチ ( I n ) と同じ命令 をパイプ 1のステージ m + 2で再度フエッチし、パイプ 1におけるパイ プラインステージ m + 1の命令デコ一ド (D n ) と同じ命令をパイプ 1 のステージ m + 3で再度デコードしなければならず、この意味において パイプラインが乱れることになる。従って、 スワップタスク処理の後に、 処理が中断された通常命令処理に復帰するときは命令フエツチから再 開しなければならない。 The same instruction as the instruction fetch (In) of the pipeline stage m in 1 is fetched again in the stage m + 2 of the pipe 1, and the same instruction as the instruction decode (D n) of the pipeline stage m + 1 in the pipe 1 Must be decoded again at stage m + 3 of pipe 1, which disrupts the pipeline in this sense. Therefore, after the swap task processing, when returning to the interrupted normal instruction processing, the instruction must be resumed from the instruction fetch.
上述のデ一タコンフリク トによる通常命令処理からスヮップタスク 処理書への切換えにおいて、パイプラインに全く乱れを生じないように するには、 第 1 8図に例示されるように、 デ一夕プロセッサ ( 1 D ) は、 一方の命令実行制御系に、 スワップタスク処理専用の命令レジスタ ( 1 In order to avoid any disturbance in the pipeline at the time of switching from the normal instruction processing to the step task processing due to the data conflict described above, as shown in FIG. D) is an instruction execution control system dedicated to swap task processing.
1 C ) と命令デコーダ ( 1 2 C ) を追加すればよい。 すなわち、 命令レ ジス夕 ( 1 1 A, 1 1 B ) にラッチした命令を命令デコーダ ( 1 2 A , 1 2 B ) で解読して命令実行ュニッ ト ( 1 3 A, 1 3 B ) が命令を実行 する命令実行制御系列を複数系列備えると共に、命令をフエツチする命 令フェッチュニッ ト ( 1 0 ) を含み、 複数の命令を前記複数の命令実行 制御系列で並列実行可能とされることを前提とする。 そして、 このデー 夕プロセッサ ( 1 D ) は、 プログラムの格納領域とその領域に格納され 命令を順次読出すためのボイン夕とを夫々が備えた複数個のタスクバ ッファ ( 1 6、 1 7 ) と、 前記複数個のタスクバッファに専用化された 特定タスク用命令レジス夕 ( 1 1 C ) と、 前記特定タスク川命令レジス 夕にラッチされた命令を解読する特定タスク用命令デコーダ ( 1 2 C ) と、 前記夫々のタスクバッファ毎に専用化され、 特定の命令実行ュニッ 卜に配置されたレジス夕手段 (S 1 , S 2 ) と、 前 g己複数個のタスクバ ッファと命令フヱツチュニッ トとの中から一つを選択的して前記特定 の命令実行ュニッ 卜に対応される命令レジス夕に接続する第 1のセレ クタ ( 1 8 ) と、 前記複数個のタスクバッファの中から一つを選択して 前記特定タスク用命令レジス夕に接続する第 2のセレクタ ( 2 6 ) と、 前記特定の命令実行ュニッ トに対応される命令デコーダの出力と前記 特定タスク用命令デコーダの出力を選択的に前記特定の命令実行ュニ ッ 卜に接続する第 3のセレクタ ( 2 7 ) と、 前記夫々の命令実行制御系 列に含まれる命令デコーダからの命令解読結果に基づいて、相亙に異な る命令実行制御系列による命令の並列実行が可能か否かについてそれ ら命令相互間の依存関係を調べ、他の命令の実行結果に依存する特定の 命令の実行を遅らせ、当該特定の命令の実行を遅らせるとき前記^! 3の セレクタに前記特定タスク用命令デコーダを選択させる競合管理ュニ ッ ト ( 2 5 ) と、 初期状態において前記命令フェッチユニッ トを前記第 1のセレクタに選択させると共に第 2のセレクタを非選択状態に制御 し、内部又は外部で発生されるィベントに従って前記第 1のセレクタを 選択制御し、 また、 前記第 3のセレクタによる前記特定タスク用命令デ コーダの選択に呼応して第 2のセレクタに内部又は外部で発生される ィベン卜に応じたタスクバッファを選択させる切換え制御手段 ( 1 9 ) とを含む。 図面の簡単な説明 1 C) and an instruction decoder (1 2 C) can be added. That is, Instructions (13A, 13B) that decode the instructions latched in these registers (11A, 11B) are decoded by the instruction decoders (12A, 12B), and are executed by the instruction execution units (13A, 13B). It is assumed that a plurality of execution control sequences are provided, an instruction fetch unit (10) for fetching instructions is included, and a plurality of instructions can be executed in parallel by the plurality of instruction execution control sequences. The data processor (1D) includes a plurality of task buffers (16, 17) each having a program storage area and a bus node for sequentially reading instructions stored in that area. A specific task instruction register (11C) dedicated to the plurality of task buffers; and a specific task instruction decoder (12C) for decoding the instruction latched in the specific task river instruction register. Register means (S 1, S 2) dedicated to each of the task buffers and arranged in a specific instruction execution unit; and a plurality of task buffers and instruction pieces, each of which includes a plurality of task buffers. A first selector (18) connected to an instruction register corresponding to the specific instruction execution unit, and one selected from the plurality of task buffers. The specific task A second selector (26) connected to the instruction register for the task, and selectively outputting the output of the instruction decoder corresponding to the specific instruction execution unit and the output of the instruction decoder for the specific task to the specific instruction. A third selector (27) connected to the execution unit, and a different instruction execution control sequence based on instruction decoding results from instruction decoders included in the respective instruction execution control sequences. Investigate whether or not parallel execution of instructions is possible by examining the dependencies between the instructions, delay the execution of a specific instruction that depends on the execution result of another instruction, and delay the execution of the specific instruction. A conflict management unit (25) for causing the selector of (3) to select the instruction decoder for the specific task; and causing the first selector to select the instruction fetch unit in the initial state and a second selector. Control to the non-selected state Selecting and controlling the first selector in accordance with an event generated internally or externally; and in response to the selection of the instruction decoder for the specific task by the third selector, the second selector is internally or externally controlled. Switching control means (19) for selecting a task buffer according to the event generated in (1). BRIEF DESCRIPTION OF THE FIGURES
第 1図は本発明の第 1の実施例に係るデ一夕プロセッサのプロック 図、  FIG. 1 is a block diagram of a data processor according to a first embodiment of the present invention,
第 2図は命令フエツチュニッ トの一例プロック図、  Fig. 2 is a block diagram of an example of an instruction program.
第 3図はスワップタスクバッファの第 1の例を示すブロック図、 第 4図はスヮップ夕スクバッファの第 2の例を示すプロック図、 第 5図はスワップタスクバッファの第 3の例を示すブロック図、 第 6図はスワップタスクバッファの第 4の例を示すブロック図、 第 7図は命令実行ュニッ 卜に含まれるレジス夕セッ トの一例説明図、 第 8図は第 1の実施例に係るデータプロセッサにおけるタスク切換 え動作の一例説明図、  FIG. 3 is a block diagram showing a first example of a swap task buffer, FIG. 4 is a block diagram showing a second example of a swap task buffer, and FIG. 5 is a block diagram showing a third example of a swap task buffer. FIG. 6, FIG. 6 is a block diagram showing a fourth example of the swap task buffer, FIG. 7 is an explanatory diagram of an example of a register set included in the instruction execution unit, and FIG. 8 is related to the first embodiment. Explanatory drawing of an example of a task switching operation in a data processor,
第 9図は通常命令処理と割り込み処理との切換え動作の一例説明図、 第 1 0図は第 1の実施例に係るデ一夕プロセッサにおけるタスク切 換えとパイブラインとの関係を示す一例タイ ミングチャート、  FIG. 9 is an explanatory diagram of an example of a switching operation between normal instruction processing and interrupt processing. FIG. 10 is an example timing chart showing a relationship between task switching and a pipeline in the data processor according to the first embodiment. ,
第 1 1図はスヮップタスク中に割り込みを受け付けない第 1の実施 例に係るデ一夕プロセッサの一例動作タイ ミングチャート、  FIG. 11 is an operation timing chart of an example of the data processor according to the first embodiment in which no interrupt is accepted during the step task.
第 1 2図は本発明の第 2の実施例に係るデータプロセッサのプロヅ ク図、  FIG. 12 is a block diagram of a data processor according to a second embodiment of the present invention.
第 1 3図はスワップタスク中に割り込みを受け付ける第 2の灾施例 に係るデータプロセッサの一例動作夕ィ ミングチャート、 第 1 4図は本発明の第 3の実施例に係るデータプロセッサのプロッ ク図、 FIG. 13 is an operation timing chart of an example of the data processor according to the second embodiment for receiving an interrupt during a swap task; FIG. 14 is a block diagram of a data processor according to a third embodiment of the present invention,
第 1 5図は第 3の実施例に係るデ一夕プロセッサにおいてデ一夕コ ンフリク トを生じた場合の制御とタスク切換え制御の内容を示す一例 タイ ミ ングチヤー卜、  FIG. 15 is an example timing chart showing the contents of control and task switching control when a data conflict occurs in the data processor according to the third embodiment.
第 1 6図は本発明の第 4の実施例に係るデータプロセッサのプロッ ク図、  FIG. 16 is a block diagram of a data processor according to a fourth embodiment of the present invention,
第 1 7図は第 4の実施例に係るデ一夕プロセッサにデータコンフリ ク トを生じたときのタスク切換え制御の内容を示すタイ ミングチヤ一 卜、  FIG. 17 is a timing chart showing the contents of task switching control when a data conflict occurs in the data processor according to the fourth embodiment.
第 1 8図は本発明の第 5の実施例に係るデータプロセッサのプロッ ク図、  FIG. 18 is a block diagram of a data processor according to a fifth embodiment of the present invention,
第 1 9図はデータコンフリク トを生じたとき第 5の実施例に係るデ —夕プロセッサで行われるタスク切換え制御を示すタイ ミングチヤ一 卜、  FIG. 19 is a timing chart showing the task switching control performed by the data processor according to the fifth embodiment when a data conflict occurs,
第 2 0図は本発明のデータプロセッサを適用したデータ処理システ ムの -例ブロック図、  FIG. 20 is an example block diagram of a data processing system to which the data processor of the present invention is applied,
第 2 1図は D M A転送制御及びデ一夕変換制御プログラムによる夕 スクの一例を示す説明図、  FIG. 21 is an explanatory diagram showing an example of a sunset based on the DMA transfer control and data conversion control program.
第 2 2図は D M A転送制御及びデ一夕変換制御プログラムのプログ ラム記述の最小単位の一例を示す説明図、  FIG. 22 is an explanatory diagram showing an example of the minimum unit of the program description of the DMA transfer control and data conversion control program.
第 2 3図はライ トバック方式を採用するキャッシュメモリとデ一夕 プロセッサの外部に配置された D M Aコン トローラとを含むデ一夕処 理システムの一例ブロック図である。 発明を実施するための最良の形態 第 1図には本発明の第 1の実施例に係るデータプロセヅサのプロッ ク図が示される。 同図に示されるデ一夕プロセッサ 1は、 特に制限され ないが、公知の半導体集積回路製造技術によって単結晶シリコンのよう な 1個の半導体基板に形成されている。 FIG. 23 is a block diagram of an example of a data processing system including a cache memory employing a write-back method and a DMA controller arranged outside the data processor. BEST MODE FOR CARRYING OUT THE INVENTION FIG. 1 shows a block diagram of a data processor according to the first embodiment of the present invention. Although not particularly limited, the data processor 1 shown in FIG. 1 is formed on one semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.
第 1図において 1 0は命令フェッチュニッ ト、 1 1は命令レジス夕、 In FIG. 1, 10 is the instruction fetch unit, 11 is the instruction register,
1 2は命令デコーダ、 1 3は命令実行ユニッ ト、 1 4は命令キャッシュ メモリ、 1 5はデータキャッシュメモリ、 1 6, 1 7は代表的に示され たスワップタスクバッファ、 1 8はセレクタ、 1 9は切換え制御回路、 2 0は内蔵周辺モジュールを総称する回路プロックである。 12 is an instruction decoder, 13 is an instruction execution unit, 14 is an instruction cache memory, 15 is a data cache memory, 16 and 17 are swap task buffers shown as representatives, 18 is a selector, 1 Reference numeral 9 denotes a switching control circuit, and reference numeral 20 denotes a circuit block that generically refers to built-in peripheral modules.
前記命令実行ュニッ ト 1 3は、 プログラムカウン夕 P C、 汎用レジス 夕 G R、 夫々のスヮヅプタスクバッファ 1 6 , 1 7に個々に割り当てら れたレジス夕セッ ト S 1, S 2、 割り込み制御回路 1 3 1、 シーケンス 制御回路 1 3 2、 演算回路等 1 3 3などを含む。  The instruction execution unit 13 includes a program counter PC, a general-purpose register GR, a register set S1, S2 individually assigned to each of the swap task buffers 16 and 17, and an interrupt. Includes control circuit 131, sequence control circuit 132, arithmetic circuit 133, etc.
本実施例のデータプロセッサ 1において、 命令レジス夕 1 1、 命令デ コーダ 1 2及び命令実行ュニッ 卜 1 3はパイプラィンステージ単位で 処理を進めて、 命令をパイプライン処理する。 命令レジス夕 1 1、 命令 デコーダ 1 2及び命令実行ュニッ ト 1 3における動作サイクルは、デ一 夕プロセッサ 1の図示を省略する動作基準クロック信 に同期して、 ¾ 記シーケンス制御回路 1 3 2が制御する。  In the data processor 1 of the present embodiment, the instruction register 11, the instruction decoder 12 and the instruction execution unit 13 advance the processing in units of pipeline stages, and execute the pipeline processing of the instructions. The operation cycles of the instruction register 11, the instruction decoder 12 and the instruction execution unit 13 are synchronized with the operation reference clock signal (not shown) of the processor 1 by the sequence control circuit 13 2. Control.
この命令実行ュニッ 卜 1 3は、 特に制限されないが、 内部バス B U S に接続されたデータキヤッシュメモリ 1 5を介して外部にイン夕フエ —スされる。データキヤッシュメモリのキャッシュの対象は外部メモリ 2等とされる。デ一夕キャッシュメモリ 1 5は図示を省略するキヤッシ ュデ一夕部、キャッシュタグ部及びキャッシュコン トローラを含む回路 ブロックとして図示されている。キャッシュデータ部は外部メモリ 2等 が保有するデータの一部を保持する。キャッシュ夕グ部はキャッシュデ —夕部が保有するデータと対応させてそのァドレスの一部(ァドレス夕 グ) をキャッシュタグとして保有する。 キャッシュコントローラは外部 アクセスにおいてキヤッシュ ·ヒッ 卜の場合には、 ヒッ トに係るデ一夕 をキヤヅシュデ一夕部から内部バス B U Sに出力し、或いはヒッ トに係 るデ一夕を新たなエントリとしてキヤッシュデ一夕部に書き込む。キヤ ッシュ ·ミスの場合には外部メモリ 2等から読み込んだデータを内部バ ス B U Sに与え、 或い外部メモリ 2等を書き込みアクセスする。キヤッ シュミスにおいては、キャッシュラインのリプレースを行うことができ る。 特に制限されないが、 このキャッシュコン トローラは、 キャッシュ ヒッ 卜によって書き換えられたキャッシュデ一夕部の内容を外部メモ リ 2等に書き戻すための処理は、キヤッシユラインのリプレースが行わ れるときだけ行う、 所謂ライ トバックによって行う。 The instruction execution unit 13 is externally interfaced through a data cache memory 15 connected to the internal bus BUS, although not particularly limited. The target of data cache memory cache is external memory 2 and so on. The cache memory 15 is illustrated as a circuit block including a cache memory, a cache tag, and a cache controller (not shown). The cache data section holds a part of the data held in the external memory 2 or the like. The cache evening section is cash —Retain a part of the address (addressless) as a cache tag in association with the data held by Yube. In the case of a cache hit in the external access, the cache controller outputs the hit data to the internal bus BUS from the cache bus, or the hit data as a new entry in the cache bus. Write in the evening. In the case of a cache miss, the data read from the external memory 2 or the like is given to the internal bus BUS, and the external memory 2 or the like is accessed for writing. For cache misses, replacement of cache lines can be performed. Although not particularly limited, this cache controller performs processing for writing back the contents of the cache data rewritten by the cache hit to the external memory 2 or the like only when the cache line is replaced. This is done by writing back.
前記プログラムカウン夕 P Cは次に実行すべき命令ァドレスを保有 する。 命令フェヅチュ二ヅ ト 1 0は、 特に制限されないが、 プログラム カウン夕 P Cの値に基づいて、 将来実行されると予想される命令(例え ばプログラムカウン夕 P Cによって指定される命令からその先の複数 命令) をフェッチする。 フェッチされるべき命令は、 特に制限されない が、 外部メモリ 3に格納されている。 この実施例において外部メモリ 3 と命令フェツチュニヅ ト 1 0との間には命令キヤッシュメモリ 1 4が 配置されている。  The program counter PC has an instruction address to be executed next. The instruction state 10 is not particularly limited, but is not limited to an instruction predicted to be executed in the future based on the value of the program count PC (for example, an instruction specified by the program count PC and a plurality of instructions subsequent thereto). Instruction). The instruction to be fetched is stored in the external memory 3 without any particular limitation. In this embodiment, an instruction cache memory 14 is arranged between the external memory 3 and the instruction fetch unit 10.
この命令キヤッシュメモリ 1 4は、図示を省略するキヤッシュデ一夕 部、キャッシュ夕グ部及びキヤッシュコン トローラを含む回路ブロック として図示されている。キヤッシュデ一夕部は外部メモリ 3等が保冇す る命令の一部を保持する。キャッシュタグ部はキャッシュデータ部が保 有する命令と対応させてそのァドレスの 部 (ァドレスタグ) をキヤッ シュ夕グとして保有する。キヤッシュコント口一ラは命令フエッチュニ ッ 卜 1 0によるメモリアクセスにおいてキャッシュ 'ヒッ トの場合には キャッシュデ一夕部が保有する命令を命令フェッチュニッ ト 1 0に- え、 キャッシュ · ミスの場合には外部メモリ 3等から命令を読み込んで 命令フエツチュニッ ト 1 0に与える。 The instruction cache memory 14 is shown as a circuit block including a cache controller, a cache controller, and a cache controller (not shown). The cache part stores a part of the instructions stored in the external memory 3 or the like. The cache tag section holds the address section (address tag) as a cache flag in association with the instruction held by the cache data section. Cache control is a command In the case of a cache hit in the memory access by the cut 10, the instruction held by the cache memory is transferred to the instruction fetch unit 10 .In the case of a cache miss, the instruction is read from the external memory 3. To give the instruction Fetish 10.
命令フェッチュニヅ ト 1 0は、 特に制限されないが、 先入れ ·先出し The instruction fetch unit 10 is not particularly limited, but is first-in first-out.
(First-in · First-out) バッファの機能を有し、 プログラムカウン夕 P Cの値に対して複数ヮード分の命令をプリフェッチすることができ る。例えば第 2図に示されるように 4段のラッチ 1 0 0 A〜 1 0 0 Dが 直列配置され、セレクタ 1 0 1 A〜 1 0 1 Cを介して前段のラツチを介 することなく直接外部若しくは命令キヤッシュメモリ 1 4からの命令 を取り込むことができるようにされている。 1 0 2は命令フェッチのた めの制御回路であり、プログラムカウン夕 P Cの値に基づいてフエッチ すべき命令のァドレスを出力するとともに、それによつて入力される命 令を先入れ,先出し形態で前記ラツチ 1 0 0 A〜 1 0 0 Dに保持させ. ft つラヅチ 1 0 0 A〜 1 0 0 Dから出力させる。特に制限されないが、 ラ ツチ 1 0 0 A〜: I 0 0 Dは 2ワード ^位で命令をラツチし、命令デコ一 ダ 1 2は 1ワード単位で命令をデコードする。 これに応じて、 データラ ツチ 1 0 0 Dの出力はセレクタ 1 0 3で 卜位ワードと上位ヮードに分 けて出力される。 (First-in · First-out) It has a buffer function, and can prefetch instructions for multiple codes for the value of the program counter PC. For example, as shown in FIG. 2, four-stage latches 100 A to 100 D are arranged in series, and directly connected to the external via selectors 101 A to 101 C without passing through the preceding latch. Alternatively, the instruction from the instruction cache memory 14 can be fetched. Reference numeral 102 denotes a control circuit for fetching instructions, which outputs the address of the instruction to be fetched based on the value of the program counter PC, and precedes the instruction input by the instruction, thereby providing a first-out instruction. The latch is held at 100 A to 100 D. The output is performed from the 100 A to 100 D ft. Although not particularly limited, the latch 100 A: I 00 D latches the instruction every two words ^, and the instruction decoder 12 decodes the instruction one word at a time. In response to this, the output of the data latch 100D is divided into a low-order word and a high-order word by the selector 103 and output.
夫々のスヮップタスクバッファ 1 6、 1 7は、 プログラム格納領 域 1 6 0、 1 7 0とその格納領域 1 6 0、 1 7 0に格納された命令を順 次読み出すためのポィン夕 1 6 1、 1 7 1 とを有する。特に制限されな いが、スワップタスクバッファ 1 6は内部バス B U Sを介して実行ュニ ッ ト 1 3によりそのプログラム格納領域 1 6 0に対する書込みが可能 にされている。 また、 スワップタスクバッファ 1 7は、 命令実行ュニッ ト 1 3により制御されるシリァルイン夕フェース(その制御線は図示を 省略してある) 2 1を介してそのプログラム格納領域 1 70に対する書 込みが可能にされている。 Each of the step task buffers 16 and 17 has a pointer for sequentially reading out the instructions stored in the program storage areas 160 and 170 and the storage areas 160 and 170, respectively. 16 1 and 17 1. Although not particularly limited, the swap task buffer 16 can be written to its program storage area 160 by the execution unit 13 via the internal bus BUS. The swap task buffer 17 has a serial interface controlled by the instruction execution unit 13 (the control lines are shown in the figure). Writing to the program storage area 170 is enabled via 21).
スワップタスクバヅファ 1 6、 1 7の一例は第 3図〜第 6図に示され ている。第 3図の例はシフ トレジス夕とセレクタを格納領域 1 60 ( 1 70 ) とするものであり、 複数個の並列人出力型のラッチ L ATが縦続 されて成るシフ トレジス夕と、夫々のラツチ L ATの並列出力から 1ビ ッ トづっ選択して並列出力するセレクタ S E Lと、セレクタ S E Lを介 して、各位ラッチ L A Tの出力を上位側或いはド位側から順番にセレク 夕 S E Lに選択させるボイン夕 1 60 ( 1 70 ) とによって構成するこ とができる。例えば夫々 mビッ トのラツチ L A Tを n段備えるとすると、 nビヅ ト単位で順次命令を m回出力することができる。シフ トレジス夕 へのデータ書込みはシリアルイン夕フェース 2 1又は命令実行ュニッ 卜 1 3の制御で行われる。前記ラッチ L ATの段数は命令のビッ 卜数に 応じて決定され、第 4図には第 3図とはラッチ L ATの段数が異なる構 成が示されている。第 5図の例はダイナミック型メモリセル又はス夕テ ィ ヅク方メモリセルをマ 卜 リクス配置したメモリセルアレイ M C A 1 とア ド レスデコーダ A D E C 1 から成る R A M ( Random Access Memory) を格納領域 1 60とするものであり、 ポィン夕 1 6 1が RAM に対するアクセスァドレスを生成する。 RAMに対する書込みは命令実 行ュニッ 卜 1 3が制御する。第 6図の例は不揮 ¾性記憶素子をマトリク ス配置したメモリセルアレイ MCA 2とアドレスデコーダ AD E C 2 から成る ROM (Read Only Memory) を格納領域 1 60とするものであ り、 ポインタ 1 6 1が R 0 Mに対するアクセスアドレスを生成する。 スワップタスクバッファ 1 6 , 1 7には、 一つのまとまった処理を実 現するための命令系列によつて構成されるプログラムが格納される。特 定の命令系列によって実現される一つのまとまつた処理の単位を夕ス クと定義するならば、特定のタスクに係る処理プログラムが格納される ( 例えば、 D M A転送のための処理プログラム、 データ圧縮 '伸長のため の処理プログラムなどが設定される。 スヮヅプタスクバッファ 1 6 , 1 7への処理プログラムのロードは、 特に制限されないが、 パワーオンリ セッ トなどによるシステムィニシャライズ時にシリアルイン夕フエ一 ス 2 1や命令実行ュニヅ ト 1 3を介して行うことができる。 Examples of the swap task buffers 16 and 17 are shown in FIGS. In the example of FIG. 3, the shift register and the selector are assumed to be storage areas 160 (170), and a shift register having a plurality of parallel human output type latches LAT cascaded and respective latches are provided. A selector SEL that selects one bit at a time from the parallel output of LAT and outputs it in parallel, and a selector that selects the output of each latch LAT to the SEL in order from the upper or lower side via the selector SEL. Evening 1 60 (1 70). For example, if n stages of latches LAT each having m bits are provided, the instruction can be sequentially output m times in units of n bits. Data writing to the shift register is performed under the control of the serial interface 21 or the instruction execution unit 13. The number of stages of the latch LAT is determined according to the number of bits of the instruction, and FIG. 4 shows a configuration in which the number of stages of the latch LAT is different from that of FIG. In the example of FIG. 5, a RAM (Random Access Memory) consisting of a memory cell array MCA 1 in which dynamic memory cells or static memory cells are arranged in a matrix and an address decoder ADEC 1 is used as a storage area 160. Pointer 161 generates an access address to RAM. Instruction execution unit 13 controls writing to RAM. In the example shown in FIG. 6, a ROM (Read Only Memory) comprising a memory cell array MCA 2 in which nonvolatile memory elements are arranged in a matrix and an address decoder DEC 2 is used as a storage area 160, and a pointer 16 1 generates an access address for R0M. The swap task buffers 16 and 17 store a program composed of an instruction sequence for implementing one integrated process. A single unit of processing performed by a specific instruction sequence If it is defined as a task, a processing program related to a specific task is stored ( for example, a processing program for DMA transfer, a processing program for data compression / decompression, etc. are set. Loading of the processing program to 16 and 17 is not particularly limited, but can be performed via the serial interface 21 or the instruction execution unit 13 at the time of system initialization such as power-on reset. it can.
前記セレクタ 1 8はスワップタスクバッファ 1 6、 1 7と命令フェツ チユニッ ト 1 0との中から一つを選択して命令レジス夕 1 1に接続す る。 その接続制御は切換え制御回路 1 9が行う。 この切換え制御回路 1 9は、データプロセッサ 1のイニシャライズリセッ ト時に前記セレク夕 1 8に命令フエツチュニッ ト 1 0を選択させ、 その後、 内外で発生され る所定のィペン卜、 例えば、 内蔵周辺回路モジュール 2 0からの割り込 み信号 2 2や外部における所定のィベン ト発生の通知信号 2 3に従つ てセレクタ 1 8にスワップタスクバッファ 1 6又は 1 7の出力を選択 させる。 どのスワップタスクバッファを選択するかは、 ィベン 卜の発生 元とスワップタスクバッファとの対応テーブルを切換え制御回路 1 9 が備えて判定したり、或いはィベン ト発生の通知信号毎に P4有のスヮッ プタスクバッファを割り当てて制御することができる。  The selector 18 selects one of the swap task buffers 16 and 17 and the instruction fetch unit 10 and connects it to the instruction register 11. The connection control is performed by the switching control circuit 19. The switching control circuit 19 causes the selector 18 to select the instruction feature 10 at the time of the initialization reset of the data processor 1, and thereafter, a predetermined event generated inside and outside, for example, the built-in peripheral circuit module 2 The selector 18 selects the output of the swap task buffer 16 or 17 in accordance with the interrupt signal 22 from 0 and the notification signal 23 of the occurrence of a predetermined event outside. The swap task buffer to be selected is determined by the control circuit 19 by switching the correspondence table between the event source and the swap task buffer, or the P4 step is performed for each event generation notification signal. Task buffers can be allocated and controlled.
特に制限されないが、 前記命令実行ュニッ ト 1 3は、 前記命令レジス 夕 1 1に命令をラッチさせる指示信号 L I Rを出力する。命令レジス夕 1 1はその指示信号 L I Rに同期して命令をラッチする。 このとき、 前 記セレクタ 1 8は、前記切換え制御回路 1 9が選択する命令フェッチュ ニッ ト 1 0又はスワップタスクバッファ 1 6, 1 7にその指示信号 L I Rを供給する。命令フェッチュニッ 卜 1 0はその指示信号 L I Rを受け ると、命令レジス夕 1 1に供給すべき命令をその指示信 に基づいて更 新する。 また、 前記タスクバッファ 1 6 , 1 7はその指示信号 L I Rを 受けると、 前記ボイン夕 1 6 1 , 1 7 1をその指示信号 L I Rに基づい て更新する。 これにより、 セレクタ 1 8で選択されるスワップタスクバ ッファ 1 6又は 1 7のボイン夕 1 6 1又は 1 7 1が順次更新され、その ボイン夕の値に応じた命令が格納領域 1 60, 1 70から命令レジス夕 1 1に供給されることになる。 Although not particularly limited, the instruction execution unit 13 outputs an instruction signal LIR that causes the instruction register 11 to latch an instruction. The instruction register 11 latches the instruction in synchronization with the instruction signal LIR. At this time, the selector 18 supplies the instruction signal LIR to the instruction fetch unit 10 or the swap task buffers 16 and 17 selected by the switching control circuit 19. When receiving the instruction signal LIR, the instruction fetch unit 10 updates the instruction to be supplied to the instruction register 11 based on the instruction signal. Also, the task buffers 16 and 17 receive the instruction signal LIR. Upon receipt, the bus terminals 161 and 171 are updated based on the instruction signal LIR. As a result, the bus task 16 1 or 17 1 of the swap task buffer 16 or 17 selected by the selector 18 is sequentially updated, and the instruction corresponding to the value of the bus task is stored in the storage areas 160 and 170. Will be supplied to the Order Regis Evening 11.
スワップタスクバッファ 1 6, 1 7に格納されたプログラムの実行終 了は、当該プログラムの最後に実行される命令が命令デコーダ 1 2でデ コ一ドされて出力される終了信号 1 2 0によって切換え制御回路 1 9 が認識する。 切換え制御回路 1 9は、 そのデコ一ド結果 (終了信号 1 2 0 ) を受け取ると、 前記セレク夕 1 8を命令フエツチュニッ ト 1 0の選 択状態に戻す。  The end of the execution of the program stored in the swap task buffers 16 and 17 is switched by the end signal 120 output when the instruction executed at the end of the program is decoded by the instruction decoder 12 and output. The control circuit 19 recognizes. Upon receiving the decoded result (end signal 120), the switching control circuit 19 returns the selector 18 to the selected state of the instruction feature 10.
第 7図には命令実行ユニッ ト 1 3のレジス夕構成例が示される。汎用 レジス夕 GRは、 レジス夕 SR, R 0〜R 1 5を含む。 S Rはステ一夕 スレジス夕に割り当てられ、 R 0~R 7はデ一夕レジス夕やアドレスレ ジス夕に割り当てられ、 R 8 ~R 1 5はデ一夕レジス夕、 アドレスレジ ス夕、 スタックポィン夕等に割り当てられる。前記レジス夕セッ 卜 S 1 はレジス夕 S 1 SR, S 1 R 0〜S 1 R 7を含み、 前記レジス夕セッ 卜 S 2はレジス夕 S 2 SR, S 2 R 0~S 2 R 7を含み、 それらレジス夕 セッ ト S l, S 2は、 汎用レジス夕 GRのレジス夕 SR, R 0〜R 7に 代えて利用されるものであり、夬々固有のレジス夕ァドレスを有する。 レジス夕セッ ト S 1はスワップタスクバッファ 1 6に格納されたプロ グラムの実行に専用的に割り当てられ、レジス夕セッ ト S 2はスワップ タスクバッファ 1 7に格納されたプログラムの実行に専用的に割り当 てられ、 汎用レジス夕 GRのレジスタ SR, R 0〜R 7は命令フェッチ ユニッ ト 1 0から出力された命令の実行に割り当てられる。  FIG. 7 shows an example of a register configuration of the instruction execution unit 13. General-purpose Regis U GR includes Regis U SR, R0 to R15. SR is assigned to station overnight, address registers R0 to R7 are assigned to evening register and address register evening, and R8 to R15 are assigned to evening register and address register evening, stack Assigned to Poin Yu and others. The resist evening set S 1 includes the resist evening S 1 SR, S 1 R 0 to S 1 R 7, and the resist evening set S 2 includes the resist evening S 2 SR, S 2 R 0 to S 2 R 7. Including, these register sets S 1 and S 2 are used in place of the register registers SR and R 0 to R 7 of the general-purpose register GR and have unique register addresses. The register set S1 is dedicated to the execution of the program stored in the swap task buffer 16 and the register set S2 is dedicated to the execution of the program stored in the swap task buffer 17. The registers SR and R0 to R7 in the general-purpose register GR are assigned to execute the instructions output from the instruction fetch unit 10.
特に制限されないが、 汎用レジス夕 GRのレジス夕 SR, R 0~R 7、 レジス夕セッ 卜 S 1又はレジスタセッ ト S 2のどのレジス夕を利用す るかは、 レジス夕番号とタスクの種類によって決定され、例えばそれは、 命令のオペランドフィールドで指定される。命令フエッチュニッ ト 1 8 から出力される命令が選択されるとき命令実行ュニッ 卜 1 3は命令実 行に前記レジスタ SR, R 0〜R 1 5を用い、 スワップタスクバッファ 1 6から出力される命令が選択されるとき命令実行ュニッ ト 1 3は命 令実行に前記レジス夕 S 1 S R, S 1 R 0〜S 1 R 7を用い、 スワップ タスクバッファ 1 7から出力される命令が選択されるとき命令実行ュ ニッ ト 1 3は命令実行に前記レジス夕 S 2 SR, S 2 R 0〜S 2 R 7を 用いる。 Although not particularly limited, general-purpose registration evening GR registration evening SR, R 0 to R 7, Which register of register set S1 or register set S2 to use is determined by the register number and the type of task. For example, it is specified in the operand field of the instruction. When the instruction output from the instruction fetch unit 18 is selected, the instruction execution unit 13 uses the registers SR and R0 to R15 for executing the instruction, and the instruction output from the swap task buffer 16 is used. When selected, the instruction execution unit 13 uses the registers S1SR and S1R0 to S1R7 for instruction execution, and when an instruction output from the swap task buffer 17 is selected, the instruction is executed. The execution unit 13 uses the registers S2SR and S2R0 to S2R7 for executing instructions.
上述のように、 スヮヅプ夕スクバッファ 1 6, 1 7は夫々固有のポィ ン夕 1 6 1, 1 7 1を有し、 夫々のスワップタスクバッファ 1 6 , 1 7 に割り当てられた固有のレジス夕セッ ト S 1 , S 2を有するから、 実行 すべき夕スクが命令フェッチュニッ ト 1 0とスヮップ夕スクノ ッファ 1 6, 1 7との間で切換えられたとき、 プログラムカウン夕 P Cやレジ ス夕 GRの値を退避したり復帰したりするために外部メモリ 2等のス 夕ック領域をアクセスする処理を必要としない。  As described above, the swap buffers 16 and 17 have their own unique pointers 16 1 and 17 1, respectively, and the unique registry buffers assigned to the respective swap task buffers 16 and 17. Since it has sets S 1 and S 2, when the task to be executed is switched between the instruction fetch unit 10 and the swap task sniffer 16, 17, the program counter PC and the register GR are switched. There is no need to perform any processing to access the storage area such as the external memory 2 to save or restore the value of.
第 8図にはタスク切換えの動作例が示される。前記命令フエツチュニ ッ 卜 1 0からの命令を実行する (通常命令処理)状態の途上で、 例えば 信号 2 3によって、スワップタスクバッファ 1 6に格納されているプロ グラム (スワップタスク 1 ) の実行が要求されると、 切換え制御回路 1 9は、 パイプラインステージの切換わりに同期して、 セレクタ 1 8によ る選択状態をスヮップ夕スクバッファ 1 6に切換える。 これにより、 ス ヮップタスクバッファ 1 6は指示 ί3号 L I Rに同期してスワップタス ク 1の先頭の命令をポィン夕 1 6 1で指示して出力し、命令レジス夕 1 1がこれをラツチする。 また、 命令実行ュニッ ト 1 3は、 スヮップタス クを実行するときは、当該タスクの命令記述によって指定されるレジス 夕セッ ト S 1を利用する。 これにより、 プログラムカウン夕 P Cの退避、 レジスタ SR, R 0〜R 7の退避を要せずに、 スワップタスク 1の実行 に移ることができる。切換えられたスワップタスク 1の最後の命令が命 令デコーダ 12で解読されると、切換え制御回路 1 9はセレクタ 18に 命令フェッチュニヅ ト 10を選択させる。 このとき、 プログラムカウン 夕 P C;、 ステータスレジス夕 S R , データ及びァドレスレジス夕 R0〜 R 7は、前記ヮップタスク 1への切換え直前の値をそのまま維持してい る。スワップタスクバッファ 16に格納されていた命令の実行において レジス夕 R8~R 15は利用されない。 したがって、 通常命令への切換 えに際しても、 復帰のためのメモリアクセスを必要としない。第 9図に 示される通常命令処理と割り込み処理との切換えの場合には、切換えの 度に退避、 復帰のためのメモリアクセスが必要になる。 退避、 復帰のた めのメモリアクセスは、タスク切換え若しくはパイプライン切換えのォ 一バへッ ドになる。 FIG. 8 shows an example of task switching operation. During the execution of the instruction from the instruction fetch unit 10 (normal instruction processing), the execution of the program (swap task 1) stored in the swap task buffer 16 is requested by the signal 23, for example. Then, the switching control circuit 19 switches the selection state by the selector 18 to the skip buffer 16 in synchronization with the switching of the pipeline stage. As a result, the swap task buffer 16 instructs and outputs the first instruction of the swap task 1 in synchronization with the instruction # 3 LIR by the pin register 161, and the instruction register 11 latches it. I do. The instruction execution unit 13 is When executing a task, the register set S1 specified by the instruction description of the task is used. As a result, it is possible to move to the execution of the swap task 1 without having to save the program counter PC and the registers SR and R0 to R7. When the last instruction of the switched swap task 1 is decoded by the instruction decoder 12, the switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10. At this time, the values of the program counter PC; status register SR, data, and address register R0 to R7 are maintained as they were immediately before switching to the top task 1. In execution of the instruction stored in the swap task buffer 16, the registers R8 to R15 are not used. Therefore, even when switching to normal instructions, memory access for return is not required. In the case of switching between normal instruction processing and interrupt processing shown in Fig. 9, a memory access for saving and restoring is required every time switching is performed. Memory access for saving and restoring is a task switching or pipeline switching overhead.
第 10図には通常命令処理とスヮップタスク 1との切換え時におけ るパイプラインの状態の一例が示される。特に制限されないが、 本実施 例のデ一夕プロセッサ 1におけるパイプラインステージは 5段とされ、 通常命令処理におけるパイプラインステージは、 命令フエッチ ( I n)、 命令デコード (Dn) 、 演算 (En) 、 メモリアクセス (An) 及びレ ジスタス トァ (Sn)の各ステージとされる。 スワップタスクにおける パイプラインステージは、 命令転送 ( C s ) 、 命令デコード (D s ) 、 演算 ( E s ) 、 メモリアクセス (As) 及びレジス夕ス トア (S s) の 各ステージとされる。  FIG. 10 shows an example of the state of the pipeline at the time of switching between the normal instruction processing and the step task 1. Although not particularly limited, the pipeline stage in the data processor 1 of this embodiment has five pipeline stages, and the pipeline stages in the normal instruction processing include instruction fetch (In), instruction decode (Dn), and operation (En). , Memory access (An) and register store (Sn). The pipeline stages in the swap task are instruction transfer (C s), instruction decode (D s), operation (E s), memory access (As), and register store (S s).
例えば、パイプラインステージ mにおいてスヮップタスク 1の実行が 要求されると、 切換え制御回路 19は、 パイプラインステージ m+ 1に おいてセレクタ 1 8による選択状態をスワップタスクバッファ 1 6に 切換え、当該パイプラインステージ m + 1においてスワップタスク 1の 先頭の命令に対する命令が命令レジス夕 1 1に転送(C s 1 ) される。 タスク切換え時には前述の通りプログラムカウンタ P Cやレジス夕 S R, R 0〜R 7の退避を要せずに、 スワップタスク 1の実行に移ること ができる。以下パイプラインステージ毎に処理が一つずつ進められる。 命令実行ュニッ ト 1 3は、通常命令処理の実行では汎用レジス夕 G Rを 利用するが、スワップタスク 1の実行ではレジス夕セッ 卜 S 1を利用す る。どのレジス夕を利用するかは夫々の命令記述によって決定される。 切換えられたスワップタスク 1の最後の命令がパイプラインステージ nにおいて命令デコーダ 1 2で解読 (D s 1 ) されると、 切換え制御回 路 1 9に終了信号 1 2 0が供給される。切換え制御回路 1 9はパイブラ インステージ n + 1でセレクタ 1 8に命令フェッチュニヅ ト 1 0を選 択させ、これによつてパイプラインステージ n + 1以降では命令レジス 夕 1 1には命令フエッチユニッ ト 1 0から命令が供給される。通^命令 処理への切換えに際しても、 前述の通り、 復帰のためのメモリアクセス を必要としない。以上のように、 通常命令処理とスヮップタスク 1 との 間でのタスク切換えに際して ィプラインは一切乱れを生じていない。 第 1図において前記割り込み制御问路 1 3 1には、代表的に示された 割り込み要求信号 I R Qが供給される。割り込み制御回路 1 3 1はそれ に設定されている割り込み優先度に応じて割り込み要求を受け付ける。 本実施例では、 前記切換え制御回路 1 9は、 スワップタスクバッファ 1 6又は 1 7をセレクタ 1 8に選択させている状態において、割り込み受 け付け禁止信号 I N Hをイネ一ブルにして割り込み制御回路 1 3 1に 供給する。割り込み制御回路 1 3 1は、 割り込み禁止信号 I N Hがイネ 一ブルにされているとき割り込み要求を一切受け付けない。したがって、 デ一夕プロセッサ 1は、スワップタスクバッファ 1 6又は 1 7のプログ ラムに従ったタスクを実行しているとき、そのタスクの実行完了まで、 タスクの切換えは行われない。換言すれば、 スヮップタスクバッファ 1 6又は 1 7に格納されたプログラムによるタスクには最も高い実行優 先度が与えられることになる。割り込み制御回路 1 3 1は、 割り込み要 求を受け付けると、 現在の命令実行を中断し、 プログラムカウン夕 P C、 ステータスレジスタ S R、データ及びァドレスレジス夕 R 0〜R 1 5の 内 等を外部メモリ 2等のスタック領域に退避し、 その後、 受け付けた 割り込み要求処理プログラムに分岐される。 For example, when execution of step task 1 is requested in pipeline stage m, the switching control circuit 19 switches to pipeline stage m + 1. In the pipeline stage m + 1, the instruction corresponding to the first instruction of the swap task 1 is transferred to the instruction register 11 (C s 1). When switching tasks, as described above, it is possible to move to the execution of swap task 1 without having to save the program counter PC and registers SR and R0 to R7. Hereinafter, the processing is advanced one by one for each pipeline stage. The instruction execution unit 13 uses the general-purpose register GR for execution of normal instruction processing, but uses the register S1 for execution of the swap task 1. Which register evening to use is determined by each command description. When the last instruction of the switched swap task 1 is decoded (D s 1) by the instruction decoder 12 in the pipeline stage n, the end signal 120 is supplied to the switching control circuit 19. The switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10 at the pipeline stage n + 1, whereby the instruction register unit 11 is provided at the instruction register 11 after the pipeline stage n + 1. Instructions are supplied from 0. As described above, memory access for restoration is not required when switching to normal instruction processing. As described above, there is no disturbance in the pipeline when the task is switched between the normal instruction processing and the swap task 1. In FIG. 1, the interrupt control circuit 1331 is supplied with an interrupt request signal IRQ shown as a representative. The interrupt control circuit 131 accepts an interrupt request according to the interrupt priority set for the interrupt control circuit. In the present embodiment, the switching control circuit 19 enables the interrupt acceptance inhibition signal INH while the swap task buffer 16 or 17 is selected by the selector 18 to enable the interrupt control circuit 1. 3 Supply to 1. The interrupt control circuit 131 does not accept any interrupt request when the interrupt disable signal INH is enabled. Therefore, When executing a task according to the program of the swap task buffer 16 or 17, the data processor 1 does not switch tasks until the execution of the task is completed. In other words, the task executed by the program stored in the step task buffer 16 or 17 is given the highest execution priority. When receiving an interrupt request, the interrupt control circuit 13 1 suspends the execution of the current instruction and stores the contents of the program counter PC, status register SR, data and address register R 0 to R 15 into the external memory 2, etc. And then branch to the accepted interrupt request processing program.
第 1 1図には上述のようにスワップタスク中に割り込みを受け付け ない場合の動作例が示される。通常処理の途中で割り込み要求があると、 戻り番地などを退避した後、 割り込み処理に分岐され、 割り込み処理が 終了されると、 復帰処理を行った後に、 通常処 ί¾に戻される。 通常処理 においてスヮップタスク 1の実行要求があると、切換え制御回路 1 9は スワップタスクバッファ 1 6を選択させて、即座にスヮップタスク 1の 実行に移される。スワップタスク 1の実行中は前記割り込み禁止信号 I Ν Ηがイネ一ブルにされるので、 割込み要求があっても、 その間は割り 込み要求は受け付けられない。受け付け禁止されていた割り込み要求は、 スワップタスク 1の実行完了後に割り込み禁止信号 I Ν Ηがディスェ 一ブルにされた後受け付けられる。割り込み処理に分岐する際には先ず、 中断されている通常命令処理の戻り番地やレジス夕の値を退避させ、そ の後割り込み処理に分岐される。割り込み処理終了後は、 退避された情 報を復帰させた後、 通常命令処理に戻される。  FIG. 11 shows an operation example when an interrupt is not accepted during the swap task as described above. If there is an interrupt request during normal processing, the program returns to the normal processing after saving the return address, etc., then branches to interrupt processing. When the interrupt processing is completed, it returns to normal processing. When there is a request to execute the swap task 1 in the normal processing, the switching control circuit 19 causes the swap task buffer 16 to be selected, and is immediately shifted to the execution of the swap task 1. While the swap task 1 is being executed, the interrupt disable signal IΝ is enabled, so that even if there is an interrupt request, no interrupt request is accepted during that time. The interrupt request that has been disabled is accepted after the interrupt disable signal I_Ν is disabled after the execution of swap task 1 is completed. When branching to interrupt processing, first, the return address of the interrupted normal instruction processing and the value of the register are saved, and then the processing branches to interrupt processing. After interrupt processing is completed, the saved information is restored, and then the process returns to normal instruction processing.
第 1 2図には本発明に係るデータプロセッサの第 2の実施例が示さ れる。 図に示されるデータプロセッサ 1 Αは、 スワップタスクバッフ ァ 1 6又は 1 7に格納されたプログラムによるタスクの実行中にも割 り込みを受付可能にした点が、第 1図のデータプロセッサ 1 と相違され る。 その他の点については第 1図と同じであり、 それと同一機能の回路 プロックには同一符号を付してその詳細な説明を省略する。 FIG. 12 shows a second embodiment of the data processor according to the present invention. The data processor 1 shown in the figure can be assigned while executing the task by the program stored in the swap task buffer 16 or 17. The difference from the data processor 1 in FIG. The other points are the same as those in FIG. 1, and the same reference numerals are given to the circuit blocks having the same functions, and detailed description thereof will be omitted.
デ一夕プロセッサ 1 Aにおいて、割り込み制御回路 1 3 1は割り込み 要求を受け付けると、割り込み制御信号 I C N Tをイネ一ブルにして前 記切換え制御回路 1 9に供給する。切換え制御回路 1 9は、 セレクタ 1 8がスワップタスクバッファ 1 6又は 1 7を選択しているとき、割り込 み制御信号 I C N Tがイネ一ブルにされると、セレクタ 1 8による選択 状態を命令フヱツチュニッ 卜 1 0に切換え制御する。更に、 切換え直前 に選択されていたスヮップタスクバッファ 1 6 , 1 7を特定するための 情報 (スワップタスク選択情報) を退避する。 退避先は、 切換え制御回 路 1 9内部の図示を省略する退避用ラッチとすることが望ましい。外部 メモリ 2等のスタック領域に退避させてもよいが、 その場合には、 当該 割り込み処理からスヮップタスクに復帰する時にスヮップタスク選択 情報を復帰させるのに外部バスアクセスサイクルを起動しなければな らず、 スヮップタスク処理への復帰が遅れるからである。  In the processor 1A, when the interrupt control circuit 1331 receives the interrupt request, it enables the interrupt control signal ICNT and supplies it to the switching control circuit 19 described above. When the selector 18 selects the swap task buffer 16 or 17 and the interrupt control signal ICNT is enabled, the switching control circuit 19 instructs the selection state by the selector 18 to an instruction. Switch to control 10 Further, the information (swap task selection information) for specifying the swap task buffers 16 and 17 selected immediately before switching is saved. The evacuation destination is desirably an evacuation latch (not shown) inside the switching control circuit 19. It may be saved in the stack area such as the external memory 2, but in that case, when returning from the interrupt processing to the step task, an external bus access cycle must be started to restore the step task selection information. This is because the return to the step task processing is delayed.
スワップタスクの実行中に割り込みを受け付ける場合、それ以前に通 常命令処理からスヮップタスクへの分岐が行われている。したがって、 当該割り込み処理を完了した後、現在中断中の通常処理に復帰出来るよ うにしなければならない。 このため、 前記セレクタ 1 8の切換えとスヮ ップタスク選択情報の退避の後、現在中断している通常命令処理の戻り 番地とレジス夕情報が退避され、 その後、 割り込み処理プログラムに分 岐される。  If an interrupt is accepted during execution of the swap task, a branch from normal instruction processing to the swap task has been made before that. Therefore, it is necessary to be able to return to the interrupted normal processing after completing the interrupt processing. Therefore, after the selector 18 is switched and the step task selection information is saved, the return address of the currently interrupted normal instruction processing and the register information are saved, and thereafter, the process is branched to an interrupt processing program.
第 1 3図にはスワップタスク中に割り込みを受け付ける場合の動作 例が示される。通常命令処理の途中で割り込み要求があると、 戻り番地 などを退避した後、 割り込み処理に分岐され、 割り込み処理が終了され ると、 復帰処理を行った後に、 通常命令処理に戻される。 通常命令処理 においてスワップタスク 1の実行要求があると、切換え制御回路 1 9は スワップタスクバッファ 1 6をセレクタ 1 8に選択させて、即座にスヮ ップタスク 1の実行に移される。割り込み制御回路 1 3 1は、 スワップ タスク 1の実行中でも割り込みを受け付けることができ、割り込みを受 け付けると、割り込み制御信号 I C N Tをイネ一ブルにして前記切換え 制御回路 1 9に供給する。 これによつて切換え制御回路 1 9は、 セレク 夕 1 8による選択状態を命令フェッチュニッ ト 1 0に切換え制御する と共に、そのとき選択されていたスワップタスクバッファを特定するた めのスワップタスク選択情報を退避する。 そして、 割り込みを受け付け た命令実行ュニッ ト 1 3は、それ以前に処理が中断されている通常命令 処理の戻り番地とレジス夕情報をスタック領域に退避( S 1 ) した後、 割り込み処理プログラムに分岐する。 この割り込み処理が終了 (T 1 ) されると、 前記割り込み制御信号 I C N Tがディスエーブルにされ、 こ れによって切換え制御回路 1 9は、退避されているスヮップタスク選択 情報に従って、 中断されていたスワップタスク 1の実行を再開する。 こ のスワップタスク 1の最後の命令が命令デコーダ 1 2で解読されると、 終了信号 1 2 0が切換え制御回路 1 9に与えられ、 これによつて、 切換 え制御回路 1 9はセレクタ 1 8に命令フエツチ回路 1 0の出力を選択 させる。 そうすると、 前記割り込み処理の後の復帰処理 ( S 2 ) が開始 され、退避されていた通常命令処理の戻り番地やレジス夕情報が復帰さ れて、 通常命令処理が再開される。 その復帰処理 ( S 2 ) は、 割り込み 処理終了 (T 1 )後に再開されるスワップタスク処理 1の終了まで引き 伸ばされているが、 これは、 割り込み処理が終了 (T 1 ) されたとき、 切換え制御回路 1 9は、前記スヮプタスク選択情報が退避されているこ とに基づいて、セレクタ 1 8を先ずスヮップタスクバッファ 1 6に切換 えるからである。 Figure 13 shows an example of operation when an interrupt is accepted during the swap task. If there is an interrupt request in the middle of normal instruction processing, the program returns to the return address, etc., branches to interrupt processing, and the interrupt processing ends. Then, after performing the return processing, it returns to the normal instruction processing. When there is a request to execute the swap task 1 in the normal instruction processing, the switching control circuit 19 causes the selector 18 to select the swap task buffer 16 and immediately proceeds to the execution of the swap task 1. The interrupt control circuit 1331 can receive an interrupt even during execution of the swap task 1, and upon receiving the interrupt, enables the interrupt control signal ICNT and supplies it to the switching control circuit 19. As a result, the switching control circuit 19 switches the selection state of the selector 18 to the instruction fetch unit 10 and controls the switching task selection information for identifying the swap task buffer selected at that time. evacuate. Then, the instruction execution unit 13 that has accepted the interrupt saves the return address and the register information of the normal instruction processing in which the processing has been interrupted earlier to the stack area (S1), and then branches to the interrupt processing program. I do. When the interrupt processing is completed (T 1), the interrupt control signal ICNT is disabled, and the switching control circuit 19 causes the interrupted swap task 1 according to the saved swap task selection information. Resume execution of. When the last instruction of the swap task 1 is decoded by the instruction decoder 12, an end signal 120 is given to the switching control circuit 19, whereby the switching control circuit 19 switches the selector 18. Causes the output of the instruction fetch circuit 10 to be selected. Then, the return processing (S2) after the interrupt processing is started, the return address and the register information of the saved normal instruction processing are restored, and the normal instruction processing is restarted. The return processing (S2) is extended until the end of the swap task processing 1 which is resumed after the end of the interrupt processing (T1), but this is switched when the interrupt processing is ended (T1). The control circuit 19 first switches the selector 18 to the swap task buffer 16 based on the fact that the step task selection information has been saved. Because you can.
第 1 4図には本発明に係るデ一夕プロセッサの第 3の実施例が示さ れる。同図に示されるデータプロセッサ 1 Bはス一パスカラァ一キテク チヤを有し、複数の命令を 2本のパイプラインによって並列的に実行す ることができる。 すなわち、 命令レジス夕 1 1 Aにラツチした命令を命 令デコーダ 1 2 Aで解読して命令実行ュニッ 卜 1 3 Aがその命令を実 行する第 1の命令実行制御系列と、命令レジス夕 1 1 Bにラッチした命 令を命令デコーダ 1 2 Bで解読して命令実行ュニッ 卜 1 3 Bがその命 令を実行する第 2の命令実行制御系列とを有する。第 1の命令実行制御 系列で行われるパイプライン処理をパイプ 0と称し、第 2の命令実行制 御系列で行われるパイプライン処理をパイプ 1 と称する。 L I R Aは命 令レジス夕 1 1 Aに対する命令ラツチの指示信号、 L I R Bは命令レジ ス夕 1 1 Bに対する命令ラツチの指示信 であり、前記指示信号 L I R に対応される。  FIG. 14 shows a third embodiment of the data processor according to the present invention. The data processor 1B shown in FIG. 1 has a single-pass color architecture, and can execute a plurality of instructions in parallel by two pipelines. That is, the instruction latch unit 11A decodes the instruction latched to the instruction register 11A with the instruction decoder 12A, and the instruction execution unit 13A executes the instruction. The instruction execution unit 13B decodes the instruction latched in 1B by the instruction decoder 12B, and the instruction execution unit 13B has a second instruction execution control sequence for executing the instruction. Pipeline processing performed in the first instruction execution control sequence is referred to as pipe 0, and pipeline processing performed in the second instruction execution control sequence is referred to as pipe1. LIRA is an instruction latch instruction signal for the instruction register 11A, and LIRB is an instruction latch instruction signal for the instruction register 11B, and corresponds to the instruction signal LIR.
前記命令実行ュニッ ト 1 3 A、 1 3 Bは夫々に専用化されたシーケン ス制御回路 1 3 2 A, 1 3 2 Bと演算回路 1 3 3 A , 1 3 3 Bを冇する。 パイプ 0とパイプ 1 との間で生ずるデータコ ンフリク 卜のような命令 相互間の依存関係は競合管理ュニッ ト 2 5が命令デコーダ 1 2 A, 1 2 Bのデコ一ド結果に基づいて検出する。 すなわち、 競合管理ュニッ ト 2 5は、 命令デコーダ 1 2 A, 1 2 Bからの命令解読結果に基づいて、 ノ イブ 0とパイプ 1による命令の並列実行が可能か否かについてそれら 命令相互間の依存関係を調べ、他の命令の実行結果に依存することにな る命令の実行を遅らせるように、 制御 ί 号 A R B A, A R B Bによって シーケンス制御回路 1 3 2 A , 1 3 2 Bを制御する。  The instruction execution units 13A and 13B respectively have dedicated sequence control circuits 13A and 13B and arithmetic circuits 13A and 13B. Dependencies between instructions such as data conflicts between pipes 0 and 1 are detected by the conflict management unit 25 based on the decoded results of the instruction decoders 12A and 12B. In other words, the contention management unit 25 determines whether or not parallel execution of instructions by the nove 0 and the pipe 1 is possible based on the result of decoding the instructions from the instruction decoders 12A and 12B. The dependency relationship is examined, and the sequence control circuits 1332A and 1332B are controlled by the control signals ARBA and ARBB so as to delay the execution of an instruction that depends on the execution result of another instruction.
割り込み制御回路 1 3 1、 プログラムカウン夕 P C, 汎用レジス夕 G Interrupt control circuit 13 1, program counter PC, general-purpose register G
Rは双方の命令実行ュニッ 卜 1 3 A , 1 3 Bに共 ¾されている。 レジス 夕セッ ト S 1 , S 2は命令実行ュニッ 卜 1 3 Bに専用化されている。 そ れらの詳細については第 1図のデ一夕プロセッサと同じである。 R is shared by both instruction execution units 13A and 13B. Regis Evening sets S 1 and S 2 are dedicated to instruction execution unit 13 B. The details are the same as those of the data processor in Fig. 1.
このス一パスカラアーキテクチャーのデ一夕プロセッサ 1 Bにおい て、 前記セレクタ 1 8、 切換え制御回路 1 9及びスワップタスクバッフ ァ 1 6, 17は命令レジス夕 1 1 B側の命令実行制御系列に配置されて いる。 そして、 第 1図のデータプロセッサと同様に、 命令フェッチュニ ヅ ト 1 0、 命令キヤッシュメモリ 1 4、 内蔵周辺モジュール 20、 デ一 夕キャッシュメモリ 1 5などが設けられている。第 14図において第 1 [¾1と同一機能を有するものには同一符^を付してその詳細な説明を省 略する。 尚、 第 14図の場合、 双方のスワップタスクバッファ 1 6、 1 7は内部バス BU Sを介してプログラムの初期ロードが行われるよう になっている。  In the data processor 1B of the fast path scalar architecture, the selector 18, the switching control circuit 19, and the swap task buffers 16 and 17 correspond to the instruction execution control sequence of the instruction register 11B. It is located. As in the data processor of FIG. 1, an instruction fetch unit 10, an instruction cache memory 14, a built-in peripheral module 20, a data cache memory 15 and the like are provided. In FIG. 14, components having the same functions as those of the first [# 1] are denoted by the same reference characters and their detailed description is omitted. In the case of FIG. 14, both swap task buffers 16 and 17 are designed so that the program is initially loaded via the internal bus BUS.
第 1 5図にはデータプロセッサ 1 Bにおいてデータコンフリク トを 生じた場合の制御とタスク切換え制御の内容が例 ^されている。  FIG. 15 shows an example of the contents of control and task switching control when a data conflict occurs in the data processor 1B.
例えばパイプラインステージ mで夫々命令レジス夕 1 1 A, 1 1 Bに ラツチされた命令のデコ一ドステージ (Π1+ 1 )で競合管理ュニッ ト 2 5がデータコンフリク トを検出すると、後から実行されるべき命令の実 行は、 先に実行されるべき命令の実行結果が得られるまで NO P (ノ ン -オペレーション) とされる。 すなわち、 パイプラインステージ (m +4) におけるパイプ 0のレジス夕ス トア (S n) の結果を当該ステ一 ジ (m+4) におけるパイプ 1の演算ステージ (E n) で利用できるよ うになるまで、 パイブ 1のパイプラインステージが NO Pとされる。 また、パイプラインステージ m + 3においてスワップタスク 1の実行 が要求されると、 切換え制御回路 1 9は、 パイプラインステージ m + 4 においてセレクタ 1 8による選択状態をスヮヅプ夕スクバッファ 1 6 に切換え、当該パイプラインステージ m+4においてパイプ 1ではスヮ ップタスク 1の先頭の命令に対する命令が命令レジス夕 1 1 Bに転送 される (C s 1 ) 。 タスク切換え時には前述の通りプログラムカウン夕 P Cやレジス夕 S R, R 0〜R 7の退避を要せずに、 スワップタスク 1 の実行に移ることができる。以下パイプ 1のパイプラインステージ毎に 処理が順次進められる。 このとき、 命令実行ュニッ ト 1 3 Bは、 スヮッ プタスク 1の実行にはレジス夕セヅ 卜 S 1を利用する。どのレジス夕を 利用するかは前記の例と同様に夫々の命令記述によって決定される。切 換えられたスヮヅブタスク 1の最後の命令がパイプ 1におけるパイプ ラインステージ n + 1で命令デコーダ 1 2 Bにてデコードされると、切 換え制御回路 1 9に終了信号 1 2 0が供給される。切換え制御回路 1 9 はパイプラインステージ n + 1でセレクタ 1 8に命令フェッチュニ ヅ ト 1 0を選択させ、これによつてパイプ 1のパイプラインステージ n + 1以降では命令レジスタ 1 1 Bには命令フェツチュニヅ ト 1 0から命 令が供給される。これによつてパイプ 1では通常命令処理が再開される。 通常命令処理への切換えに際しても、 前述の通り、 復帰のためのメモリ アクセスを必要としない。 以上のように、 通常命令処理とスヮップ夕ス ク 1 との問でのタスク切換えに際して、パイプラインは一切乱れを生じ ていない。 For example, if the conflict management unit 25 detects a data conflict at the decode stage (Π1 + 1) of the instruction latched to the instruction register 11A or 11B at the pipeline stage m, it is executed later. The execution of the instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is obtained. That is, the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 4) can be used at the operation stage (E n) of the pipe 1 at the stage (m + 4). Until then, the pipeline stage of Pive 1 is NOP. When the execution of the swap task 1 is requested at the pipeline stage m + 3, the switching control circuit 19 switches the selection state of the selector 18 to the skip buffer 16 at the pipeline stage m + 4, At pipeline stage m + 4, pipe 1 The instruction for the first instruction of step 1 is transferred to the instruction register 11B (Cs1). When switching tasks, as described above, it is possible to move to the execution of swap task 1 without having to save the program counter PC and the registry SR and R0 to R7. Hereafter, the processing proceeds sequentially for each pipeline stage of pipe 1. At this time, the instruction execution unit 13B uses the register set S1 to execute the step task 1. Which register evening to use is determined by each command description as in the above example. When the last instruction of the switched subtask 1 is decoded by the instruction decoder 12 B at the pipeline stage n + 1 in the pipe 1, an end signal 120 is supplied to the switching control circuit 19. The switching control circuit 19 causes the selector 18 to select the instruction fetch unit 10 at the pipeline stage n + 1, whereby the instruction register 11 B is stored in the instruction register 11 B after the pipeline stage n + 1 of the pipe 1. Instruction is supplied from fetish unit 10. As a result, normal instruction processing is resumed in pipe 1. As described above, switching to normal instruction processing does not require memory access for restoration. As described above, there is no disturbance in the pipeline when task switching is performed between normal instruction processing and step 1.
第 1 6図には本発明に係るデ一夕プロセッサの第 4の実施例が示さ れる。同図に示されるデータブロセッサ 1 Cは前記データプロセッサ 1 Bと同様にス一パスカラアーキテクチャを有し、複数の命令を 2本のパ ィプラインによって並列的に実行することができる。デ一夕プロセッサ 1 Bと相違する点は、パイプ 0及びパイプ 1によって通常命令処理を行 つているときのデ一タコンフリク トの発生をスヮップタスクへの切換 え要因の ·つとして有することである。競合管理ュニッ 卜 2 5はデ一夕 コ ンフリク 卜の発生に同期する制御信号 2 5 0を切換え制御回路 1 9 に与える。 これによつて切換え制御回路 1 9は、 データコンフリク 卜に よる通常命令処理におけるパイプ 1の空きを利用してスワップタスク 1の処理を行なう。但し、 パイプ 1側の命令レジス夕 1 1 B及び命令デ コーダ 1 2 Bは一組しかないので、デ一タコンフリク トによって実行が 中断された命令実行の再開に際しては、命令フエツチからやり直すこと になる。 その制御はシーケンス制御回路 1 3 2 Bが行なう。 その他の構 成は図 1 4のデータプロセッサ 1 Bと同じであるのでその構成の詳細 な説明は省略する。 FIG. 16 shows a fourth embodiment of the data processor according to the present invention. The data processor 1C shown in the figure has a single-path scalar architecture like the data processor 1B, and can execute a plurality of instructions in parallel by two pipelines. The difference from the data processor 1B is that the occurrence of data conflicts during normal instruction processing by pipes 0 and 1 is one of the factors for switching to the step task. The conflict management unit 25 switches a control signal 250 synchronized with the occurrence of a data conflict and a control circuit 19 Give to. As a result, the switching control circuit 19 performs the swap task 1 using the free space of the pipe 1 in the normal instruction processing due to the data conflict. However, since there is only one set of the instruction register 11B and the instruction decoder 12B on the pipe 1 side, when resuming the execution of the instruction whose execution was interrupted by the data conflict, the instruction fetch must be started again. . The control is performed by the sequence control circuit 13B. The rest of the configuration is the same as that of the data processor 1B in FIG. 14, so a detailed description of the configuration will be omitted.
第 1 7図にはデ一タコンフリク トを生じたときのタスク切換え制御 の内容が例示されている。例えばパイプライ ンステージ mで夫々命令レ ジス夕 1 1 A, 1 1 Bにラッチされた命令のデコードステージ ( m + 1 ) で競合管理ュニッ 卜 2 5がデータコンフリク 卜を検出すると、 後か ら実行されるべき命令の実行は、先に実行されるべき命令の実行結果を 利用できるまで N O P (ノン 'オペレ一シヨン) とされる。 すなわち、 パイプラインステージ(m + 4 )におけるパイプ 0のレジスタス トァ( S n ) の結果を当該ステージ (m + 4 ) におけるパイプ 1の演算ステージ ( E n )で利用できるようになるまで、 パイプ 1のパイプラインステー ジにおける通常命令処理の実行が停止される。その指示は制御信 A R B Bによって命令実行ュニッ ト 1 3 Bに通知される。 このとき、 競合管 理ュニッ ト 2 5は制御信号 2 5 0を活性化して切換え制御回路 1 9に 与える。切換え制御回路 1 9は、 それに応答してセレクタ 1 8にスヮッ プタスクバッファ 1 6を選択させる。 これにより、 パイプラインステー ジ m+ 1〜! 11 + 5においてパイプ 1は、 スワップタスク 1の処理を行う ことができる。 スワップタスク 1の処 ¾に許容される期間は、 データコ ンフリク 卜によってパイブ 1の通常命令処理が巾断される期問であり、 その期間は競合管理ュニッ ト 2 5で制御され、制御信号 2 5 0に反映さ れ、 当該制御信号 2 5 0がインアクティブにされることによって、 セレ クタ 1 8の選択状態は元の通常命令処理の選択状態(命令フェッチュニ ヅ 卜 1 0の選択状態) に戻される。 タスク切換え時には前述の通りプロ グラムカウン夕 P Cやレジス夕 S R , R 0 〜R 7の退避を要せずに、 ス ヮップタスク 1の実行に移ることができる。 このとき、 命令実行ュニ ヅ 卜 1 3 Bは、スワップタスク 1の実行にはレジス夕セッ ト S 1を利用す る。どのレジス夕を利用するかは前記の例と同様に夫々の命令記述によ つて決定される。 FIG. 17 illustrates the contents of the task switching control when a data conflict occurs. For example, if the conflict management unit 25 detects a data conflict at the decode stage (m + 1) of the instruction latched at the instruction register 11A and 11B respectively at the pipeline stage m, it is executed later. Execution of the instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is available. That is, until the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 4) becomes available at the operation stage (E n) of the pipe 1 at the stage (m + 4), the pipe 1 Execution of the normal instruction processing in the pipeline stage is stopped. The instruction is notified to the instruction execution unit 13B by the control signal ARBB. At this time, the competition management unit 25 activates the control signal 250 and supplies it to the switching control circuit 19. The switching control circuit 19 causes the selector 18 to select the step task buffer 16 in response thereto. With this, the pipeline stage m + 1 ~! At 11 + 5, pipe 1 can process swap task 1. The period allowed for the processing of the swap task 1 is the period when the normal instruction processing of the pipe 1 is interrupted by the data conflict, and the period is controlled by the conflict management unit 25 and the control signal 25 Reflected in 0 When the control signal 250 is deactivated, the selected state of the selector 18 is returned to the original selected state of the normal instruction processing (the selected state of the instruction fetch unit 10). When switching tasks, as described above, it is possible to proceed to step task 1 without having to save the program counter PC and the registry SR, R0 to R7. At this time, the instruction execution unit 13B uses the register set S1 to execute the swap task 1. Which register is to be used is determined by each command description as in the above example.
図 1 7の例では、パイプラインステージ m + 3で夫々命令レジス夕 1 1 A , 1 1 Bにラッチされた命令のデコードステージ (m + 4 ) におい ても競合管理ュニッ ト 2 5がデ一タコンフリク 卜を検出して、上記同様 に、 パイプラインステージ (m + 7 ) におけるパイプ 0のレジス夕ス ト ァ (S n ) の結果を当該ステージ (m + 7 ) におけるパイプ 1の演算ス テ一ジ (E n ) で利用できるようになるまで、 パイプ 1のパイプライン ステージにおける通常命令処理の実行が停止され、 それに代えて、 パイ プ 1は、 スワップタスク 1の処理を行なってる。 この例では、 スワップ タスク 1の処理は細切れであり、その処理夕ィ ミングもデータコンフリ ク ト発生時に限定されているが、デ一夕コンフリク トに固有の処理ゃ処 理イン夕一バルに制限のない処理に適用して有効である。 また、 制御信 号 2 5 0は、 前記信号 2 2、 2 3で選択されたスワップタスクを実際に 処理するタイ ミングを規定する制御信号として利用してもよい。  In the example of FIG. 17, in the decode stage (m + 4) of the instructions latched in the instruction registers 11A and 11B at the pipeline stage m + 3, the conflict management unit 25 also has In the same manner as described above, a tacon conflict is detected, and the result of the register store (S n) of the pipe 0 in the pipeline stage (m + 7) is calculated in the same manner as that of the pipe 1 in the stage (m + 7). Execution of normal instruction processing in the pipeline stage of pipe 1 is halted until it becomes available in (E n). Instead, pipe 1 is processing swap task 1. In this example, the processing of the swap task 1 is fragmented and its processing is limited to the time when a data conflict occurs, but it is limited to the processing unique to the data conflict and the processing time. It is effective to apply to the processing without. Further, the control signal 250 may be used as a control signal that defines the timing for actually processing the swap task selected by the signals 22 and 23.
第 1 8図には本発明に係るデ一夕プロセッサの第 5の実施例が示さ れる。同図に示されるデ一夕プロセッサ 1 Dは前記デ一夕プロセッサ 1 Bと同様にス一パスカラアーキテクチャを有し、複数の命令を 2本のパ ィプラインによって並列的に実行することができる。デ一夕プロセッサ 1 Dは、 デ一夕プロセッサ 1 Cと同様に、 パイブ 0及びパイプ 1によつ て通常命令処理を行っているときのデ一タコンフリク 卜の発生をスヮ ップタスクへの切換え要因の一つとするが、そのとき実行されるスヮッ プタスクに専用的に割り当てられる命令レジス夕 1 1 cと命令デコー ダ 1 2 Cを備える点が前記デ一夕プロセッサ 1 Cと相違される。命令レ ジス夕 1 1 Cの入力の選択はセレクタ 2 6が行い、命令デコーダ 1 2 B 又は 1 2 Cの出力はセレクタ 2 7によって選択される。 FIG. 18 shows a fifth embodiment of the data processor according to the present invention. The data processor 1D shown in the figure has a space scalar architecture like the data processor 1B, and can execute a plurality of instructions in parallel by two pipelines. Data processor 1D is connected to pipe 0 and pipe 1 in the same way as data processor 1C. The occurrence of data conflict during normal instruction processing is considered as one of the switching factors to the step task, and the instruction register 11c dedicated to the step task executed at that time is It is different from the processor 1C in that it has an instruction decoder 12C. The instruction register 11 C input is selected by the selector 26, and the output of the instruction decoder 12 B or 12 C is selected by the selector 27.
競合管理ュニッ ト 2 5はデ一タコンフリク 卜の発生に同期してイネ 一ブルにされる制御信号 2 5 0を切換え制御回路 1 9 と前記セレクタ 2 7に与える。これによつてセレクタ 2 7は命令デコーダ 1 2 Cの出力 を選択すると共に、制御信号 L I R Bも命令レジス夕 1 1 C側に供給さ れ、 命令レジスタ 1 1 Bは現在保持している命令をそのまま維持し、 そ れに代えて命令レジスタ 1 1 Cが制御信号 L I R Bに従って新たな命 令をラッチ可能にされる。 また、 切換え制御回路 1 9は、 イネ一ブル状 態の制御信号 2 5 0によってセレクタ 2 6によってスワップタスクバ ッファ 1 6又は 1 7を命令レジス夕 1 1 Cに接続する。どちらを接続す るかは選択可能であっても固定的であってもよい。例えばデータプロセ ッサのイニシャライズリセッ ト時に,没定される動作モードに応じて何 れを選択するかを決定するようにできる。  The conflict management unit 25 supplies a control signal 250 enabled in synchronization with the occurrence of the data conflict to the switching control circuit 19 and the selector 27. As a result, the selector 27 selects the output of the instruction decoder 12C, the control signal LIRB is also supplied to the instruction register 11C, and the instruction register 11B retains the currently held instruction. And instead, instruction register 11C is enabled to latch new instructions according to control signal LIRB. Further, the switching control circuit 19 connects the swap task buffer 16 or 17 to the instruction register 11 C by the selector 26 by the control signal 250 in the enable state. Which connection is to be made may be selectable or fixed. For example, at the time of initialization reset of the data processor, it is possible to determine what to select according to the operation mode determined.
データコンフリク トによる通常命令処理のパイプ 1の空きを利用し て例えばスワップタスク 1の処理を行なう場合、パイプ 1側にはそれ専 用の命令レジス夕 1 1 C及び命令デコーダ 1 2 Cを備えるから、データ コンフリク 卜によって実行が中断された命令実行の再開に際しては、デ 一夕プロセッサ 1 Cのように命令フエツチからやり直す必要はない。即 ちパイプラインは一切乱れない。その他の構成はデ一夕プロセッサ 1 C と同じであるのでその構成の詳細な説明は省略する。  For example, when the swap task 1 is processed by utilizing the free space in the pipe 1 for normal instruction processing due to data conflict, the pipe 1 has its own instruction register 11C and instruction decoder 12C. When resuming the execution of an instruction whose execution has been interrupted by a data conflict, it is not necessary to start over from the instruction fetch unlike the data processor 1C. The pipeline is not disturbed immediately. The rest of the configuration is the same as that of the processor 1C, and a detailed description of the configuration will be omitted.
第 1 9図にはデ一タコンフリク トを生じたときデータプロセッサ 1 Dで行われるタスク切換え制御の内容が例示されている。例えばパイプ ラインステージ mで夫々命令レジス夕 1 1 A, 1 1 Bにラッチされた命 令のデコードステージ (m+ 1 )で競合管理ュニッ ト 25がデータコン フリク トを検出すると、 後から実行されるべき命令実行は、 先に実行さ れるべき命令の実行結果が得られるまで NO P (ノン ' オペレーショ ン) とされる。 すなわち、 パイプラインステージ (m+4) におけるパ イブ 0のレジス夕ス トア (Sn)の結果を当該ステージ (m+4) にお けるパイプ 1の演算ステージ (En)で利用できるようになるまで、 ノ ィプ 1のパイプラインステージにおける通常命令処理の実行が停止さ れる。第 17図との相違点は、 第 19図のステージ m+4のパイプ 1に おける演算ステージ (En)のために改めて命令フェツチ及びデコ一ド を繰り返すことを要しないということである。パイプ 1のパイプライン ステージにおける通常命令処理の実行停止の指示は、制御信号 AR B B によって命令実行ュニッ ト 13 Bに通知される。 このとき、 競合管理ュ ニッ ト 25は制御信号 250を活性化して切換え制御回路 19に与え る。切換え制御回路 19は、 それに応答してセレクタ 18にスワップ夕 スクバッファ 1 6を選択させる。 これにより、 パイプラインステージ m + 1〜m+ 5においてパイプ 1は、スヮップタスク 1の処理を行うこと ができる。 スワップタスク 1の処理に許容される期間は、 デ一タコンフ リク 卜によってパイプ 1の通常命令処理が中断される期問であり、その 期間は競合管理ュニッ ト 1 5で制御され、制御信号 250に反映され、 当該信号 250がインアクティブにされることによって、セレクタ 18 の選択状態は元の通常命令処理の選択状態(命令フェッチュニッ ト 10 の選択状態) に戻される。 タスク切換え時には前述の通りプログラム力 ゥン夕 PCやレジス夕 SR, R0〜R 7の退避を要せずに、 スワップ夕 スク 1の実行に移ることができる。 このとき、 命令実行ュニッ 卜 13 B は、 スワップタスク 1の実行にはレジス夕セヅ 卜 S 1を利用する。 どの レジス夕を利用するかは前記の例と同様に夫々の命令記述によって決 定される。 Figure 19 shows the data processor 1 when a data conflict occurs. The contents of the task switching control performed in D are illustrated. For example, when the conflict management unit 25 detects a data conflict in the decode stage (m + 1) of the instruction latched in the instruction register 11A and 11B at the pipeline stage m, the instruction is executed later. The instruction to be executed is NOP (non-operation) until the execution result of the instruction to be executed first is obtained. That is, until the result of the register store (Sn) of Pipe 0 at the pipeline stage (m + 4) becomes available at the operation stage (En) of Pipe 1 at the stage (m + 4). Then, the execution of the normal instruction processing in the pipeline stage of the knoop 1 is stopped. The difference from FIG. 17 is that it is not necessary to repeat instruction fetching and decoding again for the operation stage (En) in the pipe 1 of the stage m + 4 in FIG. The instruction to stop the execution of the normal instruction processing in the pipeline stage of the pipe 1 is notified to the instruction execution unit 13B by the control signal ARBB. At this time, the conflict management unit 25 activates the control signal 250 and supplies it to the switching control circuit 19. The switching control circuit 19 causes the selector 18 to select the swap disk buffer 16 in response thereto. As a result, in the pipeline stages m + 1 to m + 5, the pipe 1 can perform the processing of the step task 1. The period allowed for the processing of swap task 1 is the period when the normal instruction processing of pipe 1 is interrupted by the data conflict, and the period is controlled by the conflict management unit 15 and is controlled by the control signal 250. The selected state of the selector 18 is returned to the original selected state of the normal instruction processing (the selected state of the instruction fetch unit 10) by being reflected and inactivating the signal 250. When switching tasks, as described above, it is possible to move to execution of swap task 1 without having to save the program memory PC and register software SR and R0 to R7. At this time, the instruction execution unit 13 B Uses the registry set S1 to execute the swap task 1. Which register is to be used is determined by the description of each command as in the above example.
図 1 9の例では、パイプラインステージ Π1+ 3で夫々命令レジス夕 1 1 A, 1 1 Bにラッチされた命令のデコードステージ (m+ 4 ) におい ても競合管理ュニッ 卜 25がデ一タコンフリク トを検出して、上記同様 に、 パイプラインステージ (m+7) におけるパイプ 0のレジス夕ス ト ァ (S n) の結果を当該ステージ (m+ 7) におけるパイプ 1の演!?ス テ一ジ (E n) で利用できるようになるまで、 パイプ 1のパイプライン ステージにおける通常命令処理の実行が停止され、 それに代えて、 パイ プ 1は、 スワップタスク 1の処理を行なってる。  In the example of FIG. 19, the conflict management unit 25 also removes data conflicts in the decode stages (m + 4) of the instructions latched in the instruction registers 11A and 11B, respectively, in the pipeline stage # 1 + 3. In the same manner as described above, the result of the register store (S n) of the pipe 0 at the pipeline stage (m + 7) is performed in the same manner as the performance of the pipe 1 at the stage (m + 7). ? Execution of normal instruction processing in the pipeline stage of pipe 1 is halted until it becomes available in stage (E n). Instead, pipe 1 is processing swap task 1.
第 20図には前記デ一夕プロセッサ 1を適用したデータ処理システ ムの一例が示される。スデ一夕プロセッサ 1の外部バス 4には前記外部 メモリ 2及び入出力回路 5が代表的に^されている。外部バス 4はァド レスバス ABU S,デ一夕バス DBU S及びコントロールバス CBU S を含む。 このシステムにおいて、 データブロセッサ 1のスワップタスク バッファ 1 6には D M A転送制御及びデータ変換制御プログラムが格 納されている。この DMA転送制御及びデータ変換制御プログラムの起 動は前記制御信号 23の一つに割り当てられた割り込み信号 2 3 0と される。 この割り込み信号 230は、 入出力回路 5から供給される。 第 2 1図には前記 D M A転送制御及びデータ変換制御プログラムに よるタスクの一例が示される。すなわち、 入出力回路 5から割込み信号 230が切換え制御回路 1 9に与えられると、データプロセッサ 1の処 理プログラムは、スワップタスクバッファ 1 6に格納されている DMA 転送制御及びデータ変換制御プログラムに切換えられる。このプログラ ムによって処理されるタスクは、入出力回路 5からデータを読み込み、 読み込んだデータを命令実行ュニッ ト 1 3でデ一夕変換(例えば圧縮や 座標変換) し、 変換されたデータをメモリ 2の所定領域に書込み制御す る。読み出しアドレスと書込みアドレスは、 データ転送及びデ一夕変換 毎に、 前記プログラムによって順次更新される。そのような D M A転送 制御及びデ一夕変換制御プログラムのプログラム記述の最小単位の例 を第 2 2図に示す。スワップタスクバッファを用いたタスク切換えには 前述の通り、通常の割り込み処理のような退避処理を必要とせずパイプ ラインの乱れもないから、発生したィベン 卜に対して高速に応答するこ とができる。 FIG. 20 shows an example of a data processing system to which the data processor 1 is applied. The external memory 4 and the input / output circuit 5 are representatively connected to an external bus 4 of the processor 1. The external bus 4 includes an address bus ABUS, a data bus DBUS and a control bus CBUS. In this system, a swap task buffer 16 of the data processor 1 stores a DMA transfer control and data conversion control program. The start of the DMA transfer control and data conversion control program is an interrupt signal 230 assigned to one of the control signals 23. This interrupt signal 230 is supplied from the input / output circuit 5. FIG. 21 shows an example of a task according to the DMA transfer control and data conversion control program. That is, when the interrupt signal 230 is supplied from the input / output circuit 5 to the switching control circuit 19, the processing program of the data processor 1 switches to the DMA transfer control and data conversion control program stored in the swap task buffer 16. Can be The task processed by this program reads data from the input / output circuit 5 and The read data is subjected to data conversion (for example, compression or coordinate conversion) by the instruction execution unit 13, and the converted data is written and controlled in a predetermined area of the memory 2. The read address and the write address are sequentially updated by the program for each data transfer and data conversion. Fig. 22 shows an example of the minimum unit of the program description of such a DMA transfer control and data conversion control program. As described above, task switching using the swap task buffer does not require evacuation processing like normal interrupt processing and does not disrupt the pipeline, so it can respond quickly to events that occur. .
また、 データプロセッサ 1に代表される上記実施例において、 スヮッ プタスクバッファ 1 6、 1 7に D M A転送制御プログラムを設定した場 合、 第 2 3図に例示されるようなシステム構成に比べて、 キヤッシュコ ヒーレンシの問題を解决するいためのデータプロセッサ 1の負担を軽 減することができる。 すなわち、 第 2 3図のシステム構成では、 キヤッ シュメモリ 1 5がライ トバック方式を採用するとき、キャッシュメモリ 1 5の書き換えが外部メモリに反映されていない状態で D M Aコン 卜 ローラ 6が D M A転送を開始するとキャッシュコヒ一レンシを保てな くなるので、デ一夕プロセッサ 1 Eはキャッシュコヒーレンシを保たな い D M A転送動作の起動を常時監視し、それを検出したときは予じめラ ィ トバック動作を行なわせることが必要であり、データプロセッサ 1 E は、キヤッシュコヒーレンシを保たない動作を検出するための処理を負 担しなければならない。 これに対し、 第 1図のデ一夕プロセッサ 1を例 にすると、データプロセッサ 1の処理タスクがセレクタ 1 8等を介して D M A転送制御処理に切換えられた状態において、 D M Aコントローラ としての機能は実行ュニッ ト 1 3が実現することになる。従って、 デ一 夕プロセッサ 1の外部メモリ間、或いは外部メモリと外部の入出力回路 間で D A Mデ一夕転送を制御する場合、 D M A転送制御のためのァドレ ス信号若しくはアクセス制御情報は必ずデータキヤヅシュメモリ 1 5 を通すことになる。 これにより、 キャッシュメモリ 1 5がライ トノ ソク 方式を採用する場合に、キャッシュメモリ 1 5の書き換えが外部メモリ に反映されていない状態で D M A転送が開始されても、そのような外部 メモリに反映されていないデ一夕はキヤヅシュメモリ 1 5から命令実 行ュニッ ト 1 3に読み込まれて、 転送されることになるから、 データプ 口セヅサ 1は、キヤヅシュコヒ一レンシを保たない動作を検出するため の処理を負担する必要がない。 尚、 デ一夕プロセッサ 1で実現する D M A転送制御機能において、転送デ一夕は- 旦デ一夕プロセッサ 1に読み 込まれることになる。 In the above embodiment represented by the data processor 1, when the DMA transfer control program is set in the step task buffers 16 and 17, compared with the system configuration illustrated in FIG. The burden on the data processor 1 for solving the cache coherency problem can be reduced. In other words, in the system configuration shown in Fig. 23, when the cache memory 15 adopts the write-back method, the DMA controller 6 starts DMA transfer without rewriting the cache memory 15 in the external memory. As a result, cache coherency cannot be maintained, so the processor 1E constantly monitors the start of the DMA transfer operation that does not maintain cache coherency, and when it detects this, a write-back operation is performed in advance. Must be performed, and the data processor 1 E must be responsible for processing for detecting an operation that does not maintain cache coherency. On the other hand, taking the data processor 1 in FIG. 1 as an example, when the processing task of the data processor 1 is switched to the DMA transfer control processing via the selector 18 or the like, the function as the DMA controller is executed. Unit 13 will be realized. Therefore, between the external memory of the processor 1 or between the external memory and the external input / output circuit When DAM data transfer is controlled between memory devices, an address signal or access control information for DMA transfer control always passes through the data cache memory 15. As a result, when the cache memory 15 adopts the write-no-socket method, even if the DMA transfer is started while the rewriting of the cache memory 15 is not reflected in the external memory, it is reflected in such external memory. If not, the data is read from the cache memory 15 to the instruction execution unit 13 and transferred.Therefore, the data processor 1 detects the operation that does not maintain cache coherency. There is no need to bear. In the DMA transfer control function realized by the data processor 1, the data transfer is read into the processor 1 every day.
以上本発明者によってなされた発明を実施例に基づいて具体的に説 明したが、 本発明はそれに限定されるものではなく、 その要旨を逸脱し ない範囲において種々変更可能であることは うまでもない。  Although the invention made by the inventor has been specifically described based on the embodiments, the present invention is not limited thereto, and it is needless to say that various modifications can be made without departing from the gist of the invention. Absent.
例えば、スワップタスクバッファの数は上記実施例に限定されず適宜 変更することができる。 また、 キャッシュメモリはデ一夕キヤッシュメ モリと命令キヤッシュメモリを分離した構成に限定されず、命令とデー 夕に兼用されるユニファイ ド 'キャッシュメモリであってもよい。 また、 パイプラインステージの段数は上記実施例の 5段に限定されない。また、 ス一パス力ラデー夕プロセッサにおける並列動作可能なパイプの数は 2本に限定されず、 それ以上であってもよい。 更に、 スワップタスクの 内容は必要に応じてどのようなものでも適用でき、 制限されない。 産業上の利用可能性  For example, the number of swap task buffers is not limited to the above embodiment and can be changed as appropriate. Also, the cache memory is not limited to a configuration in which the data cache memory and the instruction cache memory are separated, and may be a unified cache memory used for both instructions and data. The number of pipeline stages is not limited to the five stages in the above embodiment. In addition, the number of pipes that can be operated in parallel in the single-path power processor is not limited to two, but may be more. In addition, the content of the swap task can be applied as needed and is not limited. Industrial applicability
以上のように、 本発明に係るデータプロセッサは、 種々のデ一夕処理 システム、 特に頻繁にタスクの切換えが行われるシステム、 データ処理 能力の向上を必要とするシステムに広く適用することができ、例えば、 ディジ夕ルカメラにおける撮影デ一夕の転送とデータ圧縮とをスヮッ プタスクとして備えた組み込み機器制御用のコンピュー夕システムな どに適用することができる。 As described above, the data processor according to the present invention includes various types of data processing systems, particularly systems in which tasks are frequently switched, It can be widely applied to systems that require improved capabilities, for example, a computer system for controlling embedded devices equipped with a digital camera for transferring image data and data compression as a step task. can do.

Claims

請 求 の 範 囲 The scope of the claims
1 . 命令フェッチュニッ 卜が命令をフェッチし、 命令レジス夕にラツチ された命令を命令デコーダが解読し、その解読結果に基づいて命令実行 ュニッ 卜が命令を実行するデータプロセッサにおいて、 1. The instruction fetch unit fetches the instruction, the instruction decoder decodes the instruction latched in the instruction register, and the instruction execution unit executes the instruction based on the decoded result.
プログラムの格納領域とその領域に格納され命令を順次読出すため のボイン夕とを夫々が備えた複数個のタスクバッファと、  A plurality of task buffers each having a program storage area and a bus stored in the area for sequentially reading instructions;
前記夫々のタスクバッファ毎に専用化され、前 Jd命令実行ュニッ 卜に 配置されたレジス夕手段と、  Register means dedicated to each of the task buffers and arranged in the previous Jd instruction execution unit;
前記複数個の夕スクノ ッファと命令フエッチュニヅ 卜との中から - つを選択的に前記命令レジス夕に接続するセレクタと、  A selector for selectively connecting one of the plurality of evening sniffers and the instruction channel to the instruction register;
初期状態において前記セレク夕に前記命令フエツチュニッ 卜を選択 させると共に、内部又は外部で発生されるィベン トに従って前記セレク 夕を選択制御する切換え制御手段と、  Switching control means for allowing the selector to select the instruction feature in an initial state and for selectively controlling the selector according to an event generated internally or externally;
前記命令実行ュニッ 卜の制御に基づいて前記複数個のタスクバッフ ァの全部又は -部をデータ書き込み可能に外部とィン夕フヱ一スする インタフ I—ス手段と、を設けて成るものであることを特徴とするデ一 夕プロセッサ。  And an interface means for instructing all or a part of the plurality of task buffers with the outside so as to be able to write data based on the control of the instruction execution unit. A data processor characterized in that:
2 . 前 ci命令レジス夕、 命令デコーダ及び命令実行ュニッ トは、 パイプ ラインステージ単位で処理を進めて命令をパイブライン処理するもの であることを特徴とする請求の範囲第 1項記載のデ一夕プロセッサ。  2. The deciphering device according to claim 1, wherein the pre-ci instruction register, the instruction decoder and the instruction execution unit are for performing pipeline processing of the instruction by advancing the processing in units of pipeline stages. Processor.
3 . 前記命令実行ュニッ トは、 前記命令レジス夕に命令をラッチさせる 指示 号を出力し、 前記セレクタは、 その指示 ί 号を前 切換え制御手 段が選択する命令フェッチユニッ ト又はタスクバッファに供給し、命令 フェツチュニヅ トは命令レジス夕に供給すべき命令をその指示信号に 基づいて更新し、前記タスクバッファは前記ポインタをその指示信号に 基づいて更新するものであることを特徴とする請求の範囲第 1項乂は 第 2項記載のデ一夕プロセッサ。 3. The instruction execution unit outputs an instruction signal for latching the instruction in the instruction register, and the selector supplies the instruction signal to an instruction fetch unit or a task buffer selected by the previous switching control means. Then, the instruction fetch unit updates the instruction to be supplied to the instruction register based on the instruction signal, and the task buffer stores the pointer in the instruction signal. 3. The data processor according to claim 2, wherein the data is updated based on the data.
4 . 前記切換え制御手段は、 それが選択したタスクバッファから命令デ コーダに供給された命令の解読結果に基づいて前記セレクタを前記命 令フェッチュニッ 卜の選択状態に戻すものであることを特徴とする請 求の範囲第 3項記載のデータプロセッサ。  4. The switching control means returns the selector to the selected state of the instruction fetch unit based on the result of decoding the instruction supplied to the instruction decoder from the task buffer selected by the switching control means. The data processor of claim 3.
5 . 前記切換え制御手段は、 前記タスクバッファの選択に呼応して、 命 令実行ュニッ トに入力される割り込み信号を無効化する割り込み禁止 信号を出力するものであることを特徴とする請求の範囲第 3項記載の デ一夕プロセッサ。  5. The switching control means outputs an interrupt disable signal for invalidating an interrupt signal input to an instruction execution unit in response to the selection of the task buffer. The data processor described in paragraph 3.
6 . 前記切換え制御手段は、 前記タスクバッファを選択しているとき前 記命令実行ュニッ トによる割り込みの受け付けに呼応して前記セレク 夕を命令フエツチュニッ 卜の選択状態に戻すと共に、その直前のタスク バッファの選択状態を退避させるものであることを特徴とする請求の 範两第 3項記載のデータプロセッサ。  6. When the task buffer is selected, the switching control means returns the selector to the selected state of the instruction fetch unit in response to the acceptance of the interrupt by the instruction execution unit, and the task buffer immediately before the selected state. 4. The data processor according to claim 3, wherein the selected state is saved.
7 .前記命令実行ュニッ トと外部との間にデータキヤッシュメモリを備 えて成るものであることを特徴とする請求の範囲第 1項乂は第 2項 載のデ一夕プロセッサ。  7. The data processor according to claim 1, wherein a data cache memory is provided between the instruction execution unit and the outside.
8 . 請求の範囲第 7項記載のデータプロセッサと、 このデータプロセッ サに接続された外部デ一夕バスと、この外部データバスに接続されたメ モリ及び人出力回路とを含んで成るものであることを特徴とするデー 夕処理システム。  8. The data processor according to claim 7, an external data bus connected to the data processor, and a memory and a human output circuit connected to the external data bus. A data processing system characterized by the following.
9 .命令レジス夕にラッチした命令を命令デコーダで解読して命令実行 ュニッ トがその命令を実行する命令実行制御系列を複数系列備えると 共に、 命令をフ Iツチする命令フヱツチュニッ 卜を含み、 複数の命令を 前記複数の命令実行制御系列で並列実行可能なデータプロセッサにお いて、 9.Instruction register An instruction decoder decodes the instruction latched in the instruction register, and the instruction execution unit includes a plurality of instruction execution control sequences for executing the instruction.In addition, the instruction execution unit includes an instruction unit for executing the instruction. To a data processor that can execute the instructions in parallel with the plurality of instruction execution control sequences. And
プログラムの格納領域とその領域に格納され命令を順次読出すため のポィン夕とを夫々が備えた複数個のタスクバッファと、  A plurality of task buffers each having a program storage area and a pointer for sequentially reading instructions stored in the program storage area,
前記夫々のタスクバッファ毎に専用化され、特定の前記命令実行ュニ ッ トに配置されたレジス夕手段と、  A register means dedicated to each of the task buffers and arranged in the specific instruction execution unit;
前記複数個の夕スクバッファと命令フヱツチュニッ 卜との中から一- つを選択して前記特定の命令実行ュニッ トに対応される命令レジス夕 に接続するセレクタと、  A selector for selecting one of the plurality of buffer buffers and the instruction unit and connecting to an instruction register corresponding to the specific instruction execution unit;
初期状態において前記セレク夕に前記命令フエツチュニ 'ソ トを選択 させると共に、内部又は外部で発生されるィベン卜に従って前記セレク 夕を選択制御する切換え制御手段と、を設けて成るものであることを特 徴とするデ一夕プロセッサ。  Switching control means for allowing the selector to select the instruction filter in the initial state and for selectively controlling the selector according to an event generated internally or externally. De-Issue processor.
1 0 . 前記夫々の命令実行制御系列に含まれる命令レジス夕、 命令デコ 1 0. Instruction register and instruction deco included in each instruction execution control sequence
—ダ及び命令実行ュニッ トは、パイプラインステージ単位で処理を進め て命令をパイプライン処理するものであることを特徴とする請求の範 囲第 9頃記載のデ一夕プロセッサ。 The data processor according to claim 9, wherein the instruction and the instruction execution unit are configured to advance the processing in units of pipeline stages to pipeline the instructions.
1 1 .前記夫々の命令実行制御系列に含まれる命令デコーダからの命令 解読結果に基づいて、相互に異なる命令実行制御系列による命令の並列 実行が可能か否かについてそれら命令相互間の依存関係を調べ、他の命 令の実行結果に依存する命令の実行を遅らせる競合管理ュニッ トをお して成るものであることを特徴とする請求の範囲第 1 0項記載のデ一 夕プロセッサ。  11.Based on the instruction decoding results from the instruction decoders included in the respective instruction execution control sequences, the dependence between the instructions on whether or not the instructions can be executed in parallel by different instruction execution control sequences is determined. 10. The data processor according to claim 10, further comprising a conflict management unit for examining and delaying execution of an instruction depending on an execution result of another instruction.
1 2 . 前記切換え制御手段は、 前記競合管理ュニッ トが特定の命令の実 行を遅らせるとき、前記選択手段にタスクバッファを選択させるもので あることを特徴とする請求の範囲第 1 1項記載のデータプロセッサ。 12. The switching control means according to claim 11, wherein said switching control means causes said selection means to select a task buffer when said contention management unit delays execution of a specific instruction. Data processor.
1 3 . 前記夫々の命令実行制御系列に含まれる命令実行ュニッ トは、 前 記命令レジス夕に命令をラッチさせる指示信号を出力し、前記セレクタ は、それに対応される命令実行ュニッ 卜から出力される前記指示信号を 前記切換え制御手段が選択する命令フェッチュニッ ト又はタスクバッ ファに供給し、命令フヱツチュニッ トは命令レジス夕に供給すべき命令 をその指示信号に基づいて更新し、前記タスクバッファは前記ポインタ をその指示信号に基づいて更新するものであることを特徴とする請求 の範囲第 1 1項記載のデータプロセッサ。 1 3. The instruction execution unit included in each of the instruction execution control The instruction register outputs an instruction signal for latching the instruction, and the selector supplies the instruction signal output from the corresponding instruction execution unit to an instruction fetch unit or a task buffer selected by the switching control means. The instruction unit updates the instruction to be supplied to the instruction register based on the instruction signal, and the task buffer updates the pointer based on the instruction signal. 11. The data processor according to clause 11.
1 4 .命令レジス夕にラツチした命令を命令デコーダで解読して命令実 行ュニッ 卜が命令を実行する命令実行制御系列を複数系列備えると共 に、 命令をフエツチする命令フェツチュニッ トを含み、 複数の命令を前 記複数の命令実行制御系列で並列実行可能なデータプロセッサにおい て、  14.Instruction registerInstructions executed by the instruction decoder are decoded by an instruction decoder, and the instruction execution unit includes a plurality of instruction execution control sequences for executing the instructions.In addition, the instruction execution unit includes an instruction fetch unit for fetching instructions. In a data processor capable of executing the above-mentioned instructions in parallel with a plurality of instruction execution control sequences,
プログラムの格納領域とその領域に格納され命令を順次読出すため のポインタとを夫々が備えた複数個のタスクバッファと、  A plurality of task buffers each having a program storage area and a pointer stored in the area for sequentially reading instructions;
前記複数個のタスクバッファに専用化された特定タスク用命令レジ ス夕と、  A special task instruction register dedicated to the plurality of task buffers;
前記特定タスク用命令レジス夕にラッチされた命令を解読する特定 タスク用命令デコーダと、  A specific task instruction decoder for decoding an instruction latched in the specific task instruction register;
前記夫々のタスクバッファ每に専用化され、特定の命令実行ュニッ ト に配置されたレジス夕手段と、  Register means dedicated to the respective task buffers and arranged at a specific instruction execution unit;
前記複数個のタスクバッファと命令フヱツチュニッ トとの中から一 つを選択的して前記特定の命令実行ュニッ トに対応される命令レジス 夕に接続する第 1のセレクタと、  A first selector for selectively selecting one of the plurality of task buffers and the instruction unit and connecting to an instruction register corresponding to the specific instruction execution unit;
前記複数個のタスクバッファの中から一つを選択して前記特定タス ク用命令レジス夕に接続する第 2のセレクタと、  A second selector for selecting one from the plurality of task buffers and connecting to the instruction register for the specific task;
前記特定の命令実行ュニッ トに対応される命令デコーダの出力と前 記特定タスク用命令デコーダの出力を選択的に前 ¾特定の命令実行ュ ニッ 卜に接続する第 3のセレクタと、 The output of the instruction decoder corresponding to the specific instruction execution unit and the previous A third selector for selectively connecting the output of the instruction decoder for a specific task to a specific instruction execution unit;
前記夫々の命令実行制御系列に含まれる命令デコーダからの命令解 読結果に基づいて、相互に異なる命令実行制御系列による命令の並列実 行が可能か否かについてそれら命令相互間の依存関係を調べ、他の命令 の実行結果に依存する特定の命令の実行を遅らせ、当該特定の命令の実 行を遅らせるとき前記第 3のセレクタに前記特定タスク用命令デコー ダを選択させる競合管理ュニッ トと、  Based on the instruction decoding results from the instruction decoders included in the respective instruction execution control sequences, the interdependencies between the instructions are examined as to whether or not the instructions can be executed in parallel by different instruction execution control sequences. A conflict management unit that delays execution of a specific instruction depending on the execution result of another instruction and causes the third selector to select the specific task instruction decoder when delaying execution of the specific instruction;
初期状態において前記命令フェツチュニッ トを前記第 1のセレクタ に選択させると共に第 2のセレクタを非選択状態に制御し、内部又は外 部で発生されるイベントに従って前記第 1のセレクタを選択制御し、ま た、前記第 3のセレクタによる前記特¾タスク用命令デコーダの選択に 呼応して第 2のセレクタに内部又は外部で発生されるィベントに応じ たタスクバッファを選択させる切換え制御手段と、を設けて成るもので あることを特徴とするデ一夕プロセッサ。  In the initial state, the instruction selector is selected by the first selector and the second selector is controlled to a non-selection state, and the first selector is selectively controlled according to an event generated internally or externally. Switching control means for causing the second selector to select a task buffer according to an event generated internally or externally in response to the selection of the instruction decoder for the special task by the third selector. A processor comprising: a processor;
PCT/JP1996/002819 1996-09-27 1996-09-27 Data processor and data processing system WO1998013759A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP1996/002819 WO1998013759A1 (en) 1996-09-27 1996-09-27 Data processor and data processing system
JP51547898A JP3778573B2 (en) 1996-09-27 1996-09-27 Data processor and data processing system
TW085114272A TW332272B (en) 1996-09-27 1996-11-20 Data processor and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP1996/002819 WO1998013759A1 (en) 1996-09-27 1996-09-27 Data processor and data processing system

Publications (1)

Publication Number Publication Date
WO1998013759A1 true WO1998013759A1 (en) 1998-04-02

Family

ID=14153908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1996/002819 WO1998013759A1 (en) 1996-09-27 1996-09-27 Data processor and data processing system

Country Status (3)

Country Link
JP (1) JP3778573B2 (en)
TW (1) TW332272B (en)
WO (1) WO1998013759A1 (en)

Cited By (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6298394B1 (en) 1999-10-01 2001-10-02 Stmicroelectronics, Ltd. System and method for capturing information on an interconnect in an integrated circuit
US6349371B1 (en) 1999-10-01 2002-02-19 Stmicroelectronics Ltd. Circuit for storing information
US6351803B2 (en) 1999-10-01 2002-02-26 Hitachi Ltd. Mechanism for power efficient processing in a pipeline processor
US6408381B1 (en) 1999-10-01 2002-06-18 Hitachi, Ltd. Mechanism for fast access to control space in a pipeline processor
US6412047B2 (en) 1999-10-01 2002-06-25 Stmicroelectronics, Inc. Coherency protocol
US6434665B1 (en) 1999-10-01 2002-08-13 Stmicroelectronics, Inc. Cache memory store buffer
US6449712B1 (en) 1999-10-01 2002-09-10 Hitachi, Ltd. Emulating execution of smaller fixed-length branch/delay slot instructions with a sequence of larger fixed-length instructions
US6457118B1 (en) 1999-10-01 2002-09-24 Hitachi Ltd Method and system for selecting and using source operands in computer system instructions
US6460174B1 (en) 1999-10-01 2002-10-01 Stmicroelectronics, Ltd. Methods and models for use in designing an integrated circuit
US6463553B1 (en) 1999-10-01 2002-10-08 Stmicroelectronics, Ltd. Microcomputer debug architecture and method
US6487683B1 (en) 1999-10-01 2002-11-26 Stmicroelectronics Limited Microcomputer debug architecture and method
US6496905B1 (en) 1999-10-01 2002-12-17 Hitachi, Ltd. Write buffer with burst capability
US6502210B1 (en) 1999-10-01 2002-12-31 Stmicroelectronics, Ltd. Microcomputer debug architecture and method
US6530047B1 (en) 1999-10-01 2003-03-04 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6542983B1 (en) 1999-10-01 2003-04-01 Hitachi, Ltd. Microcomputer/floating point processor interface and method
US6546480B1 (en) 1999-10-01 2003-04-08 Hitachi, Ltd. Instructions for arithmetic operations on vectored data
US6557119B1 (en) 1999-10-01 2003-04-29 Stmicroelectronics Limited Microcomputer debug architecture and method
US6567932B2 (en) 1999-10-01 2003-05-20 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6574651B1 (en) 1999-10-01 2003-06-03 Hitachi, Ltd. Method and apparatus for arithmetic operation on vectored data
US6591369B1 (en) 1999-10-01 2003-07-08 Stmicroelectronics, Ltd. System and method for communicating with an integrated circuit
US6590907B1 (en) 1999-10-01 2003-07-08 Stmicroelectronics Ltd. Integrated circuit with additional ports
US6598177B1 (en) * 1999-10-01 2003-07-22 Stmicroelectronics Ltd. Monitoring error conditions in an integrated circuit
US6601189B1 (en) 1999-10-01 2003-07-29 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6615370B1 (en) 1999-10-01 2003-09-02 Hitachi, Ltd. Circuit for storing trace information
US6629115B1 (en) 1999-10-01 2003-09-30 Hitachi, Ltd. Method and apparatus for manipulating vectored data
US6633971B2 (en) 1999-10-01 2003-10-14 Hitachi, Ltd. Mechanism for forward data in a processor pipeline using a single pipefile connected to the pipeline
US6665816B1 (en) 1999-10-01 2003-12-16 Stmicroelectronics Limited Data shift register
US6684348B1 (en) 1999-10-01 2004-01-27 Hitachi, Ltd. Circuit for processing trace information
US6693914B1 (en) 1999-10-01 2004-02-17 Stmicroelectronics, Inc. Arbitration mechanism for packet transmission
US6701405B1 (en) 1999-10-01 2004-03-02 Hitachi, Ltd. DMA handshake protocol
WO2004023291A1 (en) * 2002-08-30 2004-03-18 Renesas Technology Corp. Information processing apparatus
US6779145B1 (en) 1999-10-01 2004-08-17 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6820195B1 (en) 1999-10-01 2004-11-16 Hitachi, Ltd. Aligning load/store data with big/little endian determined rotation distance control
US6826191B1 (en) 1999-10-01 2004-11-30 Stmicroelectronics Ltd. Packets containing transaction attributes
US6859891B2 (en) 1999-10-01 2005-02-22 Stmicroelectronics Limited Apparatus and method for shadowing processor information
US6918065B1 (en) 1999-10-01 2005-07-12 Hitachi, Ltd. Method for compressing and decompressing trace information
US6928073B2 (en) 1999-10-01 2005-08-09 Stmicroelectronics Ltd. Integrated circuit implementing packet transmission
US7000078B1 (en) 1999-10-01 2006-02-14 Stmicroelectronics Ltd. System and method for maintaining cache coherency in a shared memory system
US7072817B1 (en) 1999-10-01 2006-07-04 Stmicroelectronics Ltd. Method of designing an initiator in an integrated circuit
US7191313B2 (en) 2001-08-28 2007-03-13 Sony Corporation Microprocessor
US7260745B1 (en) 1999-10-01 2007-08-21 Stmicroelectronics Ltd. Detection of information on an interconnect
US7266728B1 (en) 1999-10-01 2007-09-04 Stmicroelectronics Ltd. Circuit for monitoring information on an interconnect
JP2014501969A (en) * 2010-11-18 2014-01-23 日本テキサス・インスツルメンツ株式会社 Context switching method and apparatus
CN102135867B (en) * 2010-01-21 2014-04-02 联阳半导体股份有限公司 Data processing module and method thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4834448A (en) * 1971-08-31 1973-05-18
JPS60263238A (en) * 1984-06-11 1985-12-26 Nippon Telegr & Teleph Corp <Ntt> Information processor
JPS6314241A (en) * 1986-07-04 1988-01-21 Hitachi Ltd Memory expansion system
JPH02115958A (en) * 1988-10-26 1990-04-27 Hitachi Ltd Data transfer control system
JPH02183342A (en) * 1989-01-10 1990-07-17 Fuji Electric Co Ltd Interruption controller
JPH02190936A (en) * 1989-01-20 1990-07-26 Nec Corp Program execution system for bank switching type computer
JPH0443434A (en) * 1990-06-08 1992-02-13 Mitsubishi Electric Corp Microprocessor
JPH0644089A (en) * 1992-05-18 1994-02-18 Matsushita Electric Ind Co Ltd Information processor
JPH0855033A (en) * 1994-08-16 1996-02-27 Nec Corp Information processor
JPH0895786A (en) * 1994-09-27 1996-04-12 Toshiba Corp Arithmetic processor

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4834448A (en) * 1971-08-31 1973-05-18
JPS60263238A (en) * 1984-06-11 1985-12-26 Nippon Telegr & Teleph Corp <Ntt> Information processor
JPS6314241A (en) * 1986-07-04 1988-01-21 Hitachi Ltd Memory expansion system
JPH02115958A (en) * 1988-10-26 1990-04-27 Hitachi Ltd Data transfer control system
JPH02183342A (en) * 1989-01-10 1990-07-17 Fuji Electric Co Ltd Interruption controller
JPH02190936A (en) * 1989-01-20 1990-07-26 Nec Corp Program execution system for bank switching type computer
JPH0443434A (en) * 1990-06-08 1992-02-13 Mitsubishi Electric Corp Microprocessor
JPH0644089A (en) * 1992-05-18 1994-02-18 Matsushita Electric Ind Co Ltd Information processor
JPH0855033A (en) * 1994-08-16 1996-02-27 Nec Corp Information processor
JPH0895786A (en) * 1994-09-27 1996-04-12 Toshiba Corp Arithmetic processor

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6601189B1 (en) 1999-10-01 2003-07-29 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6859891B2 (en) 1999-10-01 2005-02-22 Stmicroelectronics Limited Apparatus and method for shadowing processor information
US6351803B2 (en) 1999-10-01 2002-02-26 Hitachi Ltd. Mechanism for power efficient processing in a pipeline processor
US6408381B1 (en) 1999-10-01 2002-06-18 Hitachi, Ltd. Mechanism for fast access to control space in a pipeline processor
US6412047B2 (en) 1999-10-01 2002-06-25 Stmicroelectronics, Inc. Coherency protocol
US6434665B1 (en) 1999-10-01 2002-08-13 Stmicroelectronics, Inc. Cache memory store buffer
US6449712B1 (en) 1999-10-01 2002-09-10 Hitachi, Ltd. Emulating execution of smaller fixed-length branch/delay slot instructions with a sequence of larger fixed-length instructions
US6457118B1 (en) 1999-10-01 2002-09-24 Hitachi Ltd Method and system for selecting and using source operands in computer system instructions
US6460174B1 (en) 1999-10-01 2002-10-01 Stmicroelectronics, Ltd. Methods and models for use in designing an integrated circuit
US6463553B1 (en) 1999-10-01 2002-10-08 Stmicroelectronics, Ltd. Microcomputer debug architecture and method
US6487683B1 (en) 1999-10-01 2002-11-26 Stmicroelectronics Limited Microcomputer debug architecture and method
US6496905B1 (en) 1999-10-01 2002-12-17 Hitachi, Ltd. Write buffer with burst capability
US6502210B1 (en) 1999-10-01 2002-12-31 Stmicroelectronics, Ltd. Microcomputer debug architecture and method
US6530047B1 (en) 1999-10-01 2003-03-04 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6542983B1 (en) 1999-10-01 2003-04-01 Hitachi, Ltd. Microcomputer/floating point processor interface and method
US6546480B1 (en) 1999-10-01 2003-04-08 Hitachi, Ltd. Instructions for arithmetic operations on vectored data
US6298394B1 (en) 1999-10-01 2001-10-02 Stmicroelectronics, Ltd. System and method for capturing information on an interconnect in an integrated circuit
US6567932B2 (en) 1999-10-01 2003-05-20 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6574651B1 (en) 1999-10-01 2003-06-03 Hitachi, Ltd. Method and apparatus for arithmetic operation on vectored data
US6591369B1 (en) 1999-10-01 2003-07-08 Stmicroelectronics, Ltd. System and method for communicating with an integrated circuit
US6590907B1 (en) 1999-10-01 2003-07-08 Stmicroelectronics Ltd. Integrated circuit with additional ports
US6598177B1 (en) * 1999-10-01 2003-07-22 Stmicroelectronics Ltd. Monitoring error conditions in an integrated circuit
US6629115B1 (en) 1999-10-01 2003-09-30 Hitachi, Ltd. Method and apparatus for manipulating vectored data
US6615370B1 (en) 1999-10-01 2003-09-02 Hitachi, Ltd. Circuit for storing trace information
US6557119B1 (en) 1999-10-01 2003-04-29 Stmicroelectronics Limited Microcomputer debug architecture and method
US6633971B2 (en) 1999-10-01 2003-10-14 Hitachi, Ltd. Mechanism for forward data in a processor pipeline using a single pipefile connected to the pipeline
US6665816B1 (en) 1999-10-01 2003-12-16 Stmicroelectronics Limited Data shift register
US6684348B1 (en) 1999-10-01 2004-01-27 Hitachi, Ltd. Circuit for processing trace information
US6693914B1 (en) 1999-10-01 2004-02-17 Stmicroelectronics, Inc. Arbitration mechanism for packet transmission
US6701405B1 (en) 1999-10-01 2004-03-02 Hitachi, Ltd. DMA handshake protocol
US7346072B2 (en) 1999-10-01 2008-03-18 Stmicroelectronics Ltd. Arbitration mechanism for packet transmission
US6779145B1 (en) 1999-10-01 2004-08-17 Stmicroelectronics Limited System and method for communicating with an integrated circuit
US6820195B1 (en) 1999-10-01 2004-11-16 Hitachi, Ltd. Aligning load/store data with big/little endian determined rotation distance control
US6826191B1 (en) 1999-10-01 2004-11-30 Stmicroelectronics Ltd. Packets containing transaction attributes
US6349371B1 (en) 1999-10-01 2002-02-19 Stmicroelectronics Ltd. Circuit for storing information
US6918065B1 (en) 1999-10-01 2005-07-12 Hitachi, Ltd. Method for compressing and decompressing trace information
US6928073B2 (en) 1999-10-01 2005-08-09 Stmicroelectronics Ltd. Integrated circuit implementing packet transmission
US7000078B1 (en) 1999-10-01 2006-02-14 Stmicroelectronics Ltd. System and method for maintaining cache coherency in a shared memory system
US7072817B1 (en) 1999-10-01 2006-07-04 Stmicroelectronics Ltd. Method of designing an initiator in an integrated circuit
US7266728B1 (en) 1999-10-01 2007-09-04 Stmicroelectronics Ltd. Circuit for monitoring information on an interconnect
US7228389B2 (en) 1999-10-01 2007-06-05 Stmicroelectronics, Ltd. System and method for maintaining cache coherency in a shared memory system
US7260745B1 (en) 1999-10-01 2007-08-21 Stmicroelectronics Ltd. Detection of information on an interconnect
US7191313B2 (en) 2001-08-28 2007-03-13 Sony Corporation Microprocessor
WO2004023291A1 (en) * 2002-08-30 2004-03-18 Renesas Technology Corp. Information processing apparatus
CN102135867B (en) * 2010-01-21 2014-04-02 联阳半导体股份有限公司 Data processing module and method thereof
JP2014501969A (en) * 2010-11-18 2014-01-23 日本テキサス・インスツルメンツ株式会社 Context switching method and apparatus

Also Published As

Publication number Publication date
TW332272B (en) 1998-05-21
JP3778573B2 (en) 2006-05-24

Similar Documents

Publication Publication Date Title
JP3778573B2 (en) Data processor and data processing system
JP2701179B2 (en) Data processing system
KR102496402B1 (en) User-level fork and join processors, methods, systems, and instructions
KR100294475B1 (en) High Performance RSC Microprocessor Architecture
JP6143872B2 (en) Apparatus, method, and system
US7020763B2 (en) Computer processing architecture having a scalable number of processing paths and pipelines
US6907517B2 (en) Interprocessor register succession method and device therefor
JP3531167B2 (en) System and method for assigning tags to instructions to control instruction execution
US20120233442A1 (en) Return address prediction in multithreaded processors
US20020032831A1 (en) VLIW computer processing architecture with on-chip dynamic RAM
JPH087678B2 (en) Computers for processing different architecture instructions and resulting communication methods
US7529917B2 (en) Method and apparatus for interrupt handling during loop processing in reconfigurable coarse grained array
KR20040016829A (en) Exception handling in a pipelined processor
JPH0816870B2 (en) System for draining the instruction pipeline
US6963962B2 (en) Memory system for supporting multiple parallel accesses at very high frequencies
JP2007133456A (en) Semiconductor device
TW201712529A (en) Persistent commit processors, methods, systems, and instructions
KR100431975B1 (en) Multi-instruction dispatch system for pipelined microprocessors with no branch interruption
US20030196072A1 (en) Digital signal processor architecture for high computation speed
JP3872470B2 (en) Method, processing unit and data processing system for managing process states saved in memory
US20110083030A1 (en) Cache memory control device, cache memory device, processor, and controlling method for storage device
EP0374598B1 (en) Control store addressing from multiple sources
KR20080049727A (en) Processor array with separate serial module
US7028164B2 (en) Instruction fetch apparatus for wide issue processors and method of operation
US6865665B2 (en) Processor pipeline cache miss apparatus and method for operation

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): CN JP KR SG US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase