JP3059441B2 - Hadamard converter - Google Patents

Hadamard converter

Info

Publication number
JP3059441B2
JP3059441B2 JP63141828A JP14182888A JP3059441B2 JP 3059441 B2 JP3059441 B2 JP 3059441B2 JP 63141828 A JP63141828 A JP 63141828A JP 14182888 A JP14182888 A JP 14182888A JP 3059441 B2 JP3059441 B2 JP 3059441B2
Authority
JP
Japan
Prior art keywords
input
clock
sum
matrix
difference
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.)
Expired - Fee Related
Application number
JP63141828A
Other languages
Japanese (ja)
Other versions
JPH01311367A (en
Inventor
充 前田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP63141828A priority Critical patent/JP3059441B2/en
Publication of JPH01311367A publication Critical patent/JPH01311367A/en
Application granted granted Critical
Publication of JP3059441B2 publication Critical patent/JP3059441B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は所定の入力マトリクスにアダマール変換を施
すアダマール変換器に関するものである。
Description: TECHNICAL FIELD The present invention relates to a Hadamard transformer for performing a Hadamard transform on a predetermined input matrix.

[従来の技術] 第7図は、直交変換器の一般的な使用方法である。一
般にn行n列のマトリクスの演算を行う場合、入力マト
リクスを構成するためのnライン分のバツフア1が必要
不可欠である。このnライン部のデータが直交変換器2
に入力され、変換結果が信号処理部3に出力される。従
つて、直交変換器2には1列分のn個のデータが一度に
入力される。
[Prior Art] FIG. 7 shows a general method of using an orthogonal transformer. In general, when performing a matrix operation of n rows and n columns, a buffer 1 for n lines for forming an input matrix is indispensable. The data of this n-line part is orthogonal transform 2
And the conversion result is output to the signal processing unit 3. Therefore, n data for one column are input to the orthogonal transformer 2 at a time.

第8図は従来例の直交変換器の構成例である。ここで
は、説明の為に4×4のアダマール変換を例にとり、回
路構成は高速アダマール変換アルゴリズムに基づくもの
を説明する。11a〜11pはラツチであり、1列分の4要素
の入力をラツチし、4×4要素をパラレル出力する。12
a〜12dは加減算器群からなる演算器であり、13は出力用
のラツチである。このアダマール変換を実現するために
は、32組のラツチと演算器12a〜12d内に64個の加減算器
が必要である。
FIG. 8 shows a configuration example of a conventional orthogonal transformer. Here, a 4 × 4 Hadamard transform is taken as an example for description, and a circuit configuration based on a high-speed Hadamard transform algorithm will be described. Latches 11a to 11p latch input of four elements for one column and output 4 × 4 elements in parallel. 12
Reference numerals a to 12d denote arithmetic units composed of adder / subtractor groups, and reference numeral 13 denotes an output latch. In order to realize this Hadamard transformation, 32 sets of latches and 64 adders / subtracters in the arithmetic units 12a to 12d are required.

このため、各要素を8ビツトの入力とすると、出力は
10ビツトとなり、データの入出力ピンだけで196ピンと
なつてしまい、これらの規模からハードウエア化更にIC
化が困難であつた。また、従来の直交変換器を駆動する
には複雑な制御を必要とした。
Therefore, if each element is an 8-bit input, the output is
It becomes 10 bits, and only 196 pins are used for data input / output pins.
Was difficult. Further, driving the conventional orthogonal transformer required complicated control.

[発明が解決しようとする課題] 本発明は、上述従来例の欠点を除去し、ハードウエア
の規模を縮小するとともに簡易なクロツクで高速に演算
処理を行うアダマール変換器を提供する。
[Problems to be Solved by the Invention] The present invention provides a Hadamard converter that eliminates the above-mentioned drawbacks of the conventional example, reduces the scale of hardware, and performs high-speed arithmetic processing with a simple clock.

[課題を解決するための手段] この課題を解決するために、本発明のアダマール変換
器は、2×2の入力マトリクスに対してアダマール変換
を施し、2×2の出力マトリクスを得るアダマール変換
器において、上記入力マトリクスの第1の方向に並んだ
要素信号を並列に、前記第1の方向と直交する第2の方
向に並んだ要素信号を順次に入力する入力手段と、2要
素の和及び差を計算するための加算器及び減算器を1組
備え、前記入力手段により入力された要素信号に対し
て、前記第1の方向に並んだ要素信号間の和及び差演算
を行なって、前記第1の方向に並んだ2つの変換信号を
順次に得る第1の変換手段と、2要素の和及び差を計算
するための加算器及び減算器を1組備え、前記第1の変
換手段により得られた前記変換信号を選択して入力し、
前記第2の方向に並んだ変換信号間の和及び差演算を行
って、前記第2の方向に沿って2つのアダマール変換係
数を順次に2つずつ出力することで、2×2個のアダマ
ール変換係数を得る第2の変換手段とを有することを特
徴とする。
Means for Solving the Problems To solve this problem, a Hadamard transformer according to the present invention performs a Hadamard transform on a 2 × 2 input matrix to obtain a 2 × 2 output matrix. , An input means for sequentially inputting element signals arranged in a first direction of the input matrix and sequentially inputting element signals arranged in a second direction orthogonal to the first direction; A set of adder and subtractor for calculating the difference, performing a sum and difference operation between the element signals arranged in the first direction on the element signals input by the input means, A first conversion means for sequentially obtaining two conversion signals arranged in a first direction, and a set of an adder and a subtractor for calculating the sum and difference of the two elements; Select the obtained converted signal The force,
A sum and difference operation between the converted signals arranged in the second direction is performed, and two Hadamard transform coefficients are sequentially output two by two along the second direction, whereby 2 × 2 Hadamard transform coefficients are obtained. And second conversion means for obtaining a conversion coefficient.

又、本発明の他の構成のアダマール変換器は、4×4
の入力マトリクスに対してアダマール変換を施し、4×
4の出力マトリクスを得るアダマール変換器において、
上記入力マトリクスの第1の方向に並んだ要素信号を並
列に、前記第1の方向と直交する第2の方向に並んだ要
素信号を順次に入力する入力手段と、2要素の和及び差
を計算するための加算器及び減算器を2組ずつ2段備
え、前記入力手段により入力された要素信号に対して、
前記第1の方向に並んだ要素信号間の和及び差演算を2
段階行なって、前記第1の方向に並んだ4つの変換信号
を順次に得る第1の変換手段と、2要素の和及び差を計
算するための加算器及び減算器を2組ずつ2段備え、前
記第1の変換手段により得られた前記変換信号を選択し
て入力し、前記第2の方向に並んだ変換信号間の和及び
差演算を2段階行って、前記第2の方向に沿って4つの
アダマール変換係数を順次に4つずつ出力することで、
4×4個のアダマール変換係数を得る第2の変換手段と
を有することを特徴とする。
A Hadamard transformer having another configuration according to the present invention has a 4 × 4
Hadamard transform is applied to the input matrix of
In a Hadamard transformer that obtains an output matrix of 4,
Input means for sequentially inputting element signals arranged in a first direction of the input matrix and sequentially inputting element signals arranged in a second direction orthogonal to the first direction; An adder and a subtractor for calculation are provided in two stages each of two sets, and the element signal input by the input means is
The sum and difference operations between the element signals arranged in the first direction are calculated by 2
A first conversion means for sequentially obtaining four conversion signals arranged in the first direction, and two sets of adders and subtractors for calculating the sum and difference of the two elements, two stages each; , Selecting and inputting the converted signal obtained by the first converting means, performing a sum and difference operation between the converted signals arranged in the second direction in two steps, and performing the calculation in the second direction. By outputting the four Hadamard transform coefficients sequentially four by four,
Second conversion means for obtaining 4 × 4 Hadamard transform coefficients.

[実施例] 以下、実施例を挙げて説明する。本実施例では、アダ
マール変換を例にとつて説明する。
[Example] Hereinafter, an example will be described. In this embodiment, a Hadamard transform will be described as an example.

まずアダマール変換の概略を記述する。これはアダマ
ール行列による線形変換である。ここでは、2行2列の
アダマール変換の例を示す。今、第9図の(a)に示す
ような2行2列のマトリクスを、1次元ベクトルXに配
列する。
First, the outline of the Hadamard transform is described. This is a linear transformation using a Hadamard matrix. Here, an example of the Hadamard transform of two rows and two columns is shown. Now, a matrix of 2 rows and 2 columns as shown in FIG. 9A is arranged in a one-dimensional vector X.

つまり、Xは X=[x11,x12,x21,x22 …(1) ただし、Tは転置行列を表わす。That is, X is X = [x 11 , x 12 , x 21 , x 22 ] T (1) where T represents a transposed matrix.

これに、4×4のアダマール行列H2を用いてアダマー
ル変換を施した結果を、第9図の(b)に示したような
2行2列のマトリクスを1次元ベクトルで表わしたYと
する。
Thereto, and Y a result of performing a Hadamard transformation, and the two rows and two columns of the matrix as shown in the FIG. 9 (b) represents a one-dimensional vector using a Hadamard matrix of H 2 4 × 4 .

つまり、Yは Y=[y11,y12,y21,y22 …(2) である。That is, Y is Y = [y 11 , y 12 , y 21 , y 22 ] T (2).

アダマール変換の式から となる。From the Hadamard transform equation Becomes

ここで、アダマール行列H2は、 である。従つて、Yの各要素は以下のように求められ
る。
Where the Hadamard matrix H 2 is It is. Therefore, each element of Y is obtained as follows.

y11=1/2(x11+x12+x21+x22) y12=1/2(x11+x12−x21−x22) y21=1/2(x11−x12−x21+x22) y22=1/2(x11−x12+x21−x22) <第1実施例> 第1図は第1実施例の直交変換器の構成図である。19
は外部からクロツクを入力する端子、20,21は外部例え
ば2ラインバツフアから入力マトリクスの1列分のデー
タをとり込む端子、22a,22bは入力されたデータをラツ
チするラツチ、23は2項加算器、24は2項減算器であ
る。25a〜25eは、加算器23又は減算器24からの出力をシ
フトしてラツチするためのラツチ、26a,26bはセレク
タ、27は2項加算器、28は2項減算器、29a,29bは結果
を出力するためのラツチ、30a,30bは結果を出力する端
子、31は2進カウンタである。
y 11 = 1/2 (x 11 + x 12 + x 21 + x 22) y 12 = 1/2 (x 11 + x 12 -x 21 -x 22) y 21 = 1/2 (x 11 -x 12 -x 21 + x 22 ) y 22 = 1/2 (x 11 −x 12 + x 21 −x 22 ) <First Embodiment> FIG. 1 is a configuration diagram of the orthogonal transformer of the first embodiment. 19
Is a terminal for inputting a clock from outside, 20 and 21 are terminals for taking in data of one column of an input matrix from an external line buffer, for example, two lines buffer, 22a and 22b are latches for latching input data, and 23 is a binomial adder. , 24 are binary term subtractors. 25a to 25e are latches for shifting and latching the output from the adder 23 or the subtractor 24, 26a and 26b are selectors, 27 is a binomial adder, 28 is a binomial subtractor, and 29a and 29b are results. , 30a and 30b are terminals for outputting a result, and 31 is a binary counter.

第2図は第1実施例の直交変換器の動作を示すタイミ
ングチヤートである。このタイミングチヤートに従つ
て、各々の動作を述べる。端子19からクロツクCLKが供
給される。このクロツクにあわせて外部からベクトルX
の1列分のデータが供給される。
FIG. 2 is a timing chart showing the operation of the orthogonal transformer of the first embodiment. Each operation will be described according to the timing chart. A clock CLK is supplied from a terminal 19. Vector X from outside according to this clock
Is supplied for one column.

第1クロツクの立上がりで、端子20からInput 1とし
てx11を、端子21からInput 2としてx21を力する。
The rise of the first clock, the x 11 as Input 1 from the terminal 20, to force the x 21 from the terminal 21 as Input 2.

第2クロツクの立上がりで、x11,x21の各要素をラッ
チ22a,22bにラッチし、端子20,21からx12,x22を入力す
る。
The rise of the second clock, latch each element of x 11, x 21 latches 22a, to 22b, to enter the x 12, x 22 from the terminal 20, 21.

第3クロツクの立上がりで、ラッチ22a,22bの出力の
内容x11,x21を2項加算器23で加算して(x11+x21)を
求め、2項減算器24で減算して(x11−x21)を求め、ラ
ッチ25a,25bにラッチすると同時に、x12,x22をラッチ22
a,22bにラッチする。
The third is the rise of the clock, by adding the latch 22a, the output of 22b contents x 11, x 21 with binomial adder 23 obtains the (x 11 + x 21), and subtracted binomial subtractor 24 (x 11 -x 21) the determined at the same time the latch 25a, which latch to 25b, latches x 12, x 22 22
Latch to a, 22b.

第4クロツクの立上がりで、ラッチ25a,25bの出力の
内容(x11+x21),(x11−x21)をラツチ25c,25dにラ
ツチし、2項加算器23及び2項減算器24の出力(x12+x
22),(x12−x22)をラツチ25a,25bにラツチする。こ
こで、2進カウンタ31の出力信号Sel1に従つて、セレク
タ26a,26bの出力が選択される。セレクタ26a,26bは、Se
l1が“1"のときラツチ25d,25eの内容を出力する。従つ
て、この第4クロツクの間はSel1が“0"でラッチ25a,25
cが選択され、セレクタ26a,26bの出力は、それぞれ(x
12+x22),(x11+x21)である。この出力は2項加算
器27で加算され、さらに1/2されて、実際には右に1つ
シフトされ、 1/2(x11+x12+x21+x22)を求め、 2項減算器28では減算され、1/2されて、 1/2(x11−x12+x21−x22)を求める。
The rise of the fourth clock, the latch 25a, the contents of the output of 25b (x 11 + x 21) , (x 11 -x 21) the latch 25c, and latches to 25d, the second term adders 23 and binomial subtractor 24 output (x 12 + x
22 ) and (x 12 −x 22 ) are latched on the latches 25a and 25b. Here, the outputs of the selectors 26a and 26b are selected according to the output signal Sel 1 of the binary counter 31. The selectors 26a and 26b
l When 1 is "1", the contents of the latches 25d and 25e are output. Therefore, during this fourth clock, Sel1 is "0" and the latches 25a, 25
c is selected, and the outputs of the selectors 26a and 26b are (x
12 + x 22), a (x 11 + x 21). This output is summed with binomial adder 27, is further 1/2 actually be shifted one to the right, we obtain the 1/2 (x 11 + x 12 + x 21 + x 22), 2 Section subtractor 28 Is subtracted and halved to obtain 1/2 (x 11 −x 12 + x 21 −x 22 ).

第5クロツクの立上がりでは、ラツチ25dの内容(x11
−x21)がラツチ25eにラツチされ、ラツチ25a,25bの内
容(x12+x22),(x12−x22)がラツチ25c,25dにラツ
チされる。また、第4クロツク中に求められた2項加算
器27及び2項減算器28の出力の1/2がラツチ29a,29bにラ
ツチされ、出力端子30a,30bから出力される。
At the rise of the fifth clock, the contents of the latch 25d (x 11
−x 21 ) is latched on the latch 25 e, and the contents (x 12 + x 22 ) and (x 12 −x 22 ) of the latches 25 a and 25 b are latched on the latches 25 c and 25 d. Further, half of the outputs of the binomial adder 27 and the binomial subtractor 28 obtained during the fourth clock are latched by the latches 29a and 29b and output from the output terminals 30a and 30b.

端子30aからの、 1/2(x11+x12+x21+x22), 端子30bからの、 1/2(x11−x12+x21−x22) は、アダマール変換された結果のベクトルYのy11,y22
にほかならない。この第5クロツク内では、2項加算器
27及び2項減算器28には、セレクタ26a,26bで選択され
たラツチ25d及び25eの出力が入力され、 1/2(x11+x12−x21−x22)及び 1/2(x11−x12−x21+x22)が求められる。
From the terminal 30a, 1/2 (x 11 + x 12 + x 21 + x 22), from the terminal 30b, 1/2 (x 11 -x 12 + x 21 -x 22) is the result of the Hadamard transform of the vector Y y 11 , y 22
It is nothing less than. In this fifth clock, a binomial adder
27 and the binomial subtractor 28, the output of the latch 25d and 25e, which are selected by the selector 26a, 26b is input, 1/2 (x 11 + x 12 -x 21 -x 22) and 1/2 (x 11 −x 12 −x 21 + x 22 ).

そして最後に第6クロツクの立上がりにて、これらの
結果がラツチ29a,29bにラツチされ、出力ベクトルYのy
12,y21として単子30a,30bから出力される。
Finally, at the rising edge of the sixth clock, these results are latched on the latches 29a and 29b, and y of the output vector Y is calculated.
12, y 21 as Monads 30a, is outputted from 30b.

連続して次のマトリクスを処理する場合は、その前の
マトリクスの処理の第3クロツクを、第1クロツクとし
て外部から端子20,21を通して入力すればよい。このよ
うにして連続して変換処理が可能である。
When processing the next matrix continuously, the third clock of the processing of the previous matrix may be input from the outside through the terminals 20 and 21 as the first clock. Thus, the conversion process can be continuously performed.

<第2実施例> 第3図は第2実施例の直交変換器の構成図である。53
a〜53dは外部から入力マトリクスの1列分のデータをと
り込む端子、54a〜54dは入力されたデータをラツチする
ラツチ、55a,55b、58a,58b、63a,63b、71a,71bは2項加
算器、56a,56b、59a,59b、64a,64b、72a,72bは2項減算
器、57a〜57d、70a〜70dはタイミングを調整するための
ラツチ、60a〜60vは2項加算器55a,55b、58a,2項減算器
56a,56b、59a,59b、とラツチ57a〜57dからなる第1の演
算部からの出力をシフトしてラツチするためのラツチ、
61,75はセレクタを制御するための4進カウンタ及びデ
コーダ、62a〜62dはセレクタ、70a〜70dはタイミングを
調整するためのラツチ、74a〜74dは出力マトリクスの1
行分を出力する出力端子である。
Second Embodiment FIG. 3 is a configuration diagram of an orthogonal transformer according to a second embodiment. 53
a to 53d are terminals for taking in data of one column of the input matrix from the outside, 54a to 54d are latches for latching input data, 55a, 55b, 58a, 58b, 63a, 63b, 71a, 71b are 2 items Adders, 56a, 56b, 59a, 59b, 64a, 64b, 72a, 72b are binomial subtractors, 57a to 57d, 70a to 70d are latches for adjusting timing, and 60a to 60v are binomial adders 55a, 55b, 58a, binomial subtractor
A latch for shifting and latching the output from the first arithmetic unit consisting of 56a, 56b, 59a, 59b, and latches 57a to 57d;
61 and 75 are quaternary counters and decoders for controlling selectors, 62a to 62d are selectors, 70a to 70d are latches for adjusting timing, and 74a to 74d are ones of output matrices.
This is an output terminal that outputs the line.

第4A図〜第4D図は第2実施例の直交変換器の動作を表
わすタイミングチヤートである。このタイミングチヤー
トに従つて、各々の動作を述べる。ここで、特にクロツ
クの信号CLKを第3図では図示していないが、各ラツチ
及びカウンタに入力されている。今、入力マトリクスの
各要素が8ビツトのデータをもつていて、以下の様な入
力マトリクスが入力されたとし、4行4列のアダマール
変換を実施する直交変換器を例にとり説明する。4行4
列のアダマール行列Hは、次の(6)式の通りである。
4A to 4D are timing charts showing the operation of the orthogonal transformer of the second embodiment. Each operation will be described according to the timing chart. Here, the clock signal CLK is not shown in FIG. 3, but is input to each latch and counter. Now, assuming that each element of the input matrix has 8-bit data and the following input matrix is input, a quadrature transformer that performs Hadamard transform of 4 rows and 4 columns will be described as an example. 4 rows 4
The Hadamard matrix H of a column is as in the following equation (6).

入力されるマトリクスMの一例は16進で以下の通りで
ある場合について説明する。
An example of the input matrix M in hexadecimal is as follows.

まず第4A図に従つて、第1クロツクの立上がりで、端
子53a〜53dからのマトリクスMの第1列の4要素(A0,9
2,99,9C)が入力される。以下クロツクが進む毎に、端
子53a〜53dからMの第2列,第3列,第4列と入力され
る。ラツチ54a〜54dは第2クロツクの立上がりで、Mの
第1列のデータをラツチする。以下クロツクが進む毎
に、第2,3,4列と順次ラツチする。この時、2項加算器5
5a,55b、2項減算器56a,56bは、それぞれ第1行と第2
行との和(x1i+x2i),第3行と第4行との和(x3i+x
4i),第1行と第2行との差(x1i−x2i)及び第3行と
第4行との差(x3i−x4i)を求める。
First, referring to FIG. 4A, at the rising edge of the first clock, the four elements (A0,9) of the first column of the matrix M from the terminals 53a to 53d.
2,99,9C) is input. Thereafter, every time the clock advances, the second, third and fourth columns of M are input from the terminals 53a to 53d. Latches 54a to 54d latch the data of the first column of M at the rise of the second clock. Thereafter, every time the clock advances, the second, third and fourth rows are sequentially latched. At this time, binomial adder 5
5a, 55b, the binomial subtractors 56a, 56b respectively
Sum with the row (x 1i + x 2i ), sum of the third and fourth rows (x 3i + x
4i ), the difference (x 1i −x 2i ) between the first and second rows and the difference (x 3i −x 4i ) between the third and fourth rows are determined.

第3クロツクの立上がりで、第1列のそれらの結果が
ラツチ57a〜57dにラツチされ、以下クロツクが進む毎
に、第2列,第3列と続いてラツチされると同時に、2
項加算器58a,58b及び2項減算器59a,59bがそれぞれ、 (x1i+x2i+x3i+x4i), (x1i−x2i+x3i−x4i), (x1i+x2i−x3i−x4i), (x1i−x2i−x3i+x4i)を求める。
At the rising edge of the third clock, the results of the first row are latched into latches 57a-57d, and thereafter, as the clock progresses, the second row and the third row are latched successively.
Term adders 58a, 58b and binomial subtractors 59a, 59b, respectively, (x 1i + x 2i + x 3i + x 4i), (x 1i -x 2i + x 3i -x 4i), (x 1i + x 2i -x 3i - x 4i ) and (x 1i −x 2i −x 3i + x 4i ).

以下、第4B図に移る。第4クロツクの立上がりで、ラ
ツチ60a〜60dが第1列の演算結果をラツチする。第1列
の演算結果は第5クロツクの立上がりでラツチ60e〜60
l、第6クロツクの立上がりでラツチ60i〜60e、第7ク
ロツクの立上がりでラツチ60m〜60Pにラツチされる。
Hereinafter, it will move to FIG. 4B. At the rising edge of the fourth clock, the latches 60a to 60d latch the operation results in the first column. The result of the operation in the first column is latch 60e-60 at the rising edge of the fifth clock.
l. Latches 60i to 60e at the rising edge of the sixth clock and 60m to 60P at the rising edge of the seventh clock.

以下、第4C図に移る。第8クロツクの立上がりで、第
2,3,4列のデータがラツチ60g〜60s、第9クロツクの立
上がりで第3,4行のデータがラツチ60t,60u、そして第10
クロツクの立上がりで第4行のデータがラツチ60vにラ
ツチされる。さらに続いて、第2列のデータが第5クロ
ツクの立上がりに、第3列のデータが第6クロツクの立
上がりに、第4列のデータが第7クロツクの立上がり
に、ラツチ60a〜60dにラツチされ、同様にラツチ60e〜6
0h→ラツチ60i〜60l→ラツチ60m〜ラツチ60p→ラツチ60
g〜60s→ラツチ60t,60u→ラツチ60vへと、クロツクが進
む毎にシフトされていく。
Hereinafter, it will move to FIG. 4C. At the rise of the eighth clock, the
The data in columns 2, 3, and 4 are latches 60g-60s, and the data in rows 3 and 4 at the rising edge of the ninth clock are latches 60t, 60u, and 10th.
At the rising edge of the clock, the data in the fourth row is latched to the latch 60v. Subsequently, the data in the second column is latched to the rising edge of the fifth clock, the data in the third column is latched to the rising edge of the sixth clock, and the data in the fourth column is latched to latches 60a to 60d at the rising edge of the seventh clock. , As well as a latch 60e-6
0h → Latch 60i ~ 60l → Latch 60m ~ Latch 60p → Latch 60
The gear shifts from g to 60s → latch 60t, 60u → latch 60v as the clock advances.

カウンタ61は、第7クロツクの立上がりまで“0"で、
以下クロツクが進む毎に立上がりでカウントアツプして
いく4進カウンタである。この出力をデコーダ75でデコ
ードし、4ビツトのセレクタ選択信号Sel2とする。この
4ビツトのセレクタ信号Sel2の第0ビツト目が“1"の
時、即ち第7クロツクでは、ラツチ60a,60e,60i,60mの
出力を選択する。第1ビツト目が“1"の時、即ち第8ク
ロツクでは、ラツチ60f,60j,60n,60qの出力を選択す
る。以下、第2ビツトが“1"の時、即ち第9クロツクで
は、ラツチ60k,60o,60r,60tの出力を選択し、第3ビツ
トが“1"の時、即ち第10クロツクでは、ラツチ60p,60s,
60u,60vのデータを選択する。
The counter 61 is "0" until the rising edge of the seventh clock.
Hereafter, it is a quaternary counter that counts up at the rising edge every time the clock advances. The output decoded by the decoder 75, the selector selection signal Sel 2 of 4 bits. When the 4 bit 0th bit th selector signal Sel 2 is "1", i.e. in the seventh clock, latch 60a, 60e, 60i, selects the output of 60 m. When the first bit is "1", that is, at the eighth clock, the outputs of the latches 60f, 60j, 60n, and 60q are selected. Hereinafter, when the second bit is "1", that is, at the ninth clock, the outputs of the latches 60k, 60o, 60r, and 60t are selected. When the third bit is "1", that is, at the tenth clock, the latch 60p is selected. , 60s,
Select 60u, 60v data.

このように選択された各データは、2項加算器63a,63
bと2項減算器64a,64bとに入力され加減算を行う。各演
算器の出力は、第7クロツクの時を例にとれば、 以下、第4D図に移る。上記結果は、ラツチ70a〜70dに
ラツチされる。第8クロツクの立上がりで、最初のデー
タがラツチされると同時に、2項加算器71a,71b、2項
減算器72a,72bが、これらラツチ70a〜70dにラツチされ
たデータに対して加減算を行つて1/4を乗ずる。実際に
は右に2桁シフトする。この結果をラツチ73a〜73dがラ
ツチして、出力端子74a〜74dから出力される。ラツチ73
a〜73dには、最初のデータが第9クロツクの立上がりで
ラツチされる。このときの内容はラツチ73a〜73dがそれ
ぞれ、 となる。これはアダマール変換後の出力マトリクスYの
第1行y11,y12,y13,y14にほかならない。
Each of the data selected in this manner is converted into a binary adder 63a, 63
b and input to the binomial subtractors 64a and 64b to perform addition and subtraction. The output of each arithmetic unit is, for example, the time of the seventh clock, Hereinafter, the process moves to FIG. 4D. The above results are latched into latches 70a-70d. At the rise of the eighth clock, the first data is latched, and simultaneously, the binomial adders 71a and 71b and the binomial subtractors 72a and 72b perform addition and subtraction on the data latched by the latches 70a to 70d. And multiply by 1/4. Actually, it shifts two places to the right. The results are latched by latches 73a to 73d and output from output terminals 74a to 74d. Latch 73
In a to 73d, the first data is latched at the rising edge of the ninth clock. At this time, the contents of the latches 73a to 73d are as follows. Becomes This nothing but the first row y 11, y 12, y 13 , y 14 of the output matrix Y after Hadamard transform.

連続して次のマトリクスを処理する場合は、前のマト
リクスの処理の第5クロツクを、後のマトリクス処理の
第1クロツクとして外部から続けて端子53a〜53dにデー
タを入力すれば、それが第1列となり、前のマトリクス
の結果が出力終了後の次のクロツクの立上がりで、後の
マトリクスの出力マトリクスの第1行が続けて出力され
る。
When processing the next matrix continuously, the fifth clock of the processing of the previous matrix is continuously input from the outside to the terminals 53a to 53d as the first clock of the subsequent matrix processing. One column, the result of the previous matrix is output at the rising edge of the next clock after the output is completed, and the first row of the output matrix of the subsequent matrix is continuously output.

<第3実施例> 第5図は第3実施例の直交変換器の構成図である。21
9は外部からクロツクを入力する端子である。220,221は
外部より入力マトリクスの1列分データをとり込む端
子、222a,222bは入力されたデータをラツチするラツ
チ、223,227は2項加算器、223,228は2項減算器であ
る。225a〜225cはラツチ、226a,226bはセレクタ、229a,
229bは出力データをラツチするラツチ、230a,230bはラ
ツチ229a,229bにラツチされた結果を出力する端子、231
は2進カウンタである。
Third Embodiment FIG. 5 is a configuration diagram of an orthogonal transformer according to a third embodiment. twenty one
9 is a terminal for inputting a clock from outside. Reference numerals 220 and 221 denote terminals for receiving data for one column of the input matrix from outside, reference numerals 222a and 222b denote latches for latching input data, reference numerals 223 and 227 denote binomial adders, and reference numerals 223 and 228 denote binomial subtractors. 225a to 225c are latches, 226a and 226b are selectors, 229a,
229b is a latch for latching output data, 230a and 230b are terminals for outputting the results latched on the latches 229a and 229b, 231
Is a binary counter.

この実施例は、クロツクスピードが素子での遅れ等に
比して十分に小さい場合や、入力に対して多少の遅れが
生じてもよいような場合等に利用される。
This embodiment is used, for example, when the clock speed is sufficiently smaller than the delay in the element, or when a slight delay may occur with respect to the input.

第6図は第3実施例の直交変換器の動作を表わすタイ
ミングチヤートである。このタイミングチヤートに従つ
て、各々の動作を述べる。端子219からクロツクCLKが供
給される。
FIG. 6 is a timing chart showing the operation of the orthogonal transformer of the third embodiment. Each operation will be described according to the timing chart. A clock CLK is supplied from a terminal 219.

第1クロツクの立上がりで、ベクトルXの1列分のデ
ータx11,x21が端子220,221からInput 1及びInput 2とし
て入力される。
At the rise of the first clock, data x 11 and x 21 for one column of the vector X are input as Input 1 and Input 2 from terminals 220 and 221.

第2クロツクの立上がりで、ラツチ222a,222bがx11,x
21をラツチし、同時に端子220,221よりx12,x22を入力す
る。
The rise of the second clock, latch 222a, 222b is x 11, x
21 was latch inputs x 12, x 22 from the terminal 220, 221 at the same time.

第3クロツクの立上がりで、ラツチ222a,222bの出力
を2項加算器223では加算して(x11+x21)を出力し、
2項減算器224では減算して(x11−x21)を出力する。
The rise of the third clock, and output latch 222a, and adds the outputs binomial adder 223 222b a (x 11 + x 21),
The binary term subtractor 224 performs subtraction and outputs (x 11 −x 21 ).

第4クロツクの立上がりで、加算結果(x11+x21)及
び減算結果(x11−x21)を、ラツチ225a,225bにラツチ
し、さらに2項加算器223では加算結果(x12+x22)、
2項減算器224では減算結果(x12−x22)を得る。ここ
で、2進カウンタ231の出力信号Sel3に従つて、セレク
タ226a,226bは2入力のうち1入力を選択して出力す
る。つまり第3クロツクの間ではセレクタ226a,226bの
出力内容はそれぞれ(x12+x22),(x11+x21)であ
る。これを2項加算器227,2項減算器228に入力し、 y11=1/2(x11+x12+x21+x22)及び y22=1/2(x11−x12+x21−x22)を得る。
The rise of the fourth clock, the addition result (x 11 + x 21) and the subtraction result (x 11 -x 21), latch 225a, and latches to 225b, further binomial adder 223 in addition result (x 12 + x 22) ,
The binary term subtractor 224 obtains a subtraction result (x 12 −x 22 ). Here, according to the output signal Sel 3 of the binary counter 231, the selectors 226a and 226b select and output one of the two inputs. That third selector Between clock 226a, the output contents of 226b, respectively (x 12 + x 22), a (x 11 + x 21). This was entered in binomial adder 227,2 Section subtractor 228, y 11 = 1/2 (x 11 + x 12 + x 21 + x 22) and y 22 = 1/2 (x 11 -x 12 + x 21 -x 22 ) get.

同様にして第4クロツクの立上がりでは、y11,y22
出力ラツチ229a,229bにラツチし、端子230a,230bより出
力すると同時に、2項加算器227,2項減算器228は(x12
−x22),(x11−x21)を入力し、 y12=1/2(x11+x12−x21+x22), y21=1/2(x11−x12−x21+x22)を得る。
The fourth clock rising in's in the same manner, y 11, the y 22 output latch 229a, and latches to 229b, the terminal 230a, and simultaneously output from 230b, the binomial adder 227,2 Section subtractor 228 (x 12
−x 22 ) and (x 11 −x 21 ), and y 12 = 1/2 (x 11 + x 12 −x 21 + x 22 ), y 21 = 1/2 (x 11 −x 12 −x 21 + x 22 ) get.

第5クロツクの立上がりでy21,y12をラツチ229a,229b
にラツチして、端子230a,230bより出力する。
The y 21, y 12 on the rising edge of the fifth clock latch 229a, 229b
And output from terminals 230a and 230b.

以上説明したように、このような構成をとつて直交変
換器を作成すると、素子又はゲートアレイ上でのセル数
(ゲート数)を大幅に削減する効果がある。さらに、該
直交変換器のクロツクスピードは画素クロツクスピード
の1/nでよく、高速のクロツクを使用せずとも容易に他
の装置に組み込むとが可能である。
As described above, when an orthogonal transformer is created by using such a configuration, there is an effect of greatly reducing the number of cells (the number of gates) on an element or a gate array. Further, the clock speed of the orthogonal transformer may be 1 / n of the pixel clock speed, and the orthogonal transformer can be easily incorporated into another device without using a high-speed clock.

尚、本実施例では直交変換として、アダマール変換を
説明したが、他の直交変換においても、ラツチの配置及
びセレクタの制御の手直しにより容易に本発明を適用で
きるのは自明である。
In this embodiment, the Hadamard transform is described as the orthogonal transform. However, it is obvious that the present invention can be easily applied to other orthogonal transforms by modifying the arrangement of the latches and the control of the selector.

[発明の効果] 以上のように、本発明によれば、2×2の入力マトリ
クスに対してアダマール変換を施し、2×2の出力マト
リクスを得る際に、2要素の和及び差を計算するための
加算器及び減算器を1組備え、前記入力手段により入力
された要素信号に対して、前記第1の方向に並んだ要素
信号間の和及び差演算を行なって、前記第1の方向に並
んだ2つの変換信号を順次に得、2要素の和及び差を計
算するための加算器及び減算器を1組備え、前記第1の
変換手段により得られた前記変換信号を選択して入力
し、前記第2の方向に並んだ変換信号間の和及び差演算
を行って、前記第2の方向に沿って2つのアダマール変
換係数を順次に2つずつ出力することで、2×2個のア
ダマール変換係数を得る。このため、加減算器を最小限
に抑え、従来よりもハードウエアの規模を縮小するとと
もに、簡易なクロックで高速に演算処理を行うことがで
きる。
[Effects of the Invention] As described above, according to the present invention, the Hadamard transform is performed on a 2 × 2 input matrix, and the sum and difference of two elements are calculated when a 2 × 2 output matrix is obtained. A sum and a difference between element signals arranged in the first direction with respect to the element signals input by the input means, and Are sequentially obtained, one set of an adder and a subtractor for calculating the sum and difference of the two elements are provided, and the conversion signal obtained by the first conversion means is selected. By inputting and performing a sum and difference operation between the converted signals arranged in the second direction, and sequentially outputting two Hadamard transform coefficients two by two along the second direction, 2 × 2 Obtain Hadamard transform coefficients. For this reason, the number of adders / subtractors can be minimized, the scale of hardware can be reduced more than before, and arithmetic processing can be performed at high speed with a simple clock.

更に、素子又はゲートアレイ上でのセル数ゲート数)
を大幅に削減することにより、IC化が可能となつたアダ
マール変換器を提供できる。
Furthermore, the number of cells on the element or gate array The number of gates
The Hadamard converter that can be integrated into an IC can be provided by drastically reducing the power consumption.

また、本発明の他の構成によれば、4×4の入力マト
リクスに対してアダマール変換を施し、4×4の出力マ
トリクスを得る際に、2要素の和及び差を計算するため
の加算器及び減算器を2組ずつ2段備え、前記入力手段
により入力された要素信号に対して、前記第1の方向に
並んだ要素信号間の和及び差演算を2段階行なって、前
記第1の方向に並んだ4つの変換信号を順次に得、2要
素の和及び差を計算するための加算器及び減算器を2組
ずつ2段備え、前記第1の変換手段により得られた前記
変換信号を選択して入力し、前記第2の方向に並んだ変
換信号間の和及び差演算を2段階行って、前記第2の方
向に沿って4つのアダマール変換係数を順次に4つずつ
出力することで、4×4個のアダマール変換係数を得る
ので、上述の2×2の入力マトリクスの場合と同様な効
果が得られる。
According to another aspect of the present invention, an adder for calculating the sum and difference of two elements when performing a Hadamard transform on a 4 × 4 input matrix and obtaining a 4 × 4 output matrix. And two stages of two sets of subtracters, each of which performs a sum and difference operation between element signals arranged in the first direction on the element signals input by the input means in two stages, thereby obtaining the first signal. Four conversion signals arranged in the direction are sequentially obtained, two stages of adders and two subtracters for calculating the sum and difference of two elements are provided, and the conversion signal obtained by the first conversion means is provided. Is selected and input, and a sum and difference operation between the converted signals arranged in the second direction is performed in two stages, and four Hadamard transform coefficients are sequentially output four by four along the second direction. As a result, 4 × 4 Hadamard transform coefficients are obtained. Same effect as the case of the force matrix is obtained.

【図面の簡単な説明】[Brief description of the drawings]

第1図は第1実施例の直交変換器を示した構成図、 第2図は第1実施例の直交変換器の動作を表わすタイミ
ングチヤート、 第3図は第2実施例の直交変換器を示した構成図、 第4A図〜第4D図は第2実施例の直交変換器の動作を表わ
すタイミングチヤート、 第5図は第3実施例の直交変換器を示した構成図、 第6図は第3実施例の直交変換器の動作を表わすタイミ
ングチヤート、 第7図は直交変換器の使用方法の一例を示すブロツク
図、 第8図は従来の直交変換器の構成例を示す図、 第9図は2×2画素ブロツク及びそのアダマール変換後
のマトリクスを表わした図である。 図中、1……ラインバツフア、2……直交変換器、3…
…信号処理部、11a〜11p……ラツチ、12a〜12d……加減
算器で構成される演算器、13……出力ラツチ、19,219…
…クロツク端子、20,21,53a〜53d,60a〜60v,70a〜70d,7
3a〜73d,222a,222b,225a〜225c、229b……ラツチ、23,2
7,55a,55b,58a,58b,63a,63b,71a,71b,223,227……2項
加算器、26a,26b,62a〜62d、226a,226b……セレクタ、3
1,61,231……カウンタ、75……デコーダ、30a,30b,74a
〜74d,230a,230b……出力端子、24,28,56a,56b,59b,64
a,64b,72a,72b,224,228……2項減算器である。
FIG. 1 is a block diagram showing the orthogonal transformer of the first embodiment, FIG. 2 is a timing chart showing the operation of the orthogonal transformer of the first embodiment, and FIG. 3 is a diagram showing the orthogonal transformer of the second embodiment. FIGS. 4A to 4D are timing charts showing the operation of the orthogonal transformer of the second embodiment, FIG. 5 is a structural diagram showing the orthogonal transformer of the third embodiment, and FIG. FIG. 7 is a timing chart showing the operation of the orthogonal transformer of the third embodiment, FIG. 7 is a block diagram showing an example of how to use the orthogonal transformer, FIG. 8 is a diagram showing an example of the configuration of a conventional orthogonal transformer, FIG. The figure shows a 2 × 2 pixel block and its matrix after Hadamard transformation. In the figure, 1 ... line buffer, 2 ... orthogonal transformer, 3 ...
... Signal processing unit, 11a-11p ... Latch, 12a-12d ... Calculator consisting of adder / subtractor, 13 ... Output latch, 19,219 ...
... Clock terminals, 20, 21, 53a to 53d, 60a to 60v, 70a to 70d, 7
3a-73d, 222a, 222b, 225a-225c, 229b ... Latch, 23,2
7, 55a, 55b, 58a, 58b, 63a, 63b, 71a, 71b, 223, 227 ... binomial adder, 26a, 26b, 62a to 62d, 226a, 226b ... selector, 3
1,61,231 ... Counter, 75 ... Decoder, 30a, 30b, 74a
Up to 74d, 230a, 230b ... Output terminals, 24, 28, 56a, 56b, 59b, 64
a, 64b, 72a, 72b, 224, 228... are binomial subtractors.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】2×2の入力マトリクスに対してアダマー
ル変換を施し、2×2の出力マトリクスを得るアダマー
ル変換器において、 上記入力マトリクスの第1の方向に並んだ要素信号を並
列に、前記第1の方向と直交する第2の方向に並んだ要
素信号を順次に入力する入力手段と、 2要素の和及び差を計算するための加算器及び減算器を
1組備え、前記入力手段により入力された要素信号に対
して、前記第1の方向に並んだ要素信号間の和及び差演
算を行なって、前記第1の方向に並んだ2つの変換信号
を順次に得る第1の変換手段と、 2要素の和及び差を計算するための加算器及び減算器を
1組備え、前記第1の変換手段により得られた前記変換
信号を選択して入力し、前記第2の方向に並んだ変換信
号間の和及び差演算を行って、前記第2の方向に沿って
2つのアダマール変換係数を順次に2つずつ出力するこ
とで、2×2個のアダマール変換係数を得る第2の変換
手段とを有することを特徴とするアダマール変換器。
1. A Hadamard transformer for performing a Hadamard transform on a 2 × 2 input matrix to obtain a 2 × 2 output matrix, wherein the element signals arranged in a first direction of the input matrix are arranged in parallel with each other. Input means for sequentially inputting element signals arranged in a second direction orthogonal to the first direction; and a set of an adder and a subtractor for calculating the sum and difference of the two elements. First conversion means for performing a sum and difference operation between element signals arranged in the first direction on an input element signal to sequentially obtain two conversion signals arranged in the first direction; And a set of an adder and a subtractor for calculating the sum and difference of the two elements, selecting and inputting the converted signals obtained by the first converting means, and arranging them in the second direction. The sum and difference operations between the converted signals are performed, and A second transformation means for sequentially outputting two Hadamard transform coefficients two by two along two directions to obtain 2 × 2 Hadamard transform coefficients.
【請求項2】4×4の入力マトリクスに対してアダマー
ル変換を施し、4×4の出力マトリクスを得るアダマー
ル変換器において、 上記入力マトリクスの第1の方向に並んだ要素信号を並
列に、前記第1の方向と直交する第2の方向に並んだ要
素信号を順次に入力する入力手段と、 2要素の和及び差を計算するための加算器及び減算器を
2組ずつ2段備え、前記入力手段により入力された要素
信号に対して、前記第1の方向に並んだ要素信号間の和
及び差演算を2段階行なって、前記第1の方向に並んだ
4つの変換信号を順次に得る第1の変換手段と、 2要素の和及び差を計算するための加算器及び減算器を
2組ずつ2段備え、前記第1の変換手段により得られた
前記変換信号を選択して入力し、前記第2の方向に並ん
だ変換信号間の和及び差演算を2段階行って、前記第2
の方向に沿って4つのアダマール変換係数を順次に4つ
ずつ出力することで、4×4個のアダマール変換係数を
得る第2の変換手段とを有することを特徴とするアダマ
ール変換器。
2. A Hadamard transformer for performing a Hadamard transform on a 4 × 4 input matrix to obtain a 4 × 4 output matrix, wherein the element signals arranged in a first direction of the input matrix are arranged in parallel with each other. Input means for sequentially inputting element signals arranged in a second direction orthogonal to the first direction; two sets of adders and subtractors for calculating the sum and difference of the two elements; The sum and difference operations between the element signals arranged in the first direction are performed on the element signals input by the input means in two stages, and four converted signals arranged in the first direction are sequentially obtained. A first conversion unit, and two stages of adders and subtracters for calculating the sum and difference of the two elements, each of which has two stages, and selects and inputs the conversion signal obtained by the first conversion unit. , The sum between the converted signals arranged in the second direction and The difference operation is performed in two steps, and the second
And a second transforming means for sequentially outputting four Hadamard transform coefficients four by four along the direction of, thereby obtaining 4 × 4 Hadamard transform coefficients.
JP63141828A 1988-06-10 1988-06-10 Hadamard converter Expired - Fee Related JP3059441B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63141828A JP3059441B2 (en) 1988-06-10 1988-06-10 Hadamard converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63141828A JP3059441B2 (en) 1988-06-10 1988-06-10 Hadamard converter

Publications (2)

Publication Number Publication Date
JPH01311367A JPH01311367A (en) 1989-12-15
JP3059441B2 true JP3059441B2 (en) 2000-07-04

Family

ID=15301072

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63141828A Expired - Fee Related JP3059441B2 (en) 1988-06-10 1988-06-10 Hadamard converter

Country Status (1)

Country Link
JP (1) JP3059441B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4621337A (en) * 1983-08-11 1986-11-04 Eastman Kodak Company Transformation circuit for implementing a collapsed Walsh-Hadamard transform
JPS61196684A (en) * 1985-02-26 1986-08-30 Konishiroku Photo Ind Co Ltd Picture recorder
JPS61278273A (en) * 1985-06-04 1986-12-09 Ricoh Co Ltd Picture reducing system
JPS6324468A (en) * 1986-07-17 1988-02-01 Fuji Xerox Co Ltd Filter circuit

Also Published As

Publication number Publication date
JPH01311367A (en) 1989-12-15

Similar Documents

Publication Publication Date Title
US4281391A (en) Number theoretic processor
CN100388630C (en) CRC computing method and system having matrix conversion technology
US4718031A (en) Multiplying circuit
JPH05210730A (en) Method and device for processing image
US4638449A (en) Multiplier architecture
JP3059441B2 (en) Hadamard converter
US4727507A (en) Multiplication circuit using a multiplier and a carry propagating adder
KR0175733B1 (en) Vlsi for transforming beat serial matrix
JPS6250870B2 (en)
US6183122B1 (en) Multiplier sign extension
JPH0595486A (en) Two-dimension shift array for picture compression
US5781462A (en) Multiplier circuitry with improved storage and transfer of booth control coefficients
KR100444729B1 (en) Fast fourier transform apparatus using radix-8 single-path delay commutator and method thereof
EP0073116A2 (en) Integrated data processing circuits
JP2707609B2 (en) Memory device
EP0129039B1 (en) Improved multiplier architecture
JPH0583141A (en) Coding data processor
JP2524035Y2 (en) Multiplier for convolution arithmetic circuit
JP3940564B2 (en) Multiplication circuit
US5615141A (en) Multiplying apparatus
Bizzan et al. Integer mapping architectures for the polynomial ring engine
KR0170217B1 (en) Multiplier
JPH0523013Y2 (en)
JPS63102468A (en) Converting device for resolution of picture data
JPH0697462B2 (en) Image rotation method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees