JPS6336430A - Data processor - Google Patents

Data processor

Info

Publication number
JPS6336430A
JPS6336430A JP61180578A JP18057886A JPS6336430A JP S6336430 A JPS6336430 A JP S6336430A JP 61180578 A JP61180578 A JP 61180578A JP 18057886 A JP18057886 A JP 18057886A JP S6336430 A JPS6336430 A JP S6336430A
Authority
JP
Japan
Prior art keywords
zero
word
register
leading
circuit
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.)
Granted
Application number
JP61180578A
Other languages
Japanese (ja)
Other versions
JPH0746309B2 (en
Inventor
Shigenori Takegawa
竹川 茂則
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP61180578A priority Critical patent/JPH0746309B2/en
Publication of JPS6336430A publication Critical patent/JPS6336430A/en
Publication of JPH0746309B2 publication Critical patent/JPH0746309B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the hardware quantity and firmware quantity of a controller by inhibiting a leading-zero counting means from counting a leading-zero state when the output signal of a zero register indicates that a word which is high in order than a word inputted to a zero check circuit is not in an all-zero state. CONSTITUTION:The titled processor is provided with an inhibiting means consisting of a data converting circuit 13, etc., which inhibits the leading-zero counting means composed of a leading-zero detecting circuit 8, a leading-zero register 9, an adder, a zero count register 11, etc., from counting the leading-zero state when the output signal of the zero register indicates that the word is not in the all-zero state. The controller needs not decide whether the word higher in order than a word whose leading-zero state is counted is in the all-zero state or not, so the hardware quantity and firmware quantity of the controller are reducible.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は複数ワードから構成される数値データのリーデ
ィングゼロカウントを行なうデータ処理装置に関するも
のである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing device that performs leading zero counting of numerical data consisting of a plurality of words.

〔従来の技術〕[Conventional technology]

複数ワードから構成される数値データを用いて各種の演
算を行なう場合、上位の桁から連続して存在しているゼ
ロを除去し、このゼロを除去した数値データを用いて演
算を行なうと演算速度等を向上させることが可能となる
。この場合、上位の桁から何桁連続してゼロが存在して
いるかを知ることが必要となり、従来は例えば次のよう
にして上位の桁から連続して存在するゼロの桁数を求め
るようにしている。
When performing various calculations using numerical data consisting of multiple words, the calculation speed can be improved by removing consecutive zeros from the most significant digits and performing calculations using the numerical data from which these zeros have been removed. etc., it becomes possible to improve. In this case, it is necessary to know how many consecutive zero digits there are from the high-order digit, and conventionally, for example, the number of consecutive zero digits from the high-order digit is calculated as follows. ing.

第5図は従来例のブロック図であり、1はマイクロプロ
グラムにより各部の制御を行なう制御装置、2,3はそ
れぞれ第1.第2のレジスタファイル、4,5はそれぞ
れ第1.第2のアドレスレジスタ、6はレジスタファイ
ル2からワード単位で読出される10進キヤラクタデー
タがオールゼロであるか否かをチェックし、オールゼロ
ならばその出力信号を11”とし、オールゼロでなけれ
ばその出力信号を“0”とするゼロチェック回路、7は
ゼロチェック回路6の出力信号がセットされるゼロレジ
スタ、8はレジスタファイル2よりワード単位で読出さ
れる10進キヤラクタデータの上位キャラクタから「0
」でないキャラクタが現れるまでの「0」のキャラクタ
数を検出するリーディングゼロ検出回路、9はリーディ
ングゼロ検出回路8の検出結果がセットされるリーディ
ングゼロレジスタ、10は加算器、11はゼロカウント
レジスタである。
FIG. 5 is a block diagram of a conventional example, in which 1 is a control device that controls each part by a microprogram, 2 and 3 are 1. The second register files 4, 5 are respectively the first . The second address register 6 checks whether the decimal character data read in word units from the register file 2 is all zeros. If all zeros, the output signal is set to 11"; if not, the A zero check circuit sets the output signal to "0", 7 is a zero register where the output signal of the zero check circuit 6 is set, and 8 is a zero register that sets the output signal of the zero check circuit 6 to "0". 0
9 is a leading zero register in which the detection result of the leading zero detection circuit 8 is set, 10 is an adder, and 11 is a zero count register. be.

今、例えば、第1のレジスタファイル2のO番地から3
番地までにわたって格納されている4ワード構成の数値
データを第2のレジスタファイル3に転送すると共に、
この4ワード構成の数値データに対してリーディングゼ
ロカウントを行なう場合を考えてみる。第6図はこの時
の制御装置1の処理内容の一例を示すフローチャートで
ある。
Now, for example, 3 from address O of the first register file 2.
The 4-word numerical data stored up to the address is transferred to the second register file 3, and
Let us consider the case where leading zero count is performed on numerical data of this 4-word structure. FIG. 6 is a flowchart showing an example of the processing contents of the control device 1 at this time.

尚、第6図の各ステップ361〜368の処理はそれぞ
れ1クロック期間に於いて行なわれるものである。
Incidentally, each of the processes in steps 361 to 368 in FIG. 6 is performed in one clock period.

制御装置1は、先ず、アドレスレジスタ4.5に「0」
番地をセットすると共にゼロカウントレジスタ11にリ
セット信号aを加え、ゼロカウントレジスタ11の内容
ZCRを「0」とする (ステップ561)。これによ
り、第1のレジスタファイル2の「0」番地に格納され
ていた最上位ワードが読出され、第2のレジスタファイ
ル3.ゼロチェック回路6及びリーディングゼロ検出回
路8に加えられる。ゼロチェック回路6はレジスタファ
イル2から読出された最上位ワードに含まれるキャラク
タがオールゼロであるか否かをチェックし、オールゼロ
ならばその出力信号を11”とし、オールゼロでなけれ
ばその出力信号を“O”とする。
First, the control device 1 sets “0” to the address register 4.5.
At the same time as setting the address, a reset signal a is applied to the zero count register 11, and the content ZCR of the zero count register 11 is set to "0" (step 561). As a result, the most significant word stored at address "0" in the first register file 2 is read out, and the most significant word stored in the "0" address of the first register file 2 is read out, and the most significant word is read out from the second register file 3. It is added to the zero check circuit 6 and the leading zero detection circuit 8. The zero check circuit 6 checks whether the characters included in the most significant word read from the register file 2 are all zeros. If all zeros, the output signal is set to 11", and if not, the output signal is set to "11". O”.

また、リーディングゼロ検出回路8はレジスタファイル
2から読出された最上位ワードについて、その上位キャ
ラクタから「0」でないキャラクタが現れるまでの「0
」のキャラクタ数(桁数)をカウントする。
Furthermore, the leading zero detection circuit 8 detects "0" from the most significant word read from the register file 2 until a character other than "0" appears from the most significant character.
” Count the number of characters (number of digits).

次いで、制御装置1はレジスタファイル3に書込信号r
を加えることによりレジスタファイル2の「0」番地に
格納されていた最上位ワードをレジスタファイル3の「
0」番地に格納し、ゼロレジスタ7にセント信号eを加
えることにより最上位ワードについてのゼロチェック回
路6のチェック結果をゼロレジスタ7にセットし、リー
ディングゼロレジスタ9にセント信号dを加えることに
より最上位ワードについてのリーディングゼロ検出回路
8の検出結果をリーディングゼロレジスタ9にセットし
、アドレスレジスタ4,5に「1」番地をセットするこ
とによりレジスタファイル2の「1」番地に格納されて
いる上位から2番目のワードを読出す(ステップ562
)。レジスタファイル2の「1」番地から読出された2
番目のワードはレジスタファイル3.ゼロチェック回路
6及びリーディングゼロ検出回路8に加えられ、ゼロチ
ェック回路6及びリーディングゼロ検出回路8は2番目
のワードについて前述したと同様の動作を行なう。
Next, the control device 1 sends a write signal r to the register file 3.
By adding , the most significant word stored at address "0" in register file 2 is transferred to "
0'' address, and by adding the cent signal e to the zero register 7, the check result of the zero check circuit 6 for the most significant word is set in the zero register 7, and by adding the cent signal d to the leading zero register 9. By setting the detection result of the leading zero detection circuit 8 for the most significant word in the leading zero register 9 and setting the address "1" in the address registers 4 and 5, the result is stored at the "1" address of the register file 2. Read the second word from the top (step 562
). 2 read from address “1” of register file 2
The th word is register file 3. In addition to the zero check circuit 6 and the leading zero detection circuit 8, the zero check circuit 6 and the leading zero detection circuit 8 perform the same operation as described above for the second word.

次いで、制御装置1はレジスタファイル3に書込信号f
を加えることによりレジスタファイル2の「1」番地に
格納されていた2番目のワードをレジスタファイル3の
「1」番地に格納し、加算器10に加算信号Cを加え、
ゼロカウントレジスタ11にセット信号すを加えること
によりリーディングゼロレジスタ9の内容LDZR(こ
の場合、最上位ワードについてのリーディングゼロカウ
ント値)とゼロカウントレジスタ11の内容ZCR(こ
の場合「0」)との加算結果をゼロカウントレジスタ1
1にセントし、ゼロレジスタフにセット信号eを加える
ことにより2番目のワードについてのゼロチェック回路
6のチェック結果をゼロレジスタ7にセットし、リーデ
ィングゼロレジスタ9にセット信号dを加えることによ
り2番目のワードについてのリーディングゼロ検出回路
8の検出結果をリーディングゼロレジスタ9にセットし
、アドレスレジスタ4,5に「2」番地をセントするこ
とによりレジスタファイル2の「2」番地に格納されて
いた3番目のワードを読出す(ステップ563) 。
Next, the control device 1 sends a write signal f to the register file 3.
By adding , the second word stored at address "1" of register file 2 is stored at address "1" of register file 3, and addition signal C is added to adder 10,
By applying a set signal S to the zero count register 11, the contents LDZR of the leading zero register 9 (in this case, the leading zero count value for the most significant word) and the contents ZCR of the zero count register 11 (in this case "0") are changed. Addition result to zero count register 1
1, and by adding a set signal e to the zero register, the check result of the zero check circuit 6 for the second word is set to the zero register 7, and by adding a set signal d to the leading zero register 9, the second word is set. By setting the detection result of the leading zero detection circuit 8 for the word in the leading zero register 9 and writing the address "2" to the address registers 4 and 5, the third word stored at the address "2" in the register file 2 is set. (step 563).

次いで、制御装置1はステップ362の処理でゼロレジ
スタフに「O」がセットされた場合、即ち最上位ワード
がオールゼロでない場合はステップS64. 365の
処理を順次行ない、ステップ362の処理でゼロレジス
タ7に「1」がセットされた場合、即ち最上位ワードが
オールゼロである場合はステップ366の処理を行なう
Next, if "O" is set in the zero register in the process of step 362, that is, if the most significant word is not all zeros, the control device 1 proceeds to step S64. If "1" is set in the zero register 7 in the process of step 362, that is, if the most significant word is all zeros, the process of step 366 is performed.

ステップ364ではレジスタファイル3の「2」番地に
レジスタファイル2の「2」番地に格納されていた3番
目のワードを格納する処理及びアドレスレジスタ4.5
に「3」番地をセットする処理が行なわれ、ステップ3
65ではレジスタファイル3の「3」番地にレジスタフ
ァイル2の「3J番地に格納されていた4番目のワード
を格納する処理が行なわれる。また、ステップ366で
はレジスタファイル3の「2」番地にレジスタファイル
2の「2」番地に格納されていた3番目のワードを格納
する処理、リーディングゼロレジスタ9の内容LDZR
(この場合、2番目のワードについてのリーディングゼ
ロカウント値)とゼロカウントレジスタ11の内容ZC
R(この場合、最上位ワードについてのリーディングゼ
ロカウント値)とを加算器10で加算し、加算結果(こ
の場合、2番目のワードまでのリーディングゼロカウン
ト値)をゼロカウントレジスタ11にセットする処理、
ゼロレジスタフに3番目のワードについてのゼロチェッ
ク回路6のチェック結果をセントする処理、リーディン
グゼロレジスタ9に3番目のワードについてのリーディ
ングゼロ検出回路8の検出結果をセントする処理及びア
ドレスレジスタ4.5に「3」番地をセットする処理が
行なわれる。ここで、ステップ364でリーディングゼ
ロのカウント処理を行なわないのは、最上位ワードがオ
ールゼロでない場合は、最上位ワードよりも下位のワー
ドについてリーディングゼロのカウント処理を行なって
も無意味であるからである。
In step 364, the third word stored at address "2" of register file 2 is stored at address "2" of register file 3, and address register 4.5
The process of setting address "3" is performed, and step 3
At step 65, the fourth word stored at address "3J" of register file 2 is stored at address "3" of register file 3. Also, at step 366, the register is stored at address "2" of register file 3. Processing to store the third word stored at address “2” of file 2, contents of leading zero register 9 LDZR
(in this case, the leading zero count value for the second word) and the contents of zero count register 11 ZC
R (in this case, the leading zero count value for the most significant word) is added by the adder 10, and the addition result (in this case, the leading zero count value up to the second word) is set in the zero count register 11. ,
A process of placing the check result of the zero check circuit 6 for the third word in the zero register 9, a process of placing the detection result of the leading zero detecting circuit 8 for the third word in the leading zero register 9, and a process of placing the result of the check of the zero check circuit 6 on the third word in the zero register 4.5. Processing to set address "3" is performed. Here, the reason why counting of leading zeros is not performed in step 364 is because if the most significant word is not all zeros, it is meaningless to count leading zeros for words lower than the most significant word. be.

次いで、制御装置1はステップ363の処理でゼロレジ
スタフに「1」がセットされた場合、部ち2番目のワー
ドがオールゼロの場合はステップS67の処理を行ない
、ステップS63の処理でゼロレジスタ7に「0」がセ
ットされた場合、即ち2番目のワードがオールゼロでな
い場合はステップS65の処理を行なう。ステップ36
7では、レジスタファイル3の「3」番地にレジスタフ
ァイル2の「3」番地に格納されていた4番目のワード
を格納する処理、リーディングゼロレジスタ9の内容L
DZR(この場合、3番目のワードについてのリーディ
ングゼロカウント値)とゼロカウントレジスタ11の内
容ZCR(この場合、最上位ワードから2番目のワード
までのリーディングゼロカウント値)とを加算器10で
加算し、加算結果(この場合、3番目のワードまでのリ
ーディングゼロカウント値)をゼロカウントレジスタ1
1にセットする処理、ゼロレジスタ7に4番目のワード
についてのゼロチェック回路6のチェック結果をセット
する処理、リーディングゼロレジスタ9に4番目のワー
ドについてのリーディングゼロ検出回路8の検出結果を
セットする処理が行なわれる。
Next, if "1" is set in the zero register 7 in the process of step S63, the control device 1 performs the process of step S67 if the second word is all zeros, and sets "1" in the zero register 7 in the process of step S63. If "0" is set, that is, if the second word is not all zeros, the process of step S65 is performed. Step 36
7, the process of storing the fourth word stored at address "3" of register file 2 at address "3" of register file 3, and the content L of leading zero register 9.
The adder 10 adds DZR (in this case, the leading zero count value for the third word) and the content ZCR of the zero count register 11 (in this case, the leading zero count value from the most significant word to the second word). Then, the addition result (in this case, the leading zero count value up to the third word) is stored in zero count register 1.
1, setting the check result of the zero check circuit 6 for the fourth word in the zero register 7, setting the detection result of the leading zero detection circuit 8 for the fourth word in the leading zero register 9. Processing is performed.

次いで、制御装置1はステップS66の処理でゼロレジ
スタフに「1」がセットされた場合、即ち3番目のワー
ドがオールゼロの場合はステップ868の処理を行ない
、ステップS66の処理でゼロレジスタ7に「0」がセ
ットされた場合、即ち3番目のワードがオールゼロでな
い場合は他の制御ステップに移る。ステップ36Bでは
リーディングゼロレジスタ9の内容LDZR(この場合
、4番目のワードについてのリーディングゼロカウント
値)とゼロカウントレジスタ11の内容ZCR(この場
合、最上位ワードから3番目のワードまでのリーディン
グゼロカウント値)とを加算器10で加算し、加算結果
(この場合、4番目のワードまでのリーディングゼロイ
直)をゼロカウントレジスタ11にセントする処理が行
なわれる。
Next, if "1" is set in the zero register field in the process of step S66, that is, if the third word is all zeros, the control device 1 performs the process of step 868, and sets "0" in the zero register 7 in the process of step S66. '' is set, that is, if the third word is not all zeros, the process moves to another control step. In step 36B, the content LDZR of the leading zero register 9 (in this case, the leading zero count value for the fourth word) and the content ZCR of the zero count register 11 (in this case, the leading zero count value from the most significant word to the third word) The adder 10 adds the values (values), and the addition result (in this case, leading zeros up to the fourth word) is stored in the zero count register 11.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来は上述したようにしてリーディングゼロカウントを
行なうようにしているが、第6図のフローチャートから
判るように、レジスタファイル2から読出されたワード
よりも上位のワードが全てオールゼロであるか否かを制
御装置1で判別し、その判別結果に基づいて制御装置1
の処理内容を変えるようにしているため、レジスタファ
イル2から読出されたワードよりも上位のワードが全て
オールゼロであるか否かを判定するための比較器等が必
要となり、制御装置1の金物量が多くなる問題があると
共に判定結果に基づいて処理内容を変えなければならな
いので、ファームウェア量が多くなる問題があった。
Conventionally, the leading zero count is performed as described above, but as can be seen from the flowchart in FIG. The control device 1 makes a determination based on the determination result.
Since the processing contents of the control device 1 are changed, a comparator or the like is required to determine whether or not all words higher than the word read from the register file 2 are all zeros. In addition, there is a problem in that the amount of firmware increases because the processing content must be changed based on the determination result.

本発明は前述の如き問題点を解決したものであ (す、
その目的は制御装置の金物量及びファームウェア量を減
少させることにある。
The present invention solves the above-mentioned problems.
The purpose is to reduce the amount of hardware and firmware in the control device.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は前述の如き問題点を解決するため、複数ワード
から構成される数値データのリーディングゼロカウント
を行なうデータ処理装置に於いて、 前記数値データを構成する複数のワードが上位ワードよ
り順次入力され、入力されたワードに含まれるキャラク
タがオールゼロであるか否かをチェックし、その結果を
示す信号を出力するゼロチェック回路と、 入力信号がセットされるゼロレジスタと、該ゼロレジス
タの出力信号と前記ゼロチェック回路の出力信号との論
理積をとることにより、最上位ワードから前記ゼロチェ
ック回路でチェックが済んだワードまでに含まれるキャ
ラクタがオールゼロであるか否かを示す信号を前記ゼロ
レジスタに出力するゼロ累積回路と、 入力されたワードについてその上位の桁からゼロでない
桁が現れるまでのゼロの桁数をカウントすると共に各ワ
ードについての桁数を順次加算するリーディングゼロカ
ウント手段と、 前記ゼロレジスタの出力信号が前記ゼロチェック回路に
入力されたワードよりも上位のワードがオールゼロでな
いことを示している場合は前記リーディングゼロカウン
ト手段によるリーディングゼロのカウントを抑止し、前
記ゼロレジスタの出力信号が前記ゼロチェック回路に入
力されたワードよりも上位のワードがオールゼロである
ことを示している場合は前記ゼロチェック回路に入力さ
れたワードと同一のワードを前記リーディングゼロカウ
ント手段に入力する抑止手段と、前記ゼロチェック回路
に前記数値データを構成する複数のワードを上位ワード
より1ワードずつ順次加えると共に、前記ゼロレジスタ
の入力信号のセントタイミング及び前記リーディングゼ
ロカウント手段の動作タイミングを制御する制御手段と
を設けたものである。
In order to solve the above-mentioned problems, the present invention provides a data processing device that performs leading zero counting of numerical data consisting of a plurality of words, in which the plurality of words constituting the numerical data are input sequentially from the upper word. , a zero check circuit that checks whether the characters included in the input word are all zeros and outputs a signal indicating the result; a zero register to which the input signal is set; and an output signal of the zero register. By performing an AND with the output signal of the zero check circuit, a signal indicating whether or not the characters included from the most significant word to the word checked by the zero check circuit are all zeros is sent to the zero register. a zero accumulation circuit that outputs; a leading zero count means that counts the number of zero digits from the most significant digit of an input word until a non-zero digit appears, and sequentially adds the number of digits for each word; If the output signal of the register indicates that the words higher than the word input to the zero check circuit are not all zeros, counting of leading zeros by the leading zero counting means is inhibited, and the output signal of the zero register is suppressing means for inputting the same word as the word input to the zero check circuit to the leading zero count means when the word higher than the word input to the zero check circuit indicates that the word is all zero; , a control means for sequentially adding a plurality of words constituting the numerical data to the zero check circuit one word at a time starting from the upper word, and controlling the cent timing of the input signal of the zero register and the operation timing of the leading zero counting means; It has been established.

〔作 用〕[For production]

ゼロチェック回路の出力信号と自己の出力信号との論理
積が入力されるゼロレジスタの出力信号はゼロチェック
回路に入力されたワードより上位のワードが全てオール
ゼロであるか否かを示すことになる。抑止手段はゼロレ
ジスタの出力信号がゼロチェック回路に入力されたワー
ドよりも上位のワードが全てオールゼロの場合はゼロチ
ェック回路に入力されたワードと同一のワードをリーデ
ィングゼロカウント手段に加え、ゼロレジスタの出力信
号がゼロチェック回路に入力されたワードよりも上位の
ワードがオールゼロでないことを示している場合はリー
ディングゼロカウント手段によるリーディングゼロのカ
ウントを抑止するものであるから、リーディングゼロカ
ウント手段のカウント値はリーディングゼロカウント値
を示すことになる。
The output signal of the zero register, into which the AND of the output signal of the zero check circuit and its own output signal is input, indicates whether or not all words higher than the word input to the zero check circuit are all zeros. . If the output signal of the zero register is all zeros than the word input to the zero check circuit, the suppression means adds the same word as the word input to the zero check circuit to the leading zero count means, and outputs the zero register. If the output signal indicates that the words higher than the word input to the zero check circuit are not all zeros, the counting of leading zeros by the leading zero counting means is inhibited. The value will indicate the leading zero count value.

(実施例〕 第1図は本発明の実施例のブロック図で、1′はマイク
ロプログラムにより各部の制御を行なう制御装置、7“
はゼロレジスタ、12はゼロ累積回路、13はデータ変
換回路であり、他の第5図と同一符号は同一部分を表し
ている。
(Embodiment) FIG. 1 is a block diagram of an embodiment of the present invention, in which 1' is a control device that controls each part by a microprogram, and 7' is a block diagram of an embodiment of the present invention.
12 is a zero register, 12 is a zero accumulation circuit, and 13 is a data conversion circuit, and the same reference numerals as in FIG. 5 represent the same parts.

第2図はゼロ累積回路12の構成例を示す回路図であり
、ゼロチェック回路6の出力信号とゼロレジスタ7゛の
出力信号との論理積をとるアンド回路21と、制御装置
1′からの信号gが“1”の場合はアンド回路21の出
力信号を選択し、“0”の場合はゼロレジスタ7゛の初
期値となる1”を選択するセレクタ22とから構成され
ている。即ち、ゼロ累積回路12はゼロレジスタ7゛に
一旦“0”がセントされた後はゼロレジスタ7′に1”
が初期設定されるまで、ゼロチェック回路6の出力信号
の如何に拘わらずその出力信号を“O”に保持するもの
である。
FIG. 2 is a circuit diagram showing an example of the configuration of the zero accumulation circuit 12, which includes an AND circuit 21 that takes the logical product of the output signal of the zero check circuit 6 and the output signal of the zero register 7', and the output signal from the control device 1'. The selector 22 selects the output signal of the AND circuit 21 when the signal g is "1", and selects "1" which is the initial value of the zero register 7' when the signal g is "0". The zero accumulation circuit 12 stores 1 in the zero register 7' once "0" is written in the zero register 7'.
The output signal of the zero check circuit 6 is held at "O" until it is initialized, regardless of the output signal of the zero check circuit 6.

第3図はデータ変換回路13の構成例を示した回路図で
あり、ゼロレジスタ7゛の出力信号を反転するインバー
タ31と、レジスタファイル2から読出されたワードの
内の最上位ビットとインバータ31の出力信号との論理
和をとるオア回路32とから構成されている。即ちデー
タ変換回路13はゼロレジスタ7°の出力信号が“1”
の場合はレジスタファイル2から読出されたワードをそ
のままリーディング上0検出回路8に加え、ゼロレジス
タ7°の出力信号が“0′″の場合はレジスタファイル
2から読出されたワードの内の最上位ビットを必ず“1
゛にしてリーディングゼロ検出回路8に加えるものであ
る。
FIG. 3 is a circuit diagram showing an example of the configuration of the data conversion circuit 13, which includes an inverter 31 that inverts the output signal of the zero register 7', the most significant bit of the word read from the register file 2, and the inverter 31 that inverts the output signal of the zero register 7'. and an OR circuit 32 that performs a logical sum with the output signal of the output signal. That is, in the data conversion circuit 13, the output signal of the zero register 7° is "1".
In the case of , the word read from the register file 2 is directly added to the leading 0 detection circuit 8, and when the output signal of the zero register 7° is "0'", the word read from the register file 2 is added as it is. Be sure to set the bit to “1”
This is added to the leading zero detection circuit 8.

今、例えば、第1のレジスタファイル2の0番地から3
番地までにわたって格納されている4ワード構成の数値
データを第2のレジスタファイル3に転送すると共に、
この4ワード構成の数値データに対してリーディングゼ
ロカウントを行なう場合を考えてみる。第4図はこの時
の制御装置1゛の処理内容の一例を示すフローチャート
である6尚、第4図の各ステップ81〜S6の処理はそ
れぞれ1クロツタ期間に於いて行なわれるものである。
Now, for example, from address 0 to 3 of the first register file 2
The 4-word numerical data stored up to the address is transferred to the second register file 3, and
Let us consider the case where leading zero count is performed on numerical data of this 4-word structure. FIG. 4 is a flowchart showing an example of the processing contents of the control device 1 at this time.6 Note that each of the processing in steps 81 to S6 in FIG. 4 is performed in one crotter period.

制′4′B装置1°は、先ず、アドレスレジスタ4.5
に「0」番地をセットすることによりレジスタファイル
2の「0」番地に格納されていた最上位ワードを読出し
、ゼロカウントレジスタ11にリセット信号aを加える
ことによりゼロカウントレジスタ11の内容ZCRを「
0」とし、信号gを“1”とすると共にゼロレジスタ7
゛にセット信号eを加えることにより、ゼロレジスタ7
″に初期値“1“をセントする(ステップ31)。レジ
スタファイル2から読出された最上位ワードはレジスタ
ファイル3、ゼロチェック回路6及びデータ変換回路1
3に加えられる。
The control '4'B device 1° first registers the address register 4.5.
By setting the address "0" to "0", the most significant word stored in the "0" address of the register file 2 is read, and by adding the reset signal a to the zero count register 11, the content ZCR of the zero count register 11 is set to "
0'', the signal g is set to 1, and the zero register 7
By adding the set signal e to ゛, the zero register 7
” is set to the initial value “1” (step 31).The most significant word read from the register file 2 is sent to the register file 3, zero check circuit 6, and data conversion circuit
Added to 3.

ゼロチェック回路6はレジスタファイル2から読出され
た最上位ワードに含まれるキャラクタがオールゼロであ
るか否かをチェックし、オールゼロならばその出力信号
を“■”とし、オールゼロでなければその出力信号を“
0”とする。また、ゼロチェック回路6の出力信号が加
えられているゼロ累積回路12は、この場合、ゼロレジ
スタ7°に“1”がセットされているものであるから、
ゼロチェック回路6の出力信号をそのままゼロレジスタ
7′に加える。また、データ変換回路13は、この場合
、ゼロレジスタ7°に“l“がセットされているもので
あるから、レジスタファイル2がら続出された最上位ワ
ードをそのままリーディングゼロ検出回路8に加える。
The zero check circuit 6 checks whether or not the characters included in the most significant word read from the register file 2 are all zeros. If all zeros, the output signal is set to "■"; if not, the output signal is “
In addition, in the zero accumulation circuit 12 to which the output signal of the zero check circuit 6 is applied, in this case, the zero register 7° is set to "1".
The output signal of the zero check circuit 6 is directly applied to the zero register 7'. Furthermore, in this case, since "1" is set in the zero register 7°, the data conversion circuit 13 applies the most significant word successively outputted from the register file 2 to the leading zero detection circuit 8 as it is.

また、リーディングゼロ検出回路8はデータ変換回路1
3を介して加えられた最上位ワードについて、その上位
キャラクタから「0」でないキャラクタが現れるまでの
rOJのキャラクタ数をカウントする。
Furthermore, the leading zero detection circuit 8 is connected to the data conversion circuit 1.
For the most significant word added through 3, count the number of characters in rOJ from the most significant character until a non-zero character appears.

次いで、制御袋W1゛はレジスタファイル3に書込信号
fを加えることによりレジスタファイル2の「0」番地
から読出された最上位ワードをレジスタファイル3の「
0」番地に格納し、ゼロレジスタ7′にセント信号eを
加えることにより最上位ワードについてのゼロチェック
回路6のチェック結果をゼロレジスタ7゛にセットし、
リーディングゼロレジスタ9にセット信号dを加えるこ
とにより最上位ワードについてのリーディングゼロ検出
回路8の検出結果をリーディングゼロレジスタ9にセッ
トし、アドレスレジスタ4.5に「1」番地をセットす
ることによりレジスタファイル2の「1」番地に格納さ
れている2番目のワードを読出す(ステップ32)。レ
ジスタファイル2から読出された2番目のワードはレジ
スタファイル3、ゼロチェック回路6及びデータ変換回
路13に加えられる。
Next, the control bag W1' adds the write signal f to the register file 3, so that the most significant word read from the address '0' of the register file 2 is stored in the '0' address of the register file 3.
0'' address, and by adding the cent signal e to the zero register 7', the check result of the zero check circuit 6 for the most significant word is set in the zero register 7';
By applying the set signal d to the leading zero register 9, the detection result of the leading zero detection circuit 8 for the most significant word is set to the leading zero register 9, and by setting the address "1" to the address register 4.5, the register The second word stored at address "1" in file 2 is read (step 32). The second word read from register file 2 is applied to register file 3, zero check circuit 6 and data conversion circuit 13.

ゼロチェック回路6はレジスタファイル2から読出され
た2番目のワードが加えられると、2番目のワードに含
まれるキャラクタがオールゼロカ)否かをチェックし、
オールゼロならばゼロ累積回路12に加える信号を“1
”とし、オールゼロでなければゼロ累積回路12に加え
る信号を“0”とする。また、第2図に示す構成を有す
るゼロ累積回路12はゼロチェック回路6及びゼロレジ
スタ7°の出力信号が共に“1”の場合(最上位ワード
及び2番目のワードが共にオールゼロの場合)のみゼロ
レジスタ7゛に加える信号を“1′とする。また、第3
図に示す構成を有するデータ変換回路13はゼロレジス
タ7°の出力信号が“1”の場合(最上位ワードがオー
ルゼロの場合)は、レジスタファイル2から読出された
2番目のワードをそのままリーディングゼロ検出回路8
に加え、ゼロレジスタ7゛の出力信号が°0”の場合(
最上位ワードがオールゼロでない場合)はレジスタファ
イル2から読出された2番目のワードの内の最上位ビッ
トを“1”にしてリーディングゼロ検出回路8に加える
。リーディングゼロ検出回路8はデータ変換回路13の
出力データについてのリーディングゼロを検出し、検出
結果をリーディングゼロレジスタ9に加える。
When the second word read from the register file 2 is added, the zero check circuit 6 checks whether the characters contained in the second word are all zeros.
If all zeros are present, the signal applied to the zero accumulation circuit 12 is “1”.
”, and if the signal is not all zero, the signal applied to the zero accumulation circuit 12 is set to “0”. Also, in the zero accumulation circuit 12 having the configuration shown in FIG. Only in the case of "1" (when both the most significant word and the second word are all zeros), the signal applied to the zero register 7' is set to "1". Also, the third
When the output signal of the zero register 7° is "1" (when the most significant word is all zeros), the data conversion circuit 13 having the configuration shown in the figure converts the second word read from the register file 2 directly to the leading zero. Detection circuit 8
In addition, if the output signal of zero register 7゛ is °0'' (
If the most significant word is not all zeros), the most significant bit of the second word read from the register file 2 is set to "1" and is added to the leading zero detection circuit 8. Leading zero detection circuit 8 detects leading zero in the output data of data conversion circuit 13 and adds the detection result to leading zero register 9.

ここで、最上位ワードがオールゼロでない場合、レジス
タファイル2から読出された2番目のワードの内の最上
位ビットを“1”とするのは、次の理由からである。即
ち、最上位ビットがオールゼロでない場合は、2番目の
ワードについてリーディングゼロをカウントとしても無
意味であるから、最上位ワードがオールゼロでない場合
は、2番目のワードの最上位ビットを“1”とし、リー
ディングゼロ検出回路8のリーディングゼロカウント値
を「0」とするためである。
Here, if the most significant word is not all zeros, the most significant bit of the second word read from the register file 2 is set to "1" for the following reason. In other words, if the most significant bits are not all zeros, it is meaningless to count leading zeros for the second word, so if the most significant word is not all zeros, the most significant bit of the second word is set to "1". This is to set the leading zero count value of the leading zero detection circuit 8 to "0".

次いで、制御装置1°はレジスタファイル3に書込信号
fを加えることによりレジスタファイル2の「1」番地
から読出された2番目のワードをレジスタファイル3の
「1」番地に格納し、加算器10に加算信号Cを加え、
ゼロカウントレジスタ11にセント信号すを加えること
によりリーディングゼロカウントレジスタ9の内容LD
ZR(この場合は最上位ワードについてのリーディング
ゼロカウント値)とゼロカウントレジスタ11の内容Z
CR(この場合は「0」)とを加算して加算結果(この
場合最上位ワードについてのリーディングゼロカウント
値)をゼロカウントレジスタ11にセットし、ゼロレジ
スタ7゛にセット信号eを加えることによりゼロ累積回
路12の出力信号をゼロレジスタ7°にセントし、リー
ディングゼロレジスタ9にセント信号dを加えることに
より2番目のワードについてのリーディングゼロカウン
ト値をセントし、アドレスレジスタ4.5に「2」番地
をセットすることによりレジスタファイル2の「2」番
地に格納されている3番目のワードを読出す(ステップ
33)。ステップS3で読出された3番目のワードはレ
ジスタファイル3、ゼロチェック回路6及びデータ変換
回路13に加えられる。
Next, the control device 1° stores the second word read from address “1” of register file 2 at address “1” of register file 3 by applying a write signal f to register file 3, and stores the second word read out from address “1” of register file 3 into address “1” of register file 3. Add the addition signal C to 10,
By adding a cent signal to the zero count register 11, the contents of the leading zero count register 9 can be changed to LD.
ZR (in this case, the leading zero count value for the most significant word) and the contents of zero count register 11 Z
CR (in this case, "0") and set the addition result (in this case, the leading zero count value for the most significant word) in the zero count register 11, and by adding the set signal e to the zero register 7. The output signal of the zero accumulation circuit 12 is sent to the zero register 7°, and the leading zero count value for the second word is sent by adding the cent signal d to the leading zero register 9, and the address register 4.5 is set to ``2''. '' address, the third word stored at address ``2'' of register file 2 is read out (step 33). The third word read in step S3 is applied to the register file 3, zero check circuit 6 and data conversion circuit 13.

ゼロチェック回路6は3番目のワードに含まれるキャラ
クタがオールゼロであるか否かを示す信号をゼロ累積回
路12に加え、ゼロ累積回路12はゼロチェック回路6
及びゼロレジスタ7°の出力信号が共に“1”の場合(
最上位ワードから3番目のワードまでに含まれるキャリ
ーが全てオールゼロの場合)のみゼロレジスタ7゛に加
える信号を1”とする。また、データ変換回路13はゼ
ロレジスタ7′の出力信号が1”の場合(最上位ワード
及び2番目のワードが共にオールゼロの場合)はレジス
タファイル2から読出された3番目のワードをそのまま
リーディングゼロ検出回路8に加え、ゼロレジスタ7°
の出力信号が“O”の場合(1番目。
The zero check circuit 6 applies a signal indicating whether or not the characters included in the third word are all zeros to the zero accumulation circuit 12.
and the output signals of zero register 7° are both “1” (
Only when all carries included in the third word from the most significant word are all zeros), the signal added to the zero register 7' is set to 1''.In addition, the data conversion circuit 13 sets the output signal of the zero register 7' to 1''. In the case (when both the most significant word and the second word are all zeros), the third word read from the register file 2 is directly added to the leading zero detection circuit 8, and the zero register 7°
When the output signal of is “O” (1st.

2番目のワードにゼロでないキャラクタが含まれている
場合)は3番目のワードの内の最上位ビットを“1′に
してリーディングゼロ検出回路8に加え、リーディング
ゼロ検出回路8はデータ変換回路13の出力データにつ
いてのリーディングゼロを検出し、検出結果をリーディ
ングゼロレジスタ9に加える。
If the second word contains a non-zero character, the most significant bit of the third word is set to “1” and added to the leading zero detection circuit 8, and the leading zero detection circuit 8 converts the data into the data conversion circuit 13. The leading zero of the output data is detected and the detection result is added to the leading zero register 9.

次いで、制御装置1”はレジスタファイル3に書込信号
fを加えることにより、レジスタファイル3の「2」番
地にレジスタファイル2の「2」番地から続出された3
番目のワードを格納し、加算器10に加算信号Cを加え
、ゼロカウントレジスタ11にセット信号すを加えるこ
とによりリーディングゼロレジスタ9の内容LDZRと
ゼロカウントレジスタ11の内容ZCRとの加算結果を
ゼロカウントレジスタ11にセットし、ゼロレジスタ7
′にセット信号eを加えることによりゼロ累積回路12
の出力信号をゼロレジスタ7°にセットし、リーディン
グゼロレジスタ9にセント信号dを加えることにより3
番目のワードについてのリーディングゼロ検出回路8の
検出結果をリーディングゼロレジスタ9にセントし、ア
ドレスレジスタ4,5に「3」番地をセントすることに
よりレジスタファイル2がら4番目のワードを読出す(
ステップ34)。ここで、ゼロカウントレジスタ11に
は最上位ワードについてのリーディングゼロカウント値
がセントされているものであるから、ゼロカウントレジ
スタ11の内容ZCI?とリーディングゼロレジスタ9
の内容LDZRとを加算することにより、最上位ワード
に含まれるキャラクタがオールゼロであれば最上位ワー
ドから2番目のワードまでのリーディングゼロカウント
値が求められることになる。尚、最上位ワードに含まれ
るキャラクタがオールゼロでなければ、前述したように
リーディングゼロ検出回路8の検出結果がrOJとなる
ものであるがら、ゼロカウントレジスタ11には最上位
ワードについてのリーディングゼロカウント値が保持さ
れることになる。
Next, the control device 1'' applies a write signal f to the register file 3, thereby writing the 3 data successively written from the address ``2'' of the register file 2 to the address ``2'' of the register file 3.
By storing the th word, and adding an addition signal C to the adder 10 and a set signal S to the zero count register 11, the result of addition of the content LDZR of the leading zero register 9 and the content ZCR of the zero count register 11 is set to zero. Set in count register 11 and zero register 7
By adding a set signal e to ', the zero accumulation circuit 12
By setting the output signal of 0 to zero register 7° and adding cent signal d to leading zero register 9, 3
The detection result of the leading zero detection circuit 8 for the th word is written to the leading zero register 9, and the 4th word is read from the register file 2 by writing the address "3" to the address registers 4 and 5 (
Step 34). Here, since the leading zero count value for the most significant word is stored in the zero count register 11, the contents of the zero count register 11 ZCI? and leading zero register 9
If the characters included in the most significant word are all zeros, the leading zero count value from the most significant word to the second word can be obtained by adding the content LDZR. Note that if the characters included in the most significant word are not all zeros, the detection result of the leading zero detection circuit 8 will be rOJ as described above, but the zero count register 11 will contain the leading zero count for the most significant word. The value will be retained.

次いで、制御装置1“はレジスタファイル3に書込信号
rを加えることによりレジスタファイル3の「3」番地
に4番目のワードを格納し、加算器10に加算信号Cを
加え、ゼロカウントレジスタ11にセット信号すを加え
ることによりリーディングゼロレジスタ9の内容LOZ
I?とゼロカウントレジスタ11の内容ZCI?との加
算結果をゼロカウントレジスタ11にセットし、ゼロレ
ジスタ7′にセット信号eを加えることによりゼロ累積
回路12の出力信号をゼロレジスタ7°にセントし、リ
ーディングゼロレジスタ9にセット信号dを加えること
により4番目のワードについてのリーディングゼロ検出
回路8の検出結果をリーディングゼロレジスタ9にセッ
トする(ステップS 5 )’、ここで、最上位ワード
及び2番目のワードがオールゼロであればレジスタファ
イル2から読出された3番目のワードはそのままリーデ
ィングゼロ検出回路8に加えられるものであるから、ス
テップS5に於いてリーディングゼロレジスタ9の内容
LDZRとゼロカウントレジスタ11の内容ZCRとを
加算することにより最上位ワードから3番目のワードま
でのリーディングゼロカウント値が求められることにな
る。また、3番目のワードよりも上位のワードにオール
ゼロでないワードがある場合は、3番目のワードの最上
位ビットは必ず“1”となり、リーディングゼロ検出回
路8の検出結果がrOJとなるものであるから、ゼロカ
ウントレジスタ11にセットされているリーディングゼ
ロカウント値が変更されることはない。
Next, the control device 1'' stores the fourth word at address "3" of the register file 3 by applying a write signal r to the register file 3, adds an addition signal C to the adder 10, and writes the zero count register 11. By adding a set signal to LOZ, the contents of the leading zero register 9 can be changed.
I? and the contents of zero count register 11 ZCI? By setting the addition result to the zero count register 11 and adding the set signal e to the zero register 7', the output signal of the zero accumulation circuit 12 is set to the zero register 7°, and the set signal d is applied to the leading zero register 9. By adding, the detection result of the leading zero detection circuit 8 for the fourth word is set in the leading zero register 9 (step S5)'.Here, if the most significant word and the second word are all zeros, the register file Since the third word read from 2 is directly added to the leading zero detection circuit 8, by adding the content LDZR of the leading zero register 9 and the content ZCR of the zero count register 11 in step S5, The leading zero count value from the most significant word to the third word will be determined. Furthermore, if there is a word that is not all zeros in a word higher than the third word, the most significant bit of the third word will always be "1", and the detection result of the leading zero detection circuit 8 will be rOJ. Therefore, the leading zero count value set in the zero count register 11 is not changed.

次いで、制御装置1゛は加算器10に加算信号Cを加え
、ゼロカウントレジスタ11にセット信号すを加えるこ
とによりリーディングゼロレジスタ9の内容LDZRと
ゼロカウントレジスタIIの内容ZCRとの加算結果を
ゼロカウントレジスタ11にセットする(ステップS6
)。ここで、4番目のワードよりも上位のワードがオー
ルゼロであれば4番目のワードはそのままリーディング
ゼロ検出回路8に加えられるものであるから、ステップ
$6でリーディングゼロレジスタ9の内容[、DZRと
ゼロカウントレジスタ11の内容ZCRとを加算するこ
とにより最上位ワードから4番目のワードまでのリーデ
ィングゼロカウント値を求めることができる。また、4
番目のワードよりも上位のワードにオールゼロでないワ
ードがある場合は4番目のワードの最上位ビットは必ず
“1”となり、リーディングゼロ検出回路8の検出結果
が「0」になるものであるから、リーディングゼロレジ
スタ11にセットされているリーディングゼロカウント
値が変更されることはない。
Next, the control device 1' applies an addition signal C to the adder 10 and a set signal S to the zero count register 11, thereby zeroing out the addition result of the content LDZR of the leading zero register 9 and the content ZCR of the zero count register II. Set in count register 11 (step S6
). Here, if the words higher than the fourth word are all zeros, the fourth word is added as is to the leading zero detection circuit 8, so in step $6 the contents of the leading zero register 9 [, DZR and By adding the contents ZCR of the zero count register 11, the leading zero count values from the most significant word to the fourth word can be obtained. Also, 4
If there is a word that is not all zeros in a word higher than the 4th word, the most significant bit of the 4th word will always be "1", and the detection result of the leading zero detection circuit 8 will be "0". The leading zero count value set in the leading zero register 11 is not changed.

このように、本実施例はリーディングゼロのカウントを
行なうワードよりも上位のワードがオールゼロでない場
合、リーディングゼロ検出回路8の計数値がゼロとなる
ように、レジスタファイル2から読出されたワードを変
換するものであるから、制御装置1゛はリーディングゼ
ロのカウントを行なっているワードよりも上位のワード
がオールゼロであるか否かを判別する必要がなく、従っ
て制′a装置1°の処理内容を従来例に比較して簡単に
することができると共にその金物量を少ないものとする
ことができる。
In this way, this embodiment converts the word read from the register file 2 so that if the word higher than the word whose leading zero is counted is not all zero, the count value of the leading zero detection circuit 8 becomes zero. Therefore, the control device 1 does not need to determine whether or not the words higher than the word whose leading zeros are being counted are all zeros, and therefore the processing content of the control device 1 is It can be made simpler and the amount of hardware can be reduced compared to the conventional example.

尚、上述した実施例に於いては、リーディングゼロのカ
ウントを行なうワードよりも上位のワードがオールゼロ
でない場合、データ変換回路13でリーディングゼロの
カウントを行なうワードの最上位ビットを1″とするこ
とにより、リーディングゼロカウント値がセットされる
ゼロカウントレジスタ11の更新を停止するようにした
が、これに限られるものではなく、例えば加算器10の
動作を停止するようにしても良いことは勿論である。
In the above-described embodiment, if the word higher than the word whose leading zeros are to be counted is not all zeros, the most significant bit of the word whose leading zeros are to be counted is set to 1'' in the data conversion circuit 13. Accordingly, the updating of the zero count register 11 to which the leading zero count value is set is stopped, but the present invention is not limited to this, and it is of course possible to stop the operation of the adder 10, for example. be.

また、上述した実施例に於いては説明しなかったが、数
値データを構成する最上位ワードから最下位ワードまで
のワードに含まれるキャラクタがオールゼロの場合、ゼ
ロレジスタ7′の内容は“1”になっているものである
から、ゼロレジスタ7′の内容に基づいて数値データが
オールゼロであるか否かを容易に判定することが可能と
なる。これに対して、第5図に示した従来例ではゼロレ
ジスタフの内容が“1”であっても数値データがオール
ゼロであるとは言えず、数値データがオールゼロである
か否かを検出するためにはゼロカウントレジスタ11に
セットされているリーディングゼロカウント値と数値デ
ータの長さとを比較しなければならないので、数値デー
タがオールゼロであるか否かを判定するのが面倒になる
問題がある。
Furthermore, although not explained in the above embodiment, if all characters included in the words from the most significant word to the least significant word constituting the numerical data are zero, the content of the zero register 7' is "1". Therefore, it is possible to easily determine whether the numerical data is all zero based on the contents of the zero register 7'. On the other hand, in the conventional example shown in Figure 5, even if the content of the zero register is "1", it cannot be said that the numerical data is all zeros, and the Since the leading zero count value set in the zero count register 11 must be compared with the length of the numerical data, there is a problem in that it becomes troublesome to determine whether the numerical data is all zeros.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、ゼロレジスタの出力信
号がゼロチェック回路に加えられたワードよりも上位の
ワードがオールゼロであることを示している場合はゼロ
チェック回路に加えられているワードと同一のワードを
リーディングゼロ検出回路に加え、オールゼロでないこ
とを示している場合はリーディングゼロ検出回路8.リ
ーディングゼロレジスタ9.加算器、ゼロカウントレジ
スタ11等からなるリーディングゼロカウント手段によ
るリーディングゼロのカウントを抑止するデータ変換回
路13等からなる抑止手段を備えたものであり、制御装
置はリーディングゼロをカウントするワードよりも上位
のワードがオールゼロであるか否かを判定する必要がな
くなるものであるから、従来例に比較して制御装置の金
物量及びファームウェア量を減少させることができる利
点がある。
As explained above, in the present invention, if the output signal of the zero register indicates that the word higher than the word added to the zero check circuit is all zeros, the word added to the zero check circuit is Add the same word to the leading zero detection circuit, and if it shows that it is not all zeros, the leading zero detection circuit 8. Leading zero register9. It is equipped with a suppressing means consisting of a data conversion circuit 13, etc., which suppresses counting of leading zeros by a leading zero counting means consisting of an adder, a zero count register 11, etc., and the control device is installed in a higher order than the word for counting leading zeros. Since it is no longer necessary to determine whether or not all words are zero, there is an advantage that the amount of hardware and firmware of the control device can be reduced compared to the conventional example.

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

第1図は本発明の実施例のブロック図、第2図はゼロ累
積回路12の構成例を示す回路図、第3図はデータ変換
回路13の構成例を示す回路図、 第4図は制御装置1′の処理内容の一例を示すフローチ
ャート、 第5図は従来例のブロック図及び、 第6図は制御袋W1の処理内容の一部を示すフローチャ
ートである。 図に於いて、1,1′・・・制御装置、2.3・・・レ
ジスタファイル、4,5・・・アドレスレジスタ、6・
・・ゼロチェック回路、7.7°・・・ゼロレジスタ、
8・・・リーディングゼロ検出回路、9・・・リーディ
ングゼロレジスタ、10t・・加算器、11・・・ゼロ
カウントレジスタ、12・・・ゼロ累積回路、13・・
・データ変換回路、21・・・アンド回路、22・・・
セレクタ、31・・・インバータ、32・・・オア回路
。 本発明の大流例のブロック図 第1図 6より′1″ ゼロ累積回路120a成例な示す回路図第2図 8ヘ データ変換回路13の構成例を示す回路図第3図
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a circuit diagram showing an example of the configuration of the zero accumulation circuit 12, FIG. 3 is a circuit diagram showing an example of the configuration of the data conversion circuit 13, and FIG. 4 is a control diagram. FIG. 5 is a block diagram of a conventional example, and FIG. 6 is a flowchart showing a part of the processing contents of the control bag W1. In the figure, 1, 1'...control device, 2.3...register file, 4,5...address register, 6.
・・Zero check circuit, 7.7°・・Zero register,
8... Leading zero detection circuit, 9... Leading zero register, 10t... Adder, 11... Zero count register, 12... Zero accumulation circuit, 13...
・Data conversion circuit, 21...AND circuit, 22...
Selector, 31... Inverter, 32... OR circuit. Block diagram of a large flow example of the present invention FIG. 1 From 6 '1'' A circuit diagram showing an example of the zero accumulation circuit 120a FIG. 2 A circuit diagram showing an example of the configuration of the data conversion circuit 13

Claims (1)

【特許請求の範囲】 複数ワードから構成される数値データのリーディングゼ
ロカウントを行なうデータ処理装置に於いて、 前記数値データを構成する複数のワードが上位ワードよ
り順次入力され、入力されたワードに含まれるキャラク
タがオールゼロであるか否かをチェックし、その結果を
示す信号を出力するゼロチェック回路と、 入力信号がセットされるゼロレジスタと、 該ゼロレジスタの出力信号と前記ゼロチェック回路の出
力信号との論理積をとることにより、最上位ワードから
前記ゼロチェック回路でチェックが済んだワードまでに
含まれるキャラクタがオールゼロであるか否かを示す信
号を前記ゼロレジスタに出力するゼロ累積回路と、 入力されたワードについてその上位の桁からゼロでない
桁が現れるまでのゼロの桁数をカウントすると共に各ワ
ードについての桁数を順次加算するリーディングゼロカ
ウント手段と、 前記ゼロレジスタの出力信号が前記ゼロチェック回路に
入力されたワードよりも上位のワードがオールゼロでな
いことを示している場合は前記リーディングゼロカウン
ト手段によるリーディングゼロのカウントを抑止し、前
記ゼロレジスタの出力信号が前記ゼロチェック回路に入
力されたワードよりも上位のワードがオールゼロである
ことを示している場合は前記ゼロチェック回路に入力さ
れたワードと同一のワードを前記リーディングゼロカウ
ント手段に入力する抑止手段と、 前記ゼロチェック回路に前記数値データを構成する複数
のワードを上位ワードより1ワードずつ順次加えると共
に、前記ゼロレジスタの入力信号のセットタイミング及
び前記リーディングゼロカウント手段の動作タイミング
を制御する制御手段とを備えたことを特徴とするデータ
処理装置。
[Scope of Claims] In a data processing device that performs leading zero counting of numerical data consisting of a plurality of words, a plurality of words constituting the numerical data are input sequentially from the upper word, and the words included in the input words are a zero check circuit that checks whether or not all characters are zero and outputs a signal indicating the result; a zero register to which an input signal is set; an output signal of the zero register and an output signal of the zero check circuit. a zero accumulation circuit that outputs a signal to the zero register indicating whether or not the characters included from the most significant word to the word checked by the zero check circuit are all zeros by performing an AND with the zero check circuit; leading zero counting means for counting the number of zero digits from the most significant digit of the input word until a non-zero digit appears, and sequentially adding the number of digits for each word; If the word higher than the word input to the check circuit indicates that the word is not all zeros, counting of leading zeros by the leading zero count means is inhibited, and the output signal of the zero register is input to the zero check circuit. suppressing means for inputting the same word as the word inputted to the zero check circuit to the leading zero counting means if the word higher than the word inputted indicates that the word is all zero; It is characterized by comprising a control means for sequentially adding a plurality of words constituting the numerical data one word at a time starting from the upper word, and for controlling the set timing of the input signal of the zero register and the operation timing of the leading zero count means. data processing equipment.
JP61180578A 1986-07-31 1986-07-31 Data processing device Expired - Lifetime JPH0746309B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61180578A JPH0746309B2 (en) 1986-07-31 1986-07-31 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61180578A JPH0746309B2 (en) 1986-07-31 1986-07-31 Data processing device

Publications (2)

Publication Number Publication Date
JPS6336430A true JPS6336430A (en) 1988-02-17
JPH0746309B2 JPH0746309B2 (en) 1995-05-17

Family

ID=16085716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61180578A Expired - Lifetime JPH0746309B2 (en) 1986-07-31 1986-07-31 Data processing device

Country Status (1)

Country Link
JP (1) JPH0746309B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7071926B2 (en) 2000-11-06 2006-07-04 Nissha Printing Co., Ltd. Touch panel capable of wide-area inputting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7071926B2 (en) 2000-11-06 2006-07-04 Nissha Printing Co., Ltd. Touch panel capable of wide-area inputting

Also Published As

Publication number Publication date
JPH0746309B2 (en) 1995-05-17

Similar Documents

Publication Publication Date Title
NL192698C (en) Processing system for processing digital data.
JPS59111542A (en) Program counter stack method and nested subroutine and instruction apparatus
US3887901A (en) Longitudinal parity generator for mainframe memories
JPS5926059B2 (en) control circuit
US4575796A (en) Information processing unit
JPS6336430A (en) Data processor
US4947358A (en) Normalizer for determining the positions of bits that are set in a mask
JPH0315221B2 (en)
JPS6120889B2 (en)
EP0052757B1 (en) Method of decoding phrases and obtaining a readout of events in a text processing system
JPS59178544A (en) Memory access circuit
JPS6126979Y2 (en)
JPH061445B2 (en) Checksum circuit in microcomputer
JPS642970B2 (en)
SU1591027A2 (en) Device for interfacing cental processor with group of peripherals
SU1481758A1 (en) Processor instruction fetching unit
JPH03147036A (en) Variable length data processor
SU1531093A1 (en) Markovian process generator
SU847371A1 (en) Fixed storage
SU836682A1 (en) Self-checking storage
SU1737456A1 (en) Stack memory device
JPS5730198A (en) Information processing system
SU881876A1 (en) Error detecting storage device
JPH0439732A (en) Variable length data processor
JPS6017131B2 (en) memory control circuit