JP2001154908A - Memory interface - Google Patents

Memory interface

Info

Publication number
JP2001154908A
JP2001154908A JP33456599A JP33456599A JP2001154908A JP 2001154908 A JP2001154908 A JP 2001154908A JP 33456599 A JP33456599 A JP 33456599A JP 33456599 A JP33456599 A JP 33456599A JP 2001154908 A JP2001154908 A JP 2001154908A
Authority
JP
Japan
Prior art keywords
data
memory
address
read
length
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
JP33456599A
Other languages
Japanese (ja)
Other versions
JP3700504B2 (en
Inventor
Nobusato Kadowaki
信諭 門脇
Jun Nishijima
潤 西島
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP33456599A priority Critical patent/JP3700504B2/en
Publication of JP2001154908A publication Critical patent/JP2001154908A/en
Application granted granted Critical
Publication of JP3700504B2 publication Critical patent/JP3700504B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To read data from a memory without stopping the main operation of processing the data and writing the result to the memory even in the case that the processing time of the data is not fixes. SOLUTION: A device for processing the data and writing the result to the memory is provided with a differentiation circuit 21 for detecting the change of the data and judging the timing of starting the processing of the data to be written in the memory 3, a counter 22 for being reset by the output of the differentiation circuit 21 and counting the time required for the processing of the data to be written in the memory 3, a detection circuit 23 for detecting that the value of the counter 22 is a prescribed value or higher and a memory read control part 24 for reading the data from the memory 3 when it is detected that the value of the counter 22 is the prescribed value or higher by the detection circuit 23 and the read of the data is requested.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はメモリに対するデー
タの書き込み処理の空き時間を利用してメモリからデー
タの読み出し動作を行うためのメモリインターフェイス
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory interface for performing a data read operation from a memory using an idle time of a data write process to the memory.

【0002】[0002]

【従来の技術】従来、メモリに対するデータの書き込み
と読み出しは、CPU等の制御装置により管理され、通
常は、データを処理してその結果をメモリに書き込むメ
インの動作を行いながら、時には割り込み処理によりメ
インの動作を一時停止させ、データを読み出すことが行
われている。すなわち、メモリへのデータの書き込み優
先であっても、メモリからデータの読み出しが行われて
いるときは待ち信号を発生し、書き込みを一時的に停止
させて、読み出し時間の確保が行われている。
2. Description of the Related Art Conventionally, writing and reading of data to and from a memory are managed by a control device such as a CPU. Usually, while performing a main operation of processing data and writing a result to the memory, sometimes an interrupt process is performed. The main operation is suspended to read data. That is, even when the priority is given to writing data to the memory, a wait signal is generated when data is being read from the memory, the writing is temporarily stopped, and the reading time is secured. .

【0003】特開平4−133141号には、メモリの
アクセス時間を測定し、それに基づいてメモリの読み出
し制御を行う技術が提案されているが、これはメモリの
種類に応じてアクセス時間が異なる場合に対処する技術
であり、書き込まれるデータに応じて処理時間が異なる
場合には対処できない。
Japanese Patent Application Laid-Open No. Hei 4-133141 proposes a technique for measuring the access time of a memory and performing a read control of the memory based on the measured access time. This technique cannot cope with the case where the processing time differs depending on the data to be written.

【0004】[0004]

【発明が解決しようとする課題】メモリに書き込まれる
データが、例えばデータの開始位置のアドレスと、デー
タの長さを示すランレングスのデータである場合、デー
タを処理してその結果をメモリに書き込む装置は、ラン
レングスの長いデータでは書き込みの間に長い空き時間
が生じるのに対して、ランレングスの短いデータでは書
き込みの間に空き時間は殆ど生じない。このように、デ
ータを処理してその結果をメモリに書き込む装置におい
て、そのデータの処理時間が一定でない場合には、デー
タの書き込み動作の間を利用してデータの読み出し動作
を行う所謂サイクルスチールが常に可能であるとは限ら
ない。
If the data to be written to the memory is, for example, an address at the start position of the data and run-length data indicating the length of the data, the data is processed and the result is written to the memory. The device has a long idle time between writes for data with a long run length, while an idle time hardly occurs between writes for data with a short run length. As described above, in a device that processes data and writes the result in a memory, when the processing time of the data is not constant, a so-called cycle steal that performs a data read operation using the data write operation is used. This is not always possible.

【0005】本発明はこのような点に鑑みてなされたも
のであり、データの処理時間が一定していない場合であ
っても、データを処理してその結果をメモリに書き込む
メインの動作を停止させることなく、メモリからデータ
を読み出すことを可能とするメモリインターフェイスを
提供することを課題とする。
The present invention has been made in view of such a point, and even when the data processing time is not constant, the main operation of processing the data and writing the result to the memory is stopped. It is an object of the present invention to provide a memory interface that enables data to be read from a memory without causing the data to be read.

【0006】[0006]

【課題を解決するための手段】本発明のメモリインター
フェイスによれば、上記の課題を解決するために、図1
に示すように、データを処理してその結果をメモリに書
き込む装置において、データの変化を検出してメモリ3
に書き込まれるデータの処理を開始するタイミングを判
定する微分回路21と、微分回路21の出力によりリセ
ットされてメモリ3に書き込まれるデータの処理に要す
る時間をカウントするカウンタ22と、該カウンタ22
の値が所定値以上であることを検知する検知回路23
と、検知回路23によりカウンタ22の値が所定値以上
であることが検知され、且つデータの読み出し要求があ
ればメモリ3からデータを読み出すメモリリード制御部
24とを備えることを特徴とするものである。ここで、
メモリ3に書き込まれるデータは、例えば、データの開
始位置のアドレスと、データの長さを示すランレングス
のデータであり、データの処理に要する時間はランレン
グスに応じて変動する場合に本発明を適用すれば特に好
ましい。
According to the memory interface of the present invention, in order to solve the above problems, FIG.
As shown in FIG. 2, in a device for processing data and writing the result to a memory, a change in data is detected and the
A differentiating circuit 21 for determining the timing of starting the processing of the data to be written into the memory 3, a counter 22 for counting the time required for processing the data that is reset by the output of the differentiating circuit 21 and written to the memory 3, and the counter 22
Detection circuit 23 for detecting that the value of
And a memory read control unit 24 for detecting that the value of the counter 22 is equal to or greater than a predetermined value by the detection circuit 23 and reading data from the memory 3 when a data read request is issued. is there. here,
The data written to the memory 3 is, for example, an address of a data start position and run-length data indicating the length of the data. When the time required for data processing varies depending on the run-length, the present invention is used. It is particularly preferred if applied.

【0007】[0007]

【発明の実施の形態】図1は本発明のメモリインターフ
ェイスの回路構成例を示している。図中、1は制御部、
2はメモリインターフェイス、3はメモリである。メモ
リ3は、チップセレクト信号CSがLowレベルである
ときに、メモリリード信号ReadがHighレベルか
らLowレベルに変化すると、アドレスバスで指定され
たメモリアドレスのデータをデータバスに読み出す動作
を行う。また、チップセレクト信号CSがLowレベル
であるときに、メモリライト信号WriteがHigh
レベルからLowレベルに変化すると、アドレスバスで
指定されたメモリアドレスにデータバス上のデータを書
き込む動作を行う。メモリインターフェイス2は、制御
部1とメモリ3の間に介在し、制御部1からの読み出し
要求があると、メモリ3が書き込み動作中であっても、
データを書き込んでいないタイミングを自動的に検出し
て、その検出した読み出し可能な時間幅でメモリ3から
データを読み出すことにより、データを処理してその結
果をメモリ3に書き込むメインの動作を停止させること
なく、メモリ3からデータを読み出すことを可能とす
る。
FIG. 1 shows a circuit configuration example of a memory interface according to the present invention. In the figure, 1 is a control unit,
2 is a memory interface and 3 is a memory. When the memory read signal Read changes from the High level to the Low level while the chip select signal CS is at the Low level, the memory 3 performs an operation of reading the data of the memory address specified by the address bus to the data bus. When the chip select signal CS is at a low level, the memory write signal Write is set to a high level.
When the level changes from the low level to the low level, an operation of writing data on the data bus to a memory address specified by the address bus is performed. The memory interface 2 is interposed between the control unit 1 and the memory 3, and when there is a read request from the control unit 1, even if the memory 3 is performing a write operation,
By automatically detecting the timing at which no data is written and reading the data from the memory 3 within the detected readable time width, the main operation of processing the data and writing the result to the memory 3 is stopped. This makes it possible to read data from the memory 3 without any need.

【0008】図2は図1に示すメモリインターフェイス
の動作波形図である。この例は、データのランレングス
データを抽出し、メモリ3に保存する構成になってい
て、連続する2回の書き込みで、そのデータの開始位置
を示すアドレスとデータの続く長さの情報を保存してい
る。読み出し側も2回の読み出しを実行するシステムで
ある。書き込み側がデータを2段シフトしているのは、
2回連続でデータを書くシステムのためである。
FIG. 2 is an operation waveform diagram of the memory interface shown in FIG. In this example, run-length data of data is extracted and stored in the memory 3. By two consecutive writings, an address indicating the start position of the data and information on the length of the data are stored. are doing. The reading side is also a system that executes reading twice. The reason that the writing side shifts the data by two steps is that
This is for a system that writes data twice consecutively.

【0009】まず、書き込み時の動作(イ)について説
明する。図中、B,I,O,Sなどはデータの開始位置
を示すアドレスのデータであり、それに続くa,d,
f,…などはデータの長さ(ランレングスデータ)を意
味する。例えば、メモリ書き込みデータとしてのB,a
は、データの開始位置のアドレスがBで、このアドレス
Bから開始されるデータの長さがaであることを意味す
る。これらのデータB,aはメモリ3のアドレス0,1
に連続して書き込まれる。また、メモリ書き込みデータ
としてのI,dは、データの開始位置のアドレスがI
で、このアドレスIから開始されるデータの長さがdで
あることを意味する。これらのデータI,dはメモリ3
のアドレス2,3に連続して書き込まれる。同様に、メ
モリ書き込みデータとしてのO,fは、データの開始位
置のアドレスがOで、このアドレスOから開始されるデ
ータの長さがfであることを意味する。これらのデータ
O,fはメモリ3のアドレス4,5に連続して書き込ま
れる。
First, the operation (a) at the time of writing will be described. In the figure, B, I, O, S, etc. are data of an address indicating the start position of the data, followed by a, d,
f,... mean the data length (run-length data). For example, B, a as memory write data
Means that the address of the data start position is B, and the length of data starting from the address B is a. These data B and a are stored at addresses 0 and 1 of the memory 3, respectively.
Is written continuously. Further, I and d as the memory write data are such that the address of the data start position is I
Means that the length of data starting from the address I is d. These data I and d are stored in the memory 3
Are written successively at addresses 2 and 3 of FIG. Similarly, O and f as the memory write data means that the address of the start position of the data is O and the length of data starting from the address O is f. These data O and f are continuously written to addresses 4 and 5 of the memory 3.

【0010】メモリライト信号が立ち下がるタイミング
では、メモリ3のチップセレクト信号CSがLowレベ
ルとなっており、1回目のメモリライト信号の立ち下が
りで、アドレスデータBがメモリ3のアドレス0に書き
込まれ、2回目のメモリライト信号の立ち下がりで、デ
ータaがメモリ3のアドレス1に書き込まれ、しばらく
間を置いて、3回目のメモリライト信号の立ち下がり
で、アドレスデータIがメモリ3のアドレス2に書き込
まれ、4回目のメモリライト信号の立ち下がりで、デー
タdがメモリ3のアドレス3に書き込まれ、しばらく間
を置いて、5回目のメモリライト信号の立ち下がりで、
アドレスデータOがメモリ3のアドレス4に書き込ま
れ、6回目のメモリライト信号の立ち下がりで、データ
fがメモリ3のアドレス5に書き込まれる。
At the timing when the memory write signal falls, the chip select signal CS of the memory 3 is at the low level, and the address data B is written to the address 0 of the memory 3 at the first fall of the memory write signal. At the falling edge of the second memory write signal, the data a is written to the address 1 of the memory 3. After a while, at the falling edge of the third memory write signal, the address data I is changed to the address 2 of the memory 3. At the fourth falling edge of the memory write signal, the data d is written to the address 3 of the memory 3, and after a while, at the fifth falling edge of the memory write signal,
Address data O is written to address 4 of memory 3, and data f is written to address 5 of memory 3 at the falling edge of the sixth memory write signal.

【0011】次に、読み出し時の動作(ロ)について説
明する。メモリリード信号が立ち下がるタイミングで
は、メモリ3のチップセレクト信号CSがLowレベル
となっている。メモリリード信号がLowレベルである
期間において、メモリアドレスが0であると、メモリ3
のアドレス0のデータがメモリ読み出しデータBとして
読み出され、メモリアドレスが1になると、メモリ3の
アドレス1のデータがメモリ読み出しデータBaとして
読み出される。ここで、データBaはアドレスBから開
始されるデータの長さがaであることを意味している。
次に、メモリリード信号がLowレベルである期間にお
いて、メモリアドレスが2であると、メモリ3のアドレ
ス2のデータがメモリ読み出しデータIとして読み出さ
れ、メモリアドレスが3になると、メモリ3のアドレス
3のデータがメモリ読み出しデータIdとして読み出さ
れる。ここで、データIdはアドレスIから開始される
データの長さがdであることを意味している。
Next, the read operation (b) will be described. At the timing when the memory read signal falls, the chip select signal CS of the memory 3 is at the low level. If the memory address is 0 while the memory read signal is at the low level, the memory 3
Is read as memory read data B, and when the memory address becomes 1, the data at address 1 of the memory 3 is read as memory read data Ba. Here, the data Ba means that the length of the data starting from the address B is a.
Next, during the period when the memory read signal is at the low level, if the memory address is 2, the data at the address 2 of the memory 3 is read as the memory read data I, and if the memory address becomes 3, the address of the memory 3 is read. 3 is read as memory read data Id. Here, the data Id means that the length of data starting from the address I is d.

【0012】以上の説明から明らかなように、図2の動
作波形において、メモリアドレス0,1,2,3,4,
5,6,…等はメモリ3のアドレスを指しており、図2
の上から2段目に記載されたアドレスA,B,C,…,
U,V,W,…は、メモリ3にデータの開始位置とデー
タの長さを保存しておかれる第2のメモリのアドレスを
指している。メモリ3のメモリアドレス0,1からデー
タの開始位置のアドレスBと、そのデータの長さaを読
み出すことにより、第2のメモリのアドレスBから長さ
aのデータが格納されていることが分かる仕組みとなっ
ている。同様に、メモリ3のメモリアドレス2,3から
データの開始アドレスIと、そのデータの長さdを読み
出すことにより、第2のメモリのアドレスIから長さd
のデータが格納されていることが分かる仕組みとなって
いる。
As apparent from the above description, in the operation waveform of FIG. 2, the memory addresses 0, 1, 2, 3, 4,
.. Indicate the addresses of the memory 3, and FIG.
, Addresses A, B, C,...
U, V, W,... Indicate the addresses of the second memory in which the start position of data and the length of data are stored in the memory 3. By reading the address B of the data start position from the memory addresses 0 and 1 of the memory 3 and the length a of the data, it is understood that the data having the length a from the address B of the second memory is stored. It has a mechanism. Similarly, by reading the start address I of data and the length d of the data from the memory addresses 2 and 3 of the memory 3, the length d from the address I of the second memory is read.
Is stored.

【0013】ここで、メモリインターフェイスの機能
は、図2に示す書き込み時の動作(イ)と読み出し時の
動作(ロ)を実現することにあり、そのために、メモリ
インターフェイスはメモリ書き込み時には、図2(イ)
に示すように、メモリアドレスを0,1,2,3,4,
5,…のように順次変化させ、メモリ書き込みデータを
B,a,I,d,O,f,…のように順次変化させてい
る。このようなメモリ書き込み動作を実行している途中
でメモリ3に対する読み出し要求が制御部1から発生す
ると、従来は、一連のメモリ書き込み動作を一時停止さ
せて、図2(ロ)に示す読み出し時の動作を行うことに
より、メモリ3からデータを読み出していた。しかしな
がら、図2(イ)のメモリ書き込み時の動作を見れば分
かるように、2回の連続したメモリライト信号によりメ
モリ3のアドレス0,1にデータB,aを書き込んだ
後、しばらく間を置いて、再び2回の連続したメモリラ
イト信号によりメモリ3のアドレス2,3にデータI,
dを書き込んでおり、その間、メモリ3のアドレスは次
回の書き込みに備えて、アドレス2の状態に保持されて
おり、メモリ3への書き込みデータは最後に書き込んだ
データaが保持されている。
Here, the function of the memory interface is to realize the operation (a) at the time of writing and the operation (b) at the time of reading shown in FIG. (I)
As shown in the figure, the memory addresses are 0, 1, 2, 3, 4,
.., And the memory write data is sequentially changed as B, a, I, d, O, f,. Conventionally, when a read request to the memory 3 is generated from the control unit 1 during the execution of such a memory write operation, a series of memory write operations is temporarily stopped, and a read operation shown in FIG. By performing the operation, data was read from the memory 3. However, as can be seen from the operation at the time of memory writing in FIG. 2A, after writing data B and a at addresses 0 and 1 of the memory 3 by two consecutive memory write signals, a while, Then, data I and I are stored in the addresses 2 and 3 of the memory 3 again by two consecutive memory write signals.
While writing d, during this time, the address of the memory 3 is held in the state of the address 2 in preparation for the next writing, and the data a written last is held as the write data to the memory 3.

【0014】このような状態が生じる理由は、この実施
例の場合について言えば、メモリ3に格納されるデータ
がランレングスデータであるという特有の事情に基づく
ものであり、データの開始アドレスBから次のデータの
開始アドレスIまでの間、さらに次のデータの開始アド
レスOまで間に、それぞれ時間が掛かるからである。も
ちろん、この実施例とは異なる他のシステムであって
も、書き込み動作中にメモリのアドレスとデータが変化
しない空き時間が生じることはあり得る。
The reason why such a state occurs is that, in the case of this embodiment, it is based on the specific situation that the data stored in the memory 3 is run-length data. This is because it takes time before the start address I of the next data and before the start address O of the next data. Of course, even in another system different from this embodiment, there may be a vacant time during which the address and data of the memory do not change during the write operation.

【0015】そこで、本発明では、図2の動作波形にお
ける書き込み時の動作(イ)と読み出し時の動作(ロ)
を組み合わせて、図2の(ハ)に示すように、書き込み
動作中であっても、メモリ3のアドレスとデータが空い
ている時間を検出して、その時間に読み出し動作を行う
ようにしている。この例では、説明を簡単にするため
に、直前の書き込み動作により書き込まれたデータを読
み出す動作を行っているが、別のデータを読み出す動作
を行うものであっても構わない。
Therefore, in the present invention, the operation at the time of writing (A) and the operation at the time of reading (B) in the operation waveform of FIG.
As shown in (c) of FIG. 2, even during a write operation, a time during which the address and data of the memory 3 are vacant is detected, and a read operation is performed at that time. . In this example, for the sake of simplicity, the operation of reading data written by the immediately preceding write operation is performed. However, an operation of reading another data may be performed.

【0016】以下、図2の(ハ)の動作について説明す
る。メモリライト信号が立ち下がるタイミングでは、メ
モリ3のチップセレクト信号CSがLowレベルとなっ
ており、1回目のメモリライト信号の立ち下がりで、デ
ータBがメモリ3のアドレス0に書き込まれ、2回目の
メモリライト信号の立ち下がりで、データaがメモリ3
のアドレス1に書き込まれる。メモリ3のチップセレク
ト信号CSがLowレベルのままで、メモリアドレスが
0となり、メモリリード信号がLowレベルになると、
メモリ3のアドレス0のデータがメモリ読み出しデータ
Bとして読み出され、メモリアドレスが1になると、メ
モリ3のアドレス1のデータがメモリ読み出しデータa
として読み出される。メモリ3のチップセレクト信号C
Sとメモリリード信号がHighレベルとなり、しばら
く間を置いて、再びメモリ3のチップセレクト信号CS
がLowレベルとなり、3回目のメモリライト信号の立
ち下がりで、データIがメモリ3のアドレス2に書き込
まれ、4回目のメモリライト信号の立ち下がりで、デー
タdがメモリ3のアドレス3に書き込まれる。メモリ3
のチップセレクト信号CSがLowレベルのままで、メ
モリアドレスが2となり、メモリリード信号がLowレ
ベルになると、メモリ3のアドレス2のデータがメモリ
読み出しデータIとして読み出され、メモリアドレスが
3になると、メモリ3のアドレス3のデータがメモリ読
み出しデータdとして読み出される。メモリ3のチップ
セレクト信号CSとメモリリード信号がHighレベル
となり、しばらく間を置いて、再びメモリ3のチップセ
レクト信号CSがLowレベルとなり、5回目のメモリ
ライト信号の立ち下がりで、データOがメモリ3のアド
レス4に書き込まれ、6回目のメモリライト信号の立ち
下がりで、データfがメモリ3のアドレス5に書き込ま
れる。
Hereinafter, the operation of FIG. 2C will be described. At the timing when the memory write signal falls, the chip select signal CS of the memory 3 is at the Low level, and at the fall of the first memory write signal, the data B is written to the address 0 of the memory 3 and the second time. At the falling edge of the memory write signal, data a is stored in memory 3
Is written to the address 1. When the memory address becomes 0 while the chip select signal CS of the memory 3 remains at the Low level, and the memory read signal goes to the Low level,
When the data at the address 0 of the memory 3 is read as the memory read data B and the memory address becomes 1, the data at the address 1 of the memory 3 becomes the memory read data a.
Is read as Chip select signal C of memory 3
S and the memory read signal become High level, and after a while, the chip select signal CS of the memory 3 is returned again.
Becomes Low level, at the third falling edge of the memory write signal, the data I is written to the address 2 of the memory 3, and at the fourth falling edge of the memory write signal, the data d is written to the address 3 of the memory 3. . Memory 3
When the memory address becomes 2 while the chip select signal CS remains at the low level and the memory read signal goes low, the data at the address 2 of the memory 3 is read out as the memory read data I, and when the memory address becomes 3 , The data at the address 3 of the memory 3 is read as the memory read data d. The chip select signal CS and the memory read signal of the memory 3 go to the high level, and after a while, the chip select signal CS of the memory 3 goes to the low level again, and the data O becomes the memory at the falling edge of the fifth memory write signal. The data f is written to the address 4 of the memory 3 at the falling edge of the sixth memory write signal.

【0017】ところで、このような書き込み動作と読み
出し動作を組み合わせることは常に可能であるとは限ら
ない。その理由は、この実施例について言えば、メモリ
3に格納されるデータがランレングスデータであるとい
う特有の事情に基づくものであり、データの開始位置と
その長さをメモリ3に格納していくときに、データの間
隔が十分に長ければ、次のデータの開始位置とその長さ
を格納するタイミングが来るまでに空き時間が生じる
が、データの間隔が短いと、次のデータの開始位置とそ
の長さを格納するタイミングは直ぐに到来してしまうの
で、十分な空き時間は生じない。例えば、図2の動作波
形で説明すると、データの開始位置がアドレスBであ
り、そのデータの長さがaである場合と、データの開始
位置がアドレスIであり、そのデータの長さがdである
場合には、十分な空き時間が生じているが、データの開
始位置がアドレスOであり、そのデータの長さがfであ
る場合については、次のデータの開始位置(アドレス
S)までの間に十分な時間が無く、その間に読み出し動
作を挿入することはできない。
Incidentally, it is not always possible to combine such a write operation and a read operation. The reason for this is based on the specific situation that the data stored in the memory 3 is run-length data in this embodiment, and the start position and the length of the data are stored in the memory 3. If the data interval is long enough, there will be a vacant time before the start position of the next data and the timing to store the length, but if the data interval is short, the start position of the next data will be Since the timing for storing the length comes soon, there is no sufficient free time. For example, referring to the operation waveform of FIG. 2, the start position of data is address B and the length of the data is a, and the start position of data is address I and the length of the data is d In the case of, there is sufficient free time, but if the start position of the data is address O and the length of the data is f, the start position (address S) of the next data There is not enough time between them, and no read operation can be inserted during that time.

【0018】そこで、この実施例では、単純に書き込み
動作と読み出し動作を交互に行うのではなく、図1に示
すように、微分回路21、カウンタ22、検知部23、
メモリリード制御部24を設けて、メモリ読み出し動作
の可否を自動的に判定している。読み出し側の時間幅の
検知の方法は、図2の読み出し時の動作(ロ)に示す入
力データと、これをシフトレジスタにより1サイクル分
遅延させたデータシフト1により微分回路21を構成
し、立ち下がり側に、1クロックサイクル分だけイネー
ブル信号が出るようにしてある。つまり、データシフト
1がHighレベルで、入力データがLowレベルであ
る期間にのみ微分回路21はHighレベルの信号を出
力する。この信号をタイミングカウント用のカウンタ2
2のリセット信号としており、信号の立ち下がりのタイ
ミングでカウンタ22をリセットしている。タイミング
カウントのカウンタ22の値が4以上(2回の読み出し
を行うため5サイクル分の時間幅が必要)になったと
き、読み出し動作が行われる。一連の読み出しが終わっ
たときにも、タイミングカウント用のカウンタ22の値
が4以上であれば、続けて読み出しが行われる。したが
って、開始アドレスの間隔の短いデータの書き込みによ
り空き時間が少なく、そのときはデータの読み出しが出
来なくても、その後、開始アドレスの間隔の長いデータ
の書き込みにより空き時間が多く生じたときに、データ
の読み出しを何回も行うことができる。この繰り返し
は、読み出し側のメモリアドレスと書き込み側のメモリ
アドレスによって制御され、読み出し側のアドレスが書
き込み側のアドレスを越えないようになっている。
In this embodiment, instead of simply performing the write operation and the read operation alternately, as shown in FIG. 1, a differentiating circuit 21, a counter 22, a detecting unit 23,
A memory read control unit 24 is provided to automatically determine whether a memory read operation is possible. The method of detecting the time width on the read side is as follows. A differentiating circuit 21 is constituted by the input data shown in the read operation (b) of FIG. 2 and the data shift 1 obtained by delaying this by one cycle by the shift register. An enable signal is output for one clock cycle on the falling side. That is, the differentiating circuit 21 outputs a High level signal only during a period in which the data shift 1 is at High level and the input data is at Low level. This signal is used as a counter 2 for timing counting.
2, the counter 22 is reset at the falling edge of the signal. When the value of the counter 22 of the timing count becomes 4 or more (a time width of 5 cycles is required for performing two readings), a reading operation is performed. Even when a series of reading is completed, if the value of the timing counting counter 22 is 4 or more, reading is continuously performed. Therefore, when the free time is short due to the writing of the data with the short interval between the start addresses, and the data cannot be read at that time, but when the free time is long due to the writing of the data with the long interval between the start addresses, Data can be read many times. This repetition is controlled by the memory address on the reading side and the memory address on the writing side, so that the address on the reading side does not exceed the address on the writing side.

【0019】次に、以上のようなハードウェアが具体的
にはどのような用途に適用できるかについて一例を挙げ
て説明する。図3(a)のA,B,C,D,…は画像メ
モリの画素アドレスを意味しており、これが図2のアド
レスA,B,C,D,…に対応しているものとする。図
3(a)の画像メモリの各画素を2値化したデータが例
えば図3(b)のようになったとする。図3(b)の白
い四角□はその画素アドレスの画素値を2値化したデー
タが0であることを意味し、図3(b)の黒い四角■は
その画素アドレスの画素値を2値化したデータが1であ
ることを意味するものとする。これが図2のアドレス
A,B,C,D,…の下に併記したデータの1,0に対
応しているものとする。次に、図3(c)に示された
B,2,I,2,O,1,S,1,…というリストデー
タは、図3(a)の画素アドレスBから2個のデータが
存在し、画素アドレスIから2個のデータが存在し、画
素アドレスOから1個のデータが存在し、画素アドレス
Sから1個のデータが存在することを意味しており、こ
れが図1のメモリ3に格納されるデータに対応してい
る。2値化データに白地が多い場合やランレングスが大
きなデータが存在する場合には、図3(c)のリスト構
造のデータを作成するメリットがある。
Next, specific applications of the above-described hardware will be described with reference to an example. .. In FIG. 3 (a) indicate pixel addresses of the image memory, which correspond to the addresses A, B, C, D,. Assume that data obtained by binarizing each pixel in the image memory of FIG. 3A is as shown in FIG. 3B, for example. A white square □ in FIG. 3B indicates that the data obtained by binarizing the pixel value of the pixel address is 0, and a black square 図 in FIG. 3B indicates that the pixel value of the pixel address is binary. This means that the converted data is 1. It is assumed that this corresponds to the data 1 and 0 which are described below the addresses A, B, C, D,... In FIG. Next, in the list data B, 2, I, 2, O, 1, S, 1,... Shown in FIG. 3C, there are two data from the pixel address B in FIG. However, this means that two data exist from the pixel address I, one data exists from the pixel address O, and one data exists from the pixel address S. Corresponding to the data stored in. If there are many white backgrounds or large run length data in the binarized data, there is a merit to create the data of the list structure in FIG.

【0020】さて、このような用途について、データの
開始位置やデータの長さを検出する方法について、図2
の書き込み時の動作(イ)を参照しながら説明する。図
2(イ)において、データシフト2は入力データをシフ
トレジスタにより2サイクル分遅延させたデータであ
り、データシフト3は入力データをシフトレジスタによ
り3サイクル分遅延させたデータである。データシフト
3が立ち上がると、位置データ取込タイミング信号が立
ち上がり、1サイクルの時間で位置データ取り込みタイ
ミング信号は立ち下がる。このとき、開始アドレスの位
置データが取り込まれると同時に、長さカウントが開始
される。次に、データシフト3が立ち下がると、長さ検
出タイミング信号が立ち上がり、長さカウントのデータ
が読み込まれる。長さ検出タイミング信号は1サイクル
の時間で立ち下がり、このとき、長さカウントのデータ
はリセットされる。
Now, for such an application, a method of detecting the start position of data and the length of data will be described with reference to FIG.
Will be described with reference to the operation (a) at the time of writing. In FIG. 2A, data shift 2 is data obtained by delaying input data by two cycles by a shift register, and data shift 3 is data obtained by delaying input data by three cycles by a shift register. When the data shift 3 rises, the position data fetch timing signal rises, and the position data fetch timing signal falls in one cycle. At this time, the length count is started at the same time as the position data of the start address is fetched. Next, when the data shift 3 falls, the length detection timing signal rises, and the data of the length count is read. The length detection timing signal falls in one cycle, and at this time, the length count data is reset.

【0021】[0021]

【発明の効果】請求項1の発明によれば、データを処理
してその結果をメモリに書き込む装置において、データ
の変化を検出してメモリに書き込まれるデータの処理を
開始するタイミングを判定する微分回路と、微分回路の
出力によりリセットされてメモリに書き込まれるデータ
の処理に要する時間をカウントするカウンタと、該カウ
ンタの値が所定値以上であることを検知する検知回路
と、検知回路によりカウンタの値が所定値以上であるこ
とが検知され、且つデータの読み出し要求があればメモ
リからデータを読み出すメモリリード制御部とを備える
ものであるから、データを処理してその結果をメモリに
書き込むメインの動作を停止させることなく、読み出し
要求があると時間幅を回路自身で自動的に検知し、デー
タを読み出すことができる。
According to the first aspect of the present invention, in a device for processing data and writing the result to a memory, a differential for detecting a change in data and judging a timing to start processing of data to be written to the memory. A counter that counts the time required for processing the data that is reset by the output of the differentiating circuit and written to the memory; a detection circuit that detects that the value of the counter is equal to or greater than a predetermined value; A memory read control unit that reads data from the memory when the value is detected to be equal to or greater than a predetermined value and there is a data read request. Without stopping the operation, when there is a read request, the circuit itself can automatically detect the time width and read the data. Kill.

【0022】請求項2の発明によれば、メモリに書き込
まれるデータは、データの開始位置のアドレスと、デー
タの長さを示すランレングスのデータであり、データの
処理に要する時間はランレングスに応じて変動するもの
であるから、本発明のメモリインターフェイスを用いれ
ば、データを処理してその結果をメモリに書き込むメイ
ンの動作には全く影響することなく、ランレングスの長
いデータの処理により生じた空き時間を利用してメモリ
の読み出し動作を行うことができる。
According to the second aspect of the present invention, the data to be written into the memory is the address of the start position of the data and the run-length data indicating the length of the data. Therefore, if the memory interface of the present invention is used, the main operation of processing the data and writing the result to the memory is not affected at all, and is caused by the processing of the data having a long run length. A memory read operation can be performed using the idle time.

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

【図1】本発明のメモリインターフェイスの回路構成図
である。
FIG. 1 is a circuit configuration diagram of a memory interface of the present invention.

【図2】本発明のメモリインターフェイスの動作波形図
である。
FIG. 2 is an operation waveform diagram of the memory interface of the present invention.

【図3】本発明のメモリインターフェイスを画像処理に
応用した場合の動作説明図である。
FIG. 3 is an operation explanatory diagram when the memory interface of the present invention is applied to image processing.

【符号の説明】[Explanation of symbols]

1 制御部 2 メモリインターフェイス 3 メモリ 21 微分回路 22 カウンタ 23 検知回路 24 メモリリード制御部 DESCRIPTION OF SYMBOLS 1 Control part 2 Memory interface 3 Memory 21 Differentiating circuit 22 Counter 23 Detection circuit 24 Memory read control part

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データを処理してその結果をメモリに
書き込む装置において、データの変化を検出してメモリ
に書き込まれるデータの処理を開始するタイミングを判
定する微分回路と、微分回路の出力によりリセットされ
てメモリに書き込まれるデータの処理に要する時間をカ
ウントするカウンタと、該カウンタの値が所定値以上で
あることを検知する検知回路と、検知回路によりカウン
タの値が所定値以上であることが検知され、且つデータ
の読み出し要求があればメモリからデータを読み出すメ
モリリード制御部とを備えることを特徴とするメモリイ
ンターフェイス。
An apparatus for processing data and writing the result to a memory, comprising: a differential circuit for detecting a change in the data to determine a timing for starting processing of the data written to the memory; A counter that counts the time required to process the data written to the memory, a detection circuit that detects that the value of the counter is greater than or equal to a predetermined value, and that the value of the counter is greater than or equal to the predetermined value by the detection circuit. A memory interface comprising: a memory read control unit that detects data and reads data from a memory when a data read request is issued.
【請求項2】 メモリに書き込まれるデータは、デー
タの開始位置のアドレスと、データの長さを示すランレ
ングスのデータであり、データの処理に要する時間はラ
ンレングスに応じて変動することを特徴とする請求項1
のメモリインターフェイス。
2. The data written to the memory is an address of a data start position and run-length data indicating the length of the data, and the time required for data processing varies according to the run-length. Claim 1
Memory interface.
JP33456599A 1999-11-25 1999-11-25 Memory interface Expired - Lifetime JP3700504B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33456599A JP3700504B2 (en) 1999-11-25 1999-11-25 Memory interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33456599A JP3700504B2 (en) 1999-11-25 1999-11-25 Memory interface

Publications (2)

Publication Number Publication Date
JP2001154908A true JP2001154908A (en) 2001-06-08
JP3700504B2 JP3700504B2 (en) 2005-09-28

Family

ID=18278834

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33456599A Expired - Lifetime JP3700504B2 (en) 1999-11-25 1999-11-25 Memory interface

Country Status (1)

Country Link
JP (1) JP3700504B2 (en)

Also Published As

Publication number Publication date
JP3700504B2 (en) 2005-09-28

Similar Documents

Publication Publication Date Title
JP3057934B2 (en) Shared bus arbitration mechanism
US5201036A (en) Data processor having wait state control unit
JP3700504B2 (en) Memory interface
JPH11232211A (en) Dma control device and its method
JP2711111B2 (en) Data processing device, measuring method and control method
JP2908273B2 (en) Vector processing equipment
JPH06202715A (en) State change detecting and recording circuit
JP3145765B2 (en) Information processing device
US20010005870A1 (en) External bus control system
JPH0229457Y2 (en)
KR100304290B1 (en) Fail Search Circuit
JP2702832B2 (en) Relief controller for low priority adapter
JPH03119449A (en) Calculating device
JP2990099B2 (en) Trace buffer control method
JPH03296104A (en) Programmable controller system
JP2804406B2 (en) Pulse measuring device
JPS6411977B2 (en)
JPH01258291A (en) Access controller for dual port memory
JPH06139158A (en) Method for monitoring common bus
JPH03131944A (en) Data processor
JPH0581052A (en) Microprocessor runaway check circuit
JPH01274260A (en) Adapter for controlling input/output
JPH0568143B2 (en)
JP2008077393A (en) Timer circuit and printer having the same
JPH1049489A (en) Signal generating device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050610

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050621

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050704

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090722

Year of fee payment: 4

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090722

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090722

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100722

Year of fee payment: 5