WO2004023291A1 - 情報処理装置 - Google Patents

情報処理装置 Download PDF

Info

Publication number
WO2004023291A1
WO2004023291A1 PCT/JP2002/008801 JP0208801W WO2004023291A1 WO 2004023291 A1 WO2004023291 A1 WO 2004023291A1 JP 0208801 W JP0208801 W JP 0208801W WO 2004023291 A1 WO2004023291 A1 WO 2004023291A1
Authority
WO
WIPO (PCT)
Prior art keywords
dma
pipeline
instruction
processing
memory
Prior art date
Application number
PCT/JP2002/008801
Other languages
English (en)
French (fr)
Inventor
Shigezumi Matsui
Original Assignee
Renesas Technology Corp.
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 Renesas Technology Corp. filed Critical Renesas Technology Corp.
Priority to PCT/JP2002/008801 priority Critical patent/WO2004023291A1/ja
Priority to JP2004534043A priority patent/JPWO2004023291A1/ja
Publication of WO2004023291A1 publication Critical patent/WO2004023291A1/ja

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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3853Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution of compound instructions

Definitions

  • the present invention relates to an information processing device, and more particularly to a technology effective when applied to a microprocessor having a superscalar pipeline configuration having a plurality of instruction execution pipelines.
  • FIG. 14 shows an example of the configuration of a microprocessor studied by the present inventors as a premise of the present invention.
  • the microprocessor requests instruction latches; instruction decode 'Operation processing ⁇ CPU 10 for data holding by general-purpose registers, etc .; DMA A3 controller 13 for DMA transfer processing; instruction code and data storage External memory control in response to external memory access requests from internal bus 11 and internal bus 11 for data transfer of built-in memory 12 consisting of RAM, CPU 10 and DMA controller 13 External bus controller 14 that performs external peripheral control, external terminal 14 that is controlled by external bus controller 14 to transmit signals to external memory, and peripheral module bus 1 that responds to peripheral module access requests from internal bus 11 It consists of a peripheral path controller 16 that controls the CPU, a clock generation circuit 15 that generates an operation clock to be supplied to the inside of the microprocessor, and various peripheral modules. .
  • the internal bus 11 is connected to the internal memory 12, the external bus controller 14, and the peripheral bus controller 16.
  • serial interface 1801 serial communication, etc.
  • ports used as ports.
  • Interface 182 and the like.
  • the CPU 10 includes an instruction fetch unit 100 for performing instruction fetch requests and instruction decoding, an arithmetic unit 101 for performing arithmetic processing, and a register file 102 for holding data.
  • the CPU 10 fetches and decodes the instructions sequentially from the address specified by the instruction binding, and performs arithmetic processing, stores data in registers, and saves data from the registers to memory according to the decoding result. Do.
  • the DMA controller 13 holds a transfer source address (hereinafter, also referred to as a source address), a transfer destination address (hereinafter, also referred to as a destination address), an address pointer 130 for holding an address for address wraparound, and a transfer word count.
  • a transfer source address hereinafter, also referred to as a source address
  • a transfer destination address hereinafter, also referred to as a destination address
  • an address pointer 130 for holding an address for address wraparound
  • a transfer word count Built-in data register 132 that temporarily stores data during DMA transfer.
  • the DMA controller 13 performs a data transfer from the transfer source address indicated by the address pointer 130 to the transfer destination address in response to a DMA transfer request from outside the processor or from a peripheral module.
  • FIG. 15 shows an example of the configuration of a super scalar microprocessor examined by the present inventors as a premise of the present invention.
  • the super scalar microprocessor includes an instruction fetch request, instruction decoding, and arithmetic processing.CPU 10a for holding data using general-purpose registers, etc., an instruction cache 19a for caching instruction codes, and a data cache 19 for caching data.
  • Built-in memory 12 including RAM for storing instruction code data 12a, DMA controller 13 that performs DMA transfer processing, in response to instruction code fetch request from CPU 10a
  • Instruction transfer bus 11a for transferring instruction codes
  • data transfer buses 11b and 11c for transferring data in response to a data transfer request from CPU 10a
  • DMA controller 13 and instruction cache 19a Internal bus 11 d for data transfer in response to a data transfer request from overnight cache 19 b
  • External bus controller for control 14 internal bus 1 1 d
  • It consists of a peripheral bus controller 16 that controls the peripheral module bus in response to a peripheral module access request. Peripheral module buses, peripheral modules, external terminals, etc. are omitted.
  • An instruction cache 19a and an internal memory 12a are connected to the instruction transfer bus 11a.
  • a data cache 19b and a built-in memory 12a are connected to the data transfer buses 11b and 11c.
  • the internal bus 11 d is connected to the internal memory 12 a, the external path controller 14, and the peripheral path controller 16.
  • the CPU 10a is an instruction fetch unit 100a for executing instruction fetch requests and instruction decoding, an arithmetic unit 101a for performing arithmetic processing, and a register file 1 22a for storing data overnight. Consists of The CPU 1 Oa reads and decodes the instructions sequentially from the address specified in the instruction binding, and if the decoded result can execute a plurality of instructions at the same time, performs the arithmetic processing of the corresponding plurality of instructions and the data processing. Storing at a regis- ter evening, and evacuation from the regis- ter evening to a memory.
  • the instruction cache 19a holds a copy of the instruction code of the frequently used address stored in the external memory.
  • the data cache 19 holds a copy of the frequently used address data stored in the external memory, and rewrites the data to the external memory as necessary when data is rewritten.
  • the built-in memory 12a is composed of a RAM or the like, holds instruction codes and data, and reads out the built-in instruction codes and data as needed.
  • a technique related to such a microprocessor for example, a technique described in Japanese Patent Application Laid-Open No. 4-68459 is cited.
  • This publication discloses a digital signal processor capable of performing a DMA transfer process and an arithmetic processing instruction in parallel.
  • this is not a technique applied to a microprocessor having a super scalar pipeline configuration having a plurality of instruction execution pipelines as in the present invention.
  • the present inventor's study on the above-described super scalar microprocessor the following has been clarified.
  • the parallelism of instructions is not so high at about 1.3, so that all instructions are executed.
  • the execution pipeline is not always filled, which wastes resources. Specifically, when two pipelines cannot execute instructions at the same time, the efficiency of resource utilization is low because one pipeline is idle.
  • the use of inefficient resources degrades the price / performance ratio, so it is desirable that the processor has as little wasteful resources as possible and that it operates properly at all times.
  • microcontrollers have a built-in DMA controller in addition to the CPU on the controller to enhance the data transfer capability.
  • the processing content of the DMA controller is generally a subset of the processing content of general CPU.
  • the DMA controller is configured as a separate dedicated module, and therefore has low area efficiency.
  • a more efficient microcontroller can be constructed by performing not only a simple DMA transfer but also a kind of data processing at the time of transfer.
  • the inventor of the present invention can eliminate the need for a dedicated DMA controller in a super scalar pipeline processor if the infrequently used pipeline can be used as a DMA controller for DMA transfer that can also perform data arithmetic processing. As a result, it was thought that the price would be lower and the performance degradation of CPU processing could be avoided.
  • a first object of the present invention is to provide an information processing apparatus capable of reducing the chip area by eliminating the need for gate logic equivalent to a module of a DMA controller without substantially reducing the CPU processing performance.
  • the second object of the present invention is to avoid unnecessary switching overhead such as activation of interrupt processing to the CPU during data arithmetic processing, and to greatly improve the processing performance of high-performance data transfer processing.
  • An object of the present invention is to provide an information processing device capable of performing the above.
  • the present invention is applied to an information processing device having a super scalar pipeline configuration having a plurality of instruction execution pipelines, and expands and executes instructions stored in a first memory in a first super scalar pipeline. If an empty stage (eg, empty cycle, idle time) occurs where the second superscalar pipeline cannot execute instructions, the data is stored in the second memory using this empty stage (empty cycle, idle time). It has control means for switching to execute an instruction. Further, in the information processing device of the present invention, a DMAC command is executed as an instruction stored in the second memory.
  • an empty stage eg, empty cycle, idle time
  • a DMAC command is executed as an instruction stored in the second memory.
  • the information processing apparatus of the present invention has the following features.
  • a super scalar processor in general, a part of a plurality of pipelines configured to execute a series of CPU instructions in parallel is shifted to an empty stage where the corresponding CPU processing is not performed.
  • a part of a plurality of pipelines configured to execute a series of CPU instructions in parallel can also be used as a programmable DMA controller for DMA transfer.
  • the source address, destination address, number of words to be transferred, initial value information and address range information required for address wrap-around transfer, etc., required for DMA transfer are stored in memory such as RAM instead of a dedicated register.
  • a processor having a DMA transfer function which stores information in a cache register as needed and stores the information in a caching register.
  • the parallelism of instructions is not always high enough to fill all the instruction execution pipelines.
  • a dedicated DMA controller is not required while avoiding a decrease in CPU processing performance. The price will be lower, and the desired data operation will be performed simultaneously with the data transfer processing.
  • FIG. 1 is a configuration diagram illustrating an information processing apparatus (a configurable single-scalar microprocessor) according to an embodiment of the present invention
  • FIG. 2 is a configuration diagram illustrating a CPU register file according to the embodiment
  • Fig. 4 shows the configuration diagram of the DMAC register file with caching mechanism
  • Fig. 5 is an explanatory diagram showing the stage configuration of the pipeline
  • Fig. 6 shows the processing contents of each stage.
  • Fig. 7 is a schematic diagram showing the switching control of CPU instruction execution and DMA transfer processing on the pipeline 1 side.
  • Fig. 8 is a process including switching between CPU instruction execution and DMA transfer processing of pipeline 0 and pipeline 1.
  • FIG. 1 is a configuration diagram illustrating an information processing apparatus (a configurable single-scalar microprocessor) according to an embodiment of the present invention
  • FIG. 2 is a configuration diagram illustrating a CPU register file according to the embodiment
  • FIG. 9 is an explanatory diagram showing a mode setting relating to the DMA transfer process of the pipeline 1
  • FIG. 10 is an explanatory diagram showing a DMA transfer process involving simple data processing
  • FIG. 1 is a flowchart showing a DMA transfer process involving simple data processing
  • FIG. 12 is an explanatory diagram showing a DMA transfer information caching operation during a DMA transfer
  • FIG. FIG. 14 is a block diagram showing a microprocessor studied as a premise of the present invention
  • FIG. 15 is a block diagram showing a superscalar microprocessor studied as a premise of the present invention.
  • FIG. 1 shows a configuration diagram of an information processing apparatus according to the present embodiment.
  • the information processing apparatus according to the present embodiment is, for example, a configurable super scalar microprocessor, and has an instruction fetch request.
  • E CPU (Enhanced CPU) 10b that performs DMA transfer processing in response to a DMA transfer request, stores instruction codes, and stores instruction memory such as RAM and instruction cache. , Data, etc. Data memory consisting of RAM, data cache, etc.
  • DMAC command storage memory for storing DMAC command group 120 b
  • the instruction code data is transferred between the instruction storage memory, etc., 120a and the data memory, etc., 120c and 120d.
  • Switch matrix (SWM X) that performs overnight transfer
  • the switch matrix 11 e is not particularly limited, and may have a normal bus configuration.
  • a normal bus configuration for example, the configuration is as shown in FIG. 13 described later.
  • Peripheral module buses, peripheral modules, and external terminals are omitted.
  • the switch matrix module (SWMX) 11e comprises a switch matrix controller 11e1 and a switch matrix 11 having a function as a data selector.
  • the switch matrix controller 11e1 transfers instruction code data to and from any memory based on address information and control information of the pipeline controller 100b2. Control what to do.
  • the ECPU 10 b has an instruction register 100 b 4 that controls the instruction address, and a DMA C pointer 10 0 b that controls the DMA C control command address. 5.Instruction / command decoder 1 0 0 under the control of pipeline controller 100 b 2 and pipeline controller 100 b 2 for switching control of CPU processing / DMA transfer processing on instruction execution pipeline 1 b Selector for switching information to be sent to 1 100 b 3, Instruction decoder 100 for decoding instruction code on pipeline 0 b 100, Instruction / command decoder 100 for decoding instruction code on pipeline 1 and DMAC control command b 1, a DMA request queue that holds the DMA request information and sequentially activates DMA transfer processing 100 b 6, an arithmetic unit that performs arithmetic processing (ALU 0) l O lb O and (ALU 1) 10 1 bl, CPU register file 102 b 0 for holding data as CPU, DMAC register file 102 b for holding data as DMAC, arithmetic unit 10
  • This ECPU 1 Ob fetches and decodes the sequential instruction from the address specified in the instruction binding, and if multiple instructions can be executed at the same time based on the decoded result, the arithmetic processing of the corresponding multiple instructions and
  • the data is stored in the registry, and the data is saved from the registry to the memory.
  • the pipeline 1 side main components are the DMAC pointer 100b5 and a part of the instruction bus 100b4) according to the mode shown in Fig. 9 described later.
  • the instruction / command decoder 100 b 1 the arithmetic unit 101 bl, a part of the CPU register file 102 b 0, the DMAC register file 102 bl, and the selector 102 b 2) Perform overnight transfer processing.
  • the pipeline controller 100b2 receives the DMA transfer request from the DMA request queue 100b6, the instruction of the pipeline 1 side, the decoding result of the Z command decoder 100b1, etc., and mainly receives the pipeline 1 side Control behavior. Also, the switch matrix controller 11e0 is controlled via the switch matrix controller 11e1 as required.
  • the DMAC command storage memory 120b is composed of RAM, etc. Holds the DMA C command code that is executed sequentially in the same way as the instruction code for PU, and reads the built-in DMA C command code as necessary.
  • Figure 2 shows the configuration of the CPU register file.
  • the CPU register file 102 b 0 includes a register 102 b 00, a write selector 102 b 01, a decoder 102 b 02, an AND gate 102 b 03, a read selector 102 b 04, and the like.
  • the decoder 102b02 receives the instruction information of the register number 102b06 from the pipeline 0 and the pipeline 1, controls the register 102b04 for reading the register number, and combines it with the clock 102b05. A write signal is generated.
  • the input information control 102 b 06 from the pipeline 0 and the pipeline 1 controls the selector 102 b 0 1 that selects the writing to the register.
  • the output 102b08 of the arithmetic unit such as ALU0 or ALU1 or the data 102b07 read from the memory can be selected.
  • the DMAC register file 102b1 contains the source address register 102b100, the destination address register 102bl01, the count register 102bl02, the write selector 102b11, and the decoder 102. b 12, AND gate 102 b 13, read selector 102 bl 4, etc.
  • the decoder 102b12 receives the register information number 102b16 from the pipeline 1 and controls the register read selector 102b14 and, together with the clock 102b15, outputs the register write signal. Generate.
  • the input information control 102 b 16 from the pipeline 1 controls the selector 102 b 11 that selects data to be written to the register.
  • the output 102b18 of the ALU1 arithmetic unit and the data 102b17 read from the memory can be selected.
  • the registers required for DMA transfer such as the register address 102 bl 00 of the source address, the register address 102 b 101 of the destination address, and the register address 102 b 102 of the county, are the channels required for the transfer. Have a few minutes.
  • FIG. Figure 4 shows the configuration of a DMAC register file with a caching mechanism.
  • the DMAC register file having a caching mechanism is different from the configuration of the DMAC register file 102b1 in that the register number storing register 102c160 and the register storing caching valid information 102c1 are provided. 6 1 is added, and the functions of the source address register 102c100, the destination address register 102c101, and the county register 102c102 are different. In this configuration example, all the registers required for the DMA transfer are not built in as many as the number of channels, and the necessary information is stored in the memory.
  • the DMAC registry file with a caching mechanism holds a copy of the information stored in the memory as a cache register.
  • the channel number of the currently held DMA transfer information is stored in the caching register number storage register 102 c 160, and the caching information stored in the caching valid information storage register 102 c 16 1 is V a 1 Controls whether id.
  • the address information and the count information to be held are not particularly limited.
  • the source address a, b, and c used as address pointers such as a caching source address pointer 102 c 100 and a destination address a , b, c caching destination address It is stored in the caching counter register 102 c 102, which is a pointer used as a transfer word number counter, and the counters a, b, and c, and are updated as needed.
  • the switching algorithm of the caching registry depends on the mode setting as shown in Fig. 9 described below, and is called a mode in which only a part of them is resident, a round robin mode in which the priority of each channel is switched in order, and an LRU. It is a combination such as an algorithm that replaces infrequently used items with priority.
  • FIG. 5 is an explanatory diagram of the pipeline stage configuration
  • Figure 6 is an explanatory diagram of the processing content of each stage.
  • the pipeline 0 side has a five-stage configuration similar to the pipeline of a general microphone mouth processor. That is, it is dedicated to CPU instruction processing.
  • the pipeline 1 operates in a 5-stage stage configuration similar to the pipeline of a general microprocessor, or operates in a 5-stage stage configuration as a DMAC. That is, it is also used for CPU instruction processing / Intelligent DMA transfer processing.
  • each stage is as follows: IF is the instruction fetch stage, ID is the instruction decode & register reading stage, EX is the operation 'address calculation stage, MA is the memory access stage, and WB is the The CR indicates the DMAC control command readout stage, and the CD indicates the DMAC control command decode & register readout stage.
  • FIG. 7 is a flowchart showing the control of the switching of the CPU instruction execution and the DMA transfer processing on the pipeline 1 side.
  • step Sl it is determined whether or not there is a DMA transfer request (step Sl). If there is a request (yes), the pipeline 1 side is set to the DMA processing execution mode (step S2), and if necessary, It repeats and executes until the DMA transfer process for the set number of words, including data operations, is completed (steps S3 and S4). Thereafter, ⁇ is not limited, but a flag indicating the transfer end is set at the end of the DMA transfer (step S5), and the DMA transfer process ends. The set flag is used to drive an interrupt request signal or to confirm completion by software polling.
  • step S1 if there is no DMA transfer request in step S1 (No), the pipeline 1 is set to the CPU instruction execution mode (step S6), and it is determined whether or not it can be executed simultaneously with pipeline 0. Then, if possible (Yes), the CPU instruction is executed (Step S8), and when combined with pipeline 0, it operates as a normal superscalar microprocessor.
  • FIG. 8 is an explanatory diagram of the process flow including switching of CPU instruction execution and DMA transfer processing of pipeline 0 and pipeline 1
  • Fig. 9 is an explanatory diagram of mode setting for DMA transfer processing of pipeline 1 respectively.
  • the information for setting these modes is 01
  • the pipeline 1 side is set to the DMA processing execution mode, depending on the mode setting. After the end of the DMA transfer, return to the normal CPU instruction execution mode. That is, at the time of the DMA transfer request, the register file on the pipeline 1 side is switched from the CPU register file to the DMA C register file, and when the DMA transfer processing is completed, the CPU file is switched to the CPU register file.
  • the mode setting for DMA processing in pipeline 1 is such that mode 0 disables DMA processing and mode 1 enables DMA processing.
  • mode 0 is the CPU processing priority
  • mode 1 is the highest priority
  • only the DMA channel has priority over CPU processing
  • mode 2 is the highest priority
  • the next DMA Channel 3 has priority over CPU processing.
  • Mode 3 switches between CPU processing priority and DMA processing priority mode at fixed time intervals.
  • Mode 4 switches between CPU processing priority and mode 1 or 2 at fixed time intervals.
  • 5 switches between CPU processing priority and DMA processing priority mode by control signal
  • Mode 6 switches between CPU processing priority and mode 1 or 2 by control signal
  • Mode 7 has DMA processing priority mode .
  • mode 0 is fixed at channel 0> channel 1> Drobin, mode 2 only channel 0 2008801 Fixed, round robin for channel 1 and below, fixed for channel 0 and channel 1 only for mode 3, and round robin for channel 2 and below. Round robin means that the priority of multiple channels changes in order.
  • Table 1 describes an example of the configuration of a DMAC command memory using RAM.
  • RAM a storage area for information necessary for DMA transfer is secured, and a program for DMA transfer processing is stored.
  • channel 0 performs simple DMA transfer processing, and channel 1 can perform additional data transfer processing simultaneously during data transfer.
  • built-in RAM is prepared as DMA C command memory, it can be used as command memory and DMA information storage area.
  • FIG. 10 is an explanatory diagram of a DMA transfer process involving simple data processing
  • FIG. 11 is a flowchart thereof.
  • the DMA transfer processing is performed using the packing data as output data for each unit size. That is, it is started by a DMA transfer request, and first sets the pipeline 1 to the DMA processing execution mode (step S11). Then, the input data is read from the source address (step S12), the upper bit "0" of the read data is skipped, and the data is left justified (step S13). The left-justified packing data is linked to existing data and written (step S14). This process is repeated until the transfer data ends (step S15). At the end of the process, the DMA transfer end flag is set and the process ends (step S16).
  • the determination of heat / miss in the evening of the caching regis- ter and the setting of the information are performed by an instruction Iddmar.
  • dmaO Lddmar # 0; Download DMA information register of channel # 0 from memory and write to Cadhe register. If it has already been downloaded, it is equivalent to NOP. If the Cache register is full, save the oldest data in memory before loading it.
  • dt dmacreg [0]; Count register (dma_c [0]) is decremented by 1 and the flag is reflected as to whether it is 0 or not.
  • FIG. 12 is a diagram illustrating the operation of caching the DMA transfer information during the DMA transfer.
  • This example shows a case where, in the operation of the pipeline 1, a DMA request of the channel 0, a DMA request of the channel 0 are made, and then a DMA request of the channel 1 is made.
  • the instruction processing may be temporarily stopped by a combination of the instructions.
  • DMA transfer requests for channel 0 were continuous, the first time the DMA transfer information was loaded from memory, etc., but the second time DMA transfer information was not loaded from memory, etc., and was cached. Since information is used, improvement of response speed and lower power consumption can be expected. After that, since a DMA transfer request for channel 1 has occurred, save the DMA transfer information for channel 0 to memory, etc., and then transfer the DMA transfer information for channel 1. The Copying Regis copies it in the evening.
  • FIG. Figure 13 shows the configuration of a configurable superscalar microprocessor to which the bus configuration is applied.
  • a configurable-sparse scalar microprocessor to which a bus configuration is applied is a configuration in which the switch matrix module (SWMX) shown in FIG. 1 is replaced with a bus configuration. It consists of an instruction transfer bus 110a for transferring an instruction code in response to a latch request, and a data transfer bus 110b and 110c for transferring data in response to a data transfer request from the ECPU 10b. Other configurations and operations are the same as those in FIG.
  • the CPU by performing the DMA transfer processing during the idle time of the CPU processing by the pipeline mechanism for the CPU processing, the CPU is executed.
  • the gate logic equivalent to the module of the DMA controller is not required, and the chip area is reduced, with almost no reduction in processing performance.
  • the present invention is not limited to the embodiment, and can be variously modified without departing from the gist of the invention. Needless to say.
  • the instruction execution pipeline of the super scalar mouth sensor is not limited to two, and can be applied to a case having three or more pipelines. As the number of pipelines increases, the probability that a superscalar microprocessor that executes CPU instructions simultaneously can operate each pipeline without interruption decreases, but the available pipeline can be used for other processing. In addition, a microprocessor having a higher DMA transfer capability can be configured. Industrial applicability
  • the information processing apparatus has a super-scalar pipeline configuration having a plurality of instruction execution pipelines, and a high-performance processor mainly in the embedded field. It is useful when applied to a microphone port controller, and can be widely applied to an intelligent data transfer controller in a processing processor for performing signal processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Microcomputers (AREA)

Description

技術分野
本発明は、 情報処理装置に関し、 特に複数系統の命令実行パイプライ ンを有するス一パースカラパイプライン構成のマイクロプロセッサに 適用して有効な技術に関する。
明 "景技 fe 田
本発明者が検討したところによれば、 情報処理装置については、 以下 のような技術が考えられる。 図 1 4および図 1 5により、 本発明者が本 発明の前提として検討した情報処理装置の一例を説明する。
図 1 4は、 本発明者が本発明の前提として検討したマイクロプロセッ ザの構成の一例を示す。
マイクロプロセッサは、命令フヱツチ要求.命令デコード '演算処理 · 汎用レジスタなどによるデータ保持などを行う CP U 1 0、 DM A転送 処理を行う DM A3 トロ一ラ 1 3、 命令コードやデータを格納するた めの RAMなどで構成される内蔵メモリ 1 2、 CP U 1 0や DMAコン トローラ 1 3のデータ転送を行う内部バス 1 1、 内部バス 1 1からの外 部メモリアクセス要求に応じて外部メモリ制御を行う外部バスコン ト ローラ 1 4、 外部バスコントロ一ラ 1 4に制御され外部メモリに信号を 伝達する外部端子 1 4 1、 内部バス 1 1からの周辺モジュールアクセス 要求に応じて周辺モジュールバス 1 Ίの制御を行う周辺パスコン トロ ーラ 1 6、 マイクロプロセヅサ内部に供給する動作クロックを生成する クロック生成回路 1 5、 および各種周辺モジュールから構成される。 内 部バス 1 1には、 内蔵メモリ 1 2や外部バスコントロ一ラ 1 4や周辺バ スコントローラ 1 6が接続される。
各種周辺モジュールは、 一般的に、 夕イマ 1 8 0、 シリアル通信など を行うシリァルイン夕フエ一ス 1 8 1、 ポートなどとして使われるポー トインタフェース 182などから成る。
CPU 1 0は、 命令フヱツチ要求 ·命令デコードなどを行う命令フエ ツチユニッ ト 100、 演算処理を行う演算器 10 1、 データ保持を行う レジスタファイル 102から成る。 この CPU 10は、 命令ボイン夕で 指定されたァドレスから、 順次命令をフエツチ ·デコードし、 デコード 結果に従って、 演算処理や、 データのレジスタへの格納、 レジス夕から メモリなどへのデータの退避などを行う。
DMAコントローラ 13は、 転送元ァドレス (以下、 ソースアドレス ともいう) や転送先アドレス (以下、 デスティネーションアドレスとも いう) やアドレスラヅプアラウンド用のァドレスを保持するァドレスポ インタ 130、 転送語数を保持するカウン夕 13 1、 DM A転送時にデ 一夕を一時的に保持するデータレジス夕 132を内蔵する。 この DMA コントローラ 13は、 プロセッサ外部や周辺モジュールからの D M A転 送要求に応じて、 アドレスポインタ 130で示される転送元ァドレスか ら転送先アドレスへのデ一夕転送を行う。
図 15は、 本発明者が本発明の前提として検討したスーパ一スカラマ ィクロプロセッサの構成の一例を示す。
スーパ一スカラマイクロプロセッサは、 命令フエツチ要求 ·命令デコ ―ド ·演算処理 '汎用レジスタなどによるデータ保持を行う C P U 10 a、 命令コ一ドをキヤヅシングする命令キヤヅシュ 19 a、 データをキ ャッシングするデータキヤヅシュ 19 b、 命令コ一ドゃデ一夕を格納す るための RAMなどで構成される内蔵メモリ 12 a、 DM A転送処理を 行う DMAコントローラ 13、 CPU l O aからの命令コードフェッチ 要求に対して命令コードを転送する命令転送バス 1 1 a、 C P U 10 a からのデータ転送要求に対してデ一夕を転送するデータ転送バス 1 1 bおよび 1 1 c、 DMAコントローラ 13や命令キヤヅシュ 19 a、 デ 一夕キャッシュ 1 9 bからのデータ転送要求に対してデータ転送を行 う内部バス 1 1 d、 内部バス 1 1 dからの外部メモリアクセス要求に応 じて外部メモリ制御を行う外部バスコントロ一ラ 14、 内部バス 1 1 d からの周辺モジュールアクセス要求に応じて周辺モジュールバスの制 御を行う周辺バスコントローラ 1 6などから構成される。 なお、 周辺モ ジュールバスや、 周辺モジュール、 外部端子などは省略してある。
命令転送バス 1 1 aには、 命令キヤヅシュ 1 9 aや内蔵メモリ 1 2 a が接続される。 データ転送バス 1 1 bおよび 1 1 cには、 デ一夕キヤヅ シュ 1 9 bや内蔵メモリ 1 2 aが接続される。 内部バス 1 1 dには、 内 蔵メモリ 1 2 aや外部パスコントローラ 1 4や周辺パスコントローラ 1 6が接続される。
C P U 1 0 aは、 命令フヱツチ要求 ·命令デコ一ドなどを行う命令フ ヱツチユニッ ト 1 0 0 a、 演算処理を行う演算器 1 0 1 a、 デ一夕保持 を行うレジス夕ファイル 1◦ 2 aから成る。 この C P U 1 O aは、 命令 ボイン夕で指定されたァドレスから、 順次命令をフエツチ ·デコードし、 デコードした結果、 同時に複数命令が実行できる場合は、 該当する複数 命令の演算処理や、 デ一夕のレジス夕への格納、 レジス夕からメモリな どへのデ一夕の退避などを行う。
命令キャッシュ 1 9 aは、 外部メモリに格納された、 使用頻度の高い アドレスの命令コードのコピーを保持する。 また、 データキャッシュ 1 9 は、 外部メモリに格納された、 使用頻度の高いアドレスのデータの コピーを保持し、 データの書き換えなどが行われた場合、 必要に応じて 外部メモリに書き戻す。
内蔵メモリ 1 2 aは、 R A Mなどで構成され、 命令コードおよびデ一 夕を保持し、 必要に応じて内蔵する命令コードおよびデータを読み出す。 なお、 このようなマイクロプロセッサに関する技術としては、 たとえ ば特開平 4— 6 8 4 5 9号公報に記載される技術などが挙げられる。 こ の公報には、 D M A転送処理と演算処理命令を並列に行うことができる ようにしたデジタル信号処理プロセッサが開示されている。 しかしなが ら、 本発明のような複数系統の命令実行パイプラインを有するスーパー スカラパイプライ ン構成のマイクロプロセッサに適用する技術ではな い。 ところで、 前記のようなスーパースカラマイクロプロセヅサについて、 本発明者が検討した結果、 以下のようなことが明らかとなった。
たとえば、 前記図 1 5のような命令実行パイプラインを 2系統以上有 するスーパースカラパイプライン構成のマイクロプロセッサにおいて は、 命令の並列度は概ね 1 . 3程度とそれほど高くないため、 全ての命 令実行パイプラインが常時埋まることはなく、 リソースの無駄が生じて いる。 具体的には、 2本のパイプラインで同時に命令実行ができない場 合、 1本のパイプラインは休止しているため、 リソースの利用効率が低 い。 一方、 ビジネス的には、 効率の悪いリソースの使い方は、 価格性能 比を悪化させるため、 プロセッサ上には極力無駄なリソースがなく、 常 時、 適切に動作していることが望ましい。
また、 マイクロコントローラと呼ばれる製品群においては、 コント口 ーラ上に C P Uに加えて、 D M Aコントローラを内蔵し、 データ転送能 力を強化する例が多い。 この D M Aコントローラの処理内容は、 一般的 な C P Uの処理内容のサブセッ ト的なことが一般的である。 この場合、 D M Aコントローラは、 専用の別モジュールとして構成されているため、 面積効率が低い。 さらには、 データ転送において、 単純な D M A転送だ けではなく、 転送の際に一種のデ一夕演算処理を行えると、 より効率的 なマイクロコントローラが構成できる。
これらにより、 本発明者は、 スーパ一スカラパイプラインプロセッサ において、 使用頻度の低いパイプラインを、 データ演算処理も行える D M A転送用の D M Aコントロ一ラとしても使えれば、 専用の D M Aコン トローラが不要になることで低価格になり、 C P U処理の性能低下も回 避できると考えた。
また、 D M Aコントローラを構成する際、 アドレスポインタや転送語 数などの情報をチャネル分だけ保持する必要があるが、 これを全てレジ ス夕として保持するとチップ上の占有面積が多くなるため、 占有面積に 対するデータ保持量の効率がよい R A Mモジュールなどに情報を保持 し、 必要なものだけを効率のよいキヤッシングァルゴリズムを使って取 得することにより、 より占有面積を抑えたチップが作成できると考えた。 そこで、 本発明の第 1の目的は、 C P U処理性能をほとんど低下させ ずに、 D M Aコントローラのモジュール相当分のゲート論理を不要にし て、 チップ面積を小さくすることができる情報処理装置を提供すること あ o
また、 本発明の第 2の目的は、 データ演算処理時の C P Uに対する割 り込み処理の起動といった余計な切り替えオーバーへッ ドなどを回避 し、 高機能なデータ転送処理の処理性能を大幅に向上することができる 情報処理装置を提供することにある。
本発明の前記ならびにその他の目的と新規な特徴は、 本明細書の記述 および添付図面から明らかになるであろう。 発明の開示
本願において開示される発明のうち、 代表的なものの概要を簡単に説 明すれば、 次のとおりである。
本発明は、 複数系統の命令実行パイプラインを有するスーパースカラ パイプライン構成の情報処理装置に適用され、 第 1メモリに格納された 命令を第 1スーパースカラパイプラインに展開して実行する際に、 第 2 スーパースカラパイプラインが命令実行を行えない空きステージ (たと えば空きサイクル、 空き時間) が生じた場合に、 この空きステージ (空 きサイクル、 空き時間) を用いて第 2メモリに格納された命令を実行す るように切り替える制御手段を有するものである。 また、 本発明の情報 処理装置においては、 第 2メモリに格納された命令として、 D M A Cコ マンドを実行するようにしたものである。
具体的に、 本発明の情報処理装置は、 以下のような特徴を有するもの である。
( 1 ) スーパ一スカラプロセッサにおいて、 一般的には、 一連の C P U 命令の並列実行を行うために構成されている複数のパイプラインの一 部を、 該当する C P U処理が行われていない空きステージに、 該当する C P u処理とは別の独立した命令処理を行えるように切り替える制御 手段を付加したェンハンストス一パースカラプロセッサ。
( 2 ) スーパースカラプ口セヅサにおいて、 一般的には、 一連の CPU 命令の並列実行を行うために構成されている複数のパイプラインのー 部を、 DMA転送用のプログラマブル DMAコントローラとしても使え るように切り替える制御手段を付加したェンハンス トス一パースカラ プロセヅサ。
(3) 前記 (2) の切り替え制御手段を付加したパイプラインにおいて、 CPU処理と DMA転送処理の切り替えを、 CPU処理優先、 DMA転 送処理優先、 DMA転送処理の一部チャネルのみを CPU処理より優先、 一定期間毎に優先順位を切り替え、 といったモードを持たせたプロセッ サ。
(4) 前記 (2) の、 複数パイプラインの一部は CPU処理と DMA転 送処理の切り替えを、 いずれか一方に固定的なモードを持たせたプロセ ヅサ。
(5) DM A転送に必要な、 ソ一スアドレス、 デスティネーションアド レス、 転送語数、 アドレスラップアラウンド転送に必要な初期値情報や アドレス範囲情報などを、 専用レジス夕ではなく、 RAMなどのメモリ に格納し、 必要に応じてキヤヅシングレジス夕に情報をキャッシングす ることを特徴とする DMA転送機能を有するプロセッサ。
(6) 前記 (2)、 (3)、 (4) のいずれかのプロセヅサにおいて、 前記 ( 5 ) の機能を付加したェンハンス トス一パースカラプロセッサ。
前記のように、 命令実行パイプラインを 2系統以上有するスーパース カラパイプライン構成のマイクロプロセッサにおいては、 一般に命令の 並列度は常に全ての命令実行パイプラインを埋めるほど高くない。 この 時々空いてしまうパイプラインを、 データ演算処理も行える DMA転送 用の DMAコントローラとしても使うことにより、 CPU処理性能の低 下を回避しながら、 専用の DM Aコントロ一ラが不要になることで低価 格になり、 さらに、 データ転送処理と同時に所望のデータ演算なども行 えることにより、 余計な CPU処理を起動するためのオーバ一へヅ ドの 大きい割り込み処理なども不要な、 デ一夕転送能力の強力なマイクロコ ントローラを実現することができる。
このとき、 DMA転送の場合の、 転送要求に対する応答速度の要求が 著しく速くはないことを利用して、 DM A転送用の各種情報を専用レジ ス夕ではなく、 データ保持密度の高い、 たとえば RAMなどに置き、 必 要な情報のみをキャッシングして使うことにより、 さらに DMAコント ローラとしてのチップ上の占有面積を抑えることができる。 図面の簡単な説明
図 1は本発明の一実施の形態の情報処理装置 (コンフィグラブルス一 パースカラマイクロプロセッサ) を示す構成図、 図 2は本実施の形態に おいて、 C P Uレジスタファイルを示す構成図、 図 3は DMACレジス 夕ファイルを示す構成図、 図 4はキャッシング機構付き DMA Cレジス 夕ファイルを示す構成図、 図 5はパイプラインのステージ構成を示す説 明図、 図 6は各ステージの処理内容を示す説明図、 図 7はパイプライン 1側の C P U命令実行および D M A転送処理の切り替え制御を示すフ 口一図、 図 8はパイプライン 0およびパイプライン 1の C P U命令実行 および D M A転送処理の切り替えを含む処理の流れを示す説明図、 図 9 はパイプライン 1の DM A転送処理に関するモード設定を示す説明図、 図 10は簡易データ処理を伴う DMA転送処理を示す説明図、 図 1 1は 簡易データ処理を伴う DM A転送処理を示すフロー図、 図 12は DM A 転送時の DMA転送情報のキャッシング動作を示す説明図、 図 13はバ ス構成を適用したコンフィグラブルスーパ一スカラマイクロプロセヅ サを示す構成図、 図 14は本発明の前提として検討したマイクロプロセ ッサを示す構成図、 図 15は本発明の前提として検討したスーパ一スカ ラマイクロプロセッサを示す構成図である。 発明を実施するための最良の形態 以下、 本発明の実施の形態を図面に基づいて詳細に説明する。 なお、 実施の形態を説明するための全図において、 同一機能を有する部材には 同一の符号を付し、 その繰り返しの説明は省略する。
まず、 図 1により、 本発明の一実施の形態の情報処理装置の構成の一 例を説明する。 図 1は本実施の形態の情報処理装置の構成図を示す。 本実施の形態の情報処理装置は、 たとえばコンフィグラブル (C o n f i gu r a b l e) ス一パースカラマイクロプロセヅサとされ、 命令 フェッチ要求.'命令デコード ·演算処理 ·汎用レジス夕などによるデー 夕保持 . D M A転送要求を受けて DM A転送処理を行う E CPU (ェン ハンス ト CP U) 1 0 b、 命令コードを格納し、 RAMや命令キヤヅシ ュなどで構成される命令格納メモリ他 1 2 0 a、 デ一タを格納し、 RA Mやデータキャッシュなどで構成されるデ一夕メモリ他 1 2 0 cおよ び 1 2 0 d、 DMACコマンド群を格納する DMACコマンド格納メモ リ 1 2 0 b、 E C P U 1 0 bからの命令コ一ドゃデ一夕転送要求に対し て、 命令格納メモリ他 1 2 0 aやデータメモリ他 1 20 cや 1 2 0 dと の間で、 命令コードゃデ一夕転送を行うスイッチマトリ ックス (SWM X) 1 1 eなどから構成される。
なお、 スィ ッチマトリックス 1 1 eは、 特に限定されているわけでは なく、 通常のバス構成でも構わない。 通常のバス構成にした場合は、 た とえば後述する図 1 3に示すような構成となる。 また、 周辺モジュール バスや、 周辺モジュール、 外部端子などは省略してある。
スィ ヅチマ ト リ ヅクスモジュール ( S WMX) 1 1 eは、 スィ ヅチマ ト リ ックスコン ト口一ラ 1 l e 1およびデ一夕セレクタとしての機能 を有するスィ ツチマトリックス 1 1 Θ 0から成る。 このスィツチマ ト リ ヅクスコントローラ 1 1 e 1は、 特に限定はされないが、 アドレス情報 やパイプラインコントロ一ラ 1 00 b 2の制御情報により、 どのメモリ との間で命令コードゃデ一夕転送を行うかを制御する。
E C P U 1 0 bは、 命令ァドレスを制御する命令ボイン夕 1 00 b 4、 DMA C制御コマンドアドレスを制御する DMA Cポインタ 1 0 O b 5、 命令実行パイプライン 1側の C P U処理/ DM A転送処理の切り替 え制御などを行うパイプラインコントローラ 100 b 2、 パイプライン コン トローラ 1 00 b 2の制御を受けて命令/コマンドデコーダ 1 0 0 b 1に送り込む情報を切り替えるセレクタ 100 b 3、 パイプライン 0側の命令コードのデコードを行う命令デコーダ 100 b 0、 パイプラ イン 1側の命令コードおよび D M A C制御コマン ドのデコードを行う 命令/コマンドデコーダ 100 b 1、 DM A要求の情報を保持して順次 DMA転送処理を起動する DMAリクエス トキユー 100 b 6、 演算処 理を行う演算器 (ALU 0) l O l b Oおよび (ALU 1) 10 1 b l、 C P Uとしてのデ一夕保持を行う CPUレジスタファイル 102 b 0、 D M A Cとしてのデータ保持を行う DMACレジス夕ファイル 1 02 b l、 パイプラインコントローラ 100 b 2の制御を受けて演算器 10 1 b 1に供給するデ一夕を選択するセレクタ 102 b 2から成る。
この ECPU 1 O bは、 命令ボイン夕で指定されたァドレスから、 順 次命令をフェッチ ·デコードし、 デコードした結果をもとに同時に複数 命令が実行できる場合は、 該当する複数命令の演算処理や、 データのレ ジス夕への格納、 レジス夕からメモリなどへのデ一夕の退避などを行う。 また、 DMA転送要求がある場合は、 後述する図 9で示されるようなモ ードに従って、 パイプライン 1側 (主な構成要素は、 DMACポインタ 100 b 5、 命令ボイン夕 100 b 4の一部、 命令/コマンドデコーダ 100 b 1、 演算器 101 b l、 CPUレジスタファイル 102 b 0の 一部、 DMACレジスタファイル 102 b l、 セレクタ 102 b 2) で、 必要に応じてデータ演算も行いながら、 DM Aデ一夕転送処理を行う。 パイプラインコントローラ 100 b 2は、 DMAリクエス トキュー 1 00 b 6からの DM A転送要求、 パイプライン 1側の命令 Zコマンドデ コーダ 100 b 1のデコード結果などを受けて、 主にパイプライン 1側 の動作を制御する。 また、 必要に応じて、 スィッチマトリックスコント ローラ 1 1 e 1を介してスィ ツチマトリ ヅクス 1 1 e 0の制御を行う。
DMACコマンド格納メモリ 120 bは、 RAMなどで構成され、 C P U用の命令コードと同様に順次実行されるような DMA Cコマン ド コードを保持し、 必要に応じて内蔵する DMA Cコマンドコードを読み 出す。
次に、 図 2により、 本実施の形態において、 E CPUを構成する CP Uレジス夕ファイルの構成の一例を説明する。 図 2は CPUレジスタフ アイルの構成図を示す。
CPUレジスタファイル 102 b 0は、 レジスタ 102 b 00、 書き 込み用のセレクタ 102 b 0 1、 デコーダ 102 b 02、 ANDゲート 102 b 03、 読み出し用のセレクタ 102 b 04などから構成される。 この例では、 書き込みが 2ポート、 読み出しが 4ポートであり、 これら が同時に動作可能となる。
デコーダ 102 b 02は、 パイプライン 0およびパイプライン 1から のレジス夕番号の指示情報 1 02 b 06を受け、 レジス夕読み出し用セ レク夕 102 b 04の制御および、 クロヅク 102 b 05と合わせてレ ジス夕書き込み信号の生成を行う。 また、 パイプライン 0およびパイプ ライン 1からの入力情報制御 102 b 06により、 レジス夕への書き込 みデ一夕を選択するセレクタ 102 b 0 1の制御を行う。 レジス夕への 書き込みデ一夕としては、 ALU0や ALU 1といった演算器の出力 1 02 b 08やメモリからの読み出しデータ 102 b 07が選択できる。 次に、 図 3により、 DMACレジス夕ファイルの構成の一例を説明す る。 図 3は DMACレジス夕ファイルの構成図を示す。
DMACレジスタファイル 1 02 b 1は、 ソースアドレスのレジスタ 1 02 b 1 00、 デスティネーションアドレスのレジスタ 1 02 b l 0 1、 カウン夕のレジス夕 102 b l 02、 書き込み用のセレクタ 102 b 1 1、 デコーダ 102 b 1 2、 A N Dゲート 102 b 13、 読み出し 用のセレクタ 102 b l 4などから構成される。
デコーダ 102 b 12は、 パイプライン 1からのレジス夕番号の指示 情報 102 b 16を受け、 レジスタ読み出し用セレクタ 102 b 14の 制御および、 クロヅク 102 b 15と合わせてレジス夕書き込み信号の 生成を行う。 また、 パイプライン 1からの入力情報制御 102 b 1 6に より、 レジス夕への書き込みデータを選択するセレクタ 102 b 1 1の 制御を行う。 レジスタへの書き込みデータとしては、 ALU 1演算器の 出力 1 02 b 1 8やメモリからの読み出しデータ 102 b 17が選択 できる。 また、 ソースアドレスのレジス夕 102 b l 00、 デスティネ ーシヨンアドレスのレジス夕 102 b 10 1、 カウン夕のレジス夕 10 2 b 102などの DM A転送に必要なレジス夕については、 転送に必要 なチャネル数分有している。
次に、 図 4により、 キャッシング機構付き DMA Cレジスタファイル の構成の一例を説明する。 図 4はキャッシング機構付き DMACレジス タフアイルの構成図を示す。
キヤヅシング機構付き D M A Cレジス夕ファイルは、 前記 D M A Cレ ジス夕ファイル 102 b 1の構成に対して、 キヤヅシングレジス夕番号 格納レジスタ 102 c 1 60、 キヤヅシングバリヅ ド情報格納レジス夕 102 c 1 6 1が付加され、 ソースアドレスのレジスタ 102 c 1 00、 デスティネーションアドレスのレジス夕 102 c 101、 カウン夕のレ ジス夕 102 c 102などの働きが異なっている。 この構成例では、 D M A転送に必要なレジス夕をチャネル数分全て内蔵することはせず、 必 要な情報はメモリに格納する。
キヤヅシング機構付き DMACレジス夕ファイルには、 メモリに格納 されている情報のキヤヅ シユレジス夕としてコピ一を保持する。 キヤヅ シングレジスタ番号格納レジスタ 102 c 160に、 現在保持している DMA転送用情報のチャネル番号を保持し、 キャッシングバリッ ド情報 格納レジス夕 102 c 1 6 1で保持している倩報が V a 1 i dかどう かを制御する。
保持するアドレス情報やカウン夕情報は、 特に限定はされないが、 ァ ドレスポインタとして使われるソースアドレス a , b, cといったキヤ ヅシングソースアドレスポィ ン夕 1 02 c 1 00やデスティネーショ ンアドレス a , b, cといったキャッシングデスティネーションァドレ スポインタ 102 c l 0 1、 転送語数カウンタとして使われるカウンタ a , b, cといったキャッシングカウンタレジス夕 102 c 102に格 納され、 随時更新される。
また、 格納しているあるチャネル情報を別のチャネルの情報に入れ替 える際は、 まず、 キャッシングレジス夕のデ一夕をメモリに書き戻して、 その後、 別のチャネルの情報をメモリから読み込んで設定する。
このキヤヅシングレジス夕の入れ替えァルゴリズムは、 後述する図 9 に示すようなモード設定に依存し、 一部だけ常駐するモードや、 各チヤ ネルの優先順位が順に入れ替わるラウンドロビンモードおよび、 LRU と呼ばれる使用頻度の低いものを優先的に入れ替えるァルゴリズムな どの組み合わせになる。
続いて、 図 5により、 本実施の形態において、 パイプラインのステ一 ジ構成の一例を説明する。 併せて、 図 6により、 各ステージの処理内容 の一例を説明する。 図 5はパイプラインのステージ構成の説明図、 図 6 は各ステージの処理内容の説明図をそれぞれ示す。
本実施の形態のパイプライン制御においては、 特にメモリに格納され た命令をパイプラインに展開して実行する際に、 別のパイプラインが命 令実行を行えない空きステージが生じた場合に、 この空きステージを用 いて別のメモリに格納された命令を実行するように切り替えることが 可能となっている。
パイプラィン 0側は、 一般的なマイク口プロセッサのパイプラインと 同様の 5段ステージ構成となる。 すなわち、 CPU命令処理専用となる。 また、 パイプライン 1側は、 一般的なマイクロプロセッサのパイプライ ンと同様の 5段ステージ構成として動作する場合と、 DMACとして 5 段ステージ構成で動作する場合がある。 すなわち、 CPU命令処理/ィ ンテリジ工ント DMA転送処理兼用となる。
各ステージの処理内容は、 図 6に示すように、 I Fが命令フェッチス テ一ジ、 I Dが命令デコード &レジス夕読み出しステージ、 EXが演 算 ' アドレス計算ステージ、 MAがメモリアクセスステージ、 WBがレ ジス夕書き込みステージ、 C Rが DMA C制御コマンド読み出しステ一 ジ、 CDが DMAC制御コマンドデコ一ド&レジス夕読み出しステージ をそれそれ表す。
次に、 図 7により、 DMA処理優先モードの場合の、 パイプライン 1 側の C P U命令実行および D M A転送処理の切り替え制御のフローの —例を説明する。 図 7はパイプライン 1側の CPU命令実行および DM A転送処理の切り替え制御のフ口一図を示す。
まず、 DMA転送要求があるかどうかを判定し (ステップ S l)、 要 求がある場合 (Ye s) は、 パイプライン 1側を DMA処理実行モード に設定し (ステップ S 2)、 必要に応じてデータ演算なども含めて、 設 定された転送語数の DM A転送処理を終了するまで繰,り返して実行す る (ステップ S 3, S 4)。 この後、 ^に制限はされないが、 DM A転 送終了時に転送終了を示すフラグの設定などを行い (ステヅプ S 5)、 DMA転送処理を終了する。 なお、 この設定されたフラグにより、 割り 込み要求信号を駆動したり、 ソフ トウェアによるポ一リングで終了を確 認したりする。
一方、 ステヅプ S 1の判定において、 DMA転送要求がない場合 (N o ) は、 パイプライン 1側を C P U命令実行モードに設定し (ステップ S 6)、 パイプライン 0と同時実行可能かどうかを判定し (ステップ S 7 )、 可能な場合 (Ye s) は CPU命令を実行して (ステップ S 8 )、 パイプライ ン 0と合わせて通常のスーパースカラマイクロプロセヅサ として動作する。
次に、 図 8により、 パイプライン 0およびパイプライン 1の CPU命 令実行および DM A転送処理の切り替えを含む処理の流れの一例を説 明する。 併せて、 図 9により、 パイプライン 1の DM A転送処理に関す るモード設定の一例を説明する。 図 8はパイプライン 0およびパイプラ イ ン 1の C P U命令実行および D M A転送処理の切り替えを含む処理 の流れの説明図、 図 9はパイプライン 1の DMA転送処理に関するモー ド設定の説明図をそれぞれ示す。 これらのモ一ド設定のための情報は、 01
E CP U 1 0 bに含まれる図示はしない制御レジス夕に設定する、 もし くは命令を実行することによってそれぞれのモードを切り替えること が可能になる。
DMA転送要求がない場合は、 パイプライン 0とパイプライン 1を合 わせて通常のスーパ一スカラマイクロプロセッサとして C P U命令の 処理を実行する。 このとき、 パイプライン 0側とパイプライン 1側で実 行する C P U命令によっては、 同時に処理を実行できない場合があり、 その場合はパイプライン 1側は処理を休止する。
DMA転送要求がある場合は、 モード設定にもよるが、 パイプライン 1側を DMA処理実行モードに設定し、 必要に応じてデ一夕演算なども 含めて、 設定された転送語数の DMA転送処理を実行し、 DMA転送終 了後、 通常の CPU命令実行モードに戻す。 すなわち、 DM A転送要求 があった時点で、 パイプライン 1側のレジス夕ファイルを CP Uレジス 夕ファイルから DMA Cレジスタフアイルに切り替え、 D MA転送処理 が終了したら CP Uレジス夕ファイルに切り替える。
パイプライン 1の DMA処理に関するモード設定は、 図 9 (a) に示 すように、 モード 0が DM A処理禁止、 モード 1が DM A処理許可の設 定となる。 さらに、 DMA処理許可については、 図 9 ( b ) に示すよう に、 モード 0が C P U処理優先、 モード 1が最優先 D M Aチャネルのみ CP U処理より優先、 モード 2が最優先およびその次の DM Aチャネル のみ CP U処理より優先、 モード 3がー定時間毎に C P U処理優先と D M A処理優先モ一ドを切り替え、 モード 4がー定時間毎に C P U処理優 先とモード 1ないし 2を切り替え、 モード 5が制御信号により C P U処 理優先と DM A処理優先モードを切り替え、 モ一ド 6が制御信号により CP U処理優先とモード 1ないし 2を切り替え、 モード 7が DM A処理 優先の各モードがある。
さらに、 DMAチャネル( c h.)間の優先順位については、 図 9 ( c) に示すように、 モード 0がチャネル 0 >チャネル 1 > · · · >チャネル n— 1で固定、 モード 1がラウン ドロビン、 モード 2がチャネル 0のみ 2008801 固定で、 チャネル 1以下はラウンドロビン、 モード 3がチャネル 0、 チ ャネル 1のみ固定で、 チャネル 2以下はラウンドロビンとなる。 ラウン ドロビンとは、 複数チャネルの優先順位が順に変わっていくことを表す。 次に、 表 1により、 RAMを用いた DMACコマンドメモリの構成の —例を説明する。
RAM上には、 DMA転送に必要な情報の格納領域を確保し、 DMA 転送処理のプログラムを格納する。 この例の場合、 チャネル 0は単純な DM A転送処理を行い、 チャネル 1はデ一夕転送時に付加的なデ一夕処 理を同時に行える。 DMA Cコマンドメモリとして、 内蔵 RAMを用意 すれば、 コマンドメモリ兼 DMA情報格納ェリアとして使用可能である。
【表 1】
表 1 dma_sa[0]レジスタ領域 (High)
dma_sa[0]レジスタ領域 (Low)
dma_da[0]レジスタ镇域 (Hi gh)
dma一 da[0]レジスタ領域(Low)
dma_c〖0]レジスタ領域 (Hi gh)
dma_c[0]レジスタ領域 (Low)
channe i O dmaリゾ一スレジスタ読み込み命令(チャネル 0 )
ソースァドレスからデータ読み込み
データカウントレジスタを一 1 &Zeroチェヅク(フラグに反映) デスティネーションァドレスにデータ書き込み
フラグがセヅ卜されていたら、 チヤネル 0終了フラグセヅト
DMA転送処理から復帰
リザーブ領域
dma_sa[ 1 ]レジスタ領域 (Hi gh)
dma一 sa [ 1 ]レジスタ領域( Low)
dma— da[1 ]レジスタ領域 (Hi gh)
dma— da[ 1 ]レジスタ領域(Low)
dma— c[1 ]レジスタ領域 (Hi gh)
dma一 c [ 1 ]レジスタ領域( Low)
channel 1 dmaリソースレジスタみ読み込み命令(チャネル 1 )
ソースァドレスからデータ読み込み
データカウン卜レジスタを一 1 &Ze「oチエック(フラグに反映) 各種データ処理 (任意にプログラム可能) デステイネ一ションァドレスにデータ書き込み
フラグがセッ卜されていたら、 チャネル 1終了フラグセヅ卜 DMA転送処理から復帰
リザーブ領域
dma— sa[2]レジスタ領域 (High)
dma_sa[2]レジスタ領域 (Low)
Figure imgf000018_0001
次に、 図 10および図 1 1により、 簡易データ処理を伴う DM A転送 処理の一例を説明する。 図 1 0は簡易データ処理を伴う DMA転送処理 の説明図、 図 1 1はそのフロ一図をそれぞれ示す。
この例では、 入力データの上位ビッ トの "0"部分を取り除くパツキ ング処理をしながら、 パッキングデータを単位サイズ毎の出力データと して DM A転送処理を行っている。 すなわち、 DM A転送要求により起 動し、 まずパイプライン 1を DMA処理実行モードに設定する (ステヅ プ S 1 1 )。 そして、 ソースァドレスから入力デ一夕を読み込み (ステ ヅプ S 1 2)、 この読み込んだデ一夕の上位ビヅ トの "0" を読み飛ば して左詰し (ステップ S 1 3)、 この左詰したパヅキングデータを既存 データに連結して書き込む (ステップ S 14)。 この処理を、 転送デー 夕が終了するまで繰り返して行い (ステップ S 15)、 終了した時点で DM A転送終了フラグをセヅ ト して終了となる (ステップ S 16)。 これにより、 従来行われていた、 データパッキング処理や、 ソフ トゥ エアによる、 DMA転送終了時に C P Uをオーバーへヅ ドの大きい割り 込み要求などで起動し、 不要な "0"部分を取り除く処理を別途行わせ るといった余計な処理を行わなくて済み、 システム性能の向上が見込ま れる。
次に、 表 2により、 DMA転送コントローラにキャッシングレジス夕 を搭載した場合の D M A転送プログラムの一例を説明する。
この例では、 キャッシングレジス夕のヒヅ ト /ミスの判定と情報の設 定を、 I d dma rという命令にて行っている。
【表 2】
表 2 ラベル 命令 ;コメン卜
dmaO: Lddmar #0 ;チャネル #0の DMA情報レジスタをメモリからダウンロード して、 Cadheレジスタに書き込み。既にダウンロードされて いた場合は、 NOP相当。また、 Cacheレジスタが一杯の場 合は、一番 古いデータをメモリに待避してから、ロードする。 dmaOLlimov @dma sa[0]+,dma dt[0] ;ソースレジスタ (dma_sa[0])が示すアドレス力、らデータを リードして (アドレスオートインクリメント)、データレジスタ
(dma_dt[0】)に格納。 ·
mov @dma dt[0] ,dma da[0] + ;デ一タレジスタ (dma— dt[0])のデータを、デスティネーション レジスタ (dma_da[0])が示すアドレスにライト (アドレスォ一ト ンクリメン卜)。
dt dmacreg [ 0 ] ;カウントレジスタ (dma_c[0])を一 1し、 0かどうかをフラグに 反映。
bf dmaOLl ;残リ転送語数が 0でない場合は、 dmaOLlに分岐。
nop
set #1, @dma endf [0] チャネル 0の DMA転送処理フラグを 1に設定。
rtdma DMA転送処理から復帰。
次に、 図 12により、 DM A転送コントローラにキャッシングレジス ' 夕を 1セッ ト搭載した場合の、 DM A転送時の DM A転送情報のキヤッ シングの動作の一例を説明する。 図 12は DMA転送時の DMA転送情 報のキヤッシングの動作の説明図を示す。
この例では、 パイプライン 1の動作において、 チャネル 0の DMA要 求、 続けてチャネル 0の D MA要求があり、 その後、 チャネル 1の DM A要求があった場合を示している。 この際に、 DMA転送後の CPU処 理においては、 命令の組み合わせにより一時的に命令処理を休止するこ とがある。
この例の場合に、 チャネル 0の DMA転送要求が連続したため、 1回 目は DMA転送情報をメモリなどからロードするが、 2回目の DMA転 送情報はメモリなどからロードせず、 キャッシングされている情報を使 用しており、 応答速度の改善および低消費電力化が見込める。 その後、 チャネル 1の DM A転送要求が発生しているため、 チャネル 0の DMA 転送情報をメモリなどに退避してから、 チャネル 1の DMA転送情報を キヤヅシングレジス夕にコピーしている。
次に、 図 13により、 バス構成を適用したコンフィグラブルス一パ一 スカラマイクロプロセッサの構成の一例を説明する。 図 13はバス構成 を適用したコンフィグラブルスーパ一スカラマイクロプロセヅサの構 成図を示す。
バス構成を適用したコンフィグラブルス一パースカラマイクロプロ セヅサは、 前記図 1に示したスィヅチマトリヅクスモジュール ( S WM X) をバス構成に代えた構成であり、 E C P U 10 bからの命令コ一ド フヱツチ要求に対して命令コードを転送する命令転送バス 1 10 a、 E CPU 1 0 bからのデータ転送要求に対してデータを転送するデータ 転送バス 1 1 0 bおよび 1 10 cから成る。 他の構成および動作は、 前 記図 1と同様である。
以上説明したように、 本実施の形態のコンフィグラブルス一パース力 ラマイクロプロセッサによれば、 CPU処理用のパイプライン機構によ つて、 CPU処理の空き時間などに DMA転送処理を行うことにより、 C P U処理性能をほとんど低下させずに、 DMAコントローラのモジュ —ル相当分のゲート論理が不要になり、 チップ面積が小さくなる。
また、 従来の汎用の DMAコントローラの場合、 DMA転送処理と同 時にデータ演算処理を行うことは難しく、 本実施の形態のプログラマブ ル DMA転送機能により、 DMAデ一夕転送とデータ演算を連続して行 えるため、 データ演算処理時の CP Uに対する割り込み処理の起動とい つた余計な切り替えオーバへッ ドなどが回避でき、 高機能なデ一夕転送 処理の処理性能が大幅に向上できる。
この結果、 製品全体として、 DMAコントローラのモジュール相当分 のチップ面積削減を可能とする。 さらに、 高機能 ·高性能デ一夕転送機 能により、 演算を伴うようなデータ転送処理を行う場合、 システム性能 が大幅に向上する。 また、 内部バスなどに接続されるバスマスタの個数 が減るため、 負荷容量的にも、 レイアウト的にも、 負荷が減り、 動作速 度向上も期待できる。 以上、 本発明者によってなされた発明をその実施の形態に基づき具体 的に説明したが、 本発明は前記実施の形態に限定されるものではなく、 その要旨を逸脱しない範囲で種々変更可能であることはいうまでもな 'い。
たとえば、 スーパ一スカラプ口セヅサの命令実行パイプラインは、 2 本に限定されるものではなく、 3本以上のパイプラインを有する場合に も適用可能である。 パイプラインの本数が多くなると、 C P U命令を同 時に行うスーパ一スカラマイクロプロセッサとしては、 同時に各パイプ ラインを途切れなく動作させられる確立は下がるが、 空いているパイプ ラインを別の処理に充てられるため、 さらに D M A転送能力の高いマイ クロプロセッサを構成することができる。 産業上の利用可能性
以上のように、 本発明にかかる情報処理装置は、 特に複数系統の命令 実行パイプラインを有するスーパ一スカラパイプライン構成のマイク 口プロセッサや、 組み込み分野を主な夕一ゲヅ トとする高性能マイク口 コントローラに適用して有用であり、 さらに信号処理を行うための処理 プロセッサにおいての、 インテリジェントデ一夕転送コントローラなど にも広く適用することができる。

Claims

請 求 の 範 囲
1 . 複数系統の命令実行パイプラインを有するスーパ一スカラパイプラ ィン構成の情報処理装置であって、
第 1メモリに格納された命令を第 1ス一パースカラパイプラインに 展開して実行する際に、 第 2ス一パースカラパイプラインが命令実行を 行えない空きステージが生じた場合に、 前記空きステージを用いて第 2 メモリに格納された命令を実行するように切り替える制御手段を有す ることを特徴とする情報処理装置。
2 . 複数系統の命令実行パイプラインを有するスーパ一スカラパイプラ ィン構成の情報処理装置であって、
第 1メモリに格納された命令を第 1ス一パースカラパイプラインに 展開して実行する際に、 第 2スーパ一スカラパイプラインが命令実行を 行えない空きステージが生じた場合に、 前記空きステージを用いて第 2 メモリに格納された D M A Cコマンドを実行するように切り替える制 御手段を有することを特徴とする情報処理装置。
3 . 請求項 2記載の情報処理装置において、
前記 D M A Cコマンドは、 演算処理したデ一夕を転送可能とすること を特徴とする情報処理装置。
4 . 請求項 2記載の情報処理装置において、
前記制御手段は、 C P U処理と D M A転送処理とを切り替える際に、 前記 C P U処理を優先する第 1モード、 前記 D M A転送処理を優先する 第 2モード、 前記 D M A転送処理の一部チャネルのみを前記 C P U処理 より優先する第 3モード、 一定期間毎に優先順位を切り替える第 4モ一 ドを選択的なモ一ドとして有することを特徴とする情報処理装置。
5 . 請求項 2記載の情報処理装置において、
前記制御手段は、 C P U処理と D M A転送処理とを切り替える際に、 命令実行を行えない空きステージが生じた第 2スーパースカラパイプ ラインに対して前記 C P U処理と前記 D M A転送処理のいずれか一方 を固定的なモードとして切り替えることを特徴とする情報処理装置。
6 . 請求項 2記載の情報処理装置において、
前記制御手段は、 D M A転送処理の際に、 D M A転送に必要なソース アドレス、 デスティネーションアドレスおよび転送語数と、 アドレスラ ップアラウンド転送に必要な初期値情報とァドレス範囲情報をメモリ に格納し、 必要な情報のみをキヤヅシングレジスタにキャッシングする ことを特徴とする情報処理装置。
7 . 複数系統の命令実行パイプラインを有するスーパ一スカラパイブラ ィン構成の情報処理装置であって、
命令実行を行うための命令が格納された第 1メモリと、
データ転送を実行するための第 2メモリと、
少なくとも第 1および第 2スーパースカラパイプラインとを有し、 前記第 1メモリに格納された命令を前記第 1ス一パースカラパイプ ラインに展開して実行する際に、 前記第 2スーパ一スカラパイプライン が前記第 1メモリに格納された命令実行を行えない空きステージが生 じた場合に、 前記空きステージを用いて前記第 2メモリに格納された命 令を実行するように切り替える制御手段を有することを特徴とする情 報処理装置。
PCT/JP2002/008801 2002-08-30 2002-08-30 情報処理装置 WO2004023291A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2002/008801 WO2004023291A1 (ja) 2002-08-30 2002-08-30 情報処理装置
JP2004534043A JPWO2004023291A1 (ja) 2002-08-30 2002-08-30 情報処理装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2002/008801 WO2004023291A1 (ja) 2002-08-30 2002-08-30 情報処理装置

Publications (1)

Publication Number Publication Date
WO2004023291A1 true WO2004023291A1 (ja) 2004-03-18

Family

ID=31972273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/008801 WO2004023291A1 (ja) 2002-08-30 2002-08-30 情報処理装置

Country Status (2)

Country Link
JP (1) JPWO2004023291A1 (ja)
WO (1) WO2004023291A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014513343A (ja) * 2011-04-07 2014-05-29 ゼットティーイー コーポレイション レジスタファイル間におけるデータ伝送の実現方法及び実現装置
US9015397B2 (en) 2012-11-29 2015-04-21 Sandisk Technologies Inc. Method and apparatus for DMA transfer with synchronization optimization

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01125644A (ja) * 1987-11-11 1989-05-18 Hitachi Ltd データ転送装置
WO1998013759A1 (fr) * 1996-09-27 1998-04-02 Hitachi, Ltd. Machine de traitement de donnees et systeme de traitement de donnees

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01125644A (ja) * 1987-11-11 1989-05-18 Hitachi Ltd データ転送装置
WO1998013759A1 (fr) * 1996-09-27 1998-04-02 Hitachi, Ltd. Machine de traitement de donnees et systeme de traitement de donnees

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014513343A (ja) * 2011-04-07 2014-05-29 ゼットティーイー コーポレイション レジスタファイル間におけるデータ伝送の実現方法及び実現装置
US9501278B2 (en) 2011-04-07 2016-11-22 Zte Corporation Method and device for data transmission between register files
US9015397B2 (en) 2012-11-29 2015-04-21 Sandisk Technologies Inc. Method and apparatus for DMA transfer with synchronization optimization

Also Published As

Publication number Publication date
JPWO2004023291A1 (ja) 2005-12-22

Similar Documents

Publication Publication Date Title
EP1126368B1 (en) Microprocessor with non-aligned circular addressing
AU2008355072C1 (en) Thread optimized multiprocessor architecture
US6829696B1 (en) Data processing system with register store/load utilizing data packing/unpacking
US6507921B1 (en) Trace fifo management
US7473293B2 (en) Processor for executing instructions containing either single operation or packed plurality of operations dependent upon instruction status indicator
RU2292581C2 (ru) Команды загрузки/перемещения и копирования для процессора
EP1979808B1 (en) Thread optimized multiprocessor architecture
US6230259B1 (en) Transparent extended state save
EP1512068B1 (en) Access to a wide memory
US20060179273A1 (en) Data processor adapted for efficient digital signal processing and method therefor
US20030154358A1 (en) Apparatus and method for dispatching very long instruction word having variable length
US6963962B2 (en) Memory system for supporting multiple parallel accesses at very high frequencies
US20030033482A1 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
EP1512069A2 (en) An address generation unit for a processor
US5924114A (en) Circular buffer with two different step sizes
WO2002010994A1 (en) A data processor
US20070250689A1 (en) Method and apparatus for improving data and computational throughput of a configurable processor extension
US20030196072A1 (en) Digital signal processor architecture for high computation speed
US7340591B1 (en) Providing parallel operand functions using register file and extra path storage
US6889320B1 (en) Microprocessor with an instruction immediately next to a branch instruction for adding a constant to a program counter
WO2004023291A1 (ja) 情報処理装置
JP2002229779A (ja) 情報処理装置
EP0992889A1 (en) Interrupt processing during iterative instruction execution
JPH04104350A (ja) マイクロプロセッサ
EP0915416B1 (en) System for allowing a two word instruction to be executed in a single cycle and method therefor

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 BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LU MC NL PT SE SK TR

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
WWE Wipo information: entry into national phase

Ref document number: 2004534043

Country of ref document: JP

122 Ep: pct application non-entry in european phase