JPS6116377A - Memory scanner - Google Patents

Memory scanner

Info

Publication number
JPS6116377A
JPS6116377A JP13702584A JP13702584A JPS6116377A JP S6116377 A JPS6116377 A JP S6116377A JP 13702584 A JP13702584 A JP 13702584A JP 13702584 A JP13702584 A JP 13702584A JP S6116377 A JPS6116377 A JP S6116377A
Authority
JP
Japan
Prior art keywords
counter
memory
scanning
address
output
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
Application number
JP13702584A
Other languages
Japanese (ja)
Inventor
Mamoru Maeda
護 前田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP13702584A priority Critical patent/JPS6116377A/en
Publication of JPS6116377A publication Critical patent/JPS6116377A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To scan a prescribed address area of a memory at a high speed by using plural counters, which has the function to preset an initial value corresponding to a scan area, to generate scanning addresses. CONSTITUTION:Counters CNTX and CNTY generate the abscissa and the ordinate of a two-dimensional memory area respectively and have the preset function. Latches LT1 and LT2 hold lower and upper values of the scanning end address respectively, the latches LT3 and LT4 hold lower and upper values of the scanning start address respectively. A digital comparator DCP1 outputs a signal EQX when address information of the generated abscissa reaches the scanning end position, and a digital comparator DCP2 outputs a signal EQY when address information of the generated ordinate reaches the scanning end position.

Description

【発明の詳細な説明】 ■発明の分野 本発明は、2以上の次元のパラメータで特定される所定
領域のメモリの走査を行なうメモリ走査装装置に関し、
特に高速処理の可能なメモリ走査装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a memory scanning device that scans a predetermined area of memory specified by parameters of two or more dimensions.
In particular, the present invention relates to a memory scanning device capable of high-speed processing.

■従来の技術 例えば2次元の画像データや文字パターンデータを処理
する場合、各々の画素の位置を計算し、その位置が処理
範囲に入るかどうがを判定しながら、データの読み取り
及びデータの判定を行ない、これらの動作を繰り返し行
なっている。この種の処理は、比較的複雑であるため、
汎用のマイクロプロセッサにより処理することが多い。
■Conventional technology For example, when processing two-dimensional image data or character pattern data, the position of each pixel is calculated and it is determined whether the position falls within the processing range while reading and determining the data. and repeat these actions repeatedly. This type of processing is relatively complex, so
It is often processed by a general-purpose microprocessor.

しかし、この種の繰り返し処理をマイクロプロセッサで
行なうと非常に長い時間を要する。そこで、処理速度を
上げる場合には、アドレス計算等の演算を専用のハード
ウェア装置で処理する装置構成がとられることが多いが
、この種の装置は構成が複雑で高価である。
However, it takes a very long time to perform this type of repetitive processing using a microprocessor. Therefore, in order to increase the processing speed, a device configuration is often adopted in which operations such as address calculation are processed by a dedicated hardware device, but this type of device has a complicated configuration and is expensive.

■発明の目的 2以上の次元で表わされる所定のアドレス領域に対する
メモリ走査を高速で行奇う装置の構成を簡単にするとと
左目的とする。
(2) Purpose of the Invention The purpose of the invention is to simplify the configuration of a device that performs high-speed memory scanning for a predetermined address area expressed in two or more dimensions.

■発明の構成 上記目的を達成するため、本発明においては、各々の走
査軸のアドレス、つまり2次元の場合にはメモリの主ア
ドレスと副アドレスを計数する複数のカウンタを用いて
走査アドレスを生成する。
■Structure of the Invention In order to achieve the above object, in the present invention, scanning addresses are generated using a plurality of counters that count the addresses of each scanning axis, that is, the main address and subaddress of the memory in the case of two dimensions. do.

こわらのカウンタは、それらの出力が直接アドレス情報
になるように、走査領域に応じた初期値をプリセットす
る機能を備えるものにする。また各走査軸の走査終了位
置を定めるために、ラッチのようなデータ保持手段を複
数備え、それらに保持された値と前記カウンタが出力す
る値とを比較する。主走査方向のアドレスが終了位置に
達した心、それを計数するカウンタに初期値を再セット
し、他方のカウンタに計数パルスを出力する。
The stiff counters are designed to have a function of presetting initial values according to the scanning area so that their output becomes direct address information. Furthermore, in order to determine the end position of scanning for each scanning axis, a plurality of data holding means such as latches are provided, and the values held by these means are compared with the value output by the counter. When the address in the main scanning direction reaches the end position, the counter that counts it is reset to its initial value, and a counting pulse is output to the other counter.

文字パターン認識においては、例えば、そのパターンの
大きさを識別するため、所定領域内の黒画素(又は白画
素)の開始位置、終了位置等を知る必要が生ずる。そこ
で、本発明の1つの好ましい態様においては、メモリか
ら読み出したデータが所定の値になったら、その時点で
走査を終了する。このようにすれば、走愉:終了後にカ
ウンタの値を読むことで、黒画素又は白画素の開始位置
夕知ることができる。
In character pattern recognition, for example, in order to identify the size of the pattern, it is necessary to know the start position, end position, etc. of black pixels (or white pixels) within a predetermined area. Therefore, in one preferred embodiment of the present invention, when the data read from the memory reaches a predetermined value, scanning is terminated at that point. In this way, by reading the value of the counter after the end of the run, it is possible to know the starting position of the black pixel or white pixel.

また、本発明の更に好ましい態様においては、主走査方
向と副走査方向とを六九換える走査軸切換手段を設け、
またカウンタを可逆カウンタとして、任意の走査軸で任
意の方向に向かって走査可能1;する。このようにすれ
ば、様々な走査モー1−で走査を行なうことにより、例
えは文字パターンの一ヒ下左右において、黒画素ヌは白
画素の開始位置によび終了位置を知りうる。
Further, in a further preferred embodiment of the present invention, a scanning axis switching means for switching the main scanning direction and the sub-scanning direction by 69 times is provided,
Furthermore, the counter is a reversible counter, and can be scanned in any direction along any scanning axis. In this way, by performing scanning in various scanning modes, it is possible to know the start and end positions of black pixels and white pixels, for example, on the lower left and right sides of a character pattern.

上記のような構成にすると、走査終了時には、ノiウン
タに最終走査画素の次の画素のアドレスが保持される。
With the above configuration, at the end of scanning, the address of the pixel next to the last scanned pixel is held in the i-counter.

従って、例えば最初に見つかった黒画素の位置を知るた
めには、走査終了後に、カウンタの内容を読んでそれか
ら1を引かなければならない。そこで、本発明の好まし
い態様においては、走査終了条件が満たされたら、カウ
ンタの計数方向を切換え、1クロック分遅らせて動作を
終了する。つまり、アップカウントをしている場合には
、走査終了条件が満たされた後で、カウンタの値をデク
リメントしてから動作を終了する。これによれば5自動
的にアドレスの補正が行なわれるので、カウンタの内容
が、知りたい位置情報と一致し、計算の必要がなくなる
Thus, for example, to find the location of the first black pixel found, the contents of the counter must be read and one must be subtracted from it after the scan is completed. Therefore, in a preferred embodiment of the present invention, when the scanning end condition is satisfied, the counting direction of the counter is switched, and the operation is ended with a delay of one clock. That is, when up-counting is performed, after the scanning end condition is satisfied, the counter value is decremented and then the operation is ended. According to this method, address correction is automatically performed (5), so that the contents of the counter match the desired position information, eliminating the need for calculation.

発明の実施例 以下、図面を参照して本発明の詳細な説明する。Examples of the invention Hereinafter, the present invention will be described in detail with reference to the drawings.

第1. a図および第1b図に、本発明を実施するメモ
リ走査装置を示す。この装置の動作を概略でいうと、こ
の装置は、外部から印加される読み出し用クロックパル
スRDに同期して、予め設定された所定の2次元領域の
メモリアドレスを順次生成し、所定の条件が満たされる
までそれを繰り返す。つまり、この装置のアドレス出力
端子ADR5H及びADR5Lにメモリのアドレスライ
ンを接続し、そのメモリのデータ読み出し制御端子にも
クロックパルスRDを与えることにより、そのメモリは
、予め設定された2次元領域のデータを順次出力する。
1st. Figures 1a and 1b illustrate a memory scanning device embodying the invention. Briefly speaking, this device sequentially generates memory addresses in a predetermined two-dimensional area in synchronization with a read clock pulse RD applied from the outside, and when predetermined conditions are met. Repeat until satisfied. In other words, by connecting the address line of the memory to the address output terminals ADR5H and ADR5L of this device, and applying the clock pulse RD to the data read control terminal of the memory, the memory can read data in a preset two-dimensional area. Output sequentially.

この装置を使用する場合、メモリは横方向が2のn1乗
、縦方向が2の02乗(nl、n2は任意)でそれぞれ
表わされる大きさの2次元座41(アドレス)に配置す
る。例えば、nl及びn2をそれぞれ■0及び9とすれ
ば、1024(横)X512(縦)で構成される2次元
座標を構成することができる。
When using this device, the memory is arranged in a two-dimensional locus 41 (address) having a size expressed by 2 to the n1 power in the horizontal direction and 2 to the 02 power in the vertical direction (nl and n2 are arbitrary). For example, if nl and n2 are 0 and 9, respectively, two-dimensional coordinates consisting of 1024 (horizontal) x 512 (vertical) can be constructed.

その場合、メモリアドレスは、19ビツトの2値データ
で構成されるアドレス情報によって表わされるが、その
アドレス情報の上位9ビツトと下位IOビットは、それ
ぞれメモリの2次元領域の縦方向の座標および横方向の
座標に対応する。そこで、第1a図に示される回路では
、アドレス情報ADR5H及びADR5Lを、それぞれ
n2ビツト及びn1ビyトで構成している。
In that case, the memory address is represented by address information consisting of 19-bit binary data, but the upper 9 bits and lower IO bits of the address information are the vertical and horizontal coordinates of the two-dimensional area of the memory, respectively. Corresponds to the coordinates of the direction. Therefore, in the circuit shown in FIG. 1a, address information ADR5H and ADR5L are composed of n2 bits and n1 bits, respectively.

第1a図に示すカウンタCNTX及びCNTYが、それ
ぞれ2次元メモリ領域の横方向座標および縦方向座標を
生成する。これらのカウンタCNTX及びCNTYは、
プリセット機能を備えたアップ/ダウンカウンタである
。DATAがプリセットするデータの入力端子、LDが
データのプリセット指示入力端子、U/Dがアップカウ
ントとダウンカウントの選択指示入力端子、CKがMJ
数パルスの入力端子、ENが計数許可制御入力端子、そ
してOUTが計数データの出力端子であり、これらの端
子は正論理で動作する。
Counters CNTX and CNTY shown in FIG. 1a generate the horizontal and vertical coordinates, respectively, of a two-dimensional memory area. These counters CNTX and CNTY are
This is an up/down counter with a preset function. DATA is the input terminal for preset data, LD is the data preset instruction input terminal, U/D is the up-count and down-count selection instruction input terminal, CK is MJ
An input terminal for several pulses, EN is a counting permission control input terminal, and OUT is an output terminal for counting data, and these terminals operate in positive logic.

ランチLTI及びL T、2は、それぞれ走査終了アド
レスの下位(横方向座標)及び上位(縦方向座標)の値
を保持するために備わっており、ラッチLT3及びLT
4は、それぞれ走査開始アドレスの下位及び上位の値を
保持するために備わっている。デジタル比較器DCPI
はカウンタCNTXが出力する値とランチLTIが出力
する値とを比較し、デジタル比較器DCP2はカウンタ
CNTYが出力する値とランチLT2が出力する値とを
比較する。
The latches LTI and LT2 are provided to hold the lower (horizontal coordinate) and upper (vertical coordinate) values of the scan end address, respectively, and the latches LT3 and LT
4 are provided to hold the lower and upper values of the scan start address, respectively. Digital comparator DCPI
compares the value output by the counter CNTX and the value output by the launch LTI, and the digital comparator DCP2 compares the value output by the counter CNTY and the value output by the launch LT2.

デジタル比較1DcP1及びDCP2は、入力端子Aの
値と入力端子Bの値とが一致すると、その出力端子Δ=
Bに高レベルの信号(EQX、EQY)を出力する。つ
まり、デジタル比較器DCP1は生成した横方向座標の
アドレス情報が走査終了位置に達すると信号EQXを出
力し、デジタル比較器DCP2は生成した縦方向座標の
アドレス情報が走査終了位置に達すると信号EQ’Yを
出力する。
Digital comparison 1DcP1 and DCP2, when the value of input terminal A and the value of input terminal B match, the output terminal Δ=
A high level signal (EQX, EQY) is output to B. That is, the digital comparator DCP1 outputs the signal EQX when the generated horizontal coordinate address information reaches the scan end position, and the digital comparator DCP2 outputs the signal EQX when the generated vertical coordinate address information reaches the scan end position. 'Output Y.

2次元領域の走査を行なう場合、通常はその横方向を主
走査方向、縦方向を副走査方向に設定する。
When scanning a two-dimensional area, the horizontal direction is usually set as the main scanning direction and the vertical direction is set as the sub-scanning direction.

しかし、例えば文字パターンの輪郭を検出する場合など
は、主走査方向と副走査方向とを逆にした方が処理が楽
になることがある。そこで、この実施例では第1b図に
示す走査軸切換回路100を設けである。この回路10
0は、信号5DIRに応じて、主走査方向と副走査方向
とを切換える。
However, when detecting the outline of a character pattern, for example, processing may be easier if the main scanning direction and the sub-scanning direction are reversed. Therefore, in this embodiment, a scanning axis switching circuit 100 shown in FIG. 1b is provided. This circuit 10
0 switches between the main scanning direction and the sub-scanning direction in accordance with the signal 5DIR.

また、主走査及び副走査の走査方向(アドレスを増大さ
せる方向に走査するか小さくする方向に走査するか)を
いずれにも設定できるように、走査方向設定回路300
を設けである。
In addition, the scanning direction setting circuit 300 is configured to set the scanning direction of the main scanning and sub-scanning (whether to scan in the direction of increasing or decreasing the address).
This is provided.

第1b図に示す判定回路200が、走査領域の判定を行
ない、走査の開始及び終了を制御する。
A determination circuit 200 shown in FIG. 1b determines the scanning area and controls the start and end of scanning.

以下、第2図のタイミングチャートをも参照して、この
装置の具体的な使用方法と動作を説明する。この装置は
、例えばマイクロコンピュータを含むシステムのパスラ
インに接続して使用される。
Hereinafter, the specific usage and operation of this device will be explained with reference to the timing chart of FIG. 2. This device is used by being connected to a path line of a system including, for example, a microcomputer.

判定回路200から出力される信号CTは、それをシス
テムが参照しうるように、例えばマイクロコンピュータ
の入力ポートに接続される。また、走査を行なうメモリ
の出力データラインを判定口@200の入力端子D o
ut、に接続する。実際に使用する場合、まずアドレス
のパラメータ、すなわち走査開始アドレスの上位データ
5TADH,下位データ5TADL 、走査終了アドレ
スの上位データEDADH。
The signal CT output from the determination circuit 200 is connected to, for example, an input port of a microcomputer so that the system can refer to it. In addition, the output data line of the memory to be scanned is connected to the input terminal D o of the judgment port @200.
Connect to ut. When actually used, first the address parameters, that is, the upper data 5TADH of the scan start address, the lower data 5TADL, and the upper data EDADH of the scan end address.

および下位データEDADLをセットする。これらのデ
ータをセットする場合には、それぞ九ラッチパルスLP
4.LP3.LP2及びLPIを出力し、出力した各デ
ータをラッチ回路LT/I、LT3.LT2及びLTI
に保持させる。
and lower data EDADL. When setting these data, nine latch pulses LP are required.
4. LP3. LP2 and LPI are output, and each output data is sent to latch circuits LT/I, LT3 . LT2 and LTI
hold it.

第3図に示すようにメモリ領域の横方向座標が下位アド
レス、縦方向座標が上位アドレスにそれぞれ割り当てら
れている場合、信号5DIRを低レベルLにセットすれ
ば、横方向が主走査方向になり縦方向が副走査方向にな
るが、信号5DIRを高レベルHにすると、逆に縦方向
が主走査方向になり横方向が副走査方向になる。また、
信号5UDXおよび信号5uoyを高レベルHにすると
それぞれカウンタCNTX及びCNTYがアップカウン
ト方向(通常は、横座標が左から右方向、縦座標が上か
ら下方向)に走査を行なうが、それらの信号レベルを低
レベルLにすると走査方向は逆になる。
As shown in Figure 3, if the horizontal coordinates of the memory area are assigned to the lower addresses and the vertical coordinates are assigned to the upper addresses, by setting the signal 5DIR to a low level L, the horizontal direction becomes the main scanning direction. The vertical direction becomes the sub-scanning direction, but when the signal 5DIR is set to a high level H, the vertical direction becomes the main scanning direction and the horizontal direction becomes the sub-scanning direction. Also,
When the signal 5UDX and the signal 5uoy are set to high level H, the counters CNTX and CNTY respectively scan in the up-counting direction (normally, the abscissa is from left to right and the ordinate is from top to bottom), but these signal levels When is set to a low level L, the scanning direction is reversed.

この実施例では、走査を終了する条件がプログラマブル
になっている。その条件は、ラッチLT5に4ビツトデ
ータ5CONとして設定する。これらの条件は、信号E
QXが出力された場合、信号EQYが出力された場合、
データ[1」 (例えば黒画素に対応)を検出した場合
、及びデータroj(例えば白画素に対応)を検出した
場合、の4つが設定可能である。
In this embodiment, the conditions for terminating the scan are programmable. The condition is set in the latch LT5 as 4-bit data 5CON. These conditions are the signal E
When QX is output, when signal EQY is output,
There are four possible settings: when data [1] (for example, corresponding to a black pixel) is detected, and when data roj (for example, corresponding to a white pixel) is detected.

例えば、うy f L T 5 ニデータro、0,1
.OJを設定すれば、オアゲートOR5の出力端子が高
レベルHになるのは、信号EQXとEQYが共に高レベ
ルHになった場合か又はデータ「1」を検出した場合で
ある。この場合、アンドゲートAN6の出力端子が常時
低レベルLになるので、データrOJを検出した場合、
の条件はマスクされる。
For example, y f L T 5 data ro, 0,1
.. When OJ is set, the output terminal of the OR gate OR5 becomes high level H when both signals EQX and EQY become high level H or when data "1" is detected. In this case, the output terminal of AND gate AN6 is always at low level L, so when data rOJ is detected,
conditions are masked.

同様に、ラッチLT5にデータrl、0,1.OJをセ
ットすれば、オアゲートOR3の出力端子が常時高レベ
ルHになるので、信号EQXが出力された場合、の条−
件がマスクされて信号EQYが出力されると直ちに条件
が成立する。またデータro、1,1.Ojをセットす
れば、オアゲートOR4の出力端子が常時高レベルHに
なるので、信号EQYが出力された場合、の条件がマス
クされて信号EQXが出力されると直ぢに条件が成立す
る。
Similarly, data rl, 0, 1 . If OJ is set, the output terminal of OR gate OR3 will always be at a high level H, so if signal EQX is output, the condition
The condition is met as soon as the condition is masked and the signal EQY is output. Also, data ro, 1, 1 . If Oj is set, the output terminal of the OR gate OR4 is always at a high level H, so that when the signal EQY is output, the condition is masked and the condition is met immediately when the signal EQX is output.

信号5DIRを低レベルLにセント(横方向が主走査、
縦方向が副走査)し、信号5UDX及び5UDYをそれ
ぞれH及びH(CNTX、CNTY共にアップカウント
)にセットし、データ5CONとしてrQ、0,1.O
Jをセットした場合の動作を説明する。
Send signal 5DIR to low level L (horizontal direction is main scanning,
The vertical direction is sub-scanning), and the signals 5UDX and 5UDY are set to H and H (both CNTX and CNTY are up-counted), and the data 5CON is rQ, 0, 1 . O
The operation when J is set will be explained.

まず最初に、信号LOADX及びLOADYを印加する
。これによって、カウンタCNTX及びCNTYにそれ
ぞれラッチLT3及びLT4から初期値5TADL及び
5TADHがプリセットされる。ホールト信号HOLD
は高レベルHであり、読み出しクロックRDが印加され
ると、それがカウンタCNTX及びCNTYのクロック
端子に印加される。
First, signals LOADX and LOADY are applied. As a result, counters CNTX and CNTY are preset to initial values 5TADL and 5TADH from latches LT3 and LT4, respectively. Halt signal HOLD
is at a high level H, and when the read clock RD is applied, it is applied to the clock terminals of the counters CNTX and CNTY.

信号5DIRがLであるため、走査軸切換回路100は
、信号ENXを1;を時1−I kmし、信号EQXが
現われた時だけ信号ENYをHにセットする。従って、
カウンタCNTXは常時計数許可状態にあり、カウンタ
CNTYは信号EQXが現われた時だけ計数許可状態に
なる。
Since the signal 5DIR is L, the scanning axis switching circuit 100 changes the signal ENX to 1 at 1-I km, and sets the signal ENY to H only when the signal EQX appears. Therefore,
The counter CNTX is always in a counting enabled state, and the counter CNTY is in a counting enabled state only when the signal EQX appears.

この状態ではアドレス情報5TADII + 5TAD
Lがメモリのアドレス端子に印加されるので、ここで1
つのパルスRDが出力されると、それによって走査開始
位置のメモリの内容が読み出される。それと同時に、こ
のパルスRDによって計数許可状態のカウンタCNTX
が1つカウントアツプし、その計数値は5TADL +
 1になる。カウンタCNTYは、計数禁止状態にある
ので、パルスRDに応答せず、計数値は変わらない。同
様に、パルスRDが現われる毎にカウンタCNTXの内
容が更新され、そのつどメモリの内容が読み出される。
In this state, address information 5TADII + 5TAD
Since L is applied to the address terminal of the memory, here 1
When one pulse RD is output, the contents of the memory at the scanning start position are read out. At the same time, this pulse RD causes the counter CNTX in the counting enabled state to
counts up by 1, and the count value is 5TADL +
Becomes 1. Since the counter CNTY is in a counting prohibited state, it does not respond to the pulse RD and the count value does not change. Similarly, each time a pulse RD appears, the contents of the counter CNTX are updated and the contents of the memory are read each time.

カウンタCNTXの計数値が横方向座標の最終値EDA
DLに達すると、比較器DC:P1が一致信号EQXを
出力する。信号EQXが高レベル■4の間、信号LDX
及びENYt高レベルしになる。信号LDXが高レベル
Hになると、カウンタCNTXにはラッチLT3から初
期値5TADLが再びプリセットされ、その計数値が5
TADLに戻る。信号ENYが高レベルHになると、カ
ウンタCNTYが計数許可状態になり、次にパルスRD
が印加された時にカウンタCNTYの計数値が+1され
る。つまり、走査位置は、横方向は走査領域の右端から
左端に移り縦方向は1つ下の座sシこ移る。以後同様に
して、パルスRDが印加される毎に位置を更新して動作
を続ける。
The count value of counter CNTX is the final value EDA of the horizontal coordinate
When DL is reached, comparator DC:P1 outputs a match signal EQX. While signal EQX is at high level ■4, signal LDX
and ENYt becomes high level. When the signal LDX becomes high level H, the initial value 5TADL is again preset to the counter CNTX from the latch LT3, and the count value becomes 5.
Return to TADL. When the signal ENY becomes high level H, the counter CNTY enters the counting permission state, and then the pulse RD
When is applied, the count value of counter CNTY is incremented by 1. That is, the scanning position moves from the right end to the left end of the scanning area in the horizontal direction, and moves one seat down in the vertical direction. Thereafter, the position is updated and the operation continues in the same manner every time the pulse RD is applied.

走査の途中でメモリから出力されるデータが「1」レベ
ルになると、アンドゲートAN5の出力端子が高レベル
Hになり、オアゲートOR5の出力端子が高レベルHに
なる。すると、走査方向設定回路300を構成する排他
的論理和回路E’XLおよびEX2の出力レベルが反転
し、それまでアップカウントレベルに設定されていた信
号UDXおよびUDYが、共にダウンカウントレベルに
変化する。これによって、カウンタCNTXおよびCN
TYはダウンカウントモードに切り換わる。
When the data output from the memory becomes a "1" level during scanning, the output terminal of the AND gate AN5 becomes a high level H, and the output terminal of the OR gate OR5 becomes a high level H. Then, the output levels of the exclusive OR circuits E'XL and EX2 forming the scanning direction setting circuit 300 are inverted, and the signals UDX and UDY, which had been set to the up-count level, both change to the down-count level. . This causes counters CNTX and CN
TY switches to down count mode.

この後でパルスRDが印加されると、カウンタCNTX
の計数値が−1され、DタイプのフリップフロップDF
Fの端子りに印加される高レベルHを出力端子にセット
する。これによって走査終了信号CTが高レベルHにな
り、ホールド信号H○LDが低レベルLになる。ホール
ド信号HOLDによって、カウンタCNTX及びCNT
Yの計数はストップする。
When pulse RD is applied after this, counter CNTX
The count value of is reduced by 1, and the D type flip-flop DF
The high level H applied to the F terminal is set to the output terminal. As a result, the scan end signal CT becomes a high level H, and the hold signal H*LD becomes a low level L. By the hold signal HOLD, the counters CNTX and CNT
Counting of Y stops.

オアゲートOR5の出力信号によってカウンタCNTX
及びCNTYの計数方向を切換えるのは、計数値の補正
を自動的に行なうためである。すなわち、例えばアドレ
スADR8においてデータ「1」を見つけた場合、その
時にメモリデータを読み出すためのパルスRDによって
、カウンタCNTX及びCNTYの計数値はADR3+
1になる。そこで、カウンタCNTX及びCNTYの計
数方向を逆に設定した後、パルスRDが1つ現われてか
ら動作を終了すると、カウンタCNTX及びCNTYの
計数値が補正されてADR8に戻る。
The counter CNTX is set by the output signal of the OR gate OR5.
The purpose of switching the counting direction of CNTY and CNTY is to automatically correct the counted value. That is, for example, when data "1" is found at address ADR8, the count values of counters CNTX and CNTY are changed to ADR3+ by pulse RD for reading memory data at that time.
Becomes 1. Therefore, after setting the counting directions of the counters CNTX and CNTY in the opposite direction, when the operation is ended after one pulse RD appears, the count values of the counters CNTX and CNTY are corrected and the process returns to ADR8.

このようにしてカウンタCNTX及びCNTYに得られ
淋アドレス情報は、バッファBFを介して外部(例えば
マイクロコンピュータ)から読み取ることができる。
The address information thus obtained by the counters CNTX and CNTY can be read from the outside (for example, a microcomputer) via the buffer BF.

走査範囲内にデータ「1」が存在しなければ、信号EQ
XとEQYが同時に現われた時、つまり走査範囲の終了
位置HDADH+ EDADLに達した時に動作を終了
する。
If data “1” does not exist within the scanning range, the signal EQ
The operation ends when X and EQY appear simultaneously, that is, when the end position HDADH+EDADL of the scanning range is reached.

つまり、走査開始アドレス、走査終了アドレス等のパラ
メータをセットするだけで、その範囲内の大量のメモリ
を走査して、初めて現われたデータrlJ又はデータr
OJの存在したアドレスを出力する。この検索処理は、
ハードウェアで行なうので非常に高速である。
In other words, by simply setting parameters such as the scan start address and scan end address, a large amount of memory within that range is scanned, and data rlJ or data r
Output the address where OJ existed. This search process is
Since it is done in hardware, it is very fast.

なお、上記実施例では主走査方向と副走査方向とを切り
換えるために走査軸切換回路100を用いたが、第4図
に示す回路を用いてもよい。すなわち、この例ではメモ
リに接続するアドレス情報ラインとカウンタの出力う°
インとをマルチプレクサMPX1及びMPX2を介して
接続し、アドレスの上位グループと下位グループとが入
れ換えられるように構成している。但し、この構成にす
る場合には、アドレスの上位グループのビット数と下位
グループのビット数とを同一にする必要がある。々お、
この実施例ではランチL A 4 、オアゲ−トOR2
等が不要である。
In the above embodiment, the scanning axis switching circuit 100 is used to switch between the main scanning direction and the sub-scanning direction, but a circuit shown in FIG. 4 may also be used. That is, in this example, the address information line connected to the memory and the counter output
In is connected through multiplexers MPX1 and MPX2, and the upper group and lower group of addresses can be exchanged. However, when using this configuration, it is necessary to make the number of bits in the upper group and the number of bits in the lower group of the address the same. Oh,
In this example, Lunch LA 4, Or Gate OR 2
etc. are not necessary.

■効果 以上のとおり本発明によれば、構成の簡単な装置を用い
てメモリの走査を高速で行なうことができ、例えば文字
パターン認識の前処理等に有効である。
(2) Effects As described above, according to the present invention, memory can be scanned at high speed using a device with a simple configuration, and is effective for, for example, preprocessing for character pattern recognition.

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

第1a図および第1b図は、本発明を実施するメモリ走
査装置を示すブロック図である。 第2図は、第1a図および第1b図に示す装置を使用す
る場合の動作例を示すタイミングチャートである。 第3図は、メモリのアドレスと2次元座標との関係を示
す平面図である。 第4図は、本発明の変形例における回路の一部を示すブ
ロック図である。 100:走査軸切換回路 200:判定回路(電子制御手段) 30o:走査方向設定回路
Figures 1a and 1b are block diagrams illustrating a memory scanning device embodying the present invention. FIG. 2 is a timing chart showing an example of operation when using the apparatus shown in FIGS. 1a and 1b. FIG. 3 is a plan view showing the relationship between memory addresses and two-dimensional coordinates. FIG. 4 is a block diagram showing part of a circuit in a modified example of the present invention. 100: Scanning axis switching circuit 200: Judgment circuit (electronic control means) 30o: Scanning direction setting circuit

Claims (6)

【特許請求の範囲】[Claims] (1)初期値設定機能を備える第1のカウンタ;初期値
設定機能を備える第2のカウンタ; 主アドレスの走査終了位置データを保持する第1のデー
タ保持手段; 副アドレスの走査終了位置データを保持する第2のデー
タ保持手段; 前記第1のカウンタに設定する初期値と第2のカウンタ
に設定する初期値の少なくとも一方を保持する第3のデ
ータ保持手段; 前記第1のカウンタの計数値と第1のデータ保持手段の
値とを比較してその結果を出力する第1の比較手段; 前記第2のカウンタの計数値と第2のデータ保持手段の
値とを比較してその結果を出力する第2の比較手段;お
よび 前記第1のカウンタと第2のカウンタの一方に計数パル
スを順次与え、そのカウンタの計数値が所定値になると
、そのカウンタに第3のデータ保持手段の値を再セット
して他方のカウンタに計数パルスを与え、所定の条件が
満たされるまでこれらの動作を繰り返す電子制御手段; を備えるメモリ走査装置。
(1) A first counter with an initial value setting function; a second counter with an initial value setting function; a first data holding means that holds scan end position data of the main address; a scan end position data of the sub address; a second data holding means for holding; a third data holding means for holding at least one of an initial value set to the first counter and an initial value set to the second counter; a count value of the first counter; a first comparing means for comparing the count value of the second counter and the value of the second data holding means and outputting the result; a second comparison means for output; and a counting pulse is sequentially applied to one of the first counter and the second counter, and when the count value of the counter reaches a predetermined value, the value of the third data holding means is transferred to the counter; electronic control means for resetting the counter, giving a counting pulse to the other counter, and repeating these operations until a predetermined condition is met;
(2)前記所定の条件は、電子制御手段に備わったレジ
スタに予め設定されたデータに応じて設定され、前記第
1の比較手段の出力が所定状態になったこと、前記第2
の比較手段の出力が所定状態になったこと、およびメモ
リから読み出されたデータが所定値になったこと、の少
なくとも1つを含む、前記特許請求の範囲第(1)項記
載のメモリ走査装置。
(2) The predetermined condition is set according to data preset in a register provided in the electronic control means, and the output of the first comparison means is in a predetermined state;
The memory scan according to claim (1), which includes at least one of the following: the output of the comparing means has reached a predetermined state, and the data read from the memory has reached a predetermined value. Device.
(3)電子制御手段は、メモリの主アドレスと副アドレ
スとの走査順を入れ換える走査軸切換手段を備える、前
記特許請求の範囲第(1)項記載のメモリ走査装置。
(3) The memory scanning device according to claim 1, wherein the electronic control means includes scanning axis switching means for switching the scanning order of the main address and the sub address of the memory.
(4)走査軸切換手段は、第1のカウンタの出力ライン
と第2のカウンタの出力ラインの一方を選択的にメモリ
アドレスラインの上位グループに接続し、第1のカウン
タの出力ラインと第2のカウンタの出力ラインの他方を
選択的にメモリアドレスラインの下位グループに接続す
るマルチプレクサを備える、前記特許請求の範囲第(3
)項記載のメモリ走査装置。
(4) The scanning axis switching means selectively connects one of the output line of the first counter and the output line of the second counter to the upper group of memory address lines, and connects the output line of the first counter and the output line of the second counter. Claim 3 comprises a multiplexer for selectively connecting the other of the output lines of the counter to a subgroup of memory address lines.
) The memory scanning device described in paragraph 1.
(5)第1のカウンタと第2のカウンタは可逆カウンタ
である、前記特許請求の範囲第(1)項、第(2)項、
第(3)項又は第(4)項記載のメモリ走査装置。
(5) Claims (1) and (2), wherein the first counter and the second counter are reversible counters;
The memory scanning device according to item (3) or item (4).
(6)電子制御手段は、第1のカウンタと第2のカウン
タの少なくとも一方の計数方向を反転する信号反転手段
と、遅延手段とを備え、前記所定の条件が満たされると
、第1のカウンタと第2のカウンタの少なくとも一方の
計数方向を反転し、そのカウンタに計数パルスを1つ出
力した後で動作を終了する、前記特許請求の範囲第(5
)項記載のメモリ走査装置。
(6) The electronic control means includes a signal inversion means for inverting the counting direction of at least one of the first counter and the second counter, and a delay means, and when the predetermined condition is satisfied, the first counter and the counting direction of at least one of the second counters is reversed, and the operation is terminated after outputting one counting pulse to the counter.
) The memory scanning device described in paragraph 1.
JP13702584A 1984-07-02 1984-07-02 Memory scanner Pending JPS6116377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13702584A JPS6116377A (en) 1984-07-02 1984-07-02 Memory scanner

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13702584A JPS6116377A (en) 1984-07-02 1984-07-02 Memory scanner

Publications (1)

Publication Number Publication Date
JPS6116377A true JPS6116377A (en) 1986-01-24

Family

ID=15189079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13702584A Pending JPS6116377A (en) 1984-07-02 1984-07-02 Memory scanner

Country Status (1)

Country Link
JP (1) JPS6116377A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62269568A (en) * 1986-05-19 1987-11-24 Canon Inc Image processor
JPS63222205A (en) * 1987-03-12 1988-09-16 Nippon Denso Co Ltd Image processor
JPH0277935A (en) * 1988-09-14 1990-03-19 Mitsubishi Electric Corp Line buffer memory

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62269568A (en) * 1986-05-19 1987-11-24 Canon Inc Image processor
JPS63222205A (en) * 1987-03-12 1988-09-16 Nippon Denso Co Ltd Image processor
JPH0277935A (en) * 1988-09-14 1990-03-19 Mitsubishi Electric Corp Line buffer memory

Similar Documents

Publication Publication Date Title
JP3068842B2 (en) Direct memory access device in image processing device and external storage device used therefor
US4850028A (en) Image processing method and apparatus therefor
US4607340A (en) Line smoothing circuit for graphic display units
EP0038102B1 (en) Digital scan converter
EP0720120B1 (en) Laser beam printer
EP0401763B1 (en) Timing signal generating system
US4701864A (en) Memory control apparatus for a CRT controller
US5282064A (en) Apparatus for simultaneous reading of reflective and light conductive portions of an original
JPS6116377A (en) Memory scanner
JPS6116347A (en) Memory scanner
KR100206258B1 (en) Image processing apparatus
US5349369A (en) Image interpolation circuit
US5479165A (en) Two-dimensional coding apparatus
JPS60254255A (en) Memory scan system
JPH05274435A (en) Image processor
JP2903214B2 (en) Area designation device
JPS61117673A (en) System for picture data transfer processing
JPS61117668A (en) System for picture data transfer processing
JPH0511330B2 (en)
JP2903949B2 (en) Signal processing device for raster image display system
JPS63104187A (en) Area specification system
JPS6248869A (en) Picture signal processor
JPS6346872A (en) Image processing device
JP2938107B2 (en) Pattern recognition device
JPH02245988A (en) Specific continuous area detecting circuit