JPS61183787A - Data variation detecting circuit - Google Patents
Data variation detecting circuitInfo
- Publication number
- JPS61183787A JPS61183787A JP60021994A JP2199485A JPS61183787A JP S61183787 A JPS61183787 A JP S61183787A JP 60021994 A JP60021994 A JP 60021994A JP 2199485 A JP2199485 A JP 2199485A JP S61183787 A JPS61183787 A JP S61183787A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- data
- signal
- inversion
- becomes
- 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
- 238000001514 detection method Methods 0.000 claims description 2
- 239000000725 suspension Substances 0.000 abstract 1
- 238000000034 method Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 2
- 239000013256 coordination polymer Substances 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、入力信号の変化を検出し、それに対応するデ
ータ処理を行う回路に関し、特にマイクロプロセッサ−
を用いた比較的小規模のデータ処理システム、例えばプ
ログラマブルコントローラ等の入出力処理回路に適用さ
れる変化検出回路に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a circuit that detects a change in an input signal and performs data processing corresponding to the change, and particularly relates to a circuit that detects a change in an input signal and performs data processing corresponding to the change.
The present invention relates to a change detection circuit applied to a relatively small-scale data processing system using an input/output processing circuit such as a programmable controller.
ソフトウェアのみによって、入力信号の変化を検出して
それに対応する処理を行う従来例プログラム(8088
準拠)を以下に、またこのプログラムのフローチャート
を第3図にそれぞれ示す。A conventional program (8088
compliant) is shown below, and the flowchart of this program is shown in Figure 3.
(1) MOV CX、 1lu
(2) MOV SI、 1lv
(3) NOV DI、鍵W
(4) NOV AL、 (SI)(5) C
MP AL、 CDI)(8) JNZ r
5yori J(7) INC5I
(8) 18CDI
(13) LOOP
(1G) NOV CX、 l1u(11) M
OV Sl、 暮v
(12) MOV DI、 韓w(13)
MOV AL、 (Sl)(14) NOV
(DI)、AL(15) INC5l
(lEt) INCDI
(17) LOOP
すなわち以上のプログラムは、
(1)バイト数Uを汎用レジスタCX (ここでは繰り
返しカウンタとして用いる)ヘスドアし、(2)アドレ
スVをインデックスレジスタSIヘスドアし、
(3)アドレスWをインデックスレジスタDIヘスドア
しく処理31)、
(4)アキュムレータの下位8ビツトALにレジスタS
lに格納されているアドレスVの内容をストアし、
(5)アキュムレータALからレジスタDIに格納され
ているアドレスWの内容を引いて。(1) MOV CX, 1lu (2) MOV SI, 1lv (3) NOV DI, key W (4) NOV AL, (SI) (5) C
MP AL, CDI) (8) JNZ r
5yori J (7) INC5I (8) 18CDI (13) LOOP (1G) NOV CX, l1u (11) M
OV Sl, Kurev (12) MOV DI, Han w (13)
MOV AL, (Sl) (14) NOV
(DI), AL (15) INC5l (lEt) INCDI (17) LOOP In other words, the above program: (1) Doors the number of bytes U to the general-purpose register CX (here used as a repeat counter), and (2) sets the address V. (3) Process address W as index register DI (31), (4) Transfer register S to lower 8 bits AL of accumulator.
(5) Subtract the contents of address W stored in register DI from accumulator AL.
(6)ゼロでなければ処理プログラムrsyoriJ(
サブレーチン)を実行しく処理32.33)、(7)レ
ジスタSIの内容であるアドレスVを+1し、(8)レ
ジスタDIの内容であるアドレスWを+1し。(6) If it is not zero, the processing program rsyoriJ (
Process 32.33), (7) add 1 to address V, which is the content of register SI, and (8) add 1 to address W, which is the content of register DI.
(8)ステップ(4)に戻り、レジスタCxに格納され
ているバイト数Uだけループせよ(処理30゜(10)
(1)に同じ、
(11) (2)に同じ。(8) Return to step (4) and loop for the number of bytes U stored in register Cx (processing 30° (10)
Same as (1), (11) Same as (2).
(12) (3)に同じ(処理35)、(13)
(4)に同じ、
(10アキユムレータALの内容をレジスタDIに格納
されているアドレスWにストアしく処理36)。(12) Same as (3) (processing 35), (13)
Same as (4) (Process 36 to store the contents of the 10 accumulator AL at the address W stored in the register DI).
(15)レジスタS!の内容であるアドレスマを+1し
。(15) Register S! Add 1 to addressma, which is the content of .
(18)レジスタDIの内容であるアドレスWを+1し
、(17)ステップ(1G)に戻り、バイト数Uだけル
ープせよ(処理37)
という意味であり、(1)〜(9)が「照合」、ステッ
プ(lO)〜(17)が「転送」処理である。(18) Add 1 to address W, which is the content of register DI, and (17) return to step (1G) and loop by the number of bytes U (processing 37). ”, steps (lO) to (17) are “transfer” processing.
これは、アドレスVからアドレスWへ、Uバイト転送す
ることを示している。This indicates that U bytes are transferred from address V to address W.
ところが、このような従来例では入力点数が多くなると
転送するバイト数Uが増大するので、実行時間が長くな
ってしまうという問題点がある。However, in such a conventional example, as the number of input points increases, the number U of bytes to be transferred increases, so there is a problem that the execution time becomes longer.
本発明は、このような問題点を解決する回路を提供する
ことを目的とする。An object of the present invention is to provide a circuit that solves these problems.
上記問題点を解決するため、本発明は新しいデータを前
回のデータの所に重ね書きし更新する時に、ハードウェ
アでその新旧データを比較し、その差分を記憶しておき
、変化があれば割込みを発生させ、 cpuに転送中断
を要求することによりデータの変化をいちはやく検出で
きるようにしようとするものである。In order to solve the above problems, the present invention compares the old and new data using hardware when overwriting and updating the previous data with new data, stores the difference, and issues an interrupt if there is a change. The purpose is to enable data changes to be detected quickly by generating a request to the CPU and requesting the CPU to interrupt the transfer.
これよって従来、「照合」したのち、「転送」していた
処理が、「転送」処理だけで可能となる。すなわち、前
述のプログラムの転送処理部分[ステップ(lO)〜(
17)]だけでよいので、処理速度が大幅に向上する。As a result, the conventional process of "verifying" and then "transferring" can now be done by just "transferring" processing. That is, the transfer processing part of the above program [steps (lO) to (
17)], the processing speed is greatly improved.
以下、本発明の具体的実施例を第1図に示して説明する
。A specific embodiment of the present invention will be described below with reference to FIG.
1はメモリ、2はEXORゲート、3は3ステート出力
Dフリツプフロツプ(例えばLS 374) 、 4は
バスバッファ(例えばLS 245) 、 5a、 5
bは汎用Dフリップフロップ(例えばLS 74)であ
り、図示しティe イCPUは8088 (あルイは8
088) トl、、簡単化のためバスを4ビツトとして
いる。1 is memory, 2 is EXOR gate, 3 is 3-state output D flip-flop (eg LS 374), 4 is bus buffer (eg LS 245), 5a, 5
b is a general-purpose D flip-flop (for example, LS 74);
088) The bus is set to 4 bits for simplicity.
さて、メモリlをCPUが読出す時はメモリセレクト信
号MS及び読出し信号RDが“L”となり、バスバッフ
ァ4は左から右へと信号を通し、データバスD0〜D3
上にメモリlの内容を送り出す。Now, when the CPU reads the memory l, the memory select signal MS and the read signal RD become "L", and the bus buffer 4 passes the signals from left to right, and the data buses D0 to D3
Sends the contents of memory l upwards.
メモリlに書込みを行う時はデータ送出信号DT/Rが
“H”になり、マシンサイクルの初めに現われる信号A
LEが“H″になる。よってANDゲート7の出力信号
SAが“H″になり、Dフリップフロップ5aの出力信
号Qaはlクロックタイムだけ“°H”になる、これに
より、パスバッファ4はメモリlとデータバスD o
” D 3との接続を切断する。When writing to memory l, the data sending signal DT/R becomes "H", and the signal A that appears at the beginning of the machine cycle
LE becomes "H". Therefore, the output signal SA of the AND gate 7 becomes "H" and the output signal Qa of the D flip-flop 5a becomes "°H" for l clock time.
” Disconnect from D3.
またDフリップフロップ5aの反転出力信号Qaでメモ
リ1の亜端子に読出しを要求する。これによって読出さ
れた内容(前回値データ)はEXROゲート2でデータ
バスD、−03上の今回値データと比較され、差異にあ
ればNORゲート6の出力INTによりCPUに割込み
をかけて処理を中断させる。なお、差異′があったビッ
トのデータはDフリップフロップ3に記憶される。Also, a read request is made to the sub-terminal of the memory 1 using the inverted output signal Qa of the D flip-flop 5a. The content (previous value data) read by this is compared with the current value data on data bus D, -03 by EXRO gate 2, and if there is a difference, an interrupt is sent to the CPU by the output INT of NOR gate 6 to start processing. interrupt. Note that the data of the bit with the difference ' is stored in the D flip-flop 3.
次のクロックタイムCPにより、パスバッファ4はデー
タバスDo−D3の信号をメモリ1に与え、Dフリップ
フロップ5bの出力CがメモリlへのWR倍信号なり、
メモリ1にCPUのデータが書込まれる。差異ビットデ
ータは信号Iπを出すことにより「割込み処理ルーチン
」のなかにおいてCPUで読むことができる。その番地
はCPUのインデックスレジスタDIの内容である。こ
れにより、従来チェックしたのち転送したものを、本発
明では第2図のフローチャートに示すように一回の転送
処理だけで行うことになる。At the next clock time CP, the path buffer 4 gives the signal of the data bus Do-D3 to the memory 1, and the output C of the D flip-flop 5b becomes the WR multiplied signal to the memory 1.
CPU data is written to memory 1. The difference bit data can be read by the CPU in an "interrupt handling routine" by issuing a signal Iπ. That address is the content of the index register DI of the CPU. As a result, in the present invention, what was conventionally checked and then transferred is performed in just one transfer process, as shown in the flowchart of FIG.
以上述べたように本発明によれば、多数の入力信号を処
理するシステムにおいて、その処理速度を大幅に向上す
ることができ、しかもソフトウェアも短かくできるとい
う大きな効果を奏するものである。As described above, according to the present invention, in a system that processes a large number of input signals, the processing speed can be greatly improved, and the software can also be shortened, which is a great effect.
第1図は本発明の具体的実施例、第2図は本発明の動作
のフローチャート、第3図は従来例のフローチャートで
ある。
1−−− メ%す、 2−−− EXOR
ゲート。
3 、5a、 5b−= D 7リツプフロツプ。
4−m−バスバッファ、 6−−−NORゲート。
7−−− AND ゲート。
第3図FIG. 1 is a specific embodiment of the present invention, FIG. 2 is a flowchart of the operation of the present invention, and FIG. 3 is a flowchart of a conventional example. 1--- ME%, 2--- EXOR
Gate. 3, 5a, 5b-=D7 lipflop. 4-m-bus buffer, 6----NOR gate. 7---AND gate. Figure 3
Claims (1)
スと該メモリとを切断して該メモリにすでに格納されて
いる前回値データを読出した後、再び該データバスと該
メモリとを接続して該データバス上の今回値データを該
メモリに書込む制御手段と、 該制御手段により該メモリから前記前回値データが読出
されると該前回値データと前記データバス上の前記今回
値データとを比較し、差異があればそのビットを記憶す
るとともにCPUに割込みをかける比較手段とを有する
ことを特徴とするデータ変化検出回路。[Scope of Claims] A memory that stores data on a data bus, and after disconnecting the data bus and the memory and reading the previous value data already stored in the memory, disconnecting the data bus from the memory and then connecting the data bus and the memory again. control means that connects a memory and writes current value data on the data bus into the memory; and when the previous value data is read from the memory by the control means, the previous value data and the current value data on the data bus are written. A data change detection circuit comprising a comparison means for comparing the current value data and, if there is a difference, storing the bit and interrupting a CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60021994A JPS61183787A (en) | 1985-02-08 | 1985-02-08 | Data variation detecting circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60021994A JPS61183787A (en) | 1985-02-08 | 1985-02-08 | Data variation detecting circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS61183787A true JPS61183787A (en) | 1986-08-16 |
Family
ID=12070573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP60021994A Pending JPS61183787A (en) | 1985-02-08 | 1985-02-08 | Data variation detecting circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61183787A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0851369A3 (en) * | 1996-12-25 | 2003-09-17 | Nec Corporation | Data variation detecting system |
-
1985
- 1985-02-08 JP JP60021994A patent/JPS61183787A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0851369A3 (en) * | 1996-12-25 | 2003-09-17 | Nec Corporation | Data variation detecting system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH09330236A (en) | Microprocessor and peripheral device for the same | |
JPS61183787A (en) | Data variation detecting circuit | |
JP3157805B2 (en) | Size acknowledgment returning device and size acknowledgment returning method | |
JPS61183758A (en) | Memory write checking circuit | |
JPS58189770A (en) | vector processing device | |
JP2781973B2 (en) | Memory content update circuit | |
JPH0212358A (en) | Data transfer system | |
JP2707256B2 (en) | Micro computer | |
JP2574918B2 (en) | Interrupt return processing method | |
JP3299147B2 (en) | Cache control circuit | |
JPH01231126A (en) | Information processor | |
JP2560312B2 (en) | Information processing system | |
JPS63103342A (en) | Main memory controller | |
JPH04125747A (en) | Cache memory control device | |
JPS62174842A (en) | Data processor | |
JPS63208927A (en) | Memory control device | |
JPS6244838A (en) | Instruction fetching device | |
JPH01286061A (en) | bus monitoring device | |
JPS61296448A (en) | Data writing control system for electronic computer | |
JPH04170649A (en) | Bus control circuit | |
JPH1055289A (en) | Debugging information generating circuit and information processor using the same | |
JPS61131132A (en) | Tracer circuit | |
JPH0520205A (en) | Detecting circuit for memory error address | |
JPH02297653A (en) | Information processor | |
JPS62151947A (en) | Memory address trace method |