JP2009282744A - Computing unit and semiconductor integrated circuit device - Google Patents

Computing unit and semiconductor integrated circuit device Download PDF

Info

Publication number
JP2009282744A
JP2009282744A JP2008134001A JP2008134001A JP2009282744A JP 2009282744 A JP2009282744 A JP 2009282744A JP 2008134001 A JP2008134001 A JP 2008134001A JP 2008134001 A JP2008134001 A JP 2008134001A JP 2009282744 A JP2009282744 A JP 2009282744A
Authority
JP
Japan
Prior art keywords
data
unit
slices
register
processing
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
JP2008134001A
Other languages
Japanese (ja)
Inventor
Kenju Osanai
建樹 小山内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008134001A priority Critical patent/JP2009282744A/en
Publication of JP2009282744A publication Critical patent/JP2009282744A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a computing unit and a semiconductor integrated circuit device that can implement an increased operation speed. <P>SOLUTION: The computing unit 10, which executes a SIMD instruction having multi-bit data units S0 to S3 in a plurality of processing cycles PS1 and PS2, comprises a plurality of first operation parts 11-0 to 11-3 for performing a first operation of the data units S0 to S3 without any bit movements across the data units S0 to S3, and a second operation part 12 for performing a second operation with bit movements across the data units S0 to S3. The first operation and second operation execute the SIMD instruction, and the first operation and second operation are executed with a latency of one or more processing cycles. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、演算器及び半導体集積回路装置に関するもので、例えばSIMD(single instruction multiple data)命令をサポートするプロセッサに関するものである。   The present invention relates to an arithmetic unit and a semiconductor integrated circuit device, for example, a processor that supports a single instruction multiple data (SIMD) instruction.

SIMDは、1つの命令で複数のデータに対して同じ処理を実行する処理方式である。SIMD命令をサポートするプロセッサでは、演算の単位となる複数ビットの単位データ(例えば32ビット)を、同時に複数処理する。従ってプロセッサ内の演算器は、単位データ毎に論理的に独立している。   SIMD is a processing method for executing the same processing on a plurality of data with one instruction. In a processor that supports the SIMD instruction, a plurality of pieces of unit data (for example, 32 bits) serving as a unit of calculation are simultaneously processed. Therefore, the arithmetic units in the processor are logically independent for each unit data.

例えば、4つの単位データを同時に処理するプロセッサの場合、4つの32ビット加算器を並列に設けることで、並列加算命令を実行出来る。またSIMD命令では無いが、論理演算命令(AND、OR、EXOR等)を処理する場合も、32ビット単位で演算を行う4つの演算器を並列に配置する構成とすることが可能である。その理由は、これらの演算は基本的にbit wiseな演算であって、単位データ間でのデータ(ビットまたはバイト)の移動が生じないからである(例えば非特許文献1参照)。   For example, in the case of a processor that processes four unit data simultaneously, a parallel addition instruction can be executed by providing four 32-bit adders in parallel. Further, although not SIMD instructions, when processing logical operation instructions (AND, OR, EXOR, etc.), it is possible to adopt a configuration in which four arithmetic units that perform operations in units of 32 bits are arranged in parallel. This is because these operations are basically bit-wise operations, and data (bits or bytes) does not move between unit data (see, for example, Non-Patent Document 1).

他方、単位データ間でのデータの通信を生じる演算命令も存在する。それは、例えばシャッフル命令等である。そして従来、このような演算器を論理合成ツールにより物理実装しようとすると、プロセッサの動作速度が悪化するという問題があった。
東芝、“TX System Risc TX79 Core Architecture (Symmetric 2-way superscalar 64-bit CPU) Rev. 2.0”、B-48頁、PAND命令、2001年4月、インターネット<URL: http://lukasz.dk/files/tx79architecture.pdf>
On the other hand, there are arithmetic instructions that cause data communication between unit data. This is, for example, a shuffle instruction. Conventionally, when such an arithmetic unit is physically mounted using a logic synthesis tool, there has been a problem that the operating speed of the processor deteriorates.
Toshiba, “TX System Risc TX79 Core Architecture (Symmetric 2-way superscalar 64-bit CPU) Rev. 2.0”, page B-48, PAND instruction, April 2001, Internet <URL: http://lukasz.dk/ files / tx79architecture.pdf>

この発明は、動作速度を向上出来る演算器及び半導体集積回路装置を提供する。   The present invention provides an arithmetic unit and a semiconductor integrated circuit device capable of improving the operation speed.

この発明の一態様に係る演算器は、複数ビットを一つのデータ単位とするSIMD命令を、複数の処理サイクルにより実行する演算器であって、前記データ単位間でのビットの移動を伴うことなく、それぞれ前記データ単位毎に第1演算を行う複数の第1演算部と、前記データ単位間でのビットの移動を伴う第2演算を行う第2演算部とを具備し、前記第1演算と前記第2演算とにより前記SIMD命令が実行され、且つ前記第1演算と前記第2演算とは、互いに1処理サイクル以上のレイテンシを有して実行される。   An arithmetic unit according to an aspect of the present invention is an arithmetic unit that executes a SIMD instruction having a plurality of bits as one data unit in a plurality of processing cycles, and does not involve bit movement between the data units. A plurality of first calculation units that perform a first calculation for each of the data units, and a second calculation unit that performs a second calculation that involves moving a bit between the data units, The SIMD instruction is executed by the second operation, and the first operation and the second operation are executed with a latency of one processing cycle or more.

また、この発明の一態様に係る半導体集積回路装置は、複数の処理ステージを用いてパイプライン動作を行う半導体集積回路装置であって、複数ビットを一つのデータ単位とするSIMD命令を、複数の前記処理ステージを用いて実行する演算器を具備し、前記演算器は、第i処理ステージ(iは1以上の自然数)において、前記データ単位間でのビットの移動を伴うことなく、前記データ単位毎に第1演算を行い、第(i+j)処理ステージ(jは1以上の自然数)において、前記データ単位間でのビットの移動を伴う第2演算を行う。   A semiconductor integrated circuit device according to an aspect of the present invention is a semiconductor integrated circuit device that performs a pipeline operation using a plurality of processing stages, and a plurality of SIMD instructions having a plurality of bits as one data unit, An arithmetic unit that executes using the processing stage, wherein the arithmetic unit includes the data unit without moving a bit between the data units in an i-th processing stage (i is a natural number of 1 or more). The first operation is performed every time, and the second operation involving the movement of bits between the data units is performed in the (i + j) th processing stage (j is a natural number of 1 or more).

この発明によれば、動作速度を向上出来る演算器及び半導体集積回路装置を提供できる。   According to the present invention, it is possible to provide an arithmetic unit and a semiconductor integrated circuit device that can improve the operation speed.

以下、この発明の実施形態を、図面を参照して説明する。この説明に際し、全図にわたり、共通する部分には共通する参照符号を付す。   Embodiments of the present invention will be described below with reference to the drawings. In the description, common parts are denoted by common reference symbols throughout the drawings.

[第1の実施形態]
この発明の第1の実施形態に係る演算器及び半導体集積回路装置について、図1を用いて説明する。図1は、本実施形態に係るプロセッサのブロック図である。
[First Embodiment]
An arithmetic unit and a semiconductor integrated circuit device according to a first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram of a processor according to the present embodiment.

<プロセッサの全体構成について>
図示するようにプロセッサ1は、2つのレジスタRA、RB、及び第1演算器10及び第2演算器20を備えている。またプロセッサ1はパイプライン動作を行い、パイプライン動作は処理ステージPS1と、処理ステージPS1に引き続いて行われる処理ステージPS2とを含む。そして、第1演算器10は処理ステージPS1、PS2にまたがった演算を行い、第2演算器20は処理ステージPS1で完結する演算を行う。更にプロセッサ1は、例えば32ビットを単位データとするSIMD動作を行う。以下、この32ビットの単位データを「スライス(slice)」と呼ぶこととし、プロセッサ1が4つのスライスを同時に処理する場合を例に挙げて説明する。この4つのスライスを、以下スライスS0〜S3と呼ぶことにする。なお、スライスは32ビットに限らず、例えば16ビットや64ビットでも良く、また同時に処理されるスライス数も4つに限定されるものでは無い。
<About overall processor configuration>
As illustrated, the processor 1 includes two registers RA and RB, and a first arithmetic unit 10 and a second arithmetic unit 20. The processor 1 performs a pipeline operation, and the pipeline operation includes a processing stage PS1 and a processing stage PS2 performed subsequent to the processing stage PS1. The first computing unit 10 performs computations across the processing stages PS1 and PS2, and the second computing unit 20 performs computations that are completed at the processing stage PS1. Further, the processor 1 performs SIMD operation using, for example, 32 bits as unit data. Hereinafter, the 32-bit unit data will be referred to as “slice”, and a case where the processor 1 processes four slices simultaneously will be described as an example. These four slices are hereinafter referred to as slices S0 to S3. The number of slices is not limited to 32 bits, and may be 16 bits or 64 bits, for example, and the number of slices processed simultaneously is not limited to four.

レジスタRAは、4つのスライス分のデータを保持可能である。すなわち、(32ビット×4)=128ビットのデータを保持出来る。以下、レジスタRAにおけるスライスS0〜S3に相当する32ビットデータの各々を、それぞれワード0A〜3Aと呼ぶ。   The register RA can hold data for four slices. That is, (32 bits × 4) = 128 bits of data can be held. Hereinafter, each of the 32-bit data corresponding to the slices S0 to S3 in the register RA is referred to as words 0A to 3A, respectively.

レジスタRBは、レジスタRAと同様に4つのスライス分のデータを保持可能である。すなわち、128ビットのデータを保持出来る。以下、レジスタRBにおけるスライスS0〜S3に相当する32ビットデータの各々を、それぞれワード0B〜3Bと呼ぶ。   Similarly to the register RA, the register RB can hold data for four slices. That is, 128-bit data can be held. Hereinafter, each of the 32-bit data corresponding to the slices S0 to S3 in the register RB is referred to as words 0B to 3B, respectively.

第1演算器10は、4つの第1演算部11−0〜11−3と、第2演算部12とを備えている。第1演算部11−0〜11−3はそれぞれ、レジスタRA内のスライスS0〜S3とレジスタRB内のスライスS0〜S3との間の演算を行う。すなわち、第1演算部11−0はワード0Aとワード0Bとをデータとして用いた演算を行い、第1演算部11−1はワード1Aとワード1Bとをデータとして用いた演算を行い、第1演算部11−2はワード2Aとワード2Bとをデータとして用いた演算を行い、第1演算部11−3はワード3Aとワード3Bとをデータとして用いた演算を行う。つまり、第1演算部11−0〜11−3の各々において行われる処理は、スライス間でのデータの移動を生じさせない。換言すれば、各処理は、スライス間でのデータ通信を生じさせず、各スライス内で完結する処理である。以下、第1演算部11−0〜11−3を区別しない場合には、一括して第1演算部11と呼ぶことにする。第1演算部11における処理は、処理ステージPS1において実行される。   The first computing unit 10 includes four first computing units 11-0 to 11-3 and a second computing unit 12. The first calculation units 11-0 to 11-3 perform calculations between the slices S0 to S3 in the register RA and the slices S0 to S3 in the register RB, respectively. That is, the first arithmetic unit 11-0 performs an operation using the word 0A and the word 0B as data, and the first arithmetic unit 11-1 performs an operation using the word 1A and the word 1B as data. The calculation unit 11-2 performs a calculation using the word 2A and the word 2B as data, and the first calculation unit 11-3 performs a calculation using the word 3A and the word 3B as data. That is, the processing performed in each of the first arithmetic units 11-0 to 11-3 does not cause data movement between slices. In other words, each process is a process completed within each slice without causing data communication between slices. Hereinafter, when the first calculation units 11-0 to 11-3 are not distinguished, they are collectively referred to as the first calculation unit 11. The processing in the first calculation unit 11 is executed in the processing stage PS1.

第2演算部12は、プロセッサ1において同時処理されるスライス数と同数、つまり4つの第1演算部11−0〜11−3における処理結果をデータとして用いた演算を行う。すなわち、第1演算部11−0〜11−3においてそれぞれ行われたスライスS0〜S3に関する演算結果(32ビット×4)を、データとして用いて演算を行う。つまり、第2演算部12において行われる処理は、スライス間でのデータの通信を生じさせる処理である。また第2演算部12における処理は、処理ステージPS2において実行される。そして、第2演算部12において得られた32ビットの演算結果が、第1演算器10の演算結果として出力される。   The second arithmetic unit 12 performs an arithmetic operation using the same number of slices that are simultaneously processed in the processor 1, that is, the processing results in the four first arithmetic units 11-0 to 11-3 as data. That is, the calculation is performed using the calculation results (32 bits × 4) regarding the slices S0 to S3 respectively performed in the first calculation units 11-0 to 11-3 as data. That is, the process performed in the second calculation unit 12 is a process that causes data communication between slices. The processing in the second calculation unit 12 is executed in the processing stage PS2. Then, the 32-bit calculation result obtained in the second calculation unit 12 is output as the calculation result of the first calculator 10.

第2演算器20は、4つの第1演算部21−0〜21−3を備えている。第1演算部21−0〜21−3はそれぞれ、レジスタRA内のスライスS0〜S3とレジスタRB内のスライスS0〜S3とをデータとして用いた演算を行う。すなわち、第1演算部21−0はワード0Aとワード0Bとを用いた演算を行い、第1演算部21−1はワード1Aとワード1Bとを用いた演算を行い、第1演算部21−2はワード2Aとワード2Bとを用いた演算を行い、第1演算部21−3はワード3Aとワード3Bとを用いた演算を行う。つまり、第1演算部21−0〜21−3の各々において行われる処理は、スライス間でのデータの通信が無く、各スライス内で完結する処理である。以下、第1演算部21−0〜21−3を区別しない場合には、一括して第1演算部21と呼ぶことにする。第1演算部21における処理は、処理ステージPS1において実行される。そして、第1演算部21において得られた32ビットの演算結果が、第2演算器20の演算結果として出力される。   The second computing unit 20 includes four first computing units 21-0 to 21-3. The first calculation units 21-0 to 21-3 perform calculations using the slices S0 to S3 in the register RA and the slices S0 to S3 in the register RB as data, respectively. That is, the first calculation unit 21-0 performs calculation using the words 0A and 0B, the first calculation unit 21-1 performs calculation using the words 1A and 1B, and the first calculation unit 21- 2 performs an operation using the word 2A and the word 2B, and the first operation unit 21-3 performs an operation using the word 3A and the word 3B. That is, the processing performed in each of the first arithmetic units 21-0 to 21-3 is processing that is completed within each slice without communication of data between slices. Hereinafter, when the first computing units 21-0 to 21-3 are not distinguished, they are collectively referred to as the first computing unit 21. The processing in the first calculation unit 21 is executed in the processing stage PS1. Then, the 32-bit calculation result obtained in the first calculation unit 21 is output as the calculation result of the second calculator 20.

<プロセッサの動作について>
図2は、プロセッサ1におけるパイプライン処理の様子を示すタイミングチャートであり、第1演算器10及び第2演算器20における処理内容の流れを示している。
<About processor operation>
FIG. 2 is a timing chart showing the state of pipeline processing in the processor 1 and shows the flow of processing contents in the first computing unit 10 and the second computing unit 20.

まず、第2演算器20における処理について説明する。図示するように第2演算器20では、各処理サイクルにおいて、第1演算部21−0〜21−3がそれぞれスライスS0〜S3に関する演算を、並行して行う。つまり、各処理サイクルにおける演算はそれぞれ独立しており、その演算内容は各スライス内で完結するものである。   First, the process in the second computing unit 20 will be described. As illustrated, in the second computing unit 20, in each processing cycle, the first computing units 21-0 to 21-3 perform computations on the slices S0 to S3 in parallel. That is, the operations in each processing cycle are independent, and the content of the operation is completed within each slice.

次に第1演算器10における処理について説明する。図示するように、第1演算器10における第1演算部11の処理は、第2演算器20における第1演算部21の処理と同様である。第2演算器20と異なる点は、第1演算部11の処理と並行して、第2演算部12の処理が行われる点にある。つまり、第n(nは2以上の自然数)サイクルにおいて第2演算部12は、第(n−1)サイクルで第1演算部11−0〜11−3で得られた演算結果を用いた処理を行う。すなわち、スライスS0〜S3にまたがった処理を行う。つまり、第2演算部12における演算は、第1演算部11における演算に対して1サイクルのレイテンシを有して実行される。   Next, processing in the first computing unit 10 will be described. As shown in the figure, the processing of the first computing unit 11 in the first computing unit 10 is the same as the processing of the first computing unit 21 in the second computing unit 20. The difference from the second computing unit 20 is that the processing of the second computing unit 12 is performed in parallel with the processing of the first computing unit 11. That is, in the nth (n is a natural number of 2 or more) cycle, the second calculation unit 12 performs processing using the calculation results obtained by the first calculation units 11-0 to 11-3 in the (n-1) th cycle. I do. That is, a process that spans slices S0 to S3 is performed. That is, the calculation in the second calculation unit 12 is executed with a one-cycle latency with respect to the calculation in the first calculation unit 11.

次に、上記第1演算器10及び第2演算器20で行われる処理の具体例について説明する。
まず第2演算器20について説明する。前述の通り、第2演算器20で行われる処理はスライス間でのデータの通信を生じさせない処理である。その具体例は、例えば加算命令、減算命令、論理演算命令、または積和命令である。加算命令の場合には、第1演算部21−0はワード0Aとワード0Bとの加算を行い、第1演算部21−1はワード1Aとワード1Bとの加算を行い、第1演算部21−2はワード2Aとワード2Bとの加算を行い、第1演算部21−3はワード3Aとワード3Bとの加算を行う。
Next, a specific example of processing performed by the first computing unit 10 and the second computing unit 20 will be described.
First, the second computing unit 20 will be described. As described above, the processing performed by the second computing unit 20 is processing that does not cause data communication between slices. Specific examples thereof are, for example, an addition instruction, a subtraction instruction, a logical operation instruction, or a product-sum instruction. In the case of an addition instruction, the first calculation unit 21-0 adds the words 0A and 0B, the first calculation unit 21-1 adds the words 1A and 1B, and the first calculation unit 21. -2 adds word 2A and word 2B, and first operation unit 21-3 adds word 3A and word 3B.

次に第1演算器10について説明する。前述の通り、第1演算器10で行われる処理はスライス間でのデータの通信を生じさせる処理である。その具体例は、例えばシフト(shift)命令、ローテート(rotate)命令、またはシャッフル(shuffle)命令などである。   Next, the first computing unit 10 will be described. As described above, the processing performed by the first computing unit 10 is processing that causes data communication between slices. Specific examples thereof include a shift instruction, a rotate instruction, a shuffle instruction, and the like.

以下、上記の3つの命令の詳細について説明する。まず、レジスタRA、RB内に保持されるデータについて、図3及び図4を用いて説明する。図3及び図4はそれぞれ、レジスタRA、RBの構成を模式的に示す概念図である。   Details of the above three instructions will be described below. First, data held in the registers RA and RB will be described with reference to FIGS. 3 and 4 are conceptual diagrams schematically showing the configuration of the registers RA and RB, respectively.

図示するように、レジスタRA、RBにおいて、ワード0A〜3A、ワード0B〜3Bに順次含まれる1バイトのデータを、以下バイトB00〜B31と呼ぶことにする。すなわち、ワード0Aに含まれるデータは、上位ビットから順にバイトB00〜B03である。またワード1Aに含まれるデータは、上位ビットから順にバイトB04〜B07である。ワード2Aに含まれるデータは、上位ビットから順にバイトB08〜B011である。ワード3Aに含まれるデータは、上位ビットから順にバイトB12〜B15である。ワード0Bに含まれるデータは、上位ビットから順にバイトB16〜B19である。ワード1Bに含まれるデータは、上位ビットから順にバイトB20〜B23である。ワード2Bに含まれるデータは、上位ビットから順にバイトB24〜B27である。そして、ワード3Bに含まれるデータは、上位ビットから順にバイトB28〜B31である。   As shown in the figure, in the registers RA and RB, 1-byte data sequentially included in the words 0A to 3A and the words 0B to 3B is hereinafter referred to as bytes B00 to B31. That is, the data included in word 0A is bytes B00 to B03 in order from the upper bit. Data included in the word 1A is bytes B04 to B07 in order from the upper bit. Data included in the word 2A is bytes B08 to B011 in order from the upper bit. Data included in the word 3A is bytes B12 to B15 in order from the upper bit. Data included in the word 0B is bytes B16 to B19 in order from the upper bit. Data included in the word 1B is bytes B20 to B23 in order from the upper bit. Data included in the word 2B is bytes B24 to B27 in order from the upper bit. Data included in the word 3B is bytes B28 to B31 in order from the upper bit.

[シフト命令について]
まず、シフト命令について説明する。図5は、シフト命令において実行される処理内容を示すプログラムの概念図である。図5では、レジスタRAの内容をバイト毎に上位ビット側へシフトする場合(左シフト)について示している。図5における左端に示す数字はプログラムの行番号であり、“<−”は、右辺の値が左辺に代入されることを示す。またRA、RBはそれぞれレジスタRA、RBを示し、RTはターゲットレジスタを示す。ターゲットレジスタRTはプロセッサ1に備えられ(図1では省略)、第1演算器10や第2演算器20における演算結果を格納するレジスタである。またRA、RB、RTの直後に記載した“(i:j)”は、各レジスタにおけるiビット目からjビット目までのデータであることを示す。すると、各レジスタは4スライス(=4×32ビット)を保持可能であるから、i、jは0〜127までの値である。
[About shift instructions]
First, the shift instruction will be described. FIG. 5 is a conceptual diagram of a program showing the processing contents executed in the shift instruction. FIG. 5 shows a case where the contents of the register RA are shifted to the upper bit side for each byte (left shift). The numbers shown at the left end in FIG. 5 are program line numbers, and “<−” indicates that the value on the right side is assigned to the left side. RA and RB indicate registers RA and RB, respectively, and RT indicates a target register. The target register RT is a register that is provided in the processor 1 (not shown in FIG. 1) and stores the calculation results in the first calculator 10 and the second calculator 20. Further, “(i: j)” described immediately after RA, RB, and RT indicates data from the i-th bit to the j-th bit in each register. Then, since each register can hold 4 slices (= 4 × 32 bits), i and j are values from 0 to 127.

図示するように、まずある値sに、レジスタRBの例えば27〜31ビットで示される値(0〜31のいずれか)が代入される(図5の1行目参照)。sは、シフト量を示す。s=1であれば1バイト毎シフトされ、s=2であれば2バイト毎シフトされる。   As shown in the figure, first, a value (any one of 0 to 31) indicated by, for example, 27 to 31 bits of the register RB is substituted for a certain value s (see the first line in FIG. 5). s represents the shift amount. If s = 1, the data is shifted by 1 byte, and if s = 2, the data is shifted by 2 bytes.

そしてs=0〜15であれば、ターゲットレジスタRTにおける0〜(127−(s×8))ビットの内容として、レジスタRAにおける(s×8)〜127ビットの内容が格納される(図5の2、3行目参照)。そして、ターゲットレジスタにおける残りの下位ビットには、“0”が格納される(図5の4行目参照)。   If s = 0 to 15, the contents of (s × 8) to 127 bits in the register RA are stored as the contents of 0 to (127− (s × 8)) bits in the target register RT (FIG. 5). 2 and 3) Then, “0” is stored in the remaining lower bits in the target register (see the fourth line in FIG. 5).

他方、s=16〜31であれば、ターゲットレジスタRTの全ビットが“0”とされる(図5の5、6行目参照)。以上の結果、ターゲットレジスタRTには、レジスタRA内のデータを左方向へsバイトだけシフトさせたデータが格納される。   On the other hand, if s = 16 to 31, all bits of the target register RT are set to “0” (see the fifth and sixth lines in FIG. 5). As a result, the target register RT stores data obtained by shifting the data in the register RA by s bytes to the left.

図6は、シフト命令を実行するための構成を示す概念図であり、ターゲットレジスタRTも図示している。ターゲットレジスタRTは、4つのスライス分のデータを保持可能である。すなわち、(32ビット×4)=128ビットのデータを保持出来る。以下、レジスタRTに保持されるデータを、上位ビットから順にバイトB32〜B47と呼ぶことにする。またバイトB32〜B35をワード0T、バイトB36〜B39をワード1T、バイトB40〜B43をワード2T、及びバイトB44〜B47をワード3Tと呼ぶことにする。   FIG. 6 is a conceptual diagram showing a configuration for executing a shift instruction, and also shows a target register RT. The target register RT can hold data for four slices. That is, (32 bits × 4) = 128 bits of data can be held. Hereinafter, the data held in the register RT will be referred to as bytes B32 to B47 in order from the upper bit. Bytes B32 to B35 are called word 0T, bytes B36 to B39 are called word 1T, bytes B40 to B43 are called word 2T, and bytes B44 to B47 are called word 3T.

演算器は、デコーダ13及び複数の選択回路(バイトレベルマルチプレクサ:byte level multiplexer)14を備えている。以降、本明細書における「選択回路」は、特に断らない限りは全てバイトレベルマルチプレクサである。デコーダ13は、レジスタRBにおける27〜31バイトの値(s)をデコードし、デコード結果に応じて選択回路14を制御する。   The computing unit includes a decoder 13 and a plurality of selection circuits (byte level multiplexer) 14. Hereinafter, all “selection circuits” in this specification are byte level multiplexers unless otherwise specified. The decoder 13 decodes the value (s) of 27 to 31 bytes in the register RB, and controls the selection circuit 14 according to the decoding result.

選択回路14は、ターゲットレジスタRTにおけるバイト毎に設けられている。そして各選択回路14は、自身が対応づけられたバイトとして格納すべきデータ(レジスタRAにおけるバイトB00〜B15、または“0”のいずれか)を、デコーダ13の制御に従って選択し、ターゲットレジスタRTに格納する。   The selection circuit 14 is provided for each byte in the target register RT. Each selection circuit 14 selects data (bytes B00 to B15 or “0” in the register RA) to be stored as a byte associated with the selection circuit 14 according to the control of the decoder 13 and stores it in the target register RT. Store.

例えばターゲットレジスタRTのバイトB32に対応づけられた選択回路14は、バイトB00〜B15のいずれかを選択する。すなわちs=0であればバイトB00を選択し、s=1であればバイトB01を選択し、s=15であればバイトB15を選択し、ターゲットレジスタRTのバイトB32に代入する。   For example, the selection circuit 14 associated with the byte B32 of the target register RT selects any of the bytes B00 to B15. That is, if s = 0, the byte B00 is selected, if s = 1, the byte B01 is selected, and if s = 15, the byte B15 is selected and substituted into the byte B32 of the target register RT.

またターゲットレジスタRTのバイトB33に対応づけられた選択回路14は、バイトB01〜B15、及び“0”のいずれかを選択する。すなわちs=0であればバイトB01を選択し、s=1であればバイトB02を選択し、s=15であれば“0”を選択し、ターゲットレジスタRTのバイトB33に代入する。以下、ターゲットレジスタRTのバイトB34〜B47に対応づけられた選択回路14もまた同様である。   The selection circuit 14 associated with the byte B33 of the target register RT selects any one of the bytes B01 to B15 and “0”. That is, if s = 0, the byte B01 is selected, if s = 1, the byte B02 is selected, and if s = 15, “0” is selected and substituted into the byte B33 of the target register RT. The same applies to the selection circuit 14 associated with the bytes B34 to B47 of the target register RT.

従って、シフト命令においては、スライス間でのデータ(バイト)の移動が生じる。すなわち、例えばs=1であれば、ワード0TのバイトB32〜B35には、レジスタRAにおけるバイトB01〜B03(これらはスライスS0に属する)と、バイトB04(スライスS1に属する)とが代入されるからである。   Therefore, in the shift instruction, data (bytes) is moved between slices. That is, for example, if s = 1, bytes B01 to B03 (these belong to slice S0) and byte B04 (belong to slice S1) in register RA are substituted into bytes B32 to B35 of word 0T. Because.

[ローテート命令について]
次に、ローテート命令について説明する。図7は、ローテート命令において実行される処理内容を示すプログラムの概念図である。図7は図5と同様のルールにて表記している。ローテート命令は上記シフト命令において、例えば左シフトすることによってターゲットレジスタRTに格納されなかったデータを、ターゲットレジスタRTにおける下位ビットに格納するものである。図7では、レジスタRAの内容をバイト毎に上位ビット側へローテートする場合(左シフト)について示している。
[About rotate instructions]
Next, the rotate instruction will be described. FIG. 7 is a conceptual diagram of a program showing the processing contents executed in the rotate instruction. FIG. 7 shows the same rules as in FIG. The rotate instruction stores data that has not been stored in the target register RT, for example, by shifting leftward in the shift instruction, in the lower bits of the target register RT. FIG. 7 shows a case where the contents of the register RA are rotated to the upper bit side for each byte (left shift).

図示するように、まずある値sに、レジスタRBの例えば28〜31ビットで示される値(0〜15のいずれか)が代入される(図7の1行目参照)。sは、ローテートする際のシフト量を示す。s=1であればあバイト毎シフトされ、s=2であれば2バイト毎シフトされる。   As shown in the figure, first, a value (any one of 0 to 15) indicated by, for example, 28 to 31 bits of the register RB is substituted for a certain value s (see the first line in FIG. 7). s shows the shift amount at the time of rotation. If s = 1, then every byte is shifted, and if s = 2, every two bytes are shifted.

そして、s=0であれば、ターゲットレジスタRTの0〜127ビットには、レジスタRAの0〜127ビットのデータがそのまま代入される(図7の2、3行目参照)。   If s = 0, the data of 0 to 127 bits of the register RA is directly substituted into the 0 to 127 bits of the target register RT (see the second and third lines in FIG. 7).

s=1〜15であれば、ターゲットレジスタRTの0〜(127−(s×8))ビットに、レジスタRAの(s×8)〜127ビットが代入され、ターゲットレジスタRTの(127−(s×8))〜127ビットに、レジスタRAの0〜((s×8)−1)ビットが代入される。 If s = 1 to 15, (s × 8) to 127 bits of the register RA are substituted into 0 to (127− (s × 8)) bits of the target register RT, and (127− ( 0 to ((s × 8) −1) bits of the register RA are substituted into s × 8)) to 127 bits.

図8は、ローテート命令を実行する演算器の構成を示す概念図であり、ターゲットレジスタRTも図示している。図示するように演算器は、デコーダ15及び複数の選択回路16を備えている。デコーダ15は、レジスタRBにおける28〜31バイトの値をデコードし、デコード結果(=s)に応じて選択回路16を制御する。   FIG. 8 is a conceptual diagram showing a configuration of an arithmetic unit that executes a rotate instruction, and also shows a target register RT. As shown in the figure, the computing unit includes a decoder 15 and a plurality of selection circuits 16. The decoder 15 decodes the value of 28 to 31 bytes in the register RB and controls the selection circuit 16 according to the decoding result (= s).

選択回路16は、ターゲットレジスタRTにおけるバイト毎に設けられている。そして各選択回路16は、自身が対応づけられたバイトとして格納すべきデータ(レジスタRAにおけるバイトB00〜B15のいずれか)を、デコーダ15の制御に従って選択し、ターゲットレジスタRTに格納する。   The selection circuit 16 is provided for each byte in the target register RT. Each selection circuit 16 selects data to be stored as a byte associated with it (any one of bytes B00 to B15 in the register RA) according to the control of the decoder 15 and stores it in the target register RT.

例えばs=1の場合、ターゲットレジスタRTのバイトB32に対応づけられた選択回路16はバイトB01を選択し、バイトB33に対応づけられた選択回路16はバイトB02を選択し、バイトB47に対応づけられた選択回路16はバイトB00を選択する。またs=2の場合、ターゲットレジスタRTのバイトB32に対応づけられた選択回路16はバイトB02を選択し、バイトB33に対応づけられた選択回路16はバイトB03を選択し、バイトB46に対応づけられた選択回路16はバイトB00を選択し、バイトB47に対応づけられた選択回路14はバイトB01を選択する。   For example, when s = 1, the selection circuit 16 associated with byte B32 of the target register RT selects byte B01, and the selection circuit 16 associated with byte B33 selects byte B02 and associates with byte B47. The selected selection circuit 16 selects the byte B00. When s = 2, the selection circuit 16 associated with the byte B32 of the target register RT selects the byte B02, and the selection circuit 16 associated with the byte B33 selects the byte B03 and associates with the byte B46. The selected selection circuit 16 selects the byte B00, and the selection circuit 14 associated with the byte B47 selects the byte B01.

[シャッフル命令について]
次に、シャッフル命令について説明する。以下では、バイト単位のシャッフル命令を例に挙げて説明する。シャッフル命令は、ターゲットレジスタRTの各バイトに、レジスタRAにおけるバイトB00〜B15のいずれか、レジスタRBにおけるバイトB16〜B31のいずれか、または固定値を代入する演算である。図9は、シャッフル命令において実行される処理内容を示すプログラムの概念図である。図9も図5と同様のルールにて表記している。シャッフル命令を実行する際には、レジスタRA、RBの他に、レジスタRCが使用される。そしてレジスタRC内のデータに応じて、ターゲットレジスタRTに格納される値が決定される。
[About shuffle instructions]
Next, the shuffle instruction will be described. In the following description, a shuffle instruction in byte units will be described as an example. The shuffle instruction is an operation for substituting one of bytes B00 to B15 in the register RA, one of bytes B16 to B31 in the register RB, or a fixed value into each byte of the target register RT. FIG. 9 is a conceptual diagram of a program showing the processing contents executed in the shuffle instruction. FIG. 9 also shows the same rules as in FIG. When executing the shuffle instruction, the register RC is used in addition to the registers RA and RB. Then, the value stored in the target register RT is determined according to the data in the register RC.

図9において、jには0〜15のいずれかの値が順次代入される。以下、数字の先頭に付記する“0b”は、当該数字が2進数表記であることを示し、“0x”は16進数表記であることを示す。表記の無い数字は10進数表記である。   In FIG. 9, any value of 0 to 15 is sequentially substituted for j. Hereinafter, “0b” added to the beginning of a number indicates that the number is in binary notation, and “0x” indicates that it is in hexadecimal notation. Numbers without notation are in decimal notation.

レジスタRCの(j×8)〜(j×8+1)ビットの値が“0b10”であれば、ターゲットレジスタRTの(j×8)〜((j+1)×8−1)ビットには、固定値“0b00000000”(=“0x00”)が代入される。また、レジスタRCの(j×8)〜(j×8+2)ビットの値が“0b110”であれば、ターゲットレジスタRTの(j×8)〜((j+1)×8−1)ビットには、固定値“0b11111111”(=“0xFF)が代入される。更に、レジスタRCの(j×8)〜(j×8+2)ビットの値が“0b111”であれば、ターゲットレジスタRTの(j×8)〜((j+1)×8−1)ビットには、固定値“0b10000000”(=“0x80”)が代入される。   If the value of (j × 8) to (j × 8 + 1) bits of the register RC is “0b10”, the (j × 8) to ((j + 1) × 8-1) bits of the target register RT have a fixed value. “0b00000000” (= “0x00”) is substituted. Further, if the value of (j × 8) to (j × 8 + 2) bits of the register RC is “0b110”, the (j × 8) to ((j + 1) × 8-1) bits of the target register RT include The fixed value “0b11111111” (= “0xFF”) is substituted.If the value of (j × 8) to (j × 8 + 2) bits of the register RC is “0b111”, (j × 8) of the target register RT ) To ((j + 1) × 8-1) bits are assigned a fixed value “0b10000000” (= “0x80”).

それ以外の場合には、ターゲットレジスタRTの(j×8)〜((j+1)×8−1)ビットには、レジスタRAまたはRBにおける(b×8)〜((b+1)×8−1)ビットの値が代入される。但しbの値は、レジスタRCにおける((j×8)+3)〜((j×8)+7)ビットで示される値であり、0〜31のいずれかの値を取る。また、((b×8)〜((b+1)×8−1))=0〜255で表されるビットは、レジスタRAにおけるバイトB00からレジスタRBにおけるバイトB31に相当する。従って、b=16の場合には、128〜135ビットの値、すなわちレジスタRBにおけるバイトB00が、ターゲットレジスタRTにおいて対応するバイトに代入される。   In other cases, the (j × 8) to ((j + 1) × 8-1) bits of the target register RT include (b × 8) to ((b + 1) × 8-1) in the register RA or RB. The bit value is assigned. However, the value of b is a value indicated by ((j × 8) +3) to ((j × 8) +7) bits in the register RC, and takes a value of 0 to 31. Further, the bits represented by ((b × 8) to ((b + 1) × 8-1)) = 0 to 255 correspond to the byte B00 in the register RA to the byte B31 in the register RB. Therefore, when b = 16, the value of 128 to 135 bits, that is, the byte B00 in the register RB is substituted into the corresponding byte in the target register RT.

以上の代入を、j=0からj=15まで繰り返す。そして、j=i(iは0〜15のいずれか)の場合において、ターゲットレジスタRTにおけるB(i+32)への代入が行われる。   The above substitution is repeated from j = 0 to j = 15. When j = i (i is one of 0 to 15), substitution into B (i + 32) in the target register RT is performed.

図10は、シャッフル命令を実行する演算器の構成を概念的に示すブロック図であり、ターゲットレジスタRTも図示している。図示するように第1演算器10は、それぞれがレジスタRTのバイトB(i+32)毎(iは0〜15のいずれか)に設けられた複数のデコーダ17、複数の選択回路18、及び複数のマスク論理19を備えている。   FIG. 10 is a block diagram conceptually showing the configuration of an arithmetic unit that executes a shuffle instruction, and also shows a target register RT. As shown in the figure, the first computing unit 10 includes a plurality of decoders 17, a plurality of selection circuits 18, and a plurality of selection circuits 18 each provided for each byte B (i + 32) of the register RT (i is any one of 0 to 15). Mask logic 19 is provided.

デコーダ17は、対応するレジスタRCにおけるビット(i×8)〜((i×8)+7)をデコードする。そして、デコード結果に応じて、対応する選択回路18及びマスク論理19を制御する。   The decoder 17 decodes the bits (i × 8) to ((i × 8) +7) in the corresponding register RC. Then, the corresponding selection circuit 18 and mask logic 19 are controlled according to the decoding result.

選択回路14の各々は、レジスタRAにおけるバイトB00〜B15及びレジスタRBにおけるB16〜B31のいずれかを、対応するデコーダ17の制御に従って選択し、マスク論理19へ出力する。   Each of the selection circuits 14 selects any one of the bytes B00 to B15 in the register RA and B16 to B31 in the register RB according to the control of the corresponding decoder 17 and outputs the selected data to the mask logic 19.

マスク論理19は、対応するデコーダ17の制御に従い、固定値、または対応する選択回路18から与えられるデータ(B00〜B31のいずれか)、対応するバイトに格納する。すなわち、デコーダ17におけるデコードの結果、レジスタRCの値が“0b10”、“0b110”、または“0b111”であれば、ターゲットレジスタRTに固定値を格納し、それ以外の場合には選択回路18から与えられるデータを格納する。   The mask logic 19 stores a fixed value or data (any one of B00 to B31) supplied from the corresponding selection circuit 18 in a corresponding byte according to the control of the corresponding decoder 17. That is, if the value of the register RC is “0b10”, “0b110”, or “0b111” as a result of decoding by the decoder 17, a fixed value is stored in the target register RT. Stores the given data.

以上のようにシャッフル命令においては、レジスタRCにおける制御データに応じてランダムに、レジスタRA、RBにおけるいずれかのバイトがターゲットレジスタRTに格納される。従ってシャッフル命令では、スライス間でのデータ(バイト)の移動が生じる。   As described above, in the shuffle instruction, any byte in the registers RA and RB is randomly stored in the target register RT in accordance with the control data in the register RC. Therefore, a shuffle instruction causes data (bytes) to move between slices.

上記の図6、図8、及び図10に示す演算器が、図1における第1演算器10に相当する。そして、各演算器において、スライス間でのデータの行き来の生じない演算は処理ステージPS1で実行され、スライス間でのデータの行き来の生じる演算は処理ステージPS2で実行される。   The arithmetic units shown in FIGS. 6, 8, and 10 correspond to the first arithmetic unit 10 in FIG. In each arithmetic unit, an operation in which data does not pass between slices is executed in the processing stage PS1, and an operation in which data goes back and forth between slices is executed in the processing stage PS2.

<効果>
以上のように、この発明の第1の実施形態に係るプロセッサであると、LSIの自動設計において、半導体素子の配置の乱れを抑制出来る。その結果、配置及びレイアウトや動作タイミングの設計を容易にし、且つ高速化出来る。以下、本効果について詳細に説明する。
<Effect>
As described above, the processor according to the first embodiment of the present invention can suppress the disorder of the arrangement of semiconductor elements in the LSI automatic design. As a result, the layout, layout, and operation timing can be easily designed and speeded up. Hereinafter, this effect will be described in detail.

placement drivenの論理合成ツールを用いることにより演算ユニットを一括して物理実装する場合、加算器など、用いるデータがスライス毎に独立している演算器は、それを構成するスタンダードセルはスライス毎に集まって配置される傾向にある。また、同一演算器内において、互いに異なるスライスを使用するスタンダードセル群は、比較的距離が離れて配置されやすい。これは、同一スライスを使用するスタンダードセルのゲート同士は、相互に接続されているために、近接してまとめて配置された方が配線遅延を小さく出来るからである。これにより、動作タイミングの観点から優れた設計が可能となる。また、異なるスライスを使用するスタンダードセル群間では、相互に大きな束縛条件が無いからである。   When using a placement-driven logic synthesis tool to physically implement arithmetic units in a batch, arithmetic units such as adders that use independent data for each slice gather standard cells that make up the unit for each slice. Tend to be placed. In addition, standard cell groups using different slices in the same arithmetic unit are likely to be arranged relatively far apart. This is because the gates of standard cells using the same slice are connected to each other, and therefore wiring delay can be reduced by arranging them close together. As a result, an excellent design is possible from the viewpoint of operation timing. In addition, there is no large constraint condition between standard cell groups using different slices.

更に、各演算器のスタンダードセル群は、使用するデータ、つまりスライスが同一であるもの同士(例えば加算器のスライスS0と、論理演算器のスライスS0など)が、近くに配置されやすい。これは、スライス番号が共通な演算器は、データのソースとなる汎用レジスタのビット番号が共通であるからである。つまり、パイプライン動作するプロセッサでは、パイプラインの処理ステージの配線長を短くして高速に物理実装するためには、スライス番号が共通の演算器同士を近づけて配置した方が有利だからである。   Furthermore, in the standard cell group of each arithmetic unit, data to be used, that is, those having the same slice (for example, the slice S0 of the adder and the slice S0 of the logical arithmetic unit) are easily arranged close to each other. This is because the arithmetic units having the same slice number share the same general-purpose register bit number as the data source. That is, in a processor that operates in a pipeline, it is advantageous to arrange arithmetic units having a common slice number close to each other in order to shorten the wiring length of the processing stage of the pipeline and perform physical mounting at high speed.

その結果、演算ユニットを一括してplacement drivenの論理合成ツールで物理実装する場合、LSIのレイアウトは、図11に示すようになる。図11はLSIのレイアウトを示す模式図であり、演算器の配置をスライス毎に示したものである。図示するように、汎用レジスタ2(またはオペランドF/F)を始点にして、スライス毎の大きな領域3−0〜3−3が自然に形成されて配置され易い。図中において、領域3−0〜3−3はそれぞれ、スライスS0〜S3を使用するスタンダードセル(演算器)の集合である。そしてこのような配置とすることで、各領域3−0〜3−3における配線長を短く出来、動作タイミングの観点からも優れた設計となる。   As a result, when the arithmetic units are physically mounted collectively with a placement driven logic synthesis tool, the LSI layout is as shown in FIG. FIG. 11 is a schematic diagram showing the layout of an LSI, and shows the arrangement of computing units for each slice. As shown in the figure, starting from the general-purpose register 2 (or operand F / F), large areas 3-0 to 3-3 for each slice are naturally formed and arranged easily. In the figure, regions 3-0 to 3-3 are sets of standard cells (calculators) that use slices S0 to S3, respectively. And by setting it as such an arrangement | positioning, the wiring length in each area | region 3-0 3-3 can be shortened, and it becomes the design excellent also from the viewpoint of operation timing.

しかし、シャッフル演算を行う演算器(以下、シャッフラー(shuffler))の場合には、その性質としてスライス間の通信をサポートするという特徴がある。従って、スライス間の境界に注意をしない実装をすると、演算器を構成するスタンダードセル群は、配置上、スライスの区別の無い大きなかたまりになりやすい。そのため、シャッフラーがSIMD演算器群や論理演算器と混在するLSIでは、シャッフラーを構成するスタンダードセル群のかたまりの大きさから、LSI全体として演算器の配置が乱れるという問題がある。その結果、一部のオペランド供給のバスが必要以上に長くなったり、演算器が小さくまとまりきれずに配置されたりするため、配線遅延が増大し、動作タイミングの最適化が困難となる。そしてこの問題により、LSIの動作速度が低下するという問題があった。   However, an arithmetic unit (hereinafter referred to as a shuffler) that performs a shuffle operation has a feature of supporting communication between slices as a property thereof. Accordingly, if implementation is performed without paying attention to the boundary between slices, the standard cell group constituting the arithmetic unit tends to be a large cluster without distinction of slices in terms of arrangement. Therefore, in an LSI in which a shuffler is mixed with a SIMD arithmetic unit group and a logical arithmetic unit, there is a problem that the arrangement of arithmetic units as a whole LSI is disturbed due to the size of a group of standard cell groups constituting the shuffler. As a result, some operand-supplied buses become unnecessarily long, and the arithmetic units are arranged in a small and inconsistent manner, increasing wiring delay and making it difficult to optimize the operation timing. Due to this problem, there has been a problem that the operating speed of the LSI is reduced.

また、従来のシャッフラーの設計はカスタム設計により行われていた。つまり、人手によって、演算器の配置やレイアウト及びタイミングの制御が行われていた。従って、そもそも上記のような自動設計を用いた際に生ずる問題に対する配慮は行われてこなかった。しかし人手による設計は、近年の高速設計の時代に適うものでは無く、また開発者にとって大きな負担となるとともに、開発費の高騰の原因ともなっていた。以上の問題はシャッフラーだけでなく、スライス間の通信をサポートする全ての演算器において共通する問題である。   Further, the conventional shuffler has been designed by custom design. That is, the arrangement, layout, and timing of the arithmetic units are controlled manually. Therefore, in the first place, no consideration has been given to the problems that occur when using the automatic design as described above. However, manual design is not suitable for the era of high-speed design in recent years, has become a heavy burden on developers, and has caused a rise in development costs. The above problem is not only a shuffler but also a problem common to all arithmetic units that support communication between slices.

しかし、本実施形態に係るLSIであると、スライス間の通信をサポートする演算器において、スライス間の通信が生じる演算部分と、生じない演算部分とを分離している。より具体的には、それぞれを異なる処理ステージに配置している。更に言い換えれば、スライス間でビットまたはバイトの移動を要する演算と、要しない演算との間に、パイプライン処理における1つ以上の処理ステージに相当するレイテンシを設けている。   However, in the LSI according to the present embodiment, in a computing unit that supports communication between slices, a computation portion in which communication between slices occurs and a computation portion that does not occur are separated. More specifically, each is arranged on a different processing stage. In other words, a latency corresponding to one or more processing stages in pipeline processing is provided between an operation that requires movement of bits or bytes between slices and an operation that does not need to be performed.

前述の通りパイプライン動作を行うLSIでは、配線遅延や動作タイミング等の条件が厳しいのは、同一の処理ステージ内においてである。従って、自動設計の場合には、同一の処理ステージ内におけるスタンダードセルが、スライス毎に集まって配置されやすい。   As described above, in an LSI that performs pipeline operation, conditions such as wiring delay and operation timing are severe within the same processing stage. Therefore, in the case of automatic design, standard cells in the same processing stage are easily collected and arranged for each slice.

従って本実施形態に係る構成であると、スライス間の通信が生じない演算部分を含む処理ステージでは、図11に示すような配置が可能となる。すなわち、placement drivenの論理合成ツールを用いて自動設計を行った場合であっても、スタンダードセルがスライス毎に配置される。そのため、配線遅延を低減し、動作タイミングを最適化出来、その結果、LSIの動作速度を向上出来る。   Therefore, with the configuration according to the present embodiment, an arrangement as shown in FIG. 11 is possible in a processing stage including a calculation part in which communication between slices does not occur. That is, even when automatic design is performed using a placement driven logic synthesis tool, standard cells are arranged for each slice. Therefore, the wiring delay can be reduced and the operation timing can be optimized, and as a result, the operation speed of the LSI can be improved.

なお、図1における処理ステージPS2では、第2演算部12においてスライス間の通信が生じる演算が行われている。従って、処理ステージPS2ではスタンダードセルの配置の乱れが生じるが、LSI全体として見た配線の乱れは、従来に比べて大幅に低減出来る。   Note that, in the processing stage PS2 in FIG. 1, the second arithmetic unit 12 performs an operation that causes communication between slices. Accordingly, the standard cell arrangement is disturbed in the processing stage PS2, but the wiring disturbance as seen in the entire LSI can be greatly reduced as compared with the conventional case.

以上のように、自動設計を用いた場合であっても、高速動作出来るLSIの設計が可能となる。従って、人手による設計を削減し、LSI開発の省力化を図ることが出来るとともに、開発費を削減出来る。   As described above, even if automatic design is used, it is possible to design an LSI that can operate at high speed. Therefore, manual design can be reduced, labor saving of LSI development can be achieved, and development costs can be reduced.

[第2の実施形態]
次に、この発明の第2の実施形態に係る演算器及び半導体集積回路装置について説明する。本実施形態は、上記第1の実施形態で説明したプロセッサ1のより具体的な構成に関するものである。
[Second Embodiment]
Next, an arithmetic unit and a semiconductor integrated circuit device according to a second embodiment of the present invention will be described. The present embodiment relates to a more specific configuration of the processor 1 described in the first embodiment.

<プロセッサの全体構成について>
図12は、本実施形態に係るプロセッサ1の回路図である。図示するようにプロセッサ1は、順次処理が行われる5段の処理ステージPS1〜PS5を含むパイプライン動作を行い、また第1の実施形態と同様にスライス単位でSIMD動作を行う。スライスの一例は32ビットである。またプロセッサ1は、汎用レジスタ2、バスBS−A、BS−B、BS−C、BS−PS4、BS−PS5、BS−LS、BS−A0〜BS−A3、BS−B0〜BS−B3、BS−C0〜BS−C3、ロードストアユニット(load and store unit)30、選択回路31〜41、68、69、70、フリップフロップ42〜48、及び積和演算器50、算術演算器51、論理演算器52、及びシャッフラー53を備えている。
<About overall processor configuration>
FIG. 12 is a circuit diagram of the processor 1 according to the present embodiment. As shown in the figure, the processor 1 performs a pipeline operation including five processing stages PS1 to PS5 that are sequentially processed, and performs a SIMD operation in units of slices as in the first embodiment. An example of a slice is 32 bits. The processor 1 also includes a general-purpose register 2, buses BS-A, BS-B, BS-C, BS-PS4, BS-PS5, BS-LS, BS-A0 to BS-A3, BS-B0 to BS-B3, BS-C0 to BS-C3, load and store unit 30, selection circuits 31 to 41, 68, 69, 70, flip-flops 42 to 48, product-sum operation unit 50, arithmetic operation unit 51, logic An arithmetic unit 52 and a shuffler 53 are provided.

汎用レジスタ2は、第1の実施形態で説明したレジスタRA〜RB、RTを含み、データを保持する。汎用レジスタ2の構成について図13を用いて説明する。図13は、汎用レジスタ2の内部構成を示すブロック図である。   The general-purpose register 2 includes the registers RA to RB and RT described in the first embodiment and holds data. The configuration of the general-purpose register 2 will be described with reference to FIG. FIG. 13 is a block diagram showing the internal configuration of the general-purpose register 2.

図示するように汎用レジスタ2は、メモリ71及びレジスタ72〜75を備えたマルチポートレジスタファイルである。メモリ71は、各々が例えば128ビットのデータを保持可能な128(=4スライス)個のエントリE0〜E127を備えた半導体メモリである。   As illustrated, the general-purpose register 2 is a multiport register file including a memory 71 and registers 72 to 75. The memory 71 is a semiconductor memory having 128 (= 4 slices) entries E0 to E127 each capable of holding, for example, 128-bit data.

レジスタ72〜74は、フリップフロップと選択回路とを備える。そして、選択回路がメモリ71のエントリE0〜E127の各々からいずれか1ビットを選択し、選択したデータをフリップフロップに格納する。その結果、レジスタ72〜74は、メモリ71から読み出した128ビットのデータを保持する。そしてレジスタ72〜74がそれぞれ、上記第1の実施形態で説明したレジスタRA〜RCに相当する。   The registers 72 to 74 include a flip-flop and a selection circuit. The selection circuit selects one bit from each of the entries E0 to E127 of the memory 71, and stores the selected data in the flip-flop. As a result, the registers 72 to 74 hold 128-bit data read from the memory 71. The registers 72 to 74 correspond to the registers RA to RC described in the first embodiment.

レジスタ75も、フリップフロップと選択回路とを備える。そして、選択回路69から与えられる128ビットのデータを、フリップフロップに格納する。更に、レジスタ75内において選択回路が、フリップフロップに格納された128ビットのデータを1ビットずつ選択し、選択したビットをメモリ71のエントリE0〜E127の各々に格納する。レジスタ75は、上記第1の実施形態で説明したターゲットレジスタRTに相当する。   The register 75 also includes a flip-flop and a selection circuit. Then, the 128-bit data supplied from the selection circuit 69 is stored in the flip-flop. Further, a selection circuit in the register 75 selects 128-bit data stored in the flip-flop bit by bit, and stores the selected bit in each of the entries E0 to E127 of the memory 71. The register 75 corresponds to the target register RT described in the first embodiment.

図12に戻って、引き続きプロセッサ1の構成について説明する。
バスBS−A〜BS−Cのそれぞれには、レジスタRA〜RCからそれぞれ与えられる128ビットのデータを伝送する。またバスBS−PS4、BS−PS5は、処理ステージPS4、PS5で得られた128ビット(4スライス)のデータをそれぞれ伝送する。更にバスBS−LSは、ロードストアユニット30から与えられる128ビットのデータを伝送する。
Returning to FIG. 12, the configuration of the processor 1 will be described.
Each of the buses BS-A to BS-C transmits 128-bit data supplied from the registers RA to RC. The buses BS-PS4 and BS-PS5 respectively transmit 128-bit (4 slices) data obtained in the processing stages PS4 and PS5. Further, the bus BS-LS transmits 128-bit data provided from the load store unit 30.

ロードストアユニット30は、バスBS−A〜BS−Cを介して、必要なデータをレジスタRA〜RCから読み出すと共に、必要に応じてデータをバスBS−LSに出力する。   The load / store unit 30 reads necessary data from the registers RA to RC via the buses BS-A to BS-C and outputs data to the bus BS-LS as necessary.

選択回路31は、バスBS−C、BS−PS4、BS−PS5、BS−LS上のデータのいずれかを選択し、選択したデータをスライス毎にフリップフロップ42に格納する。選択回路32は、バスBS−A、BS−PS4、BS−PS5、BS−LS上のデータのいずれかを選択し、選択したデータをスライス毎にフリップフロップ43に格納する。選択回路33は、バスBS−B、BS−PS4、BS−PS5、BS−LS上のデータのいずれかを選択し、選択したデータをスライス毎にフリップフロップ44に格納する。   The selection circuit 31 selects any of the data on the buses BS-C, BS-PS4, BS-PS5, and BS-LS, and stores the selected data in the flip-flop 42 for each slice. The selection circuit 32 selects any of the data on the buses BS-A, BS-PS4, BS-PS5, and BS-LS, and stores the selected data in the flip-flop 43 for each slice. The selection circuit 33 selects any of the data on the buses BS-B, BS-PS4, BS-PS5, and BS-LS, and stores the selected data in the flip-flop 44 for each slice.

フリップフロップ42〜44の各々は、それぞれスライスと同じ数(4個)設けられ、それぞれがスライスS0〜S3に対応づけられている。そして、選択回路31〜33によって与えられるデータ(スライス)をそれぞれ保持する。   Each of the flip-flops 42 to 44 is provided in the same number (four) as the slices, and each is associated with the slices S0 to S3. Data (slices) given by the selection circuits 31 to 33 are held.

選択回路34、36、38、40は、バスBS−B、BS−PS4、BS−PS5、BS−LS上のデータのいずれかを選択し、選択したデータをフリップフロップ45〜48にそれぞれ格納する。フリップフロップ45〜48の各々は、それぞれ選択回路34、36、38、40によって与えられるデータをそれぞれ保持する。そしてフリップフロップ45〜48は同じデータを保持し、それぞれに保持されたデータがスライスS0〜S3の制御用データとして使用される。   The selection circuits 34, 36, 38, and 40 select any of the data on the buses BS-B, BS-PS4, BS-PS5, and BS-LS, and store the selected data in the flip-flops 45 to 48, respectively. . Each of flip-flops 45 to 48 holds data provided by selection circuits 34, 36, 38, and 40, respectively. The flip-flops 45 to 48 hold the same data, and the data held in the flip-flops 45 to 48 are used as control data for the slices S0 to S3.

選択回路35、37、39、41は、バスBS−C、BS−PS4、BS−PS5、BS−LS上のデータのいずれかを選択し、選択したデータをレジスタRD、RE、RF、RGにそれぞれ格納する。レジスタRD〜RGの各々は、それぞれ選択回路35、37、39、41によって与えられるデータをそれぞれ保持する。シャッフラー53においてシャッフル演算を行う場合には、レジスタRD〜RGの全てにレジスタRCのデータが格納される。そして、レジスタRD〜RFのそれぞれに格納されたデータが、スライスS0〜S3に関する演算の制御用データとして使用される。   The selection circuits 35, 37, 39, and 41 select any of the data on the buses BS-C, BS-PS4, BS-PS5, and BS-LS, and the selected data are stored in the registers RD, RE, RF, and RG. Store each one. Each of registers RD to RG holds data provided by selection circuits 35, 37, 39, and 41, respectively. When the shuffler 53 performs the shuffle operation, the data of the register RC is stored in all the registers RD to RG. The data stored in each of the registers RD to RF is used as control data for operations related to the slices S0 to S3.

バスBS−A0〜BS−A3のそれぞれは、フリップフロップ43の各々によって与えられる、レジスタRAにおけるスライス0〜スライスS3を伝送する。また、バスBS−B0〜BS−B3のそれぞれは、フリップフロップ44の各々によって与えられる、レジスタRBにおけるスライス0〜スライスS3を伝送する。更にバスBS−C0〜BS−C3のそれぞれは、フリップフロップ42の各々によって与えられる、レジスタRCにおけるスライス0〜スライスS3を伝送する。   Each of the buses BS-A0 to BS-A3 transmits a slice 0 to a slice S3 in the register RA provided by each of the flip-flops 43. Each of the buses BS-B0 to BS-B3 transmits a slice 0 to a slice S3 in the register RB provided by each of the flip-flops 44. In addition, each of the buses BS-C0 to BS-C3 transmits slice 0 to slice S3 in the register RC provided by each of the flip-flops 42.

積和演算器50は、2つの処理ステージPS3、PS4において、レジスタRA〜RCにおけるデータの積和処理を行う。積和処理とは、ある時刻において入力データの乗算を行ってこれを蓄積し、次の時刻において次の入力信号の乗算を行い、更にその乗算結果と蓄積されている前の時刻の乗算結果とを加算して蓄積する処理のことを言う。本実施形態に係る積和演算器50は、スライス単位のSIMD動作により上記積和処理を実行する。そして積和処理においては、スライス間でのデータの通信は行われない。従って積和演算器50は、上記第1の実施形態で説明した第2演算器20に相当する。   The product-sum operation unit 50 performs product-sum processing of data in the registers RA to RC in the two processing stages PS3 and PS4. Multiply-and-accumulate processing multiplies input data at a certain time and accumulates it, multiplies the next input signal at the next time, and further multiplies the multiplication result and the accumulated multiplication result at the previous time. This is the process of adding and accumulating. The product-sum operation unit 50 according to the present embodiment performs the product-sum processing by the SIMD operation in units of slices. In the product-sum process, data communication between slices is not performed. Therefore, the product-sum calculator 50 corresponds to the second calculator 20 described in the first embodiment.

算術演算器51は、処理ステージPS3において、レジスタRA、RBにおけるデータの算術演算を行う。算術演算の具体例は、例えば加算命令や減算命令である。本実施形態に係る算術演算器51は、スライス単位のSIMD動作により上記算術演算を実行する。そして上記算術処理においては、スライス間でのデータの通信は行われない。従って算術演算器51も、上記第1の実施形態で説明した第2演算器20に相当する。   The arithmetic operator 51 performs an arithmetic operation on the data in the registers RA and RB in the processing stage PS3. A specific example of the arithmetic operation is, for example, an addition instruction or a subtraction instruction. The arithmetic operator 51 according to the present embodiment performs the arithmetic operation by SIMD operation in units of slices. In the arithmetic processing, data communication between slices is not performed. Therefore, the arithmetic operator 51 also corresponds to the second operator 20 described in the first embodiment.

論理演算器52は、処理ステージPS3において、レジスタRA、RBにおけるデータの論理演算を行う。論理演算の具体例は、例えば論理積(AND)命令、論理和(OR)命令、または排他的論理和(XOR)命令である。本実施形態に係る論理演算器52は、スライス単位のSIMD動作により上記論理演算を実行する。そして上記論理処理においては、スライス間でのデータの通信は行われない。従って論理演算器52は、上記第1の実施形態で説明した第2演算器20に相当する。   The logical operation unit 52 performs logical operation on data in the registers RA and RB in the processing stage PS3. Specific examples of the logical operation are, for example, a logical product (AND) instruction, a logical sum (OR) instruction, or an exclusive logical sum (XOR) instruction. The logical operation unit 52 according to the present embodiment executes the logical operation by a SIMD operation in units of slices. In the logical processing, data communication between slices is not performed. Therefore, the logical operation unit 52 corresponds to the second operation unit 20 described in the first embodiment.

シャッフラー53は、2つの処理ステージPS3、PS4において、レジスタRA、RBにおけるデータを用いたシャッフル演算を行う。シャッフル演算の詳細は第1の実施形態で説明した通りである。本実施形態に係るシャッフラー53も、スライス単位のSIMD動作により上記シャッフル演算を実行する。シャッフラー53は、上記第1の実施形態で説明した第1演算器10に相当する。   The shuffler 53 performs a shuffle operation using data in the registers RA and RB in the two processing stages PS3 and PS4. The details of the shuffle calculation are as described in the first embodiment. The shuffler 53 according to the present embodiment also performs the shuffle calculation by the SIMD operation in units of slices. The shuffler 53 corresponds to the first computing unit 10 described in the first embodiment.

選択回路70は処理ステージPS4において、算術演算器51における演算結果(128ビット=4スライス)と、論理演算器52における演算結果(128ビット=4スライス)とのいずれかを選択し、バスBS−PS4に出力する。   In the processing stage PS4, the selection circuit 70 selects either the operation result in the arithmetic operator 51 (128 bits = 4 slices) or the operation result in the logic operator 52 (128 bits = 4 slices), and the bus BS− Output to PS4.

フリップフロップ66の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS4において、算術演算器51におけるスライスS0〜S3についての演算結果をそれぞれ格納する。   Each of the flip-flops 66 is associated with each of the slices S0 to S3. In the processing stage PS4, the calculation results for the slices S0 to S3 in the arithmetic calculator 51 are stored.

フリップフロップ67の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS4において、論理演算器52におけるスライスS0〜S3についての演算結果をそれぞれ格納する。   Each of the flip-flops 67 is associated with slices S0 to S3. Then, in the processing stage PS4, the calculation results for the slices S0 to S3 in the logic calculator 52 are stored.

選択回路68は処理ステージPS5において、積和演算器50における演算結果(128ビット=4スライス)、フリップフロップ66に格納されたデータ(128ビット=4スライス)、フリップフロップ67に格納されたデータ(128ビット=4スライス)、及びシャッフラー53における演算結果(128ビット=4スライス)のいずれかを選択し、バスBS−PS5に出力する。   In the processing stage PS5, the selection circuit 68 calculates the operation result in the sum-of-products calculator 50 (128 bits = 4 slices), the data stored in the flip-flop 66 (128 bits = 4 slices), and the data stored in the flip-flop 67 ( One of 128 bits = 4 slices) and the operation result in the shuffler 53 (128 bits = 4 slices) is selected and output to the bus BS-PS5.

次に、上記構成のプロセッサ1における積和演算器50、算術演算器51、論理演算器52、及びシャッフラー53の構成について説明する。
<積和演算器50について>
本実施形態に係る積和演算器50は、複数の乗算器54、複数の加算器56、及び複数のフリップフロップ55、57を備えている。
Next, the configuration of the product-sum operation unit 50, the arithmetic operation unit 51, the logical operation unit 52, and the shuffler 53 in the processor 1 having the above configuration will be described.
<About the product-sum calculator 50>
The product-sum operation unit 50 according to the present embodiment includes a plurality of multipliers 54, a plurality of adders 56, and a plurality of flip-flops 55 and 57.

乗算器54の各々は、それぞれスライスS0〜S3に対応づけられており、処理ステージPS3においてそれぞれスライスS0〜S3についての乗算を行う。すなわち乗算器54の各々は、バスBS−A0〜A3、BS−B0〜B3、BS−C0〜C3からデータを受け取る。そして、レジスタRA〜RCのスライスS0の乗算、レジスタRA〜RCのスライスS1の乗算、レジスタRA〜RCのスライスS2の乗算、及びレジスタRA〜RCのスライスS3の乗算をそれぞれ行う。   Each of the multipliers 54 is associated with the slices S0 to S3, and performs multiplication for the slices S0 to S3 in the processing stage PS3. That is, each of the multipliers 54 receives data from the buses BS-A0 to A3, BS-B0 to B3, and BS-C0 to C3. Then, multiplication of the slice S0 of the registers RA to RC, multiplication of the slice S1 of the registers RA to RC, multiplication of the slice S2 of the registers RA to RC, and multiplication of the slice S3 of the registers RA to RC are performed.

フリップフロップ55の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS3において、乗算器54の各々におけるスライスS0〜S3についての乗算結果を格納する。   Each of the flip-flops 55 is associated with each of the slices S0 to S3. In the processing stage PS3, the multiplication results for the slices S0 to S3 in each of the multipliers 54 are stored.

加算器56の各々は、それぞれスライスS0〜S3に対応づけられており、処理ステージPS4においてそれぞれスライスS0〜S3についての加算を行う。すなわち加算器54の各々は、フリップフロップ55の各々に保持される乗算結果と、当該乗算結果が得られた乗算の直前の処理サイクルに処理ステージPS3で得られた乗算結果とを、スライス毎に加算する。   Each of the adders 56 is associated with each of the slices S0 to S3, and performs addition for each of the slices S0 to S3 in the processing stage PS4. That is, each of the adders 54 obtains, for each slice, the multiplication result held in each of the flip-flops 55 and the multiplication result obtained in the processing stage PS3 in the processing cycle immediately before the multiplication from which the multiplication result is obtained. to add.

フリップフロップ57の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS4において、加算器56の各々におけるスライスS0〜S3についての加算結果を格納する。そしてフリップフロップ57に保持されたデータが、選択回路68に与えられる。   Each of the flip-flops 57 is associated with each of the slices S0 to S3. Then, in the processing stage PS4, the addition results for the slices S0 to S3 in each of the adders 56 are stored. Then, the data held in the flip-flop 57 is given to the selection circuit 68.

<算術演算器51について>
本実施形態に係る算術演算器51は、複数の演算器(加算器または減算器)58、及び複数のフリップフロップ59を備えている。
<About Arithmetic Unit 51>
The arithmetic operation unit 51 according to this embodiment includes a plurality of operation units (adders or subtractors) 58 and a plurality of flip-flops 59.

演算器58の各々はそれぞれスライスS0〜S3に対応づけられており、処理ステージPS3においてそれぞれスライスS0〜S3についての加算または減算を行う。すなわち演算器58の各々は、バスBS−A0〜A3及びBS−B0〜B3からデータを受け取る。そして、レジスタRA、RBのスライスS0の加算または乗算、レジスタRA、RBのスライスS1の加算または乗算、レジスタRA、RBのスライスS2の加算または乗算、及びレジスタRA、RBのスライスS3の加算または乗算を行う。   Each of the computing units 58 is associated with the slices S0 to S3, respectively, and performs addition or subtraction for the slices S0 to S3 in the processing stage PS3. That is, each of the calculators 58 receives data from the buses BS-A0 to A3 and BS-B0 to B3. Then, addition or multiplication of the slice S0 of the registers RA and RB, addition or multiplication of the slice S1 of the registers RA and RB, addition or multiplication of the slice S2 of the registers RA and RB, and addition or multiplication of the slice S3 of the registers RA and RB I do.

フリップフロップ59の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS3において、演算器58の各々におけるスライスS0〜S3についての算術演算結果を格納する。そしてフリップフロップ59に保持されたデータが、選択回路70及びフリップフロップ66に与えられる。   Each of the flip-flops 59 is associated with each of the slices S0 to S3. Then, in the processing stage PS3, the arithmetic operation results for the slices S0 to S3 in each of the calculators 58 are stored. The data held in the flip-flop 59 is supplied to the selection circuit 70 and the flip-flop 66.

<論理演算器52について>
本実施形態に係る論理演算器52は、複数の演算器60、及び複数のフリップフロップ61を備えている。演算器60は、例えばAND演算、OR演算、またはXOR演算を行う。
<Regarding the logic unit 52>
The logical operation unit 52 according to the present embodiment includes a plurality of operation units 60 and a plurality of flip-flops 61. The computing unit 60 performs, for example, an AND operation, an OR operation, or an XOR operation.

演算器60の各々はそれぞれスライスS0〜S3に対応づけられており、処理ステージPS3においてそれぞれスライスS0〜S3についての論理演算を行う。すなわち演算器60の各々は、バスBS−A0〜A3及びBS−B0〜B3からデータを受け取る。そして、レジスタRA、RBのスライスS0の論理演算、レジスタRA、RBのスライスS1の論理演算、レジスタRA、RBのスライスS2の論理演算、及びレジスタRA、RBのスライスS3の論理演算を行う。   Each of the computing units 60 is associated with the slices S0 to S3, and performs logical operations on the slices S0 to S3 in the processing stage PS3. That is, each of the arithmetic units 60 receives data from the buses BS-A0 to A3 and BS-B0 to B3. Then, the logical operation of the slice S0 of the registers RA and RB, the logical operation of the slice S1 of the registers RA and RB, the logical operation of the slice S2 of the registers RA and RB, and the logical operation of the slice S3 of the registers RA and RB are performed.

フリップフロップ61の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS3において、演算器60の各々におけるスライスS0〜S3についての論理演算結果を格納する。そしてフリップフロップ61に保持されたデータが、選択回路70及びフリップフロップ67に与えられる。   Each of the flip-flops 61 is associated with each of the slices S0 to S3. Then, in the processing stage PS3, the logical operation results for the slices S0 to S3 in each of the arithmetic units 60 are stored. Then, the data held in the flip-flop 61 is given to the selection circuit 70 and the flip-flop 67.

<シャッフラー53について>
本実施形態に係るシャッフラー53は、複数の第1演算部62−0〜62−3、第2演算部64、及び複数のフリップフロップ63−0〜63−3、65を備えている。
<About the shuffler 53>
The shuffler 53 according to the present embodiment includes a plurality of first arithmetic units 62-0 to 62-3, a second arithmetic unit 64, and a plurality of flip-flops 63-0 to 63-3 and 65.

第1演算部62−0〜62−3の各々は、第1の実施形態で説明した図1における第1演算部11−0〜11−3に相当する。すなわち第1演算部62−0〜62−3は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS3において、それぞれスライスS0〜S3についてのシャッフル演算に関する処理を行う。すなわち第1演算部62−0〜62−3の各々は、バスBS−A0〜A3及びBS−B0〜B3から、シャッフルすべきデータを受け取る。更に、レジスタRD〜RG及びフリップフロップ45〜48からそれぞれ制御信号を受け取る。そして、これらのデータと制御信号とに基づいて、スライス間でのデータ通信を必要としない処理を行う。   Each of the first calculation units 62-0 to 62-3 corresponds to the first calculation units 11-0 to 11-3 in FIG. 1 described in the first embodiment. That is, the first arithmetic units 62-0 to 62-3 are associated with the slices S0 to S3, respectively. Then, in the processing stage PS3, processing related to shuffle calculation is performed for each of the slices S0 to S3. That is, each of the first arithmetic units 62-0 to 62-3 receives data to be shuffled from the buses BS-A0 to A3 and BS-B0 to B3. Further, control signals are received from the registers RD to RG and the flip-flops 45 to 48, respectively. Based on these data and the control signal, processing that does not require data communication between slices is performed.

フリップフロップ63−0〜63−3の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS3において、第1演算部62−0〜62−3の各々におけるスライスS0〜S3についての演算結果を格納する。   Each of flip-flops 63-0 to 63-3 is associated with slices S0 to S3, respectively. In the processing stage PS3, the calculation results for the slices S0 to S3 in each of the first calculation units 62-0 to 62-3 are stored.

第2演算部64は、第1の実施形態で説明した図1における第2演算部12に相当する。すなわち第2演算部64は、フリップフロップ63−0〜63−3に保持されるデータにつき、スライス間でのデータの通信を必要とする処理を行い、シャッフル演算を完了させる。   The second calculation unit 64 corresponds to the second calculation unit 12 in FIG. 1 described in the first embodiment. That is, the second calculation unit 64 performs processing that requires data communication between slices on the data held in the flip-flops 63-0 to 63-3, and completes the shuffle calculation.

フリップフロップ65の各々は、それぞれスライスS0〜S3に対応づけられている。そして処理ステージPS4において、第2演算部64で得られたシャッフル演算結果を格納する。そしてフリップフロップ65に保持されたデータが、選択回路68に与えられる。   Each of the flip-flops 65 is associated with each of the slices S0 to S3. Then, in the processing stage PS4, the shuffle calculation result obtained by the second calculation unit 64 is stored. Then, the data held in the flip-flop 65 is given to the selection circuit 68.

<プロセッサ全体の大まかな動作について>
次に、上記構成のプロセッサ1の大まかな動作について説明する。パイプライン動作は、処理ステージPS1からPS2、PS3、PS4、及びPS5の順序で実行される。
<Rough operation of the entire processor>
Next, a rough operation of the processor 1 having the above configuration will be described. The pipeline operation is executed in the order of processing stages PS1 to PS2, PS3, PS4, and PS5.

処理ステージPS1においては、汎用レジスタ2内においてレジスタRA〜RCにデータが読み出される。また、必要に応じてデータがターゲットレジスタRTに書き込まれる。   In the processing stage PS1, data is read into the registers RA to RC in the general-purpose register 2. Further, data is written to the target register RT as necessary.

次に処理ステージPS2においては、レジスタRA〜RC内のデータが、バスBS−A〜BS−C、BS−PS4、BS−PS5に供給される。すなわち、各バスにオペランドが供給される。また必要に応じて、ロードストアユニット30がバスBS−LSにデータを供給する。   Next, in the processing stage PS2, the data in the registers RA to RC are supplied to the buses BS-A to BS-C, BS-PS4, and BS-PS5. That is, an operand is supplied to each bus. Further, the load store unit 30 supplies data to the bus BS-LS as necessary.

次に処理ステージPS3においては、積和演算器50、算術演算器51、論理演算器52、及びシャッフラー53における演算が行われる。但し、シャッフラー53において行われる演算は、スライス間でのデータ通信を生じない演算に限られる。   Next, in the processing stage PS3, calculations in the product-sum calculator 50, the arithmetic calculator 51, the logic calculator 52, and the shuffler 53 are performed. However, operations performed in the shuffler 53 are limited to operations that do not cause data communication between slices.

引き続き処理ステージPS4においては、積和演算器50及びシャッフラー53における演算が行われる。シャッフラー53において行われる演算は、スライス間でのデータ通信が生じる演算である。また、処理ステージPS4では算術演算器51及び論理演算器52における演算が既に完了している。従って、本処理ステージPS4において、算術演算器51及び論理演算器52における演算結果を、バスBS−PS4に供給しても良い。バスBS−PS4に供給された演算結果の汎用レジスタ2への書き戻しは、上記処理ステージPS1において行われる。   Subsequently, in the processing stage PS4, calculation in the product-sum calculator 50 and the shuffler 53 is performed. The calculation performed in the shuffler 53 is a calculation in which data communication between slices occurs. In the processing stage PS4, the arithmetic operation unit 51 and the logical operation unit 52 have already been completed. Therefore, in this processing stage PS4, the calculation results in the arithmetic calculator 51 and the logical calculator 52 may be supplied to the bus BS-PS4. The calculation result supplied to the bus BS-PS4 is written back to the general-purpose register 2 in the processing stage PS1.

最後に処理ステージPS5においては、フリップフロップ57、66、67、65に格納された演算結果が、バスBS−PS5に供給される。バスBS−PS5に供給された演算結果の汎用レジスタ2への書き戻しは、上記処理ステージPS1において行われる。   Finally, in the processing stage PS5, the operation results stored in the flip-flops 57, 66, 67, 65 are supplied to the bus BS-PS5. The calculation result supplied to the bus BS-PS5 is written back to the general-purpose register 2 in the processing stage PS1.

次に、上記シャッフラー53の詳細な構成と動作について説明する。   Next, a detailed configuration and operation of the shuffler 53 will be described.

<シャッフラー53の構成の詳細について>
図14は、シャッフラー53の詳細を示す回路図である。図14では紙面の都合上、シャッフラー53の一部のみ(バイトB32に代入すべきバイトを選択する部分のみ)を示すと共に、説明の便宜上、レジスタRA、RB、RD〜RG、RTも示している。
<Details of the configuration of the shuffler 53>
FIG. 14 is a circuit diagram showing details of the shuffler 53. FIG. 14 shows only a part of the shuffler 53 (only a part for selecting a byte to be substituted for the byte B32) for convenience of paper, and also shows registers RA, RB, RD to RG, RT for convenience of explanation. .

図示するようにシャッフラー53は、選択回路80−0A〜80−3A、80−0B〜80−3B、81−0〜81−3、82、マスク論理83、及び前述のフリップフロップ63−0〜63−3を備えている。   As shown in the figure, the shuffler 53 includes selection circuits 80-0A to 80-3A, 80-0B to 80-3B, 81-0 to 81-3, 82, mask logic 83, and the aforementioned flip-flops 63-0 to 63. -3.

選択回路80−0A〜80−3A、80−0B〜80−3Bは、それぞれ16個ずつ設けられると共に、それぞれスライスS0〜S3に対応づけられている。すなわち、16個の選択回路80−0Aは、レジスタRAにおけるスライスS0のいずれかのバイト、すなわちバイトB00〜B03のいずれかを選択する。そして16個の選択回路80−0Aの各々は、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   Sixteen selection circuits 80-0A to 80-3A and 80-0B to 80-3B are provided, respectively, and are associated with slices S0 to S3, respectively. That is, the 16 selection circuits 80-0A select any byte of the slice S0 in the register RA, that is, any one of the bytes B00 to B03. Each of the 16 selection circuits 80-0A is associated with bytes B32 to B47 in the target register RT.

また16個の選択回路80−1Aは、レジスタRAにおけるスライスS1のいずれかのバイト、すなわちバイトB04〜B07のいずれかを選択する。そして16個の選択回路80−1Aの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   The 16 selection circuits 80-1A select any byte of the slice S1 in the register RA, that is, any one of the bytes B04 to B07. Each of the 16 selection circuits 80-1A is also associated with bytes B32 to B47 in the target register RT.

また16個の選択回路80−2Aは、レジスタRAにおけるスライスS2のいずれかのバイト、すなわちバイトB08〜B11のいずれかを選択する。そして16個の選択回路80−2Aの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   The 16 selection circuits 80-2A select any byte of the slice S2 in the register RA, that is, any one of the bytes B08 to B11. Each of the 16 selection circuits 80-2A is also associated with bytes B32 to B47 in the target register RT.

更に16個の選択回路80−3Aは、レジスタRAにおけるスライスS3のいずれかのバイト、すなわちバイトB12〜B15のいずれかを選択する。そして16個の選択回路80−3Aの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   Further, the 16 selection circuits 80-3A select any byte of the slice S3 in the register RA, that is, any one of the bytes B12 to B15. Each of the 16 selection circuits 80-3A is also associated with bytes B32 to B47 in the target register RT.

選択回路80−0B〜80−3Bも同様である。すなわち、16個の選択回路80−0Bは、レジスタRBにおけるスライスS0のいずれかのバイト、すなわちバイトB16〜B19のいずれかを選択する。そして16個の選択回路80−0Bの各々は、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   The same applies to the selection circuits 80-0B to 80-3B. That is, the 16 selection circuits 80-0B select any byte of the slice S0 in the register RB, that is, any one of the bytes B16 to B19. Each of the 16 selection circuits 80-0B is associated with bytes B32 to B47 in the target register RT.

また16個の選択回路80−1Bは、レジスタRBにおけるスライスS1のいずれかのバイト、すなわちバイトB20〜B23のいずれかを選択する。そして16個の選択回路80−1Bの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   The 16 selection circuits 80-1B select any byte of the slice S1 in the register RB, that is, any one of the bytes B20 to B23. Each of the 16 selection circuits 80-1B is also associated with bytes B32 to B47 in the target register RT.

また16個の選択回路80−2Bは、レジスタRBにおけるスライスS2のいずれかのバイト、すなわちバイトB24〜B27のいずれかを選択する。そして16個の選択回路80−2Bの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   The 16 selection circuits 80-2B select any byte of the slice S2 in the register RB, that is, any one of the bytes B24 to B27. Each of the 16 selection circuits 80-2B is also associated with bytes B32 to B47 in the target register RT.

更に16個の選択回路80−3Bは、レジスタRBにおけるスライスS3のいずれかのバイト、すなわちバイトB28〜B31のいずれかを選択する。そして16個の選択回路80−3Bの各々も、ターゲットレジスタRTにおけるバイトB32〜B47に対応づけられている。   Further, the 16 selection circuits 80-3B select any byte of the slice S3 in the register RB, that is, any one of the bytes B28 to B31. Each of the 16 selection circuits 80-3B is also associated with bytes B32 to B47 in the target register RT.

選択回路81−0〜81−3は、それぞれ16個ずつ設けられると共に、それぞれスライスS0〜S3に対応づけられている。16個の選択回路81−0の各々は、バイトB32〜B47の各々に対応づけられている。そして選択回路81−0の各々は、それぞれバイトB32〜B47に対応づけられた選択回路81−0A、81−0Bのいずれか一方の出力を選択する。すなわち、B00〜B03、B16〜B19のいずれかを選択する。   Sixteen selection circuits 81-0 to 81-3 are provided, and are associated with slices S0 to S3, respectively. Each of the 16 selection circuits 81-0 is associated with each of the bytes B32 to B47. Each of the selection circuits 81-0 selects one of the outputs of selection circuits 81-0A and 81-0B associated with the bytes B32 to B47. That is, any one of B00 to B03 and B16 to B19 is selected.

16個の選択回路81−1の各々は、バイトB32〜B47の各々に対応づけられている。そして選択回路81−1の各々は、それぞれバイトB32〜B47に対応づけられた選択回路81−1A、81−1Bのいずれか一方の出力を選択する。すなわち、B04〜B07、B20〜B23のいずれかを選択する。   Each of the 16 selection circuits 81-1 is associated with each of the bytes B32 to B47. Each of the selection circuits 81-1 selects one output of the selection circuits 81-1A and 81-1B associated with the bytes B32 to B47. That is, any one of B04 to B07 and B20 to B23 is selected.

16個の選択回路81−2の各々は、バイトB32〜B47の各々に対応づけられている。そして選択回路81−2の各々は、それぞれバイトB32〜B47に対応づけられた選択回路81−2A、81−2Bのいずれか一方の出力を選択する。すなわち、B08〜B11、B24〜B27のいずれかを選択する。   Each of the 16 selection circuits 81-2 is associated with each of the bytes B32 to B47. Each of the selection circuits 81-2 selects one of the outputs of the selection circuits 81-2A and 81-2B respectively associated with the bytes B32 to B47. That is, any one of B08 to B11 and B24 to B27 is selected.

16個の選択回路81−3の各々は、バイトB32〜B47の各々に対応づけられている。そして選択回路81−3の各々は、それぞれバイトB32〜B47に対応づけられた選択回路81−3A、81−3Bのいずれか一方の出力を選択する。すなわち、B12〜B15、B28〜B31のいずれかを選択する。   Each of the 16 selection circuits 81-3 is associated with each of the bytes B32 to B47. Each of the selection circuits 81-3 selects one of the outputs of selection circuits 81-3A and 81-3B associated with the bytes B32 to B47. That is, any one of B12 to B15 and B28 to B31 is selected.

フリップフロップ63−0〜63−3はそれぞれ、16個ずつ設けられると共に、それぞれがスライスS0〜S3に対応づけられている。すなわち16個のフリップフロップ63−0の各々は、16個の選択回路81−0の各々で選択されたデータを、それぞれ格納する。また16個のフリップフロップ63−1の各々は、16個の選択回路81−1の各々で選択されたデータを、それぞれ格納する。更に16個のフリップフロップ63−2の各々は、16個の選択回路81−2の各々で選択されたデータを、それぞれ格納する。そして16個のフリップフロップ63−3の各々は、16個の選択回路81−3の各々で選択されたデータを、それぞれ格納する。   Each of the 16 flip-flops 63-0 to 63-3 is provided, and each is associated with the slices S0 to S3. That is, each of the 16 flip-flops 63-0 stores the data selected by each of the 16 selection circuits 81-0. Each of the 16 flip-flops 63-1 stores the data selected by each of the 16 selection circuits 81-1. Further, each of the 16 flip-flops 63-2 stores the data selected by each of the 16 selection circuits 81-2. Each of the 16 flip-flops 63-3 stores the data selected by each of the 16 selection circuits 81-3.

選択回路82は、それぞれバイトB32〜B47に対応づけられて16個、設けられている。そして16個の選択回路82の各々は、バイトB32〜B47に対応づけられたフリップフロップ63−0〜63−3に保持されるデータのいずれかを、それぞれ選択する。   Sixteen selection circuits 82 are provided in association with the bytes B32 to B47, respectively. Each of the 16 selection circuits 82 selects any of the data held in the flip-flops 63-0 to 63-3 associated with the bytes B32 to B47.

マスク論理83は、それぞれバイトB32〜B47に対応づけられて16個、設けられている。そして16個のマスク論理83の各々は、16個の選択回路82の各々において選択されたデータを、必要に応じて固定値にフォースし、レジスタRTのバイトB32〜B47に代入する。   Sixteen mask logics 83 are provided in association with the bytes B32 to B47, respectively. Each of the 16 mask logics 83 forces the data selected in each of the 16 selection circuits 82 to a fixed value as necessary, and substitutes it into bytes B32 to B47 of the register RT.

上記構成において、16個の選択回路80−0A、80−0B及び16個の選択回路81−0がスライスS0に関する処理を行うユニットであり、図12における第1演算部62−0に相当する。また、16個の選択回路80−1A、80−1B及び16個の選択回路81−1がスライスS1に関する処理を行うユニットであり、図12における第1演算部62−1に相当する。更に16個の選択回路80−2A、80−2B及び16個の選択回路81−2がスライスS2に関する処理を行うユニットであり、図12における第1演算部62−2に相当する。そして16個の選択回路80−3A、80−3B及び16個の選択回路81−3がスライスS3に関する処理を行うユニットであり、図12における第1演算部62−3に相当する。そして以上の構成によって行われる処理は、処理ステージPS3において行われる。   In the above configuration, the 16 selection circuits 80-0A and 80-0B and the 16 selection circuits 81-0 are units that perform processing related to the slice S0, and correspond to the first calculation unit 62-0 in FIG. In addition, the 16 selection circuits 80-1A and 80-1B and the 16 selection circuits 81-1 are units that perform processing related to the slice S1, and correspond to the first calculation unit 62-1 in FIG. Further, the 16 selection circuits 80-2A and 80-2B and the 16 selection circuits 81-2 are units that perform processing related to the slice S2, and correspond to the first calculation unit 62-2 in FIG. The 16 selection circuits 80-3A and 80-3B and the 16 selection circuits 81-3 are units that perform processing related to the slice S3, and correspond to the first calculation unit 62-3 in FIG. And the process performed by the above structure is performed in process stage PS3.

また、選択回路82及びマスク論理83がスライスS0〜S3にまたがった処理を行うユニットであり、図12における第2演算部64に相当する。そしてこれらの構成によって行われる処理が、処理ステージPS4において行われる。   The selection circuit 82 and the mask logic 83 are units that perform processing across slices S0 to S3, and correspond to the second arithmetic unit 64 in FIG. And the process performed by these structures is performed in process stage PS4.

上記選択回路80−0A〜80−3A、80−0B〜80−3B、81−0〜81−3、82の選択動作、及びマスク論理83における固定値へのフォースの要否は、レジスタRD〜RG内のデータのデコード結果に応じて制御される。前述の通り、レジスタRD〜RGにはレジスタRC内のデータがコピーされる。そして、デコーダ84−0〜84−3がそれぞれ、レジスタRD〜RG内のデータをデコードする。そして、それぞれのデコード結果が選択回路80−0A〜80−3A、80−0B〜80−3B、81−0〜81−3へ与えられ、更にフリップフロップ85を介して選択回路82及びマスク論理83へ与えられる。   The selection operation of the selection circuits 80-0A to 80-3A, 80-0B to 80-3B, 81-0 to 81-3, 82, and the necessity of the force to a fixed value in the mask logic 83 are described in the registers RD to Control is performed according to the decoding result of the data in the RG. As described above, the data in the register RC is copied to the registers RD to RG. Then, the decoders 84-0 to 84-3 decode the data in the registers RD to RG, respectively. Then, the respective decoding results are given to the selection circuits 80-0A to 80-3A, 80-0B to 80-3B, 81-0 to 81-3, and further through the flip-flop 85, the selection circuit 82 and the mask logic 83. Given to.

処理ステージPS3においては、デコーダ84−0〜84−3におけるデコード結果はそれぞれ、第1演算部62−0〜62−3の各々に相当する選択回路に与えられる。つまり、選択回路80−0A、80−0B、81−0にはデコーダ84−0におけるデコード結果が与えられ、選択回路80−1A、80−1B、81−1にはデコーダ84−1におけるデコード結果が与えられる。以下同様である。   In the processing stage PS3, the decoding results in the decoders 84-0 to 84-3 are respectively supplied to selection circuits corresponding to the first arithmetic units 62-0 to 62-3. That is, the decoding results in the decoder 84-0 are given to the selection circuits 80-0A, 80-0B, 81-0, and the decoding results in the decoder 84-1 are given to the selection circuits 80-1A, 80-1B, 81-1. Is given. The same applies hereinafter.

処理ステージPS4においては、デコーダ84−0〜84−3の少なくともいずれかにおけるデコード結果に応じて、選択回路82及びマスク論理83における動作が制御される。なおデコーダ84−0〜84−3は、シャッフラー53の第1演算部62−0〜62−3内に含まれても良い。   In the processing stage PS4, operations in the selection circuit 82 and the mask logic 83 are controlled in accordance with the decoding result in at least one of the decoders 84-0 to 84-3. The decoders 84-0 to 84-3 may be included in the first calculation units 62-0 to 62-3 of the shuffler 53.

次に、上記シャッフラー3の動作について説明する。
<シャッフラー53の動作の詳細について>
図14を用いて説明した上記構成により、シャッフラー53は第1の実施形態で説明した図9及び図10に示される演算を行う。
Next, the operation of the shuffler 3 will be described.
<Details of operation of the shuffler 53>
With the above-described configuration described with reference to FIG. 14, the shuffler 53 performs the calculation shown in FIGS. 9 and 10 described in the first embodiment.

まず処理ステージPS3における処理について説明する。処理ステージPS3においては、スライスS0〜S3の各々において、各バイトB32〜B47への代入候補となる一つのバイトが選ばれる。以下、その詳細につき説明する。   First, processing in the processing stage PS3 will be described. In the processing stage PS3, in each of the slices S0 to S3, one byte that is a candidate for substitution into each of the bytes B32 to B47 is selected. The details will be described below.

まず選択回路80−0A〜80−3Aが、レジスタRAにおける各スライスS0〜S3におけるいずれかのバイトを、ターゲットレジスタRTの対応するバイトへの代入候補として選択する。また選択回路80−0B〜80−3Bが、レジスタRBにおける各スライスS0〜S3におけるいずれかのバイトを候補として選択する。この選択動作は、各々16個の選択回路80−0A〜80−3A、80−0B〜80−3Bによって、バイトB32〜B47毎に行われる。   First, the selection circuits 80-0A to 80-3A select any byte in each of the slices S0 to S3 in the register RA as an assignment candidate to the corresponding byte in the target register RT. Further, the selection circuits 80-0B to 80-3B select any byte in each of the slices S0 to S3 in the register RB as a candidate. This selection operation is performed for each byte B32 to B47 by 16 selection circuits 80-0A to 80-3A and 80-0B to 80-3B.

以上の選択動作により、バイトB32〜B47毎に、1つのスライスあたり2つの代入候補が決定する。そこで次に選択回路81−0〜81−3が、これらの2つの代入候補のいずれかを選択し、選択した1つの代入候補をフリップフロップ63−0〜63−3へ代入する。   With the above selection operation, two substitution candidates are determined per slice for each of bytes B32 to B47. Therefore, next, the selection circuits 81-0 to 81-3 select one of these two substitution candidates, and substitute the selected substitution candidate into the flip-flops 63-0 to 63-3.

以上の選択動作により、各スライスあたり1つの代入候補が、バイトB32〜B47毎に決定する。つまり、各バイトB32〜B47あたり、代入候補が4つまで絞られる。   Through the above selection operation, one substitution candidate for each slice is determined for each of bytes B32 to B47. That is, up to four substitution candidates are narrowed for each byte B32 to B47.

次に処理ステージPS4において処理が行われる。16個の選択回路82の各々は、16個ずつ設けられたフリップフロップ63−0〜63−3の各々から、いずれかのバイトを候補として選択する。これにより、各バイトB32〜B47あたり、1つの代入候補が決定される。そして、次にマスク論理83が、対応するバイトB32〜B47について、代入すべき値を固定値とするか、または選択回路82で選択したデータとするかを決定する。   Next, processing is performed in the processing stage PS4. Each of the 16 selection circuits 82 selects one of the 16 flip-flops 63-0 to 63-3 as a candidate. Thereby, one substitution candidate is determined for each byte B32 to B47. Then, the mask logic 83 determines whether the value to be substituted is a fixed value or the data selected by the selection circuit 82 for the corresponding bytes B32 to B47.

以上の処理の具体例について、バイトB32の代入候補を決定する場合を例に、以下説明する。この場合は、図9においてj=0である場合に相当する。   A specific example of the above processing will be described below by taking as an example the case of determining a substitution candidate for byte B32. This case corresponds to the case where j = 0 in FIG.

まず、処理ステージPS3における処理が行われる。すなわち、選択回路80−0A、80−0Bは、デコーダ84−0における、レジスタRDのビット3〜7のデコード結果に応じて、バイトB00〜B03のいずれか、及びバイトB16〜B19のいずれかを、それぞれ選択する。また選択回路80−1A、80−1Bは、デコーダ84−1における、レジスタREのビット3〜7のデコード結果に応じて、バイトB04〜B07のいずれか、及びバイトB20〜B23のいずれかを、それぞれ選択する。更に選択回路80−2A、80−2Bは、デコーダ84−2における、レジスタRFのビット3〜7のデコード結果に応じて、バイトB08〜B11のいずれか、及びバイトB24〜B27のいずれかを、それぞれ選択する。そして選択回路80−3A、80−3Bは、デコーダ84−3における、レジスタRGのビット3〜7のデコード結果に応じて、バイトB12〜B15のいずれか、及びバイトB28〜B31のいずれかを、それぞれ選択する。   First, processing in the processing stage PS3 is performed. That is, the selection circuits 80-0A and 80-0B select one of bytes B00 to B03 and one of bytes B16 to B19 according to the decoding result of bits 3 to 7 of the register RD in the decoder 84-0. , Select each. The selection circuits 80-1A and 80-1B select any one of bytes B04 to B07 and any of bytes B20 to B23 according to the decoding result of bits 3 to 7 of the register RE in the decoder 84-1. Select each one. Further, the selection circuits 80-2A and 80-2B select one of the bytes B08 to B11 and one of the bytes B24 to B27 according to the decoding result of the bits 3 to 7 of the register RF in the decoder 84-2. Select each one. Then, the selection circuits 80-3A and 80-3B select any one of bytes B12 to B15 and any of bytes B28 to B31 according to the decoding result of bits 3 to 7 of the register RG in the decoder 84-3. Select each one.

次に、選択回路81−0は、デコーダ84−0における、レジスタRDのビット3〜7のデコード結果に応じて、選択回路80−0Aで選択されたいずれかのバイトと、選択回路80−0Bで選択されたバイトとのいずれか一方を選択する。そして、選択したバイトをフリップフロップ63−0に格納する。また選択回路81−1は、デコーダ84−1における、レジスタREのビット3〜7のデコード結果に応じて、選択回路80−1Aで選択されたいずれかのバイトと、選択回路80−1Bで選択されたバイトとのいずれか一方を選択する。そして、選択したバイトをフリップフロップ63−1に格納する。更に選択回路81−2は、デコーダ84−2における、レジスタRFのビット3〜7のデコード結果に応じて、選択回路80−2Aで選択されたいずれかのバイトと、選択回路80−2Bで選択されたバイトとのいずれか一方を選択する。そして、選択したバイトをフリップフロップ63−2に格納する。そして選択回路81−3は、デコーダ84−3における、レジスタRGのビット3〜7のデコード結果に応じて、選択回路80−3Aで選択されたいずれかのバイトと、選択回路80−3Bで選択されたバイトとのいずれか一方を選択する。そして、選択したバイトをフリップフロップ63−3に格納する。   Next, the selection circuit 81-0 selects one of the bytes selected by the selection circuit 80-0A and the selection circuit 80-0B according to the decoding result of bits 3 to 7 of the register RD in the decoder 84-0. Select one of the bytes selected in. Then, the selected byte is stored in the flip-flop 63-0. The selection circuit 81-1 selects one of the bytes selected by the selection circuit 80-1A and the selection circuit 80-1B according to the decoding result of bits 3 to 7 of the register RE in the decoder 84-1. One of the selected bytes. Then, the selected byte is stored in the flip-flop 63-1. Further, the selection circuit 81-2 selects one of the bytes selected by the selection circuit 80-2A and the selection circuit 80-2B according to the decoding result of bits 3 to 7 of the register RF in the decoder 84-2. One of the selected bytes. Then, the selected byte is stored in the flip-flop 63-2. The selection circuit 81-3 selects one of the bytes selected by the selection circuit 80-3A and the selection circuit 80-3B according to the decoding result of bits 3 to 7 of the register RG in the decoder 84-3. One of the selected bytes. Then, the selected byte is stored in the flip-flop 63-3.

次に処理ステージPS4において処理が行われる。バイトB32に対応する選択回路82は、デコーダ84−0〜84−3のいずれかにおける、レジスタRDのビット3〜7のデコード結果に応じて、フリップフロップ63−0〜63−3のいずれかに保持されるバイトを選択する。   Next, processing is performed in the processing stage PS4. The selection circuit 82 corresponding to the byte B32 is connected to one of the flip-flops 63-0 to 63-3 according to the decoding result of the bits 3 to 7 of the register RD in any of the decoders 84-0 to 84-3. Select the bytes to be retained.

次にマスク論理83が、デコーダ84−0〜84−3のいずれかにおける、レジスタRD〜RGのビット0〜2のデコード結果に応じて、バイトB32に代入すべきデータを固定値にフォースする。すなわち、図9で説明したように、ビット0〜1が“0b10”であれば、バイトB32には“0b00000000”が代入され、ビット0〜2が“0b110”であれば、バイトB32には“0b11111111”が代入され、ビット0〜2が“0b111”であれば、バイトB32には“0b10000000”が代入される。ビット0〜2が上記以外の値であれば、バイトB32には選択回路82で選択されたバイトが代入される。   Next, the mask logic 83 forces the data to be substituted into the byte B32 to a fixed value according to the decoding result of the bits 0 to 2 of the registers RD to RG in any of the decoders 84-0 to 84-3. That is, as described in FIG. 9, if bits 0 to 1 are “0b10”, “0b00000000” is assigned to byte B32, and if bits 0 to 2 are “0b110”, “0b110” is assigned to byte B32. If 0b11111111 "is assigned and bits 0-2 are" 0b111 ", then" 0b10000000 "is assigned to byte B32. If bits 0 to 2 are values other than those described above, the byte selected by the selection circuit 82 is substituted for byte B32.

以上がバイトB32に代入すべきデータの選択方法である。バイトB33に代入すべきデータの選択時は、図9におけるj=1の場合に相当するので、各選択回路及びマスク論理の制御にあたっては、レジスタRD〜RGにおけるビット8〜15のデコード結果が使用される。またバイトB34の場合はj=2の場合に相当するので、この場合にはビット16〜23のデコード結果が使用される。以下同様である。   The above is the method for selecting data to be substituted into byte B32. The selection of data to be substituted into the byte B33 corresponds to the case of j = 1 in FIG. 9, so that the decoding results of bits 8 to 15 in the registers RD to RG are used for controlling each selection circuit and mask logic. Is done. Since the byte B34 corresponds to the case of j = 2, the decoding result of bits 16 to 23 is used in this case. The same applies hereinafter.

上記のように、第1の実施形態で説明したLSIは、例えば本実施形態で説明した構成によって実現出来る。本実施形態に係る構成であると、シャッフラー53は、スライス間でのデータ通信を要する処理と要しない処理とを、処理ステージPS3と処理ステージPS4とに分離している。   As described above, the LSI described in the first embodiment can be realized by the configuration described in the present embodiment, for example. In the configuration according to the present embodiment, the shuffler 53 separates processing that requires data communication between slices and processing that does not need into processing stages PS3 and PS4.

前述の通り、動作タイミングについて配慮すべき領域は処理ステージ毎である。そして、異なる処理ステージ間では、動作タイミングについての要求は同一処理ステージ内に比して緩やかである。その結果、各処理ステージにおいてスタンダードセルはスライス毎に集まって配置されやすい。   As described above, the area to be considered for the operation timing is each processing stage. And between different processing stages, the request | requirement about operation | movement timing is loose compared with the same processing stage. As a result, the standard cells are easily collected and arranged for each slice in each processing stage.

すると、本実施形態に係る構成であると、処理ステージPS3においてはスライスをまたぐ演算部が存在しない。従って、処理ステージPS3を構成するスタンダードセル群は、スライス毎にまとまって配置されることが可能となる。処理ステージPS4ではスライスをまたぐ演算部(第2演算部64)が存在するが、この演算部はシャッフラー53の一部に過ぎない。従って、LSI全体として見たときに、スライスをまたいでスタンダードセルが配置される領域は、従来に比べて圧倒的に小さくなる。よって、上記第1の実施形態で説明した効果が得られる。   Then, in the configuration according to the present embodiment, there is no arithmetic unit that crosses slices in the processing stage PS3. Therefore, the standard cell group constituting the processing stage PS3 can be arranged together for each slice. In the processing stage PS4, there is a calculation unit (second calculation unit 64) that crosses the slice, but this calculation unit is only a part of the shuffler 53. Therefore, when viewed as the entire LSI, the area where the standard cells are arranged across the slices is overwhelmingly smaller than in the prior art. Therefore, the effect described in the first embodiment can be obtained.

なおシャッフラー53は、本実施形態で説明した構成によって、シャッフル演算だけでなくローテート演算やシフト演算も可能である。この場合には、ローテート演算やシフト演算が可能となるよう、つまり図5及び図7が実現出来るよう、レジスタRCの制御データをセットすれば良い。   The shuffler 53 can perform not only the shuffle calculation but also the rotation calculation and the shift calculation by the configuration described in the present embodiment. In this case, it is only necessary to set the control data of the register RC so that the rotation calculation and the shift calculation can be performed, that is, the processes shown in FIGS.

また、本実施形態に係る構成であると、レジスタRCを多重化している。より具体的には、レジスタRCのデータ(演算内容の制御データ)のコピーを保持するレジスタRD〜RGを、スライスS0〜S3毎に設けている。そして、レジスタRD〜RGにおける制御データに基づいて、それぞれスライスS0〜S3に対応した第1演算部62−0〜62−3が制御される。このことも、処理ステージPS3におけるスライス間でのデータ通信の発生を防止することに寄与している。   In the configuration according to the present embodiment, the register RC is multiplexed. More specifically, registers RD to RG that hold a copy of the data in the register RC (control data of calculation contents) are provided for each of the slices S0 to S3. Based on the control data in the registers RD to RG, the first arithmetic units 62-0 to 62-3 corresponding to the slices S0 to S3 are controlled. This also contributes to preventing the occurrence of data communication between slices in the processing stage PS3.

[第3の実施形態]
次に、この発明の第3の実施形態に係る半導体集積回路装置について説明する。本実施形態は、上記第1、第2の実施形態で説明したプロセッサを用いたプロセッサシステムに関するものである。
[Third Embodiment]
Next explained is a semiconductor integrated circuit device according to the third embodiment of the invention. The present embodiment relates to a processor system using the processor described in the first and second embodiments.

<プロセッサシステムの全体構成について>
図15は、本実施形態に係る画像処理用プロセッサシステムのブロック図である。図示するようにプロセッサシステム90は、ホストPC91、マルチコアプロセッサ92、及びローカルメモリ93を備えている。
<Overall configuration of processor system>
FIG. 15 is a block diagram of an image processing processor system according to the present embodiment. As shown in the figure, the processor system 90 includes a host PC 91, a multi-core processor 92, and a local memory 93.

ホストPC91は、外部から映像データを受信し、マルチコアプロセッサ92に対して映像データのエンコードまたはデコードを命令する。マルチコアプロセッサ92は、ホストPC91から映像データを受け取り、ローカルメモリ93に一時的に格納すると共に、映像データのエンコード及びデコードを行う。そしてホストPC91は、マルチコアプロセッサ92でデコードされた映像データを、外部の映像表示部に表示させる。
次に、上記ホストPC91及びマルチコアプロセッサ92の構成について説明する。
The host PC 91 receives video data from the outside and instructs the multi-core processor 92 to encode or decode the video data. The multi-core processor 92 receives video data from the host PC 91, temporarily stores it in the local memory 93, and encodes and decodes the video data. Then, the host PC 91 displays the video data decoded by the multi-core processor 92 on an external video display unit.
Next, the configuration of the host PC 91 and the multi-core processor 92 will be described.

<ホストPC91について>
上記ホストPC91は、CPU94、ビデオRAM(以下VRAMと呼ぶ)95、グラフィックプロセッサ(以下GPU(Graphic Processing Unit)と呼ぶ)96、メインメモリ97、第1接続部98、及び第2接続部99を備えている。
<About the host PC 91>
The host PC 91 includes a CPU 94, a video RAM (hereinafter referred to as VRAM) 95, a graphic processor (hereinafter referred to as GPU (Graphic Processing Unit)) 96, a main memory 97, a first connection unit 98, and a second connection unit 99. ing.

CPU94は、ホストPC91全体の処理を司る。メインメモリ97は、例えばDRAM等の半導体メモリであり、CPU94の作業領域として使用される。第2接続部99は、外部より映像データ及び音声データを受信する。また、ホストPC91とマルチコアプロセッサ92との間のデータの授受を司る。外部からのデータは、例えばUSBやシリアルATAによって、第2接続部99に転送される。第1接続部98は、CPU94、メインメモリ97、第2接続部99、及びGPU96の相互間の接続を司る。GPU96は、第1接続部98を介して与えられる映像データを、ビデオ出力として映像表示部に表示させる。VRAM95は、例えばDRAM等の半導体メモリであり、GPU96の作業領域として使用される。   The CPU 94 manages the entire processing of the host PC 91. The main memory 97 is a semiconductor memory such as a DRAM, and is used as a work area for the CPU 94. The second connection unit 99 receives video data and audio data from the outside. It also manages data exchange between the host PC 91 and the multi-core processor 92. Data from the outside is transferred to the second connection unit 99 by, for example, USB or serial ATA. The first connection unit 98 governs connection among the CPU 94, the main memory 97, the second connection unit 99, and the GPU 96. The GPU 96 displays the video data provided through the first connection unit 98 on the video display unit as a video output. The VRAM 95 is a semiconductor memory such as a DRAM, for example, and is used as a work area for the GPU 96.

<マルチコアプロセッサ92について>
次に、上記マルチコアプロセッサ92の構成について説明する。図16はマルチコアプロセッサ92の構成を示すブロック図である。
<About the multi-core processor 92>
Next, the configuration of the multi-core processor 92 will be described. FIG. 16 is a block diagram showing the configuration of the multi-core processor 92.

図示するようにマルチコアプロセッサ92は、第1プロセッサ100、DMA(Direct Memory Access)コントローラ110、第1デコーダ120、第2デコーダ130、複数の第2プロセッサ140、ホストインターフェース160、及びメモリコントローラ170を備えている。これらは、バス180によって相互に通信可能に接続されている。   As illustrated, the multi-core processor 92 includes a first processor 100, a DMA (Direct Memory Access) controller 110, a first decoder 120, a second decoder 130, a plurality of second processors 140, a host interface 160, and a memory controller 170. ing. These are connected to each other via a bus 180 so that they can communicate with each other.

第1プロセッサ100は、マルチコアプロセッサ92全体の動作を制御するメインプロセッサである。オペレーティングシステム(OS:Operating System)は、主に第1プロセッサ100によって実行される。OSの一部の機能は、第2プロセッサ140等で分担して実行することもできる。   The first processor 100 is a main processor that controls the operation of the entire multi-core processor 92. An operating system (OS) is mainly executed by the first processor 100. Some functions of the OS can be shared and executed by the second processor 140 or the like.

第2プロセッサ140の各々は、第1プロセッサ100の管理の下で各種の処理を実行する。第1プロセッサ100は、複数の第2プロセッサ140に処理を振り分けて並列に実行させるための制御を行う。これにより高速で効率よい処理を実行できる。第2プロセッサ140の各々は、大まかには制御部、演算部、及びメモリを備えている。制御部は、第1プロセッサ100の命令に基づき、演算部に対して必要な演算実行を命令する。メモリは、DMAコントローラ110の命令に基づき、外部からデータを受け取り、または外部へデータを出力する。このデータは、例えばOSやアプリケーションプログラム、または映像データ等である。演算部は、制御部の命令に基づき、メモリに格納されたデータを用いて演算を行う。第2プロセッサ140の詳細については後述する。   Each of the second processors 140 executes various processes under the management of the first processor 100. The first processor 100 performs control for distributing the processing to the plurality of second processors 140 and executing them in parallel. Thereby, high-speed and efficient processing can be executed. Each of the second processors 140 roughly includes a control unit, a calculation unit, and a memory. The control unit instructs the calculation unit to execute necessary calculation based on the instruction of the first processor 100. The memory receives data from the outside or outputs data to the outside based on a command from the DMA controller 110. This data is, for example, an OS, an application program, or video data. The operation unit performs an operation using data stored in the memory based on an instruction from the control unit. Details of the second processor 140 will be described later.

第1デコーダ120は、外部から与えられたMPEG(Moving Picture Experts Group)−2形式の映像データをデコードする。第2デコーダ130は、外部から与えられたH.264形式の映像データをデコードする。なお、MPEG−2及びH.264とは、映像を圧縮して符号化する規格の名称である。   The first decoder 120 decodes video data in the MPEG (Moving Picture Experts Group) -2 format provided from the outside. The second decoder 130 is connected to the H.264 supplied from the outside. H.264 format video data is decoded. MPEG-2 and H.264 H.264 is the name of a standard for compressing and encoding video.

DMAコントローラ110は、マルチコアプロセッサ92内におけるバス180を介したデータの通信を司る。ホストインターフェース160はホストPC91との間のデータの授受を司り、メモリコントローラ170はローカルメモリ93との間のデータの授受を司る。   The DMA controller 110 manages data communication via the bus 180 in the multi-core processor 92. The host interface 160 is responsible for data exchange with the host PC 91, and the memory controller 170 is responsible for data exchange with the local memory 93.

なお、図16の構成では、第1プロセッサ100が1つであり、また第2プロセッサ140VPU12が4つの場合を例に挙げている。しかし、これらの回路ブロックの個数は制限されない。例えば第1プロセッサ100が複数ある構成や、第1プロセッサ100を有しない構成も可能である。第1プロセッサ100を有しない構成の場合、第1プロセッサ100の行う処理は、いずれかの第2プロセッサ140が担当する。つまり、仮想的な第1プロセッサ100の役割を第2プロセッサ140が兼ねる。   In the configuration of FIG. 16, there is an example in which there is one first processor 100 and four second processors 140 VPU 12. However, the number of these circuit blocks is not limited. For example, a configuration with a plurality of first processors 100 or a configuration without the first processor 100 is possible. In the case where the first processor 100 is not provided, any one of the second processors 140 is in charge of processing performed by the first processor 100. That is, the second processor 140 serves as the virtual first processor 100.

<第2プロセッサ140について>
次に、上記第2プロセッサ140の構成について説明する。図17は第2プロセッサ140の構成を示すブロック図である。
<About the second processor 140>
Next, the configuration of the second processor 140 will be described. FIG. 17 is a block diagram showing a configuration of the second processor 140.

図示するように第2プロセッサ140は、チャネルインターフェース141、分岐命令実行部142、DMAインターフェース143、ローカルメモリ144、ロードストアユニット145、バッファ制御部146、命令バッファ147、汎用レジスタ148、オペランド供給ネットワーク149、浮動小数点演算部150、及び整数演算部151を備えている。   As shown, the second processor 140 includes a channel interface 141, a branch instruction execution unit 142, a DMA interface 143, a local memory 144, a load store unit 145, a buffer control unit 146, an instruction buffer 147, a general-purpose register 148, and an operand supply network 149. A floating point arithmetic unit 150 and an integer arithmetic unit 151.

チャネルインターフェース141は、図示せぬメモリフローコントローラ(Memory Flow Controller)を介して、第1プロセッサ100から命令を受信する。   The channel interface 141 receives an instruction from the first processor 100 via a memory flow controller (not shown).

DMAインターフェース143は、メモリコントローラを介して、ローカルメモリ93から映像データやプログラムを受信する。   The DMA interface 143 receives video data and programs from the local memory 93 via the memory controller.

ローカルメモリ144は例えばDRAMやEEPROM(Electrically Erasable and Programmable ROM)等の半導体メモリであり、DMAインターフェース143で受信した映像データやプログラムを保持する。また、整数演算部151や浮動小数点演算部150、または分岐命令実行部142における処理結果を保持する。   The local memory 144 is a semiconductor memory such as DRAM or EEPROM (Electrically Erasable and Programmable ROM), and holds video data and programs received by the DMA interface 143. In addition, the processing result in the integer arithmetic unit 151, the floating point arithmetic unit 150, or the branch instruction execution unit 142 is held.

命令バッファ147は、バッファ制御部146の制御に従って、ローカルメモリ144に保持されたプログラムを一時的に保持する。   The instruction buffer 147 temporarily holds a program held in the local memory 144 under the control of the buffer control unit 146.

分岐命令実行部142は、チャネルインターフェース141で受信した命令に基づき、命令バッファ147に読み出されたプログラムにおける分岐命令を実行する。   The branch instruction execution unit 142 executes a branch instruction in the program read to the instruction buffer 147 based on the instruction received by the channel interface 141.

ロードストアユニット145は、チャネルインターフェース141で受信した命令に基づき、各種データやプログラムのローカルメモリ144に対するロード(読み出し)及びストア(書き込み)を制御する。すなわち、必要なデータやプログラムをローカルメモリ144からロードし、オペランド供給ネットワーク149に出力する。またローカルメモリ144におけるプログラムをロードして、命令バッファ147に保持させる。更に、分岐命令実行部142、整数演算部151、または浮動小数点演算部150における演算結果を、ローカルメモリ144に格納する。ロードストアユニット145は、上記第2の実施形態で説明した図12におけるロードストアユニット30に相当する。   The load / store unit 145 controls loading (reading) and storing (writing) of various data and programs to / from the local memory 144 based on instructions received by the channel interface 141. That is, necessary data and programs are loaded from the local memory 144 and output to the operand supply network 149. The program in the local memory 144 is loaded and held in the instruction buffer 147. Further, the operation result in the branch instruction execution unit 142, the integer operation unit 151, or the floating point operation unit 150 is stored in the local memory 144. The load / store unit 145 corresponds to the load / store unit 30 in FIG. 12 described in the second embodiment.

オペランド供給ネットワーク149は、上記第2の実施形態で説明した図12におけるバスBS−A〜BS−C、BS−PS4、BS−PS5、BS−LSに相当する。従って、図17におけるロードストアユニット145でロードされたデータやプログラムが、図12におけるバスBS−LSに与えられる。また、図12におけるバスBS−A〜BS−C、BS−PS4、BS−PS5において伝送されるデータやプログラムが、ロードストアユニット145を介してローカルメモリ144に格納される。   The operand supply network 149 corresponds to the buses BS-A to BS-C, BS-PS4, BS-PS5, and BS-LS in FIG. 12 described in the second embodiment. Accordingly, the data and programs loaded by the load / store unit 145 in FIG. 17 are given to the bus BS-LS in FIG. Further, data and programs transmitted on the buses BS-A to BS-C, BS-PS4, and BS-PS5 in FIG. 12 are stored in the local memory 144 via the load store unit 145.

汎用レジスタ148は、上記第2の実施形態で説明した図12における汎用レジスタ2に相当する。すなわち汎用レジスタ148は、レジスタRA〜RG、RTを含む。   The general-purpose register 148 corresponds to the general-purpose register 2 in FIG. 12 described in the second embodiment. That is, general purpose register 148 includes registers RA to RG and RT.

整数演算部151及び浮動小数点演算部150は、上記第2の実施形態で説明した図12における、処理ステージPS3、PS4における演算ユニットに相当する。そして整数演算部151及び浮動小数点演算部150は、それぞれ整数及び浮動小数点につき、積和演算、算術演算、論理演算、またはシャッフル演算(及び/またはシフト演算及びローテート演算)を行う。   The integer arithmetic unit 151 and the floating point arithmetic unit 150 correspond to the arithmetic units in the processing stages PS3 and PS4 in FIG. 12 described in the second embodiment. The integer operation unit 151 and the floating point operation unit 150 perform product-sum operation, arithmetic operation, logical operation, or shuffle operation (and / or shift operation and rotate operation) for the integer and the floating point, respectively.

<マルチコアプロセッサ92の動作について>
次に、上記マルチコアプロセッサ92の動作について、ホストPC91から入力されたMPEG−2形式の映像データをH.264形式に変換する場合を例に挙げて、以下説明する。勿論、この変換処理は計算機システム10の行う処理の一例に過ぎない。図18は、マルチコアプロセッサ92における処理の流れを示すフローチャートであり、図19乃至図21はマルチコアプロセッサ92のブロック図である。図19乃至図21において、白抜き矢印は制御を示し、黒塗り矢印はデータの流れを示す。
<Operation of multi-core processor 92>
Next, regarding the operation of the multi-core processor 92, the MPEG-2 format video data input from the host PC 91 is converted into the H.264 format. The case of converting to the H.264 format will be described below as an example. Of course, this conversion processing is only an example of processing performed by the computer system 10. FIG. 18 is a flowchart showing the flow of processing in the multi-core processor 92, and FIGS. 19 to 21 are block diagrams of the multi-core processor 92. In FIG. 19 to FIG. 21, white arrows indicate control, and black arrows indicate data flow.

まず初めに、マルチコアプロセッサ92がホストPC91から映像データの変換命令を受ける。すると図19に示すように、マルチコアプロセッサ92では、変換命令に応答して第1プロセッサ100が、DMAコントローラ110に対して、ホストPC91からの映像データの読み出しを命令する。この命令に従いDMAコントローラ110は、ホストインターフェース160を介してMPEG−2形式で符号化された映像データ(データストリーム)を読み出す。そして読み出した映像データを、メモリコントローラ170を介してローカルメモリ93に格納する(図18におけるステップS10)。   First, the multi-core processor 92 receives a video data conversion command from the host PC 91. Then, as shown in FIG. 19, in the multi-core processor 92, in response to the conversion command, the first processor 100 instructs the DMA controller 110 to read the video data from the host PC 91. In accordance with this command, the DMA controller 110 reads video data (data stream) encoded in the MPEG-2 format via the host interface 160. The read video data is stored in the local memory 93 via the memory controller 170 (step S10 in FIG. 18).

次に図20に示すように、第1プロセッサ100は第1デコーダ120に対して、ステップS10で読み出した映像データについてのデコードを命令する。すると第1デコーダ120は、メモリコントローラ170を介してローカルメモリ93から映像データを読み出し、MPEG−2形式の映像データをデコードし、デコード結果をローカルメモリ93に格納する(ステップS11)。   Next, as shown in FIG. 20, the first processor 100 instructs the first decoder 120 to decode the video data read in step S10. Then, the first decoder 120 reads the video data from the local memory 93 via the memory controller 170, decodes the MPEG-2 format video data, and stores the decoding result in the local memory 93 (step S11).

次に、第1デコーダ120からデコードの終了を通知されると、図21に示すように第1プロセッサ100は、複数の第2プロセッサ140に対してH.264エンコードプログラムの実行を命令する。H.264エンコードプログラムは、映像をH.264形式により圧縮符号化するためのプログラムである。H.264エンコードプログラムは、第2プロセッサ140自身が保持していても良いし、ローカルメモリ93から第2プロセッサ140に転送されても良い。H.264エンコードプログラムに基づいて第2プロセッサ140の各々は、メモリコントローラ170を介してローカルメモリ93から、MPEG−2のデコード結果を読み込む(ステップS12)。このデコード結果は、ステップS11において第1デコーダ120がデコードして得た映像データである。   Next, when the end of decoding is notified from the first decoder 120, the first processor 100 sends the H.264 to the plurality of second processors 140 as shown in FIG. Command the execution of the H.264 encoding program. H. H.264 encoding program converts video to H.264. This is a program for compressing and encoding in the H.264 format. H. The H.264 encoding program may be held by the second processor 140 itself, or may be transferred from the local memory 93 to the second processor 140. H. Based on the H.264 encoding program, each of the second processors 140 reads the MPEG-2 decoding result from the local memory 93 via the memory controller 170 (step S12). This decoding result is video data obtained by the first decoder 120 decoding in step S11.

そしてH.264エンコードプログラムに従って、各々の第2プロセッサ140が、読み込んだ映像をH.264形式にエンコード(符号化)し、エンコード結果をローカルメモリ93に格納する(ステップS13)。   And H. In accordance with the H.264 encoding program, each second processor 140 converts the read video into H.264 format. The data is encoded (encoded) in the H.264 format, and the encoded result is stored in the local memory 93 (step S13).

エンコード処理が終了すると、第2プロセッサ140はH.264エンコードプログラムに基づいて、第1プロセッサ100に対してエンコードの終了を通知する。エンコードの終了を通知された第1プロセッサ100は、DMAコントローラ110に対してデータの転送を命令する。するとDMAコントローラ110は、ローカルメモリ93に保持されるH.264形式のエンコード結果を、ホストPC91へ転送する。   When the encoding process is completed, the second processor 140 executes H.264. Based on the H.264 encoding program, the first processor 100 is notified of the end of encoding. The first processor 100 notified of the end of encoding instructs the DMA controller 110 to transfer data. Then, the DMA controller 110 stores the H.264 data stored in the local memory 93. The H.264 format encoding result is transferred to the host PC 91.

なお、ステップS11で得られた映像ストリームは、ローカルメモリ93だけでなくホストPC91へ転送されても良い。これにより、映像を映像表示部で再生しつつ、当該映像のMPEG−2形式からH.264形式への変換が可能となる。   Note that the video stream obtained in step S11 may be transferred not only to the local memory 93 but also to the host PC 91. As a result, while the video is reproduced on the video display unit, the MPEG-2 format of the video is changed from the MPEG-2 format. Conversion to H.264 format is possible.

以上のように、第1、第2の実施形態で説明したプロセッサ1はプロセッサシステムの一部として使用することが可能である。そして、特に画像処理ではプロセッサの負担は非常に大きく、各プロセッサの動作速度が重要となる。従って、マルチコアプロセッサを使用したプロセッサシステムに対して第1、第2の実施形態で説明したプロセッサ1を使用することで、画像処理の処理速度を格段に向上出来る。   As described above, the processor 1 described in the first and second embodiments can be used as a part of the processor system. Especially in image processing, the burden on the processor is very large, and the operation speed of each processor is important. Therefore, by using the processor 1 described in the first and second embodiments for a processor system using a multi-core processor, the processing speed of image processing can be significantly improved.

上記のように、この発明の第1乃至第3の実施形態に係る演算器は、複数ビットを一つのデータ単位(スライスS0〜S3)とするSIMD命令を、複数の処理サイクルにより実行する演算器10、53であって、スライス間でのビットの移動を伴うことなく、それぞれスライス毎に第1演算を行う複数の第1演算部11−0〜11−3、62−0〜62−3と、スライス間でのビットの移動を伴う第2演算を行う第2演算部12、64とを具備する。そして、第1演算と第2演算とによりSIMD命令が実行され、且つ第1演算と第2演算とは、互いに1処理サイクル以上のレイテンシを有して実行される。   As described above, the arithmetic unit according to the first to third embodiments of the present invention executes a SIMD instruction having a plurality of bits as one data unit (slices S0 to S3) in a plurality of processing cycles. A plurality of first arithmetic units 11-0 to 11-3 and 62-0 to 62-3 that perform a first operation for each slice without moving a bit between slices; , Second arithmetic units 12 and 64 for performing a second operation involving the movement of bits between slices. The SIMD instruction is executed by the first operation and the second operation, and the first operation and the second operation are executed with a latency of one processing cycle or more.

また、この発明の第1乃至第3の実施形態に係る半導体集積回路装置は、複数の処理ステージを用いてパイプライン動作を行うプロセッサ1であって、複数ビットを一つのデータ単位(スライスS0〜S3)とするSIMD命令を、複数の前記処理ステージを用いて実行する演算器10、53を具備する。そして演算器10、53は、第i処理ステージ(iは1以上の自然数、図1におけるPS1または図12におけるPS3)において、スライス間でのビットの移動を伴うことなく、スライス単位の第1演算を行い、第(i+j)処理ステージ(jは1以上の自然数、図1におけるPS2または図12におけるPS4)において、スライス間でのビットの移動を伴う第2演算を行う。   The semiconductor integrated circuit device according to the first to third embodiments of the present invention is a processor 1 that performs a pipeline operation using a plurality of processing stages, and a plurality of bits are converted into one data unit (slices S0 to S0). Computation units 10 and 53 that execute the SIMD instruction in S3) using a plurality of the processing stages are provided. Then, the arithmetic units 10 and 53 perform the first operation in units of slices in the i-th processing stage (i is a natural number of 1 or more, PS1 in FIG. 1 or PS3 in FIG. 12) without moving bits between slices. In the (i + j) th processing stage (j is a natural number of 1 or more, PS2 in FIG. 1 or PS4 in FIG. 12), a second operation involving the movement of bits between slices is performed.

そして、上記プロセッサ1は、スライス毎に設けられ、演算器53における演算内容を制御する制御データを保持する複数のレジスタRD〜RGを更に備え、第1演算において、レジスタRD〜RGの各々に保持される制御データは、スライス毎の第1演算にそれぞれ使用される。   The processor 1 further includes a plurality of registers RD to RG which are provided for each slice and hold control data for controlling the calculation contents in the calculator 53, and are held in each of the registers RD to RG in the first calculation. The control data to be used is used for the first calculation for each slice.

なお上記第1、第2実施形態では、演算器が初めの処理ステージにおいてスライス間でのデータ通信を要しない演算(第1演算)を行い、これに引き続く次の処理ステージにおいて、スライス間でのデータ通信を要する演算(第2演算)を行う場合について説明した。しかし、この順序は逆であっても良い。すなわち、まず第2演算を行い、次に第1演算を行っても良い。また上記実施形態では、これら2つの演算が連続する処理ステージで行われる場合について説明した。すなわちレイテンシ=1の場合である。しかし、レイテンシは2以上であっても良い。例えば図12のシャッフラー53において、第2演算部64における第2演算は、処理ステージPS4では無く処理ステージPS5以降で行われても良い。すなわち、第1演算と第2演算とが異なる処理ステージで行われる構成であれば、演算の順序等は特に限定されず、適宜選択することが出来る。   In the first and second embodiments, the arithmetic unit performs an operation (first operation) that does not require data communication between slices in the first processing stage, and in the subsequent processing stage, The case where the calculation requiring the data communication (second calculation) has been described. However, this order may be reversed. That is, the second calculation may be performed first, and then the first calculation may be performed. In the above embodiment, the case where these two operations are performed in successive processing stages has been described. That is, the case of latency = 1. However, the latency may be 2 or more. For example, in the shuffler 53 of FIG. 12, the second calculation in the second calculation unit 64 may be performed not after the processing stage PS4 but after the processing stage PS5. In other words, as long as the first calculation and the second calculation are performed in different processing stages, the order of the calculations is not particularly limited and can be selected as appropriate.

また、上記第1、第2の実施形態では、スライス間でのデータ通信を要する演算として、バイト単位のシャッフル演算、ローテート演算、及びシフト演算を例に挙げた。しかし、これらの演算はバイト単位に限らず、例えばビット単位であっても良い。また、これらの演算に限定されるものでは無く、プログラム上において単一の命令として取り扱われ、且つスライス間でのデータの通信を要する演算であれば、全般的に、上記実施形態を適用出来る。   In the first and second embodiments, as operations requiring data communication between slices, shuffle operations, rotate operations, and shift operations in units of bytes are given as examples. However, these operations are not limited to byte units, but may be bit units, for example. In addition, the present embodiment is not limited to these operations, and the embodiments described above can be generally applied to operations that are handled as a single instruction in a program and require data communication between slices.

なお、本願発明は上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。更に、上記実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出されうる。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出されうる。   Note that the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the invention in the implementation stage. Furthermore, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, the problem described in the column of the problem to be solved by the invention can be solved, and the effect described in the column of the effect of the invention Can be extracted as an invention.

この発明の第1の実施形態に係るプロセッサのブロック図。1 is a block diagram of a processor according to a first embodiment of the present invention. この発明の第1の実施形態に係るプロセッサの動作の流れを示すタイミングチャート。2 is a timing chart showing a flow of operations of the processor according to the first embodiment of the present invention. この発明の第1の実施形態に係るレジスタの構成を示す模式図。The schematic diagram which shows the structure of the register | resistor which concerns on 1st Embodiment of this invention. この発明の第1の実施形態に係るレジスタの構成を示す模式図。The schematic diagram which shows the structure of the register | resistor which concerns on 1st Embodiment of this invention. シフト命令の詳細を示すダイアグラム。Diagram showing details of shift instruction. シフト命令を実行する演算器の概念図。The conceptual diagram of the arithmetic unit which performs a shift command. ローテート命令の詳細を示すダイアグラム。Diagram showing details of rotate instruction. ローテート命令を実行する演算器の概念図。The conceptual diagram of the arithmetic unit which performs a rotate instruction. シャッフル命令の詳細を示すダイアグラム。Diagram showing details of shuffle instructions. シャッフル命令を実行する演算器の概念図。The conceptual diagram of the arithmetic unit which performs a shuffle instruction. LSIのレイアウトを示す模式図。The schematic diagram which shows the layout of LSI. この発明の第2の実施形態に係るプロセッサのブロック図。The block diagram of the processor which concerns on 2nd Embodiment of this invention. この発明の第2の実施形態に係る汎用レジスタのブロック図。The block diagram of the general purpose register which concerns on 2nd Embodiment of this invention. この発明の第2の実施形態に係るシャッフラーのブロック図。The block diagram of the shuffler which concerns on 2nd Embodiment of this invention. この発明の第3の実施形態に係るプロセッサシステムのブロック図。The block diagram of the processor system which concerns on 3rd Embodiment of this invention. この発明の第3の実施形態に係るマルチコアプロセッサのブロック図。The block diagram of the multi-core processor which concerns on 3rd Embodiment of this invention. この発明の第3の実施形態に係るプロセッサのブロック図。The block diagram of the processor which concerns on 3rd Embodiment of this invention. この発明の第3の実施形態に係るマルチコアプロセッサにおける処理の流れを示すフローチャート。The flowchart which shows the flow of a process in the multi-core processor which concerns on the 3rd Embodiment of this invention. この発明の第3の実施形態に係るマルチコアプロセッサのブロック図。The block diagram of the multi-core processor which concerns on 3rd Embodiment of this invention. この発明の第3の実施形態に係るマルチコアプロセッサのブロック図。The block diagram of the multi-core processor which concerns on 3rd Embodiment of this invention. この発明の第3の実施形態に係るマルチコアプロセッサのブロック図。The block diagram of the multi-core processor which concerns on 3rd Embodiment of this invention.

符号の説明Explanation of symbols

1…プロセッサ、2、148…汎用レジスタ、10…第1演算器、11−0〜11−3、21−0〜21−3、62−0〜62−3…第1演算部、12、64…第2演算部、13、15、17、84−0〜84−3…デコーダ、14、16、18、31〜41、45〜48、68、69、70、80−0A〜80−3A、80−0B〜80−3B、81−0〜81−3、82…マルチプレクサ、19、83…マスク論理、20…第2演算器、30、145…ロードストアユニット、42〜44、55、57、59、61、63−0〜63−3、65〜67、72〜75、85…フリップフロップ、50…積和演算器、51…算術演算器、52…論理演算器、53…シャッフラー、54…乗算器、56…加算器、58、60…演算器、71…メモリ、90…プロセッサシステム、91…ホストPC、92…マルチコアプロセッサ、93、144…ローカルメモリ、94…CPU、95…VRAM、96…GPU、97…メインメモリ、98…第1接続部、99…第2接続部、100…第1プロセッサ、110…DMAコントローラ、120…第1デコーダ、130…第2デコーダ、140…第2プロセッサ、160…ホストインターフェース、170…メモリコントローラ、141…チャネルインターフェース、142…分岐命令実行部、143…DMAインターフェース、146…バッファ制御部、147…命令バッファ、149…オペランド供給ネットワーク、150…浮動小数点演算部、151…整数演算部   DESCRIPTION OF SYMBOLS 1 ... Processor 2, 148 ... General-purpose register, 10 ... 1st calculator, 11-0-11-3, 21-0-21-3, 62-0-62-3 ... 1st calculating part, 12, 64 ... 2nd calculating part, 13, 15, 17, 84-0-84-3 ... Decoder, 14, 16, 18, 31-41, 45-48, 68, 69, 70, 80-0A-80-3A, 80-0B to 80-3B, 81-0 to 81-3, 82 ... Multiplexer, 19, 83 ... Mask logic, 20 ... Second arithmetic unit, 30, 145 ... Load store unit, 42-44, 55, 57, 59, 61, 63-0 to 63-3, 65 to 67, 72 to 75, 85 ... flip-flop, 50 ... product-sum operation unit, 51 ... arithmetic operation unit, 52 ... logic operation unit, 53 ... shuffler, 54 ... Multiplier 56 ... Adder 58, 60 ... Calculator 71 ... Me 90 ... Processor system, 91 ... Host PC, 92 ... Multi-core processor, 93, 144 ... Local memory, 94 ... CPU, 95 ... VRAM, 96 ... GPU, 97 ... Main memory, 98 ... First connection unit, 99 ... Second connection unit 100 ... first processor 110 ... DMA controller 120 ... first decoder 130 ... second decoder 140 ... second processor 160 ... host interface 170 ... memory controller 141 ... channel interface 142 ... branch instruction execution unit, 143 ... DMA interface, 146 ... buffer control unit, 147 ... instruction buffer, 149 ... operand supply network, 150 ... floating point operation unit, 151 ... integer operation unit

Claims (5)

複数ビットを一つのデータ単位とするSIMD命令を、複数の処理サイクルにより実行する演算器であって、
前記データ単位間でのビットの移動を伴うことなく、それぞれ前記データ単位毎に第1演算を行う複数の第1演算部と、
前記データ単位間でのビットの移動を伴う第2演算を行う第2演算部と
を具備し、前記第1演算と前記第2演算とにより前記SIMD命令が実行され、且つ前記第1演算と前記第2演算とは、互いに1処理サイクル以上のレイテンシを有して実行される
ことを特徴とする演算器。
An arithmetic unit that executes a SIMD instruction having a plurality of bits as one data unit in a plurality of processing cycles,
A plurality of first calculation units that perform a first calculation for each data unit without moving a bit between the data units;
A second operation unit that performs a second operation with a bit shift between the data units, the SIMD instruction is executed by the first operation and the second operation, and the first operation and the second operation The second operation is executed with a latency of one processing cycle or more.
前記SIMD命令は、シャッフル命令、ローテート命令、及びシフト命令の少なくともいずれかである
ことを特徴とする請求項1記載の演算器。
The arithmetic unit according to claim 1, wherein the SIMD instruction is at least one of a shuffle instruction, a rotate instruction, and a shift instruction.
複数の処理ステージを用いてパイプライン動作を行う半導体集積回路装置であって、
複数ビットを一つのデータ単位とするSIMD命令を、複数の前記処理ステージを用いて実行する演算器を具備し、
前記演算器は、第i処理ステージ(iは1以上の自然数)において、前記データ単位間でのビットの移動を伴うことなく、前記データ単位毎に第1演算を行い、
第(i+j)処理ステージ(jは1以上の自然数)において、前記データ単位間でのビットの移動を伴う第2演算を行う
ことを特徴とする半導体集積回路装置。
A semiconductor integrated circuit device that performs a pipeline operation using a plurality of processing stages,
An arithmetic unit that executes a SIMD instruction having a plurality of bits as one data unit using a plurality of the processing stages;
The computing unit performs a first computation for each data unit in the i-th processing stage (i is a natural number equal to or greater than 1) without moving a bit between the data units,
A semiconductor integrated circuit device characterized in that, in an (i + j) th processing stage (j is a natural number equal to or greater than 1), a second operation involving bit movement between the data units is performed.
前記データ単位毎に設けられ、前記演算器における演算内容を制御する制御データを保持する複数のレジスタを更に備え、
前記第1演算において、前記レジスタの各々に保持される前記制御データは、前記データ単位毎の前記第1演算にそれぞれ使用される
ことを特徴とする請求項3記載の半導体集積回路装置。
A plurality of registers that are provided for each data unit and hold control data for controlling calculation contents in the calculator;
4. The semiconductor integrated circuit device according to claim 3, wherein in the first operation, the control data held in each of the registers is used for the first operation for each data unit. 5.
前記演算器によって実行される前記SIMD命令は、シャッフル命令、ローテート命令、及びシフト命令の少なくともいずれかである
ことを特徴とする請求項4記載の半導体集積回路装置。
The semiconductor integrated circuit device according to claim 4, wherein the SIMD instruction executed by the arithmetic unit is at least one of a shuffle instruction, a rotate instruction, and a shift instruction.
JP2008134001A 2008-05-22 2008-05-22 Computing unit and semiconductor integrated circuit device Withdrawn JP2009282744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008134001A JP2009282744A (en) 2008-05-22 2008-05-22 Computing unit and semiconductor integrated circuit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008134001A JP2009282744A (en) 2008-05-22 2008-05-22 Computing unit and semiconductor integrated circuit device

Publications (1)

Publication Number Publication Date
JP2009282744A true JP2009282744A (en) 2009-12-03

Family

ID=41453137

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008134001A Withdrawn JP2009282744A (en) 2008-05-22 2008-05-22 Computing unit and semiconductor integrated circuit device

Country Status (1)

Country Link
JP (1) JP2009282744A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2333921A2 (en) 2009-12-14 2011-06-15 Yazaki Corporation Electrical junction box
CN102109976A (en) * 2009-12-26 2011-06-29 英特尔公司 Rotate instructions that complete execution without reading carry flag
JP2011128909A (en) * 2009-12-17 2011-06-30 Toshiba Corp Image processing apparatus and method
JP2017529601A (en) * 2014-09-25 2017-10-05 インテル・コーポレーション Bit shuffle processor, method, system, and instructions
WO2018101167A1 (en) * 2016-12-01 2018-06-07 ヤマハ株式会社 Processor and arithmetic processing device equipped with processor

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2333921A2 (en) 2009-12-14 2011-06-15 Yazaki Corporation Electrical junction box
JP2011128909A (en) * 2009-12-17 2011-06-30 Toshiba Corp Image processing apparatus and method
JP2017016712A (en) * 2009-12-26 2017-01-19 インテル・コーポレーション Multi-core processor, system on chip, and mobile phone
JP2011138499A (en) * 2009-12-26 2011-07-14 Intel Corp Rotate instruction that completes execution without reading carry flag
JP2015038766A (en) * 2009-12-26 2015-02-26 インテル・コーポレーション Multi-core processor, system on chip, and mobile phone
US9164762B2 (en) 2009-12-26 2015-10-20 Intel Corporation Rotate instructions that complete execution without reading carry flag
CN102109976A (en) * 2009-12-26 2011-06-29 英特尔公司 Rotate instructions that complete execution without reading carry flag
US9916160B2 (en) 2009-12-26 2018-03-13 Intel Corporation Rotate instructions that complete execution either without writing or reading flags
US9940130B2 (en) 2009-12-26 2018-04-10 Intel Corporation Rotate instructions that complete execution either without writing or reading flags
US9940131B2 (en) 2009-12-26 2018-04-10 Intel Corporation Rotate instructions that complete execution either without writing or reading flags
US11106461B2 (en) 2009-12-26 2021-08-31 Intel Corporation Rotate instructions that complete execution either without writing or reading flags
US11900108B2 (en) 2009-12-26 2024-02-13 Intel Corporation Rotate instructions that complete execution either without writing or reading flags
JP2017529601A (en) * 2014-09-25 2017-10-05 インテル・コーポレーション Bit shuffle processor, method, system, and instructions
US10713044B2 (en) 2014-09-25 2020-07-14 Intel Corporation Bit shuffle processors, methods, systems, and instructions
WO2018101167A1 (en) * 2016-12-01 2018-06-07 ヤマハ株式会社 Processor and arithmetic processing device equipped with processor

Similar Documents

Publication Publication Date Title
KR102346079B1 (en) vector calculation unit
US10846089B2 (en) Unified logic for aliased processor instructions
TWI496080B (en) Transpose instruction
JP4277042B2 (en) Arithmetic processing unit
US5487022A (en) Normalization method for floating point numbers
KR100497078B1 (en) Program product and data processor
TWI517031B (en) Vector instruction for presenting complex conjugates of respective complex numbers
TWI517038B (en) Instruction for element offset calculation in a multi-dimensional array
JP4934356B2 (en) Video processing engine and video processing system including the same
CN110678840A (en) Tensor register file
JP2020533691A (en) Efficient direct convolution using SIMD instructions
US9513908B2 (en) Streaming memory transpose operations
CN110678841A (en) Tensor processor instruction set architecture
KR102118836B1 (en) Shuffler circuit for rain shuffle in SIMD architecture
US8959275B2 (en) Byte selection and steering logic for combined byte shift and byte permute vector unit
JP2006012182A (en) Data processing system and method thereof
CN107533460B (en) Compact Finite Impulse Response (FIR) filter processor, method, system and instructions
KR20060056855A (en) Processor
US7013321B2 (en) Methods and apparatus for performing parallel integer multiply accumulate operations
JP2009282744A (en) Computing unit and semiconductor integrated circuit device
TW201941047A (en) Circuit to perform dual input value absolute value and sum operation
US8874881B2 (en) Processors operable to allow flexible instruction alignment
US20170150175A1 (en) Faster and more efficient different precision sum of absolute differences for dynamically configurable block searches for motion estimation
US20080059763A1 (en) System and method for fine-grain instruction parallelism for increased efficiency of processing compressed multimedia data
US7558816B2 (en) Methods and apparatus for performing pixel average operations

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110802