JPS59111532A - Data sorting method - Google Patents

Data sorting method

Info

Publication number
JPS59111532A
JPS59111532A JP57221141A JP22114182A JPS59111532A JP S59111532 A JPS59111532 A JP S59111532A JP 57221141 A JP57221141 A JP 57221141A JP 22114182 A JP22114182 A JP 22114182A JP S59111532 A JPS59111532 A JP S59111532A
Authority
JP
Japan
Prior art keywords
memory
address
data
counter
written
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
JP57221141A
Other languages
Japanese (ja)
Inventor
Yasutaka Shibuya
渋谷 泰孝
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.)
Hitachi Denshi KK
Original Assignee
Hitachi Denshi KK
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 Hitachi Denshi KK filed Critical Hitachi Denshi KK
Priority to JP57221141A priority Critical patent/JPS59111532A/en
Publication of JPS59111532A publication Critical patent/JPS59111532A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/24Loading of the microprogram

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To increase the data quantity to be handled without increasing the processing capacity of a central processor by using a means which reads out in parallel the memory contents of a memory every plural data names and decodes the contents of the memory. CONSTITUTION:The contents of a memory are read out in parallel every plural data names, and the contents of the memory are decoded to detect an address where the data is stored. For instance, the address signals sent from a counter 22 are supplied in parallel to memories 141-156, and the memory contents of the areas corresponding to the supplied address signals are supplied to a priority encoder 157. The output of the encoder 157 is supplied to a memory 13 as well as decoder 158. Then an enable signal is supplied to the decoder 158 from a central processor 23, and the output signals of the decoder 158 are supplied to memories 141-156 to perform writing corresponding to the address signal. When the memories 141-156 deliver plural signals, an output corresponding to the terminal of the youngest number is delivered from the encoder 157.

Description

【発明の詳細な説明】 この発明は多数の数値データをそのデータが表わす値の
大きい順番あるいは、小さい順番に並びかえる、データ
ソーティング方法に関するものであシ、操縦訓練用の模
擬視界発生装置等に用いて好適なものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data sorting method for arranging a large number of numerical data in the order of the largest value or the smallest value represented by the data, and is applicable to a simulated visibility generating device for pilot training, etc. It is suitable for use.

一般に模擬視界発生装置はメモリに記憶しているデータ
を読出して、モニタの表示画面上に表示するようにして
いる。この場合、第1図に示すように、2つの三角図形
を表示しようとする時、左角図形1と三角図形2のデー
タを別々にメモリから読出してフレームメモリに記憶さ
せ、このフレームメモリの内容を走査に同期して読出す
ことによって表示が行われる。     ゛ この場合、第1図の走査11!3上の映像を表示するた
めのデータは、1m、2m、2b、1bの順番にフレー
ムメモリに記憶させる必要がある。しかし、図形を記憶
しているメモリには各図形毎のデータが書込まれている
ので、これらのデータをフレームメモリに記憶させるに
はメモリから読出したデータをアドレス順に並べかえ、
フレームメモリに記憶させる必要がある。とのようにデ
ータをその値の順番に並べ変えるためにデータソーティ
ングが行なわれる。
Generally, a simulated visual field generating device reads data stored in a memory and displays it on a display screen of a monitor. In this case, as shown in FIG. 1, when two triangle figures are to be displayed, the data of left corner figure 1 and triangle figure 2 are read out from memory separately and stored in a frame memory, and the contents of this frame memory are Display is performed by reading out in synchronization with scanning. In this case, the data for displaying the image on scan 11!3 in FIG. 1 needs to be stored in the frame memory in the order of 1m, 2m, 2b, and 1b. However, data for each figure is written in the memory that stores the figures, so in order to store this data in the frame memory, the data read from the memory must be rearranged in address order.
It is necessary to store it in frame memory. Data sorting is performed to rearrange data in the order of its values.

このため従来は次のような方法によって、デ−タの並べ
かえを行なっていた。先ず並べかえを行なうためのデー
タを順次メモリに記憶する。この時、メモリに記憶する
順序は記憶するだめのデータが供給される順とし、アド
レス記憶用のメモリにデータが記憶されたアドレスを記
憶させておく。
For this reason, data has conventionally been rearranged using the following method. First, data for rearranging is sequentially stored in a memory. At this time, the order in which the data is stored in the memory is the order in which the data to be stored is supplied, and the address at which the data is stored is stored in the memory for address storage.

順次供給されるデータの中には既に記憶されたデータと
同じ内容のデータが供給されることがあるので、この時
は後から供給されるデータを退避用のメモリに記憶させ
るとともに、退避用のメモリのどのアドレスに記憶した
のかもアドレス記憶用のメモリに記憶させておく。そし
て、全てのデータの記憶が終了したら、アドレス記憶用
のメモリの内容に従がって記憶したデータを所定の順序
で読み出すようにしている。
Some data that is supplied sequentially may have the same content as data that has already been stored, so in this case, the data that will be supplied later is stored in the save memory, and the data that is supplied later is stored in the save memory. The address in which the data was stored is also stored in the address storage memory. After all data has been stored, the stored data is read out in a predetermined order according to the contents of the address storage memory.

第2図は従来の方法を適用したデータソーティング装置
の一例を示すブロック図である。同図において、11〜
15.17〜21はメモリ、16.22はカウンタであ
る。メモリ11はソーティングする数値データが書込ま
れたデータメモリ、メモリ12はメモリ11に書込まれ
た数値データに与え3− られた名称データが書込1れた名称メモリとして使用さ
れ、例えばブラウン管上に図形を表示する時、ブラウン
管上のアドレスが数値データに相当し、色および輝度が
名称データに相当する。第1のメモリとしてのメモリ1
3はソーティングのだめのデータ名称を一時記憶するメ
モリであシ、データ値に該当するアドレスにデータ名称
が書込まれるようになっておシ、第2のメモリとしての
メモリ14はメモリ13にデータ名称が書込まれている
ことを記憶するメモリである。
FIG. 2 is a block diagram showing an example of a data sorting device to which a conventional method is applied. In the same figure, 11~
15.17 to 21 are memories, and 16.22 is a counter. The memory 11 is used as a data memory in which numerical data to be sorted is written, and the memory 12 is used as a name memory in which name data given to the numerical data written in the memory 11 is written. When displaying a figure on a computer, the address on the cathode ray tube corresponds to numerical data, and the color and brightness correspond to name data. Memory 1 as the first memory
Reference numeral 3 is a memory for temporarily storing data names for sorting, and the data names are written to addresses corresponding to data values.Memory 14 as a second memory stores data names in the memory 13. This is a memory that stores information that has been written.

一度発生したデータ値と同一なデータ値が後から発生す
ることがあシ、この時はデータ値をアドレスとして第3
のメモリとしてのメモリ19に、後から発生したデータ
名称を書込むようになっている。この時、メモリ19に
書込まれたデータ名称は後述するように同じデータ値に
対応するもの毎に読み出すようになっている。このため
、同じデータ値に対応するデータ名称のうち、最初にメ
モリ19に書込まれたものがメモリ19の、どのアドレ
スに書込まれているかを記憶するものがメ4− モリ15である。
It is possible that the same data value as the one that occurred once will occur later, and in this case, the data value will be used as the address and
The data name generated later is written into the memory 19 as a memory. At this time, the data names written in the memory 19 are read out for each data name corresponding to the same data value, as will be described later. Therefore, the memory 15 stores the address in the memory 19 at which the first name written in the memory 19 among data names corresponding to the same data value is written.

第1のカウンタとしてのカウンタ16はメモリ19にデ
ータ名称を書込むためのアドレスを発生し、第2のカウ
ンタとしてのカウンタ22は読出すデータ名称の順序を
決めるものである。
A counter 16 as a first counter generates an address for writing data names into the memory 19, and a counter 22 as a second counter determines the order of data names to be read.

メモリ17は同じデータ値に対応するデータ名称がメモ
リ19に複数書込まれていることを記憶し、またメモリ
14,15.1F、18.1浦、21はメモリ19に書
込まれているデータ名称がどのアドレスにあるかという
ことを記憶するメモリである。
The memory 17 stores that a plurality of data names corresponding to the same data value are written in the memory 19, and the memories 14, 15.1F, 18.1ura, and 21 store the data written in the memory 19. This is a memory that stores which address a name is located at.

23は処理装置となる中央処理装置であシ、各メモリお
よびカウンタ間のデータ転送処理を行う。
A central processing unit 23 serves as a processing unit and performs data transfer processing between each memory and counter.

1およびbはデータ名称およびデータ値を出力するライ
ンである。
1 and b are lines for outputting data names and data values.

このようVC構成された装置は中央処理装置によって制
御され、処理するデーター一度装置内のメモリに書込ま
れた後、順番に読出される。
A device having such a VC configuration is controlled by a central processing unit, and data to be processed is once written to a memory within the device and then sequentially read out.

書込時の動作を第3図のフローチャートおよび第4図の
動作説明図を用いて説明する。第4図において■〜0の
記号はメモリ11およびメモリ12のデータが読出され
る順序を示している。
The operation at the time of writing will be explained using the flowchart of FIG. 3 and the operation explanatory diagram of FIG. 4. In FIG. 4, symbols .about.0 indicate the order in which data in the memories 11 and 12 are read.

最初は第4図に示すようにメモリ11に記憶されたデー
タの値「2」と、メモリ12に記憶されたデータの名称
「イ」の書込みが行なわれる。これは、第3図のステッ
プ100に従がってメモリ11からデータ値「2」が読
出され、ステップ1旧に従ってメモリ12からデータ名
称「イ」が読出される第1の動作が行なわれる。そして
、ステップ102において、メモリ14の記憶内容のう
ちメモリ11から読出したデータが示すアドレス部分に
「1」が書込まれているかどうかの第1の判定が行なわ
れる0この場合、メモリ11から読出された値は「2」
であシ、メモリ14のアドレス2は何も書込まれていな
いので「0」であるから、判定結果は[NOJ  であ
シフローはステップ103に移る。ステップ103では
メモリ12から読出したデータの名称がメモリ13に書
込まれる。この時、メモリ13のアドレスはメモリ11
から読出されたデータが示す値に一致するものが使用さ
れる。このため、メモリ13のアドレス2に「イ」が書
込まれ、フロ−はステップ104に移る。ステップ10
4ではメモリ14のアドレスのうちメモリ11が示す値
、即ちこの時にはアドレス2に「1」が書込まれ、フロ
ーはステップ100に戻る。
Initially, as shown in FIG. 4, the value "2" of the data stored in the memory 11 and the name "A" of the data stored in the memory 12 are written. A first operation is performed in which the data value "2" is read from the memory 11 according to step 100 in FIG. 3, and the data name "i" is read from the memory 12 according to step 1 old. Then, in step 102, a first determination is made as to whether "1" is written in the address portion indicated by the data read from the memory 11 among the stored contents of the memory 14. The value is "2"
Yes, since nothing has been written to address 2 of the memory 14, it is "0", so the determination result is [NOJ], and the flow moves to step 103. In step 103, the name of the data read from memory 12 is written into memory 13. At this time, the address of memory 13 is
The value that matches the value indicated by the data read from is used. Therefore, "i" is written in address 2 of the memory 13, and the flow moves to step 104. Step 10
At step 4, "1" is written to the value indicated by memory 11 among the addresses of memory 14, that is, address 2 at this time, and the flow returns to step 100.

2度目の動作として、ステップ100,101 に示す
ようにメモリ11からデータイ直「1」が読出され、メ
モリ12からデータ名称「口」が読出される。次にステ
ップ102の判定が行なわれるが、メモ1月4における
アドレス1にはまだ何も書込まれていないので判定結果
は「NO」であ如、ステップ103゜104に従がって
メモリ13のアドレス1にデータの名称「口」が書込ま
れ、メモリ14のアドレス1に「1」が書込まれ、フロ
ーはステップ100に戻る0 3度目の動作として、メモリ11からデータ値「3」、
データ名称「ハ」が読出され、ステップ102が「NO
」と判定され、ステップ103に従かいメモリ13のア
ドレス3にデータ名称「ハ」が書込まれ、ステップ10
4に従かいメモリ14のアドレス3に「1」が書込まれ
てフローはステップ100に戻る。
As a second operation, as shown in steps 100 and 101, the data ``1'' is read from the memory 11, and the data name ``口'' is read from the memory 12. Next, a judgment is made in step 102, but since nothing has been written to address 1 in the memo January 4 yet, the judgment result is "NO", and according to steps 103 and 104, the memory 13 The data name "mouth" is written to address 1 of the memory 14, "1" is written to address 1 of the memory 14, and the flow returns to step 100.0 As the third operation, the data value "3" is written from the memory 11. ,
The data name "c" is read out, and step 102 is "NO".
”, the data name “c” is written in address 3 of the memory 13 according to step 103, and step 10
4, "1" is written to address 3 of the memory 14, and the flow returns to step 100.

4度目の動作としてデータ値「3」とデータ名称「二」
が読出されるが、この時はメモリ14のアドレス3は3
度目の動作において既に「1」が書込まれているので、
判定結果は[YEsJとなシ、フローは第2の判定であ
るステップ105に移る。ステップ105において、メ
モリ17はこの時には何も書込まれていないので判定結
果は「NO」となシ、ステップ106に示すように、メ
モリ15のアドレス3にカウンタ16の示す値、この時
は「0」が書込まれる。そして、ステップ107に示す
ようにメモリ17のアドレス3に「1」が書込まれ、ス
テップ108に示すように、メモリ18のアドレス3に
カウンタ16の示す値「0」が書込まれる。その後、ス
テップ109に示すように、メモリ19のアドレスOに
メモリ12の示す内容「二」が書込まれ、ステップ11
0に示すようにカウンタ16がカウントアツプされ「1
」になる。
For the fourth operation, data value "3" and data name "2"
is read out, but at this time address 3 of memory 14 is 3.
Since "1" has already been written in the second operation,
The determination result is YESJ, and the flow moves to step 105, which is the second determination. In step 105, since nothing is written in the memory 17 at this time, the determination result is "NO".As shown in step 106, the value indicated by the counter 16 is stored at address 3 of the memory 15, and at this time, "0" is written. Then, as shown in step 107, "1" is written to address 3 of the memory 17, and as shown in step 108, the value "0" indicated by the counter 16 is written to address 3 of the memory 18. Thereafter, as shown in step 109, the content "2" indicated by the memory 12 is written to the address O of the memory 19, and in step 11
As shown in 0, the counter 16 counts up and becomes ``1''.
"become.

この時ステップ111においてカウンタ16の値   
  ゛が所定のカウント数に達したかどうかの判定が行
なわれる。この実施例の場合、第4図に示すように11
個のデータ名を書込むのであるから、所定のカウント数
は11が使用される。このため、ステップ111はrN
OJと判定されフローはステップ100に戻る。
At this time, in step 111, the value of the counter 16 is
A determination is made as to whether or not the count has reached a predetermined count. In this embodiment, as shown in FIG.
Since 11 data names are written, 11 is used as the predetermined count number. Therefore, step 111 is rN
OJ is determined, and the flow returns to step 100.

5度目の動作としてデータ値「4」とデータ名称「ホ」
が読出され、ステップ102が「NO」と判定され、ス
テップ103に従かいメモリ13のアドレス3にデータ
名「ホ」が書込まれ、ステップ104に従かいメモリ1
4のアドレス4に「1」が書込まれ、フローはステップ
100に戻る。
For the fifth operation, data value "4" and data name "Ho"
is read out, the determination in step 102 is "NO", the data name "ho" is written in address 3 of the memory 13 in accordance with step 103, and the data name "E" is written in address 3 in the memory 13 in accordance with step 104.
4 is written to address 4, and the flow returns to step 100.

6度目の動作としてメモリ11から「1」が、メモリ1
2から「へ」が読出される。そして、ステップ102が
「YES」ステップ105がrNOJと判定され、フロ
ーはステップ106に進む。ステップ106ではメモリ
15のアドレス1にこの時のカウンタ16の値「1」が
書込まれ、次のステップ107でメモリ17のアドレス
1に「1」が書込まれた後、ステップ108でメモリ1
8のアドレス1にカウンタ16の値である「1」が書込
まれる。そして、ステップ109でメモリ19のアドレ
ス1に「へ」が書込まれ、ステップ110でカウンタ1
6の値が「1」から「2」にカウントアツプされ、ステ
ップ111が「NOJ  と判定され、フロー100に
戻る。
As the sixth operation, "1" is transferred from memory 11 to memory 1.
"to" is read from 2. Then, it is determined that step 102 is "YES" and step 105 is rNOJ, and the flow advances to step 106. In step 106, the value "1" of the counter 16 at this time is written to the address 1 of the memory 15, and in the next step 107, "1" is written to the address 1 of the memory 17, and then in step 108, the value "1" of the counter 16 is written to the address 1 of the memory 15.
The value "1" of the counter 16 is written to the address 1 of the counter 8. Then, in step 109, "to" is written in address 1 of memory 19, and in step 110, counter 1 is written.
The value of 6 is counted up from "1" to "2", step 111 is determined as "NOJ", and the flow returns to flow 100.

7度目の動作としてステップ100,101においてデ
ータ値「3」とデータ名称「ト」が読出され、ステップ
102および105の両方がrYEsJと判定され、ス
テップ112においてメモリ1Bのアドレス3の値「0
」が読出され、ステップ113においてメモリ20のア
ドレスOにカウンタ16が示す値「2」が書込まれる。
As the seventh operation, the data value "3" and the data name "G" are read in steps 100 and 101, both of steps 102 and 105 are determined to be rYEsJ, and in step 112 the value "0" of address 3 of the memory 1B is read.
" is read out, and the value "2" indicated by the counter 16 is written to address O of the memory 20 in step 113.

次にステップ114においてメモリ21のアドレス0に
「1」が書込まれ、ステップ115においてメモリ19
のアドレス2にデータ名称「ト」が書込まれる。そして
、ステップ116においてメモリ18のアドレス3にカ
ウンタ16の示す値「2」が書込まれ、ステップ110
においてカウンタ16の値が「2」から「3」にカウン
トアツプされる。次に、ステップ111がrNOJと判
定されフローはステップ100に戻る。
Next, in step 114, "1" is written to address 0 of the memory 21, and in step 115, "1" is written to address 0 of the memory 21.
The data name "g" is written to address 2 of . Then, in step 116, the value "2" indicated by the counter 16 is written to address 3 of the memory 18, and in step 110
At this point, the value of the counter 16 is counted up from "2" to "3". Next, step 111 is determined to be rNOJ, and the flow returns to step 100.

8度目の動作としてステップ100,101においてデ
ータ値「1」とデータ名称「チ」が読出され、ステップ
102および105の両方がrYESJと判定され、ス
テップ112においてメモリ18のアドレス1の値「1
」が読出され、ステップ113においてメモリ20のア
ドレス1にカウンタ16が示す値「3」が書込まれる。
As the eighth operation, the data value "1" and the data name "chi" are read out in steps 100 and 101, both of steps 102 and 105 are determined to be rYESJ, and in step 112 the value "1" of address 1 of the memory 18 is read out.
" is read out, and the value "3" indicated by the counter 16 is written to address 1 of the memory 20 in step 113.

次にステップ114においてメモリ21のアドレス1に
「1」が書込まれ、ステップ115においてメモリ19
のアドレス3にデータ名称「チ」が書込まれる。そして
、ステップ116においてメモリ18のアドレス1にカ
ウンタ16の示す値「3」が書込まれ、ステップ110
においてカウンタ16の値が「3」から「4」にカウン
トアツプされる。次に、ステップ111がrNOJと判
定されフローはステップ100に戻る。
Next, in step 114, "1" is written to address 1 of the memory 21, and in step 115, "1" is written to the address 1 of the memory 21.
The data name "chi" is written to address 3 of . Then, in step 116, the value "3" indicated by the counter 16 is written to address 1 of the memory 18, and in step 110
At this point, the value of the counter 16 is counted up from "3" to "4". Next, step 111 is determined to be rNOJ, and the flow returns to step 100.

9度目の動作としてステップ100.101においてデ
ータ値「3」とデータ名称「す」が読出され、ステップ
102および1050両方がryEs Jと判定され、
ステップ112においてメモリ18のアドレス3の値「
2」が読出され、ステップ113においてメモリ20の
アドレス2にカウンタ16が示す値「4」が書込まれる
。次にステップ114においてメモリ21のアドレス2
に「1」が書込まれ、 ステップ115においてメモリ
19のアドレス4にデータ名称「す」が書込まれる。そ
して、ステップ116においてメモリ18のアドレス3
にカウンタ16の示す値「4」が書込まれ、ステップ1
10においてカウンタ16の値が「4」から「5」にカ
ウントアツプされる。次に、ステップ111が「NO」
と判定されフローはステップ100に戻る。
As the ninth operation, the data value "3" and the data name "su" are read at step 100.101, and both steps 102 and 1050 are determined to be ryEs J.
In step 112, the value of address 3 in memory 18 is “
2" is read out, and in step 113, the value "4" indicated by the counter 16 is written to address 2 of the memory 20. Next, in step 114, the address 2 of the memory 21 is
``1'' is written to ``1'', and in step 115, the data name ``su'' is written to address 4 of the memory 19. Then, in step 116, the address 3 of the memory 18 is
The value "4" indicated by the counter 16 is written in step 1.
At step 10, the value of the counter 16 is counted up from "4" to "5". Next, step 111 is "NO"
If so, the flow returns to step 100.

10度目の動作としてステップ100.101において
データ値「3」とデータ名称「ヌ」 が読出され、ステ
ップ102および105の両方がrYEsJと判定され
、ステップ112においてメモリ18のアドレス3の値
「4」が読出され、ステップ113においてメモリ20
のアドレス4にカウンタ16が示す値「5」が書込まれ
る。次にステップ114においてメモリ21のアドレス
4に「1」が書込まれ、ステップ115においてメモリ
19のアドレス5にデータ名称「ヌ」が書込まれる。そ
して、ステップ116においてメモリ1Bのアドレス3
にカウンタ16の示す値「5」が書込まれ、ステップ1
10においてカウンタ16の値が「5」から「6」 に
カウントアツプされる。次に、ステップ111が「NO
」と判定されフローはステップ100に戻る。
As the tenth operation, the data value "3" and the data name "NU" are read out in steps 100 and 101, and both steps 102 and 105 are determined to be rYEsJ, and in step 112, the value "4" at address 3 of the memory 18 is read. is read out, and in step 113 the memory 20
The value "5" indicated by the counter 16 is written to address 4 of . Next, in step 114, "1" is written in address 4 of memory 21, and in step 115, the data name "nu" is written in address 5 of memory 19. Then, in step 116, address 3 of memory 1B
The value "5" indicated by the counter 16 is written in step 1.
At step 10, the value of the counter 16 is counted up from "5" to "6". Next, step 111 is “NO.
” and the flow returns to step 100.

11度目の動作としてステップ100.101において
データ「3」とデータ名称「ル」 が読出され、ステッ
プ102および1050両方がrYEsJと判定され、
ステップ112においてメモシ18のアドレス3の値「
5」が読出され、ステップ113においてメモリ20の
アドレス5にカウンタ16が示す値「6」が書込まれる
。次にステップ114においてメモリ21のアドレス5
に「1」が書込まれ、ステップ115においてメモリ1
9のアドレス6にデータ名称「ル」が書込まれる。そし
て、ステップ116においてメモリ1Bのアドレス3に
カウンタ16の示す値「6」が書込まれ、ステップ11
0においてカウンタ16の値が「6」から「7」にカウ
ントアツプされる。次に、ステップ111の判定が行な
われるわけであるが、との読出は11回行うのであらか
じめ所定回数として11がセットされておシ、ステップ
111は11回目の読出でrYEsJ となル、第3図
のフローは終了し、メモリ11およびメモリ12に記憶
されていたデータの書込みが終了する0 次に読出動作を第4図の動作説明図と第5図のフローチ
ャートを用いて説明する0 先ずステップ200において、カウンタ22が所定の回
数を表示しているかどうかの判定が行なわれる。ここで
、カウンタ22は後述するように、読出しが1回路る毎
に一度カウントアップするカウンタであり、所定回数と
はメモリ11に書込まれるデータ値の種類よシ1つだけ
多い回数である。
As the 11th operation, data "3" and data name "ru" are read out in steps 100 and 101, and both steps 102 and 1050 are determined to be rYEsJ.
In step 112, the value of address 3 of the memory 18 is “
5" is read out, and in step 113, the value "6" indicated by the counter 16 is written to address 5 of the memory 20. Next, in step 114, the address 5 of the memory 21 is
"1" is written to the memory 1 in step 115.
The data name "RU" is written to address 6 of 9. Then, in step 116, the value "6" indicated by the counter 16 is written to address 3 of the memory 1B, and in step 11
At 0, the value of the counter 16 is counted up from "6" to "7". Next, a determination is made in step 111, and since reading is performed 11 times, 11 is set in advance as the predetermined number of times. The flow shown in the figure is completed, and writing of the data stored in the memory 11 and memory 12 is completed.Next, the read operation will be explained using the operation explanatory diagram in FIG. 4 and the flowchart in FIG. 5.0 First, step At 200, a determination is made whether counter 22 is displaying a predetermined number of times. Here, as will be described later, the counter 22 is a counter that counts up once for each reading cycle, and the predetermined number of times is the number of times that is one value larger than the type of data value written to the memory 11.

この実施例ではデータ値の種類は4であるから所定回数
は5に設定される。当初カウンタ22は「0」であるか
ら、ステップ200は「NO」と判定され、フローは次
のステップ201の動作を行なう。
In this embodiment, since the type of data value is 4, the predetermined number of times is set to 5. Since the counter 22 is initially "0", the determination in step 200 is "NO", and the flow proceeds to the next step 201.

ステップ201ではメモリ14のデータのうちカウンタ
22が示すアドレスに「1」が書込まれているかどうか
の第3の判定をする。カウンタ22は当初「0」を示し
ているから、第4図よ如メモリ14のアドレスOは空欄
となっておりOを示しているので、判定結果はrNOJ
となりフローはステップ202に進む。ステップ202
ではカウンタ22を1カウントアツプさせ計数値を「1
」にしてフローはステップ200に戻る。
In step 201, a third determination is made as to whether "1" is written in the address indicated by the counter 22 among the data in the memory 14. Since the counter 22 initially indicates "0", as shown in FIG. 4, the address O of the memory 14 is blank and indicates O, so the determination result is rNOJ.
The flow then proceeds to step 202. Step 202
Then, the counter 22 is incremented by 1 and the count value is set to ``1''.
” and the flow returns to step 200.

第2回の読出において、ステップ200はrNOJと判
定され、メモリ14のアドレス1は第4図から「1」が
書込まれているので、ステップ201は[YESJと判
定され、フローはステップ203に進む。
In the second read, step 200 is determined to be rNOJ, and since "1" is written in address 1 of the memory 14 as shown in FIG. move on.

ステップ203ではメモリ14のカウンタ22が示すア
ドレスに「0」を書込む動作が行なわれるので、メモリ
14のアドレス1にrOJが書込まれ、フローはステッ
プ204に進む。ステップ204ではメモリ13のデー
タのうちカウンタ22が示す番地の内容と、カウンタ2
2の内容を出力する。この結果、メモリ13におけるア
ドレス1のデータ「口」とカウンタ22の示す値「1」
が出力され、フローはステップ205に進む。ステップ
205ではメモリ17のデータのうちカウンタ22が示
すアドレス「1」が書込まれているかどうかを判定する
第4の判定を行うが、第4図からメモリ17のアドレス
1は「1」であるから判定はrYESJとなシ、フロー
はステップ206に進む。ここまでが第2回の読出しで
あシ、この読出しでデータの名称[町と、データの値「
1」が読出される。
In step 203, an operation of writing "0" to the address indicated by the counter 22 of the memory 14 is performed, so rOJ is written to address 1 of the memory 14, and the flow advances to step 204. In step 204, the contents of the address indicated by the counter 22 among the data in the memory 13 and the contents of the address indicated by the counter 22 are stored.
Output the contents of 2. As a result, the data "mouth" at address 1 in the memory 13 and the value "1" indicated by the counter 22
is output, and the flow proceeds to step 205. In step 205, a fourth determination is made to determine whether or not the address "1" indicated by the counter 22 has been written in the data in the memory 17. From FIG. 4, the address 1 in the memory 17 is "1". The determination is rYESJ, and the flow advances to step 206. This is the second readout, and in this readout, the name of the data [town] and the data value "
1" is read out.

第3回の読出しはステップ206から行表われる。The third reading starts from step 206.

ステップ206ではメモリ17のカウンタ22が示すア
ドレスにrOJが書込まれる。このため、メモリ17の
アドレス1に「0」が書込まれ、フローはステップ20
7に進む。ステップ207ではメモリ15の内容のうち
、カウンタ22が示すアドレスの内容をカウンタ16に
設定する。このため、メモリ15のアドレス1のデータ
である「1」をカウンタ16に設定して、フローはステ
ップ208に進む。
In step 206, rOJ is written to the address indicated by the counter 22 in the memory 17. Therefore, "0" is written to address 1 of the memory 17, and the flow returns to step 20.
Proceed to step 7. In step 207, the contents of the address indicated by the counter 22 among the contents of the memory 15 are set in the counter 16. Therefore, "1", which is the data at address 1 of the memory 15, is set in the counter 16, and the flow advances to step 208.

ステップ208では、メモリ19〜21のデータのうち
、カウンタ16が示す番地のデータを読み出す。カウン
タ16は「1」が設定されているので、メモリ19〜2
1におけるアドレス1のデータ[へJ、r3J、rlJ
 が読出され、フローはステップ     209に進
む。ステップ209ではメモリ19の内容とカウンタ2
2の内容を出力するので、メモリ19から読み出された
内容「へ」とカウンタ22の内容「1」が出力され、フ
ローはステップ210に進む。
In step 208, the data at the address indicated by the counter 16 is read out of the data in the memories 19-21. Since the counter 16 is set to "1", the memories 19 to 2
Data at address 1 in 1 [toJ, r3J, rlJ
is read and the flow proceeds to step 209. In step 209, the contents of memory 19 and counter 2 are
Since the contents of 2 are output, the contents ``to'' read from the memory 19 and the contents ``1'' of the counter 22 are output, and the flow advances to step 210.

ステップ210はメモリ21の内容のうち、カウンタ1
6が示すアドレスの内容は「1」かどうかを判定する第
5の判定を行なうものであるが、メモリ21のアドレス
1は「1」であるからステップ210の判定はryEs
、、1となシ、フローはステップ211に進む。ここま
でが第3回の読出しであシ、この読出しでデータの名称
「へ」と、データの値「1」が読出される。
In step 210, counter 1 is selected from among the contents of memory 21.
A fifth determination is made to determine whether the content of the address indicated by 6 is "1", but since the address 1 of the memory 21 is "1", the determination at step 210 is ryEs.
, 1, the flow proceeds to step 211. This is the third readout, and in this readout, the data name "to" and the data value "1" are read out.

第4回の読出しはステップ211から行なわれる。The fourth reading is performed from step 211.

ステップ211ではメモリ21のカウンタ16が示すア
ドレスに「0」が書込まれるので、メモリ21のアドレ
ス1に「0」が書込まれ、フローはステップ212に進
む。ステップ212ではメモリ20のデータのうち、カ
ウンタ16が示すアドレスの内容をカウンタ16に設定
する。この時、カウンタ16は「1」であるから、メモ
リ20のアドレス1の内容「3」をカウンタ16へ設定
するので、カウンタ16は「3」を示し、フローはステ
ップ213に進む。
In step 211, "0" is written to the address indicated by the counter 16 of the memory 21, so "0" is written to the address 1 of the memory 21, and the flow advances to step 212. In step 212, the content of the address indicated by the counter 16 among the data in the memory 20 is set in the counter 16. At this time, since the counter 16 is "1", the content "3" of address 1 of the memory 20 is set to the counter 16, so the counter 16 indicates "3" and the flow advances to step 213.

ステップ213ではメモリ19〜21のうちカウンタ1
6の示すアドレスの内容を読出すので、メモリ19〜2
1のうちアドレス3のデータ「チ」、[OJ、rOJが
読出され、フローはステップ214に進む。ステップ2
14ではメモリ19の内容のうちカウンタ16の示すア
ドレスの内容とカウンタ22の内容を出力する。このた
めメモリ19のアドレス3の内容「チ」とカウンタ22
の内容「1」が出力され、フローはステップ210に戻
る。ステップ210ではメモリ21のうちカウンタ16
の示すアドレスに「1」が書込まれているかどうかを判
定するが、メモリ21のアドレス3は第4図から「0」
であるため、判定は「NO」となシ、フローはステップ
202に戻る。ここまでの読出しが第4回の読出しでデ
ータの名称「チ」と、データの値「1」が読出される。
In step 213, counter 1 of memories 19 to 21 is
Since the contents of the address indicated by 6 are read, memories 19 to 2
1, data "chi", [OJ, rOJ at address 3 are read out, and the flow advances to step 214. Step 2
At step 14, among the contents of the memory 19, the contents of the address indicated by the counter 16 and the contents of the counter 22 are output. Therefore, the contents of address 3 of memory 19 "chi" and counter 22
The content "1" is output, and the flow returns to step 210. In step 210, the counter 16 of the memory 21 is
It is determined whether "1" is written in the address indicated by , but address 3 of the memory 21 is "0" from FIG.
Therefore, the determination is "NO" and the flow returns to step 202. The reading up to this point is the fourth reading, and the data name "chi" and the data value "1" are read out.

そして、ステップ202ではカウンタ22を1カウント
アツプさせるので、カウンタ22の内容は1から2に変
シ、フローはステップ200に進む。この段階ではカウ
ンタ22は所定回数に達していないので、ステップ20
0は「No」と判定され、フローはステップ201に進
む。メモリ14のアドレス2は第4図から「1」である
から、ステップ201はrYEsJと判定されフローは
ステップ203に進み第5回目の読出しが行なわれる。
Then, in step 202, the counter 22 is incremented by 1, so the content of the counter 22 changes from 1 to 2, and the flow advances to step 200. At this stage, the counter 22 has not reached the predetermined number of times, so step 20
0 is determined as "No", and the flow proceeds to step 201. Since the address 2 of the memory 14 is "1" from FIG. 4, step 201 is determined to be rYEsJ, and the flow advances to step 203, where the fifth reading is performed.

第5回の読出しはステップ203においてメモリ14の
アドレス2に10」が書込まれ、ステップ204におい
てメモリ13におけるアドレス2の内容「イ」とカウン
タ22の内容「2」が出力される。
In the fifth read, in step 203, ``10'' is written to address 2 of the memory 14, and in step 204, the content ``a'' of address 2 in the memory 13 and the content ``2'' of the counter 22 are output.

そして、第4図からメモリ17のアドレス2は「0」で
あるからステップ205はrNOJと判定され、ステッ
プ202においてカウンタ22の内容が「2」から「3
」にカウントアツプされる。このため第5回の読出しで
データの名称「イ」とデータの値「2」が読出される。
Then, since address 2 of the memory 17 is "0" from FIG.
” will be counted up. Therefore, in the fifth reading, the data name "A" and the data value "2" are read out.

第6回の読出しはステップ200が「NO」、ステップ
201がrYEsJと判定され、ステップ203におけ
るメモリ14のアドレス3に「0」を書込む動作、ステ
ップ204におけるメモリ13のアドレス3の内容「ハ
」とカウンタ22の値「3」を出力する動作が行なわれ
る。
In the sixth read, the determination in step 200 is "NO", the determination in step 201 is rYEsJ, the operation of writing "0" to address 3 of the memory 14 in step 203, and the content of the address 3 of the memory 13 in step 204 "H". ” and outputs the value “3” of the counter 22.

第7回の読出しはステップ205がYES  と判定さ
れ、ステップ206におけるメモリ17のアドレス3に
10」を書込む動作、ステップ207におけるメモリ1
5のアドレス3の内容である「0」をカウンタ16へ設
定する動作、ステップ208におけるメモリ19〜21
におけるアドレスOの内容であるr二J、r2J、rl
Jを読出す動作、ステップ209におけるメモリ19か
ら読出した内容「二」とカウンタ22の値「3」を出力
する動作が行なわれる。
In the seventh read, step 205 is determined as YES, step 206 writes 10'' to address 3 of memory 17, and step 207 writes ``10'' to memory 17.
Operation of setting "0", which is the content of address 3 of 5, to the counter 16, memories 19 to 21 in step 208
The contents of address O in r2J, r2J, rl
The operation of reading J, the operation of outputting the content "2" read from the memory 19 in step 209 and the value "3" of the counter 22 are performed.

第8回の読出しはステップ210がrYESJと判定さ
れ、ステップ211におけるメモリ21のアドレス0に
「0」 を書込む動作、ステップ212におけるメモリ
20のアドレスOの内容2をカウンタ16に設定する動
作、ステップ213におけるメモリ19〜21のアドレ
ス2の内容r)J、r4J、rl」を読出す動作、ステ
ップ214におけるメモリ19から読出した内容「ト」
とカウンタ22の値「3」を出力する動作が行なわれる
In the eighth read, step 210 is determined to be rYESJ, step 211 writes "0" to address 0 of memory 21, step 212 sets content 2 of address O of memory 20 to counter 16, The operation of reading out the contents "r)J, r4J, rl" of addresses 2 of memories 19 to 21 in step 213;
Then, the operation of outputting the value "3" of the counter 22 is performed.

第9回の読出しはステップ210がYES  と判定さ
れ、ステップ211におけるメモリ21のアドレス2に
「0」を書込む動作、ステップ212におけるメモリ2
0のアドレス2の内容「4」をカラ〃16に設定する動
作、ステップ213におけるメモリ19〜21のアドレ
ス4の内容「すJ、r5J、rl」を読出す動作、ステ
ップ214におけるメモリ19から読出しだ内容「ト」
とカウンタ22の値「3」を出力する動作が行なわれる
In the ninth read, the determination in step 210 is YES, the operation of writing "0" to address 2 of the memory 21 in step 211, and the operation of writing "0" to address 2 of the memory 21 in step 212.
The operation of setting the content "4" of address 2 of address 0 to color 16, the operation of reading the content "suJ, r5J, rl" of address 4 of memories 19 to 21 in step 213, and the operation of reading from memory 19 in step 214 The content is “T”
Then, the operation of outputting the value "3" of the counter 22 is performed.

第10回の読出しはステップ210がrYEsJと判定
され、ステップ211におけるメモリ21のアドレス4
に「0」を書込む動作、ステップ212におけるメモリ
20のアドレス4の内容「5」をカウンタ16に設定す
る動作、ステップ213におけるメモリ19〜21のア
ドレス5の内容「ヌ」、[6J、rOJを読出す動作、
ステップ214におけるメモリ19から読出した内容「
ヌ」とカウンタ22の内容「3」を出力する動作が行な
われる。
In the 10th read, step 210 is determined to be rYEsJ, and address 4 of the memory 21 is determined in step 211.
the operation of writing "0" to the counter 16, the operation of setting the content "5" of the address 4 of the memory 20 to the counter 16 in step 212, the action of writing "nu" of the address 5 of the memories 19 to 21 in step 213, [6J, rOJ The operation of reading out
The contents read from the memory 19 in step 214 “
An operation is performed to output the content "3" of the counter 22.

第11回の読出しはステップ210がrYEsJと判定
され、ステップ211におけるメモリ21のアドレス5
に「0」が書込まれる動作、ステップ212におけるメ
モリ20のアドレス5の内容「6」をカウンタ16に設
定する動作、ステップ213におけるメモリ19〜21
のアドレス6の内容「ル」、rOJ、rOJを読出す動
作、ステップ214におけるメモリ19から読出した内
容「ル」とカウンタ22の内容3を出力する動作が行な
われる。
In the 11th read, step 210 is determined to be rYEsJ, and address 5 of the memory 21 is determined in step 211.
The operation of writing "0" into the counter 16, the operation of setting the contents "6" of address 5 of the memory 20 to the counter 16 in step 212, and the operation of writing memories 19 to 21 in step 213
The operation of reading out the contents "RU", rOJ, and rOJ of the address 6 of , and the operation of outputting the contents "RU" read from the memory 19 in step 214 and the contents 3 of the counter 22 are performed.

その後フローはステップ210に戻るが、この時メモリ
21のアドレス6は「0」であるから、ステップ210
はrNOJと判定され、ステップ202においてカウン
タ22を「3」から「4」Kカウントアツプしてフロー
はステップ200に進む。
After that, the flow returns to step 210, but since address 6 of the memory 21 is "0" at this time, step 210
is determined to be rNOJ, and in step 202 the counter 22 is incremented by ``3'' to ``4'' K, and the flow proceeds to step 200.

第12回の読出しはステップ200がrNOJ、ステッ
プ201がrYEs Jと判定され、ステップ203に
おけるメモリ14のアドレス4に「0」 を書込む動作
、ステップ204におけるメモリ13のアドレス4の内
容「ホ」とカウンタ22の内容「4」を出力する動作を
行なう。
In the 12th read, step 200 is determined to be rNOJ, step 201 is determined to be rYEs J, the operation of writing "0" to address 4 of memory 14 in step 203, and the content of address 4 of memory 13 "H" in step 204. and outputs the content "4" of the counter 22.

その後、フローはステップ205に進むが、メモリ17
のアドレス4は「0」であるから、ステップ205は「
NO」と判定され、ステップ202 においてカウンタ
22を「4」から「5」にカウントアツプした後フロー
はステップ200に進む。ここでステップ200はあら
かじめ設定された所定回数「5」になったことを判定し
rYEsJとなシ、読出動作が終了する。
The flow then proceeds to step 205, where the memory 17
Since address 4 of is "0", step 205 is "
If the answer is "NO", the counter 22 is counted up from "4" to "5" in step 202, and then the flow proceeds to step 200. Here, in step 200, it is determined that the predetermined number of times has reached "5", rYEsJ, and the read operation ends.

以上説明した読出結果を整理すると第1表のようになる
The readout results explained above are summarized in Table 1.

第1表 このように、第4図上段の表にあるデータは、第1表の
ようにデータの値が小さい順に並べ変えられる。
Table 1 In this way, the data in the table at the top of FIG. 4 is rearranged in descending order of data value as shown in Table 1.

以上の実施例はデータの値が小さい順に並べかえた例で
あるが、カウンタ22を最大値からカウントダウンすれ
ばデータの値が大きい順に並べ変えが行なわれる。
The above embodiment is an example in which the data values are rearranged in descending order, but if the counter 22 is counted down from the maximum value, the data values are rearranged in descending order.

しかしながらこのような従来の方法は、例えば第5図の
ステップ201または210に示すようにデータの読み
出しを行なう時、そのデータが他のアドレスにも書込ま
れていないかどうかをデータ毎にその都度捜さねばなら
ないので、データ数が多くなると中央処理装置の処理時
間が長くなシ、大量のデータ処理を行なうことができな
かった。
However, in this conventional method, when reading data, for example, as shown in step 201 or 210 in FIG. Since the amount of data has to be searched, the processing time of the central processing unit increases as the amount of data increases, making it impossible to process large amounts of data.

したがってこの発明の目的は、中央処理装置のデータ処
理能力を増加させることなく扱かうデータ量を増加させ
ることができるデータソーティング方法を提供すること
にある。
Therefore, an object of the present invention is to provide a data sorting method that can increase the amount of data handled without increasing the data processing capacity of a central processing unit.

このような目的を達成するためにこの発明は、データが
一時記憶されていることを示すメモリの記憶内容を複数
のデータ名称毎に並列に読み出し、読み出した内容を解
読することによってデータが一時記憶されているアドレ
スを検出するようにしたものである。以下、実施例を示
す図面を用いてこの発明の詳細な説明する。
In order to achieve such an object, the present invention reads the stored contents of a memory indicating that data is temporarily stored in parallel for each of a plurality of data names, and decodes the read contents to temporarily store the data. It is designed to detect addresses that are Hereinafter, the present invention will be described in detail using drawings showing embodiments.

第6図はこの発明に係る方法を第2図に示すメモリ14
に適用した時の一実施例を示す回路図であシ、第2図と
同一部分および相当部分は同記号を用いている。メモリ
14は、1x256ビツト容量のメモリ141〜156
、プライオリティエンコーダ157、デコーダ15Bか
ら構成されている。メモリ141〜156はデータ名称
がメモリ13に一時記憶されているアドレスを記憶する
もので、それには零番地はメモリ141のアドレス零に
記憶し、1番地はメモリ142のアドレス零に記憶し、
15番地はメモリ156のアドレス零に記憶し、16番
地はメモリ141に戻ってメモリ141のアドレス1に
記憶し、以下とのような方法で記憶が行なわれるように
なっている(書込みのための回路は図示していない)。
FIG. 6 shows a method according to the present invention for the memory 14 shown in FIG.
This is a circuit diagram illustrating an embodiment when applied to FIG. 2, and the same symbols are used for the same parts and corresponding parts as in FIG. The memory 14 includes memories 141 to 156 with a capacity of 1x256 bits.
, a priority encoder 157, and a decoder 15B. The memories 141 to 156 are for storing addresses at which data names are temporarily stored in the memory 13, such that address zero is stored at address zero of the memory 141, address 1 is stored at address zero of the memory 142,
The 15th address is stored at address 0 of the memory 156, and the 16th address is returned to the memory 141 and stored at address 1 of the memory 141, and storage is performed in the following manner (for writing). circuit not shown).

そして、端子AO−A7にアドレス信号が供給された時
に、このアドレス信号に対応する記憶内容が読み出され
、端子WEに信号が供給された時は端子AO−A7に供
給されるアドレス信号に対応するアドレスにrOJが書
込まれるようになっている。プライオリティエンコーダ
157は端子Do〜D15に「1」レベルの信号が供給
されている時、その「1」レベルの信号が供給されてい
る端子の番号0〜15を4ビツトの信号で表わして出力
するようになっている。この時、「1」レベルの信号が
複数の端子に供給されていれば、「1」レベルの信号が
供給されている端子の番号のうち、最も若い番号が出力
されるようになっている。デコーダ158は端子Eにイ
ネーブル信号が供給された時、4ビツトの信号で表わさ
れる入力信号の内容を16ビツトの信号で表わして出力
するようになっている0 このように構成された装置の動作は次の通りである。書
込み動作は従来のものと同様であり、読み出し動作もメ
モリ14の部分の動作以外は従来のものと同様であるか
ら、メモリ140部分の動作についてのみ詳細に説明す
る。カウンタ22から送出されるアドレス信号はメモリ
141〜156の端子AO〜A7に並列に供給される。
Then, when an address signal is supplied to the terminal AO-A7, the memory contents corresponding to this address signal are read out, and when a signal is supplied to the terminal WE, it corresponds to the address signal supplied to the terminal AO-A7. rOJ is written to the address. When a "1" level signal is supplied to the terminals Do to D15, the priority encoder 157 outputs a 4-bit signal representing the number 0 to 15 of the terminal to which the "1" level signal is supplied. It looks like this. At this time, if a "1" level signal is supplied to a plurality of terminals, the lowest number among the terminal numbers to which "1" level signals are supplied is output. When the enable signal is supplied to terminal E, the decoder 158 outputs the contents of the input signal represented by a 4-bit signal as a 16-bit signal.0 Operation of the device configured in this way is as follows. The write operation is the same as the conventional one, and the read operation is also the same as the conventional one except for the operation of the memory 14 portion, so only the operation of the memory 140 portion will be described in detail. The address signal sent from the counter 22 is supplied in parallel to terminals AO to A7 of the memories 141 to 156.

この結果、メモリ141〜156は供給されたアドレス
信号に対応する部分の記憶内容をプライオリティエンコ
ーダ157に供給する。この時、メモリ141〜156
よシ「1」が読み出されれば、「1」が読み出されたメ
モリに対応するプライオリティエンコーダ157の端子
DO〜D15KrlJレベルの信号が供給される0プラ
イオリテイエンコーダ157は供給された信号をもとに
、「1」レベルの信号が供給されている端子の番号を4
ビツトの信号で表わして出力するので、この信号はメモ
リ13に供給され、メモ1月3はこの信号とカウンタ2
2から供給されているアドレス信号の両方とによって表
わされるアドレスの記憶内容を読出す。
As a result, the memories 141 to 156 supply the stored contents of the portion corresponding to the supplied address signal to the priority encoder 157. At this time, memories 141 to 156
If "1" is read out, a signal at the terminal DO~D15KrlJ level of the priority encoder 157 corresponding to the memory from which "1" is read out is supplied. Input the number of the terminal to which the “1” level signal is supplied to 4.
Since it is expressed as a bit signal and output, this signal is supplied to the memory 13, and the memo January 3 combines this signal with the counter 2.
The stored contents of the address represented by both address signals supplied from 2 are read out.

ここまでの動作が終了すると、中央処理装置23はデコ
ーダ158のイネーブル端子Eにイネーブル信号を供給
し、これによってデコーダ15Bは4ビツトの入力信号
で表わされるデータを16ビツトで表わした信号で出力
する。この結果、デコーダ158の出力はどれか1つが
「1」レベルとなり、この信号がメモリ141〜156
 の端子WEに供給されるのでこの「1」レベルの信号
が供給されたメモリは端子AO〜A7に供給されるアド
レス信号に対応する部分に「0」が書込まれる0メそり
141〜156よシ「1」レベルの信号が複数出力され
ている時、プライオリティエンコーダ157は端子DO
〜015のうち最も若い番号の端子に供給された端子の
信号に対応した出力を発生するので、「0」が書込まれ
るメモリはメモリ141〜156のうち、最も若い番号
のメモリとなる。以後は同様な動作を行ない、メモリ1
41〜156のうち最も若い番号のメモリのアドレスに
対応するメモリ13の内容が読み出されるとともに、デ
ータの読み出されたメモリに「0」を書込む動作が順次
行なわれる。そして、この動作はメモリ141〜156
のうち「1」レベルの信号を送出するものがなくなるま
で読けられる。
When the operations up to this point are completed, the central processing unit 23 supplies an enable signal to the enable terminal E of the decoder 158, so that the decoder 15B outputs the data represented by the 4-bit input signal as a 16-bit signal. . As a result, one of the outputs of the decoder 158 becomes "1" level, and this signal is transmitted to the memories 141 to 156.
Therefore, the memory to which this "1" level signal is supplied is 0 memory 141-156 where "0" is written in the part corresponding to the address signal supplied to terminals AO-A7. When multiple "1" level signals are output, the priority encoder 157
Since an output corresponding to the signal of the terminal supplied to the terminal with the lowest number among the terminals 141 to 156 is generated, the memory into which "0" is written is the memory with the lowest number among the memories 141 to 156. After that, perform the same operation and store memory 1.
The contents of the memory 13 corresponding to the address of the memory with the smallest number among 41 to 156 are read out, and "0" is written in the memory from which the data has been read out. This operation is performed by the memories 141 to 156.
It can be read until there is no one that sends out a "1" level signal.

メモリ141〜156のうち「1」レベルの信号を送出
するものがなくなると、中央処理装置23はメモリ14
1〜156に対して今まで供給していたアドレス信号と
は1番地だけ異なるアドレス信号を供給するので、以上
説明した動作が新らしいアドレスにおいて再び行なわれ
る。そして、この動作はメモリ141〜156の記憶内
容が全て読み出されるまで繰返して行なわれ、メモリ1
3から必要なデータが読出される。
When none of the memories 141 to 156 sends out a "1" level signal, the central processing unit 23
Since an address signal different by one address from the address signal previously supplied to addresses 1 to 156 is supplied, the operation described above is performed again at a new address. This operation is repeated until all the stored contents of the memories 141 to 156 are read out, and the memory 1
Necessary data is read from 3.

なお、以上説明した実施例はこの発明を第2図のメモリ
14に適用した例であるが、これに限定されず、データ
が不特定の複数アドレスに分散して記憶されており、こ
のデータの記憶されているアドレスを捜しながらデータ
をアドレスJ@に読み出すものであれば全て適用できる
Note that the embodiment described above is an example in which the present invention is applied to the memory 14 in FIG. 2, but the present invention is not limited thereto. Any method that reads data to address J@ while searching for a stored address can be applied.

以上説明したようにこの発明は、中央処理装置の指示に
より複数種類のデータを並列に読み出し、各種類毎のデ
ータの有無からデータの記憶されていたアドレスを解読
するものであるから、データを1種類ずつ読み出してい
たものに比ベデータの読み出し時間が極めて短かくなシ
、中央処理装置のデータ処理能力を増加させることなく
扱かうデータ量を増加させることができるので、高速ソ
ーティングが要求されるリアルタイム図形発生装置等に
使用することができるという効果を有する。
As explained above, the present invention reads multiple types of data in parallel according to instructions from the central processing unit, and decodes the address where the data was stored based on the presence or absence of each type of data. The time required to read data is extremely short compared to reading data by type, and the amount of data to be handled can be increased without increasing the data processing capacity of the central processing unit, so high-speed sorting is required in real time. It has the advantage that it can be used in a graphic generator, etc.

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

第1図は画面に表示する図形の一例を示す図、第2図は
従来の方法を適用した装置の一例を示すブロン7り図、
第3図は書込動作を表わす70−テヤート、第4図は装
置内の各メモリに記憶されるデータを示す図、第5図は
読出動作を表わすフローチャート、第6図はこの発明の
方法を適用した装置の一実施例を表わすブロック図であ
る。 11〜21.141〜156e・・・メモリ、16.2
2・@Φ・カウンタ、23・・・・中央処理装置、15
7・・・・プライオリティエンコーダ、158・Q・・
デコーダ。 特許出願人 日立電子株式会社 代理人 山川政樹(F!7>為1名)
FIG. 1 is a diagram showing an example of a figure displayed on the screen, FIG. 2 is a block diagram showing an example of a device to which the conventional method is applied,
FIG. 3 is a 70-tayat representing a write operation, FIG. 4 is a diagram showing data stored in each memory in the device, FIG. 5 is a flowchart representing a read operation, and FIG. 6 is a diagram showing the method of the present invention. FIG. 2 is a block diagram showing an example of an applied device. 11~21.141~156e...Memory, 16.2
2・@Φ・Counter, 23...Central processing unit, 15
7...Priority encoder, 158Q...
decoder. Patent applicant Hitachi Electronics Co., Ltd. Agent Masaki Yamakawa (F!7> Tame 1 person)

Claims (1)

【特許請求の範囲】[Claims] 処理装置の指示によシメモリにデータの一時記憶を行な
うとともに、この一時記憶が行なわれたことを記憶する
メモリにそのデータを記憶したアドレスを記憶させた後
に、これらの記憶内容をもとに記憶させたデータを所定
の順序に並べ変えるデータソーティング方法において、
データの一時記憶が行なわれたことを記憶するメモリの
記憶内容のうち複数種類の記憶内容を並列に読み出し、
各種類のデータの記憶内容の有無からデータの一時記憶
が行なわれているアドレスを解読することを特徴とする
データソーティング方法。
Data is temporarily stored in the memory according to instructions from the processing device, and the address at which the data was stored is stored in the memory that stores the fact that this temporary storage has been performed, and then the data is stored based on these stored contents. In a data sorting method that rearranges the data in a predetermined order,
Read out in parallel multiple types of storage contents of a memory that stores information that data has been temporarily stored;
A data sorting method characterized by decoding the address where data is temporarily stored based on the presence or absence of stored contents of each type of data.
JP57221141A 1982-12-17 1982-12-17 Data sorting method Pending JPS59111532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57221141A JPS59111532A (en) 1982-12-17 1982-12-17 Data sorting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57221141A JPS59111532A (en) 1982-12-17 1982-12-17 Data sorting method

Publications (1)

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

Family

ID=16762102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57221141A Pending JPS59111532A (en) 1982-12-17 1982-12-17 Data sorting method

Country Status (1)

Country Link
JP (1) JPS59111532A (en)

Similar Documents

Publication Publication Date Title
US5454071A (en) Method and apparatus for performing object sorting and edge calculation in a graphic system
EP0566847A2 (en) Multi-media window manager
US5555003A (en) Method for selecting an item on a graphics screen
JPS5912176B2 (en) Cursor circuit for digital television display
WO1992000570A1 (en) Graphics rendering systems
JP3034465B2 (en) Character input method using numeric keys
JPS59111532A (en) Data sorting method
US6628291B1 (en) Method and apparatus for display refresh using multiple frame buffers in a data processing system
JPH0544063B2 (en)
JP2863484B2 (en) Map display method
JPS59148089A (en) Agate character centering apparatus
JP3077351B2 (en) Data display method
JPH01142986A (en) Picture memory element
JPH087793B2 (en) Screen information processing device
JPS5870276A (en) Writing and reading of video memory
JPS59160172A (en) Data display
JPS638837A (en) Scan data display system
JPH0236009B2 (en) MEMORIAKUSESUSEIGYOHOSHIKI
JPH1040412A (en) Method and device for plotting three-dimensional graphic
JPS6167123A (en) File access control method
JPS61160794A (en) Rule display control system
JPS63292265A (en) Editing system for japanese word text data
JPH0120513B2 (en)
JPS58107583A (en) Display unit
JPS63262687A (en) Window control