JPS59111555A - Memory circuit - Google Patents

Memory circuit

Info

Publication number
JPS59111555A
JPS59111555A JP22121982A JP22121982A JPS59111555A JP S59111555 A JPS59111555 A JP S59111555A JP 22121982 A JP22121982 A JP 22121982A JP 22121982 A JP22121982 A JP 22121982A JP S59111555 A JPS59111555 A JP S59111555A
Authority
JP
Japan
Prior art keywords
memory
data
register
conditions
comparison
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
JP22121982A
Other languages
Japanese (ja)
Inventor
Tomoko Matsuki
松木 智子
Hisao Ishizuka
石塚 久夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP22121982A priority Critical patent/JPS59111555A/en
Publication of JPS59111555A publication Critical patent/JPS59111555A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To amplify a program and to shorten an execution time by adding a condition register to a memory circuit, and executing write control to a memory by comparison control. CONSTITUTION:A memory circuit is constituted of a memory 1 for extracting and storing that which satisfies conditions among input data, an address counter 2, a condition register 3, a data register 4, and a comparison controlling circuit 5. Necessary conditions are set to the condition register 3 by a memory write instruction, and these conditions are compared with the contents (input data) of the data register 4. In case when this result of comparison satisfies the conditions, the comparison controlling circuit 5 outputs a write instruction and writes the contents of the data register 4 in the memory 1. Also, this circuit transmits the writing to the address counter 2 simultaneously with the writing and designates the following address. Thereafter, with regard to the input data which satisfies the conditions, the writing is executed successively in the memory 1.

Description

【発明の詳細な説明】 本発明は、メモリ回路に関する。[Detailed description of the invention] The present invention relates to memory circuits.

一般に、大量のデータを扱う事務処理、統計処理におい
て、条件を満たすデータだけを抽出して処理に用いる場
合がよくある。
In general, in office processing and statistical processing that handle large amounts of data, it is often the case that only data that satisfies conditions is extracted and used for processing.

 1− たとえば、人間に関するデータがあるとして、名前、性
別1年令、身長9体重などのデータが書き込まれている
場合を考える。
1- For example, suppose that there is data about a human being, and data such as name, gender, age, height, weight, and so on are written.

この場合、これらのデータは大量なので、磁気ディスク
や磁気テープ等に格納するのが一般的である。しかし、
これらの記憶媒体は、アクセス時間を要するので、何回
もアクセスすることは避けなければならない。たとえば
、20才から30才までの人の身長の平均や体重の平均
や分布などを求めようとした場合、磁気ディスクや磁気
テープに格納されているデータ群を直接アクセスするよ
りも、20才から30才までの人間に関するデータだけ
を抽出して、アクセス時間の短いIOメモリ等に格納し
、然る後に、との工0メモリから読み出して、身長の平
均を求める処理、体重の平均を求める処理等々を施すの
が望ましい。
In this case, since the amount of data is large, it is common to store it on a magnetic disk, magnetic tape, or the like. but,
These storage media require access time, so accessing them multiple times must be avoided. For example, if you want to find the average height, average weight, and distribution of people between the ages of 20 and 30, it is better to Processing that extracts only data related to people up to the age of 10, stores it in IO memory etc. with short access time, and then reads it from IO memory and calculates the average height, average weight, etc. It is desirable to apply

そこで、条件を満たすデータだけが必要な場合、磁気デ
ィスクや磁気テープ等に格納されている大量のデータ群
から、条件を満たすデータだけを抽出して、IOメモリ
等に書き込み処理を行なうことが必要となる。
Therefore, if only data that satisfies the conditions is required, it is necessary to extract only the data that satisfies the conditions from a large group of data stored on magnetic disks, magnetic tapes, etc., and write them to IO memory, etc. becomes.

従来のメモリ回路は、大量のデータが格納されているフ
ァイルから条件を満たすデータだけを抽  □出して、
メモリに書き込む場合に、プログラムにより実現される
のが一般的である。
Conventional memory circuits extract only data that satisfies conditions from a file containing a large amount of data.
When writing to memory, it is generally realized by a program.

たとえば、人間に関する大量のデータから20才以下の
人のデータだけ選び出し、メモリに書き込むプログラム
を以下に示し、説明する。
For example, a program that selects only data on people under the age of 20 from a large amount of data on people and writes it into memory will be shown and explained below.

尚、1つのデータは1人分の名前、性別などを持つもの
とする。
It is assumed that one piece of data includes the name, gender, etc. of one person.

ステップ1) 20才以下という条件の設定 ステップ2) ファイルからの1人分のデータの読み込
み ステップ3) データが条件を満たすならばステップ4
)へさもなけれ ばステップ5)へ ステップ4) メモリへの1人分のデータの書き込み ステップ5) ファイルにデータが残っているならばス
テップ2)へ 以下に、上述したプログラムの動作を説明する。
Step 1) Setting the condition of being under 20 years old Step 2) Loading the data for one person from the file Step 3) If the data meets the condition, Step 4
) Otherwise, go to step 5) Step 4) Write data for one person to memory Step 5) If data remains in the file, go to step 2) The operation of the above program will be explained below.

ステップ1)において、年令という選択条件と20以下
という選択条件を設定する。
In step 1), the selection condition of age and the selection condition of 20 or less are set.

ステップ2)において、大量のデータが書き込まれてい
るファイルから、1人分のデータを読み込む。
In step 2), data for one person is read from a file in which a large amount of data has been written.

ステップ3)において、データの中に書き込まれた年令
が20才以下ならば、ステップ4)へ、さもなければ、
ステップ5)へ条件分岐させる。
In step 3), if the age written in the data is less than 20 years old, proceed to step 4); otherwise,
Conditionally branch to step 5).

ステップ4)において、ステップ2)で読み込んだ1人
分のデータをメモリに書き込む。
In step 4), the data for one person read in step 2) is written into memory.

ステップ5)において、ファイルに他の人のデータがま
だ残っているならば、ステップ2)へ戻る。
In step 5), if the other person's data still remains in the file, return to step 2).

従来のメモリ回路は、以上の処理により、人間に関する
大量のデータを持つファイルから20才以下の人のデー
タだけを選び出し、メモリへの書き込みを行なうもので
あるが、ステップ3)の条件分岐が必要で、プログラム
が繁雑となり、また実行時間も要するという欠点を持つ
Conventional memory circuits use the above processing to select only data on people under 20 years old from a file containing a large amount of data about people and write it into memory, but the conditional branch in step 3) is required. However, this method has the disadvantage that the program becomes complicated and takes a long time to execute.

本発明の目的はプログラムを簡素化できるとともに実行
時間を短縮できるメモリ回路を提供することにある。
An object of the present invention is to provide a memory circuit that can simplify programs and shorten execution time.

すなわち、本発明の目的は、従来の欠点を除去し、プロ
グラムにおける処理を簡単にし、実行時間を短縮できる
メモリ回路を提供することにある。
That is, an object of the present invention is to provide a memory circuit that eliminates the conventional drawbacks, simplifies processing in a program, and shortens execution time.

本発明のメモリ回路は、メモリと、前記メモリのアドレ
スを指定するアドレスレジスタと、前記メモリに書き込
むための書込データを格納するデータレジスタと、前記
メモリへの書込条件を格納する条件レジスタと、前記書
込データと前記書込条件とを比較し比較結果に従って前
記メモリへの書き込みを行うかどうかを制御する比較制
御回路とを含んで構成される。
The memory circuit of the present invention includes a memory, an address register that specifies an address of the memory, a data register that stores write data to be written to the memory, and a condition register that stores write conditions to the memory. , and a comparison control circuit that compares the write data and the write conditions and controls whether or not to write to the memory according to the comparison result.

すなわち、本発明のメモリ回路は、メモリと、前記メモ
リのアドレスを指定するアドレスレジスタと、前記メモ
リに書き込むデータを格納するデータレジスタと、前記
メモリの書き込み条件を格納する条件レジスタと、前記
データレジスタの内5 − 容と前記条件レジスタの内容とを比較し該比較の結果に
より、前記メモリの書き込みを行なうかどうかを制御す
る制御回路とを含んで構成される。
That is, the memory circuit of the present invention includes a memory, an address register that specifies an address of the memory, a data register that stores data to be written to the memory, a condition register that stores write conditions for the memory, and the data register. (5) A control circuit that compares the contents of the condition register with the contents of the condition register and controls whether or not to write to the memory based on the result of the comparison.

次に、本発明の実施例について、図面を参照して説明す
る。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は、本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.

第1図に示すメモリ回路は、メモリ1と、アドレスカウ
ンタ2と、条件レジスタ3と、データレジスタ4と、比
較制御回路5とを含んでいる。
The memory circuit shown in FIG. 1 includes a memory 1, an address counter 2, a condition register 3, a data register 4, and a comparison control circuit 5.

以下に第1図に示すメモリ回路の動作を説明する。The operation of the memory circuit shown in FIG. 1 will be explained below.

第1図に示すメモリ回路は、メモリ書込命令によシ次の
ように動作する。
The memory circuit shown in FIG. 1 operates as follows in response to a memory write command.

1) 比較制御回路5において、条件レジスタ3に設定
した条件とデータレジス タ4の内容とが比較される。
1) In the comparison control circuit 5, the conditions set in the condition register 3 and the contents of the data register 4 are compared.

2) 次に、比較制御回路5は、前記1)の比較の結果
により、データレジスタ 4の内容が条件レジスタ3の条件を満 6− たす場合のみ書込命令を出し、データ レジスタ4の内容をメモリ1に書き込 む。
2) Next, the comparison control circuit 5 issues a write command only when the content of the data register 4 satisfies the condition of the condition register 3 based on the result of the comparison in 1) above, and writes the content of the data register 4. is written to memory 1.

3) 比較制御回路5は、メモリ1に書き込みを行なう
と同時に、アドレスカウ ンタ2に、書き込みを行なうととを伝 える。
3) Comparison control circuit 5 writes to memory 1 and at the same time notifies address counter 2 that writing is to be performed.

4) アドレスカウンタ2は、比較制御回路5から、メ
モリ1に書き込みを行カ うととが伝えられることにより、+1 され1つ先のアドレスを指宇する。
4) Address counter 2 is incremented by 1 when it is informed by comparison control circuit 5 that writing is to be performed in memory 1, and points to the next address.

次に、第1図に示す実施例によう、前述した大量のデー
タから20才以下の人のデータだけ抽出し、メモリに書
き込むプログラムを以下に示し、説明する。
Next, as shown in the embodiment shown in FIG. 1, a program for extracting only data on persons under 20 years of age from the aforementioned large amount of data and writing it into memory will be shown and explained below.

ステップ1) 20才以下という条件を条件レジスタに
設定 ステップ2) ファイルからの1人分のデータの読み込
み、データレジ スタに設定 ステップ3) メモリへの1人分のデータの書き込み ステップ4) ファイルにデータが残っているならばス
テップ2)へ ステップ3)では、比較制御回路5は、ステップ2)で
読み込んだデータが、20才以下という条件を満たすか
どうかの比較を行ないその比較の結果、条件を満たす場
合のみ、前記データをメモリに書き込むという制御を行
うので、20才以下である人のデータのみ、メモリ1に
格納される。
Step 1) Set the condition of being 20 years old or younger in the condition register Step 2) Read the data for one person from the file and set it in the data register Step 3) Write the data for one person to the memory Step 4) Write the data to the file If remains, go to step 2) In step 3), the comparison control circuit 5 compares whether the data read in step 2) satisfies the condition of being 20 years old or younger, and as a result of the comparison, the condition is satisfied. Only when the condition is satisfied, control is performed to write the data into the memory, so only the data of people who are 20 years old or younger are stored in the memory 1.

このとき、メモリに書き込む場合だけ、アドレスが+1
されるので、上記プログラムにょ9、メモリの連続した
領域に20才以下である人のデータが格納される。
At this time, the address is +1 only when writing to memory.
Therefore, in the above program 9, data of persons under the age of 20 is stored in a continuous area of the memory.

以上のように、本発明のメモリ回路を使用して大量のデ
ータから条件を満たすデータを抽出し、メモリに書き込
むプログラムは、従来の方法で必要とされたデータが条
件を満たすかどうかの比較     ′を行なう条件分
岐命令が不要で、プログラムにおける処理が簡単となる
。また比較制御回路は、比較を行ない、その結果から書
込命令を実行させるかどうかを決定することを自動的に
行なうため、命令を転送する時間を短縮することができ
る。
As described above, a program that uses the memory circuit of the present invention to extract data that satisfies a condition from a large amount of data and writes it to memory is a program that uses the memory circuit of the present invention to extract data that satisfies conditions from a large amount of data and to write it into memory. There is no need for a conditional branch instruction to perform this, which simplifies program processing. Furthermore, the comparison control circuit automatically performs the comparison and determines whether or not to execute the write command based on the comparison result, so that the time required to transfer the command can be shortened.

従って、大量のデータすべてについて前記プログラムに
よる繰り返し処理を行なうため処理時間をかなり矧縮す
ることができる。
Therefore, since all of the large amount of data is repeatedly processed by the program, the processing time can be considerably reduced.

本発明のメモリ回路は条件レジスタを追加することによ
り、メモリへの書込の制御を比較制御によって行々うど
とができるため、不要なデータをメモリに書き込まずに
すませることができるので、プログラムを簡素化し実行
時間を短縮できるという効果がある。
By adding a condition register to the memory circuit of the present invention, writing to the memory can be controlled by comparison control, so it is possible to avoid writing unnecessary data to the memory, so the program can be This has the effect of simplifying the process and shortening the execution time.

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

第1図は本発明の一実施例を示すブロック図である。 1・・・・・・メモリ、2・旧・・アドレスカウンタ、
3゛・・・・条件レジスタ、4・・・・・・データレジ
スタ、5・・曲・比較制御回路。
FIG. 1 is a block diagram showing one embodiment of the present invention. 1...Memory, 2.Old address counter,
3゛...condition register, 4...data register, 5...music/comparison control circuit.

Claims (1)

【特許請求の範囲】[Claims] メモリと、前記メモリのアドレスを指定するアドレスレ
ジスタと、前記メモリに書き込むための書込データを格
納するデータレジスタと、前記メモリへの書込条件を格
納する条件レジスタと、前記書込データと前記書込条件
とを比較し比較結果に従って前記メモリへの書き込みを
行うかどうかを制御するための比較制御回路とを含むこ
とを特徴とするメモリ回路。
a memory, an address register that specifies an address of the memory, a data register that stores write data to be written to the memory, a condition register that stores conditions for writing to the memory, and a register that stores the write data and the write data. A memory circuit comprising: a comparison control circuit for comparing write conditions and controlling whether or not to write to the memory according to a comparison result.
JP22121982A 1982-12-17 1982-12-17 Memory circuit Pending JPS59111555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22121982A JPS59111555A (en) 1982-12-17 1982-12-17 Memory circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22121982A JPS59111555A (en) 1982-12-17 1982-12-17 Memory circuit

Publications (1)

Publication Number Publication Date
JPS59111555A true JPS59111555A (en) 1984-06-27

Family

ID=16763327

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22121982A Pending JPS59111555A (en) 1982-12-17 1982-12-17 Memory circuit

Country Status (1)

Country Link
JP (1) JPS59111555A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61223944A (en) * 1985-03-29 1986-10-04 Toshiba Corp Data selecting device
JPS63220321A (en) * 1987-03-10 1988-09-13 Nec Corp Data retrieving system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5121746A (en) * 1974-08-19 1976-02-21 Hitachi Ltd

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5121746A (en) * 1974-08-19 1976-02-21 Hitachi Ltd

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61223944A (en) * 1985-03-29 1986-10-04 Toshiba Corp Data selecting device
JPS63220321A (en) * 1987-03-10 1988-09-13 Nec Corp Data retrieving system

Similar Documents

Publication Publication Date Title
DE69922238T2 (en) MECHANISM FOR BLOCKING LOAD OPERATIONS ON ADDRESS GENERATION OF MEMORY COMMANDS AND UNIVERSAL DEPENDENCE VECTOR
US4937780A (en) Single instruction updating of processing time field using software invisible working registers
US5408634A (en) Dual disk system for causing optimal disk units to execute I/O request channel programs
JPS59111555A (en) Memory circuit
JPS62177621A (en) Disk device
US4527253A (en) Data searching apparatus
JPS6116336A (en) Fortran input/output control processing system
JPS6329861A (en) Ipl control system
JP2635169B2 (en) Micro program controller
JPS63184836A (en) Frame managing system
JP2743947B2 (en) Micro program control method
JPS6191738A (en) Information processor
JPS5875250A (en) Digital information processor
JPH04182750A (en) Data processor
JPH02105237A (en) Data update system for sequence organization file
JPS58139258A (en) Information retrieving device
JPS6048551A (en) List data access controlling system
JPS59189451A (en) Information processing device
JPS6136253B2 (en)
JPS59186048A (en) Microprogram control system
JPS58223831A (en) Selecting system of input and output device
JPS6086654A (en) System for remote loading of system from another cpu
JPH0436412B2 (en)
JPH04260139A (en) File access rpocessor
Rudd et al. Input/Output