JPS6380324A - Microcomputer circuit - Google Patents
Microcomputer circuitInfo
- Publication number
- JPS6380324A JPS6380324A JP61226477A JP22647786A JPS6380324A JP S6380324 A JPS6380324 A JP S6380324A JP 61226477 A JP61226477 A JP 61226477A JP 22647786 A JP22647786 A JP 22647786A JP S6380324 A JPS6380324 A JP S6380324A
- Authority
- JP
- Japan
- Prior art keywords
- data
- circuit
- buffer
- microcomputer
- block
- 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.)
- Pending
Links
- 239000000872 buffer Substances 0.000 claims abstract description 45
- 230000002457 bidirectional effect Effects 0.000 claims description 13
- 230000004044 response Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はブロックサーチ命令を有するマイクロコンピュ
ータを用いて構成したマイクロコンピュータ回路に関す
る。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer circuit constructed using a microcomputer having a block search instruction.
マイクロコンピュータを使用したマイクロコンピュータ
回路に於いては、メモリに記憶されている特定データ或
いは特定データ以外のデータを検索する処理を行なう場
合がある。このような、データ検索の一般的な方法は、
検索すべきメモリの開始アドレスから検索終了アドレス
までのデータを順次読出し、これを特定データと比較す
る処理を行なわせるプログラムをマイクロコンピュータ
に具備されたメモリリード命令、比較命令等を組合わせ
て作成するものであるが、このような方法ではプログラ
ムの作成が面倒であり、且つ処理時間も長くかかってし
まう。In a microcomputer circuit using a microcomputer, processing may be performed to search for specific data or data other than specific data stored in a memory. A common method of data retrieval is
Create a program that sequentially reads data from the start address of the memory to be searched to the search end address and compares it with specific data by combining memory read instructions, comparison instructions, etc. provided in the microcomputer. However, with such a method, creating a program is troublesome and the processing time is also long.
そこで、マイクロコンピュータの中には、例えば、Z−
80(ザイログ社製マイクロコンピュータ)に見られる
ように、1命令で一定範囲のメモリエリア上の特定デー
タの検索(−敗検出)を行なうことができるブロックサ
ーチ命令を持ったものが知られており、これにより特定
データの検索を容易に且つ高速に行なえるようになった
。Therefore, in microcomputers, for example, Z-
80 (microcomputer manufactured by Zilog), there are known ones that have a block search instruction that allows searching for specific data in a certain range of memory areas (defeat detection) with one instruction. This has made searching for specific data easier and faster.
しかしながら、上記したZ−80は特定データ以外のデ
ータを1命令でブロック検索する命令がないため、メモ
リ上の特定データ以外のデータを検索する場合(例えば
、O以外のデータを検索する場合等)、即ち不一致検出
を行なう場合は、上述したような一般的な方法を使用し
て検索を行なわなければならず、マイクロコンピュータ
への指示が面倒であり、特にデータ量が多い場合には処
理時間が膨大なものとなる問題があった。However, the Z-80 described above does not have an instruction to search a block of data other than specific data with one instruction, so when searching for data other than specific data in memory (for example, when searching for data other than O) In other words, when detecting discrepancies, it is necessary to perform a search using the general method described above, and the instructions to the microcomputer are troublesome, and the processing time is particularly high when the amount of data is large. The problem was enormous.
本発明は前述の如き問題点を解決したものであり、その
目的は特定データ以外のデータの検索を特定データ検索
用のブロックサーチ命令を用いて行ない得るようにする
ことにある。The present invention solves the above-mentioned problems, and its purpose is to enable searching for data other than specific data using a block search command for searching for specific data.
本発明は前述の如き問題点を解決するため、ブロックサ
ーチ命令を有するマイクロコンピュータを用いたマイク
ロコンピュータ回路に於いて、前記マイクロコンピュー
タに接続される第1のデータバスと、
該第1のデータバスと双方向バッファを介して接続され
る第2のデータバスと、
特定データがラッチされるラッチ回路と、該ラッチ回路
にラッチされた特定データと前記第2のデータバス上の
データとを比較する比較回路と、
該比較回路と前記第1のデータバスとの間に設けられ、
該比較回路の比較結果に応じたデータを前記第1のデー
タバスに出力する単方向バッファと、
前記ブロックサーチ命令を前記特定データ以外のデータ
の検索に使用するか否かのモード選択を行なう動作モー
ド選択回路と、
該動作モード選択回路によって選択されたモードに応じ
て前記単方向バッファ及び双方向バッファの開閉を制御
するバッファ開閉回路とを設けたものである。In order to solve the above-mentioned problems, the present invention provides a microcomputer circuit using a microcomputer having a block search instruction, including: a first data bus connected to the microcomputer; a second data bus connected to the second data bus via a bidirectional buffer; a latch circuit for latching specific data; and comparing the specific data latched by the latch circuit with the data on the second data bus. a comparison circuit; provided between the comparison circuit and the first data bus;
a unidirectional buffer that outputs data according to a comparison result of the comparison circuit to the first data bus; and an operation that selects a mode for determining whether or not the block search command is used to search for data other than the specific data. A mode selection circuit and a buffer opening/closing circuit for controlling opening/closing of the unidirectional buffer and bidirectional buffer according to the mode selected by the operation mode selection circuit are provided.
ブロックサーチ命令により、ラッチ回路にラッチされて
いる特定データ以外のデータを検索する場合には、バッ
ファ開閉回路により単方向バッファが開にされ、双方向
バッファが閉にされる。従って、この場合、マイクロコ
ンピュータには単方向バッファ及び第1のデータバスを
介して比較回路の比較結果に対応したデータが加えられ
ることになる。従って、マイクロコンピュータは比較回
路による比較結果が不一致の時に単方向バッファから出
力されるデータを検索するブロックサーチ命令を実行す
ることにより、特定データ以外のデータの検索を行なう
ことが可能となる。When searching for data other than the specific data latched in the latch circuit by a block search command, the buffer opening/closing circuit opens the unidirectional buffer and closes the bidirectional buffer. Therefore, in this case, data corresponding to the comparison result of the comparison circuit is applied to the microcomputer via the unidirectional buffer and the first data bus. Therefore, the microcomputer can search for data other than specific data by executing a block search instruction to search for data output from the unidirectional buffer when the comparison result by the comparison circuit is inconsistent.
次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
第1図に於いて、1はZ−80等のマイクロコンピュー
タ、2はメモリ、3はマグニチュードコンパレータ等か
らなる比較回路、4は特定データ以外の検索を行なう場
合、特定データがラッチされるラッチ回路、5はバッフ
ァ開閉回路、6は動作モード選択回路、7は単方向バッ
ファ、8は双方向バッファ、9はエムワン信号Ml、1
0リクエスト信号10RQ、 メモリリクエスト信号M
REQ。In Figure 1, 1 is a microcomputer such as Z-80, 2 is a memory, 3 is a comparison circuit consisting of a magnitude comparator, etc., and 4 is a latch circuit that latches specific data when searching for data other than specific data. , 5 is a buffer opening/closing circuit, 6 is an operation mode selection circuit, 7 is a unidirectional buffer, 8 is a bidirectional buffer, 9 is an M1 signal Ml, 1
0 request signal 10RQ, memory request signal M
REQ.
リード信号RD、 ライト信号WR等が伝送されるコン
トロール信号バス、10はアドレスバス、11゜11°
はデータバス、12はインバータである。A control signal bus through which read signals RD, write signals WR, etc. are transmitted, 10 is an address bus, 11° 11°
is a data bus, and 12 is an inverter.
ラッチ回路4にはマイクロコンピュータ1の成るI10
アドレスが割当てられており、マイクロコンピュータ1
より任意の8ビツトのデータをアウト命令(OUT命令
)によって書込むことができるものである。比較回路3
はラッチ回路4にラッチされている特定データとメモリ
2から続出されたデータとを比較し、比較不一致のとき
にその出力信号をハイレベル、ローレベルの内の予め定
められた一方のレベルにするものであり、以下、本実施
例に於いては比較不一致の場合、比較回路3はその出力
信号をローレベルにするものとする。The latch circuit 4 includes I10, which is made up of the microcomputer 1.
address is assigned and the microcomputer 1
Any 8-bit data can be written using an OUT instruction. Comparison circuit 3
compares the specific data latched in the latch circuit 4 with the data successively output from the memory 2, and sets the output signal to a predetermined one of high level and low level when the comparison does not match. Hereinafter, in this embodiment, if the comparison does not match, the comparator circuit 3 will set its output signal to a low level.
動作モード選択回路6はマイクロコンピュータ1の制御
により、その出力信号をハイレベル或いはローレベルに
するものであり、動作モード選択回路6の出力信号がハ
イレベルの場合にはブロックサーチ命令により特定デー
タの検索が行なわれ、ローレベルの場合にはブロックサ
ーチ命令により特定データ以外のデータの検索が行なわ
れるものである。バッファ開閉回路5は単方向バッファ
7及び双方向バッファ8の開閉を制御するものであり、
動作モード選択回路6の出力信号がローレベルで、且つ
マイクロコンピュータ1がメモリ2に記憶されているデ
ータを読込むためにアドレスバス10にメモリ2に割当
てられているアドレスを出力した際、コントロール信号
バス9上のリード信号RDをアクティブ状態にした場合
のみ、単方向バッファ7を開、双方向バッファ8を閉と
し、それ以外の場合は単方向バッファ7を閉、双方向バ
ッファ8を開とするものである。単方向バッファ7は開
とされることにより、比較回路3の出力信号を最下位ビ
ットに出力し、他の7ビツトをローレベルにするもので
あり、従って、メモリ2から読出されたデータとラッチ
回路4にラッチされている特定データとが不一致の場合
には単方向バッファ7より08(8ビツト全てローレベ
ル)が出力され、その他の場合は1エ (最下位ビット
のみがハイレベルで他の7ピントは全てローレベル)が
出力されることになる。The operation mode selection circuit 6 sets its output signal to high level or low level under the control of the microcomputer 1. When the output signal of the operation mode selection circuit 6 is high level, specific data is selected by a block search command. A search is performed, and when the level is low, a block search command is used to search for data other than specific data. The buffer opening/closing circuit 5 controls opening/closing of the unidirectional buffer 7 and the bidirectional buffer 8.
When the output signal of the operation mode selection circuit 6 is at a low level and the microcomputer 1 outputs the address assigned to the memory 2 to the address bus 10 in order to read data stored in the memory 2, the control signal bus 9 Only when the above read signal RD is activated, the unidirectional buffer 7 is opened and the bidirectional buffer 8 is closed; otherwise, the unidirectional buffer 7 is closed and the bidirectional buffer 8 is opened. be. When the unidirectional buffer 7 is opened, it outputs the output signal of the comparator circuit 3 to the least significant bit and sets the other 7 bits to low level. Therefore, the data read from the memory 2 and the latch are output. If there is a mismatch with the specific data latched in the circuit 4, the unidirectional buffer 7 outputs 08 (all 8 bits are low level), and in other cases, 08 (all 8 bits are low level) is output. All 7 pinpoints will be output at low level).
次にブロックサーチ命令を用いて特定データ以外のデー
タを検索する場合の動作を説明する。尚、この場合、特
定データを“n”とする。Next, the operation when searching for data other than specific data using a block search command will be described. Note that in this case, the specific data is "n".
マイクロコンピュータ1がブロックサーチ命令を実行す
る前には下記■〜■に示す初期設定が行なわれる。Before the microcomputer 1 executes the block search command, initial settings shown in (1) to (4) below are performed.
■ マイクロコンピュータl内のアキエムレータにON
をセットする。■ Turn on the Akiemulator in the microcomputer
Set.
■ アウト命令を用いてラッチ回路4に特定データ“n
”を書込む。■ Input specific data “n” to the latch circuit 4 using an out command.
”.
■ アウト命令を用いて動作モード選択回路6の出力信
号をローレベルにする。(2) Set the output signal of the operation mode selection circuit 6 to low level using the OUT command.
■ マイクロコンピュータ1内のレジスタベアHしに、
検索を開始するメモリ2のアドレスをセットする。■ To the register bear H in the microcomputer 1,
Set the address of memory 2 to start the search.
■ マイクロコンピュータ1内のバイトカウンタBCに
、■でセットしたアドレスから何バイトにわたってデー
タの検索を行なうかを示すバイト数をセントする。(2) Enter the number of bytes in the byte counter BC in the microcomputer 1, indicating how many bytes to search for data starting from the address set in (2).
上記■〜■に示す初期設定が行なわれた後、マイクロコ
ンピュータlはブロックサーチ命令を実行するものであ
り、先ず、メモリ2のレジスタペアHLの内容で指定さ
れるアドレスに記憶されているデータを読出し、次いで
、データバス11上のデータを読込む、この時、動作モ
ード選択回路6の出力信号は前記■でローレベルにされ
ており、また、マイクロコンピュータ1はコントロール
信号バス9上のリード信号RDをアクティブとするので
、バッファ開閉回路5は単方向バッファ7を開、双方向
バッファ8を閉とする。従って、この場合、マイクロコ
ンピュータ1は単方向バッファ7及びデータバス11を
介して加えられる比較回路3の比較結果に対応したデー
タを読込むことになる。After the initial settings shown in ■ to ■ above are performed, the microcomputer l executes a block search instruction, and first, it searches the data stored at the address specified by the contents of the register pair HL in the memory 2. Then, the data on the data bus 11 is read. At this time, the output signal of the operation mode selection circuit 6 is set to a low level in the above-mentioned (2), and the microcomputer 1 reads the read signal on the control signal bus 9. Since RD is activated, the buffer opening/closing circuit 5 opens the unidirectional buffer 7 and closes the bidirectional buffer 8. Therefore, in this case, the microcomputer 1 reads data corresponding to the comparison result of the comparison circuit 3 applied via the unidirectional buffer 7 and the data bus 11.
次いで、マイクロコンピュータ1は読込んだデータとア
キュムレータの内容とを比較し、比較−敗の場合は特定
データ”n”以外のデータを検索したとしてフラグFを
セットし、その後、アウト命令により動作モード選択回
路6の出力信号をハイレベルに戻す、即ち、アキュムレ
ータには前記した■で08がセットされており、またラ
ッチ回路4にラッチされている特定データ“n”とメモ
IJ 2から読出されたデータとが不一致の場合、単方
向バッファ7の出力は前述したようにO工となるもので
あるから、読込んだデータとアキエムレータの内容とが
一致した場合、マイクロコンピュータ1は特定データ以
外のデータを検索したとしてフラグをセットするもので
ある。Next, the microcomputer 1 compares the read data with the contents of the accumulator, and if the comparison fails, it sets a flag F as data other than the specific data "n" has been retrieved, and then changes the operating mode by an OUT command. The output signal of the selection circuit 6 is returned to a high level, that is, the accumulator is set to 08 in the above-mentioned case, and the specific data "n" latched in the latch circuit 4 and read from the memo IJ 2 are set. If the data do not match, the output of the unidirectional buffer 7 will be output as described above. Therefore, if the read data matches the contents of the Achiemulator, the microcomputer 1 will output data other than the specific data. This flag is set to indicate that the search has been performed.
また、比較不一致の場合は、マイクロコンピュータ1は
、前記したレジスタベアHLの内容を+1或いは−1し
、次いでバイトカウンタBCの内容を−1し、次いでバ
イトカウンタBCの内容が「0」になったか否かを判断
する。そして、バイトカウンタBCの内容がrOJにな
ったと判断した場合はブロックサーチ命令の実行を終了
し、その後、アウト命令により動作モード選択回路6の
出力信号をハイレベルに戻す、また、「0」になってい
ないと判断した場合は、アキュムレータの内容と読込ん
だデータとが一致するか或いはバイトカウンタBCの内
容が「0」となるまで、前述したと同様の処理を繰返し
行なう。If the comparison does not match, the microcomputer 1 increments the content of the register bear HL by +1 or -1, then -1 the content of the byte counter BC, and then sets the content of the byte counter BC to "0". Determine whether or not. If it is determined that the content of the byte counter BC has become rOJ, the execution of the block search instruction is finished, and then the output signal of the operation mode selection circuit 6 is returned to high level by the OUT instruction, and also set to "0". If it is determined that this is not the case, the same processing as described above is repeated until the contents of the accumulator match the read data or the contents of the byte counter BC become "0".
尚、上述した実施例に於いては説明しなかったが、動作
モード選択回路6の出力信号をハイレベルにしてブロッ
クサーチ命令を実行させた場合は、単方向バッファ7が
閉、双方向バッファ8が開となり、メモリ2から読出さ
れたデータがデータバス11°、双方向バッファ8及び
データバス11を介してマイクロコンピュータ1に加え
られることになるので、通常のデータ検索、即ちマイク
ロコンピュータ1内のアキュムレータにセットされたデ
ータと同一のデータが検索されることになる。Although not explained in the above embodiment, when the output signal of the operation mode selection circuit 6 is set to high level to execute a block search command, the unidirectional buffer 7 is closed and the bidirectional buffer 8 is closed. is opened, and the data read from the memory 2 is applied to the microcomputer 1 via the data bus 11°, the bidirectional buffer 8, and the data bus 11. The same data as the data set in the accumulator will be retrieved.
以上説明したように、本発明は、マイクロコンピュータ
が有している特定データ検索用のブロックサーチ命令を
用いて特定データ以外のデータの検索を行なうことがで
きるので、メモリよりデータを1つずつ読出して比較し
なければならなかった従来例に比較して、特定データ以
外のデータの検索を迅速に行なうことができる効果があ
る。As explained above, the present invention is capable of searching for data other than specific data by using a block search instruction for specific data searches that the microcomputer has. This has the advantage that data other than specific data can be searched more quickly than in the conventional example, in which data had to be compared.
第1図は本発明の実施例のブロック図である。
図に於いて、1・・・マイクロコンピュータ、2・・・
メモリ、3・・・比較回路、4・・・ラッチ回路、5・
・・バッファ開閉回路、6・・・動作モード選択回路、
7・・・単方向バッファ、8・・・双方向バッファ、9
・・・コントロール信号バス、10・・・アドレスバス
、11.11’・・・データバス、12・・・インバー
タ。FIG. 1 is a block diagram of an embodiment of the invention. In the figure, 1... microcomputer, 2...
Memory, 3... Comparison circuit, 4... Latch circuit, 5.
...buffer opening/closing circuit, 6...operation mode selection circuit,
7... Unidirectional buffer, 8... Bidirectional buffer, 9
...Control signal bus, 10...Address bus, 11.11'...Data bus, 12...Inverter.
Claims (1)
いたマイクロコンピュータ回路に於いて、前記マイクロ
コンピュータに接続される第1のデータバスと、 該第1のデータバスと双方向バッファを介して接続され
る第2のデータバスと、 特定データがラッチされるラッチ回路と、 該ラッチ回路にラッチされた特定データと前記第2のデ
ータバス上のデータとを比較する比較回路と、 該比較回路と前記第1のデータバスとの間に設けられ、
該比較回路の比較結果に応じたデータを前記第1のデー
タバスに出力する単方向バッファと、 前記ブロックサーチ命令を前記特定データ以外のデータ
の検索に使用するか否かのモード選択を行なう動作モー
ド選択回路と、 該動作モード選択回路によって選択されたモードに応じ
て前記単方向バッファ及び双方向バッファの開閉を制御
するバッファ開閉回路とを備えたことを特徴とするマイ
クロコンピュータ回路。[Scope of Claim] In a microcomputer circuit using a microcomputer having a block search instruction, a first data bus connected to the microcomputer, and a connection between the first data bus and the bidirectional buffer. a second data bus connected; a latch circuit that latches specific data; a comparison circuit that compares the specific data latched by the latch circuit with data on the second data bus; and the comparison circuit. and the first data bus,
a unidirectional buffer that outputs data according to a comparison result of the comparison circuit to the first data bus; and an operation that selects a mode for determining whether or not the block search command is used to search for data other than the specific data. A microcomputer circuit comprising: a mode selection circuit; and a buffer opening/closing circuit that controls opening/closing of the unidirectional buffer and bidirectional buffer according to the mode selected by the operation mode selection circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61226477A JPS6380324A (en) | 1986-09-25 | 1986-09-25 | Microcomputer circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61226477A JPS6380324A (en) | 1986-09-25 | 1986-09-25 | Microcomputer circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS6380324A true JPS6380324A (en) | 1988-04-11 |
Family
ID=16845712
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61226477A Pending JPS6380324A (en) | 1986-09-25 | 1986-09-25 | Microcomputer circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6380324A (en) |
-
1986
- 1986-09-25 JP JP61226477A patent/JPS6380324A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0814801B2 (en) | Programmable access memory | |
| US4999770A (en) | Command controlled multi-storage space protection key pretesting system permitting access regardless of test result if selected key is predetermined value | |
| US4975872A (en) | Dual port memory device with tag bit marking | |
| JP3462245B2 (en) | Central processing unit | |
| KR920006612B1 (en) | Information processing device | |
| JPS59112479A (en) | High speed access system of cache memory | |
| JPH01273132A (en) | Microprocessor | |
| JPH01177145A (en) | Information processor | |
| JP2721168B2 (en) | Data string search device | |
| JPS61264431A (en) | Storage circuit | |
| JPS6010368A (en) | Address conversion buffer control system | |
| JPS63727A (en) | Information retrieving method | |
| JPS6148049A (en) | Check device of mamory-access | |
| JPH02157932A (en) | variable length data processing device | |
| JPH0250498B2 (en) | ||
| JPS5856145A (en) | Data retrieval system | |
| JPS62184561A (en) | Input/output buffer controller | |
| JPH02219144A (en) | Cache memory with shortened write-back access time | |
| JPS6145485A (en) | Magnetic bubble memory control device | |
| JPS59176851A (en) | Data storing system | |
| JPH03175543A (en) | Data processor | |
| JPH04112251A (en) | Microcomputer | |
| JPS6095658A (en) | Virtual storage controlling method | |
| JPS60251434A (en) | Retrieving method of information | |
| JPH03168845A (en) | Instruction execution control system |