JPH08249041A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH08249041A
JPH08249041A JP7055478A JP5547895A JPH08249041A JP H08249041 A JPH08249041 A JP H08249041A JP 7055478 A JP7055478 A JP 7055478A JP 5547895 A JP5547895 A JP 5547895A JP H08249041 A JPH08249041 A JP H08249041A
Authority
JP
Japan
Prior art keywords
memory
block
access frequency
selection signal
block address
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
JP7055478A
Other languages
Japanese (ja)
Inventor
Hiroshi Noda
浩 野田
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.)
Fanuc Corp
Original Assignee
Fanuc Corp
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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP7055478A priority Critical patent/JPH08249041A/en
Publication of JPH08249041A publication Critical patent/JPH08249041A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide a numerical controller which can fast carry out a program by retrieving a block address of the highest access frequency out of those access frequency of all block addresses and then allocating a fast memory in the retrieved block address of the highest access frequency. CONSTITUTION: An access frequency measurement means 4 measures the access frequency of a central arithmetic processing unit 1 to an ordinary memory 22 included in a block address that is shown by the block selection signal received during reception of a processing selection signal. A fast memory allocation decision means 5 sends successively all block addresses of the memory 22 to the means 4 as the block selection signals and records every access frequency to retrieve a block address of the highest access frequency. Then the unit 1 can have accesses to only plural blocks of the memory 22 before the retrieval of the block address ends, and a fast memory 21 is allocated in the block address of the highest access frequency.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、数値制御装置に関す
る。特に、数値制御装置のメモリの一部を通常メモリか
ら高速メモリに代えて特定の処理の高速化を図るとき、
最も効果が高くなるように高速メモリの配置を決定する
ことを可能にする改良に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a numerical control device. In particular, when a part of the memory of the numerical control device is replaced with a high-speed memory from a normal memory to speed up a specific process,
It relates to an improvement that makes it possible to determine the placement of the fast memory so that it is most effective.

【0002】[0002]

【従来技術】中央演算処理装置を使用し、ソフトウェア
によって目的の処理を実行する装置において、処理の速
度を上げるために通常メモリに代えて高速メモリを使用
することは有効な手段である。しかし、高速メモリは高
価であるので、メモリのすべてを高速メモリにすること
は価格対性能比が低下し、受け入れられない。パーソナ
ルコンピュータのように不特定で多種のソフトウェアを
実行させる装置においては、キャッシュ方式が有効であ
り、よく採用されるが、これは実行されるソフトウェア
の局所性を利用している。数値制御のソフトウェアは局
所性がないので、キャッシュ方式を採用しても余り意味
がない。
2. Description of the Related Art In a device that uses a central processing unit and executes a target process by software, it is an effective means to use a high-speed memory instead of a normal memory in order to speed up the process. However, because high speed memory is expensive, making all of the memory high speed memory is unacceptable as it reduces the price to performance ratio. The cache method is effective and often used in a device such as a personal computer that executes various kinds of software, but it utilizes the locality of the software to be executed. Numerical control software has no locality, so it does not make much sense to use the cache method.

【0003】そこで、数値制御装置においては、実行さ
せるプログラムの中で高速にしたい処理を実行するプロ
グラムが頻繁にアクセスすると思われるメモリ領域を狙
って、その領域に高速メモリを固定配置している。
Therefore, in the numerical controller, a high-speed memory is fixedly arranged in a memory area, which is likely to be frequently accessed by a program for executing a high-speed process in a program to be executed.

【0004】[0004]

【発明が解決しようとする課題】ところで、数値制御装
置においては、取り付けられる機械やオプションの構成
やユーザが作成するマクロプログラムなどによっては、
頻繁にアクセスするメモリ領域は変化し、さらには、高
速化させたい処理も追加あるいは変更される。このた
め、高速化させたい処理が、常に、高速に実行されると
は言いがたい。
By the way, in the numerical control device, depending on the machine to be attached, the configuration of the option, the macro program created by the user, etc.,
The memory area that is frequently accessed changes, and further, the processing to be speeded up is added or changed. For this reason, it is hard to say that the processing to be speeded up is always executed at high speed.

【0005】本発明の目的は、この問題を解消すること
にあり、高速メモリをその時点で最適なメモリ領域に割
り付け、高速化させたい処理があるプログラムを高速に
実行させることのできる数値制御装置を提供することに
ある。
An object of the present invention is to solve this problem. A numerical controller capable of allocating a high speed memory to an optimum memory area at that time and executing a program having a process to be speeded up at high speed. To provide.

【0006】[0006]

【課題を解決するための手段】上記の目的は、中央演算
処理装置(1)と、高速メモリ(21)と、この高速メ
モリ(21)の容量以下にブロック分けされた複数ブロ
ックの通常メモリ(22)とを有し、前記の中央演算処
理装置(1)とバスを介して接続され、プログラムが格
納されるメモリ手段(4)と、前記のプログラムの中か
ら選択された高速に実行させたい処理が実行されている
期間中処理選択信号を生成する処理選択信号生成手段
(3)と、ブロック選択信号が入力され、前記の処理選
択信号生成手段(3)が発する処理選択信号を受信中に
前記の中央演算処理装置(1)が前記のブロック選択信
号が示すブロックアドレスにある前記の通常メモリ(2
2)にアクセスした回数をカウントするアクセス頻度測
定手段(4)と、前記の通常メモリ(22)のすべての
ブロックアドレスをブロック選択信号として順次前記の
アクセス頻度測定手段(4)に発し、その都度、このア
クセス頻度測定手段(4)が発するアクセス頻度を記憶
し、すべてのブロックアドレスのアクセス頻度の中から
最もアクセス頻度の高いブロックアドレスを検索し、検
索が終了するまでは前記の中央演算処理装置(1)がア
クセスできるメモリは前記の通常メモリ(22)の複数
ブロックとし、検索終了後は最もアクセス頻度の高いブ
ロックに前記の高速メモリ(21)を配置する高速メモ
リ配置決定手段(5)とを有する数値制御装置によって
達成される。
The above-mentioned object is to provide a central processing unit (1), a high-speed memory (21), and a plurality of blocks of normal memory (blocks each having a capacity less than the capacity of the high-speed memory (21). 22), which is connected to the central processing unit (1) via the bus and stores a program, and a high-speed execution selected from the program. A process selection signal generating means (3) for generating a process selection signal during a period during which the process is being executed, and a block selection signal are inputted, and while the process selection signal generated by the process selection signal generating means (3) is being received. The central processing unit (1) has the normal memory (2) located at the block address indicated by the block selection signal.
2) Access frequency measuring means (4) for counting the number of times of access, and all block addresses of the normal memory (22) are sequentially issued to the access frequency measuring means (4) as block selection signals, each time. The access frequency issued by the access frequency measuring means (4) is stored, the block address with the highest access frequency is searched from the access frequencies of all the block addresses, and the central processing unit is operated until the search is completed. A memory accessible by (1) is a plurality of blocks of the normal memory (22), and a high-speed memory allocation determining unit (5) for allocating the high-speed memory (21) to a block having the highest access frequency after the search is completed. Is achieved by a numerical controller having

【0007】そして、前記のアクセス頻度測定手段
(4)は、ブロック選択信号をラッチするブロック選択
回路(41)と、前記の通常メモリ(22)へのチップ
セレクト信号に対応する信号が入力され、この信号のブ
ロックアドレスと前記のブロック選択回路(41)がラ
ッチしているブロックアドレスとが一致するとき出力す
るセレクタ(42)と、このセレクタ(42)の出力と
前記の中央演算処理装置(1)のレディ(RDY)信号
との論理積を出力する第1のゲート(43)と、この第
1のゲート(43)の出力がクロック端子に前記の処理
選択信号生成手段(3)が発する処理選択信号がイネー
ブル端子に入力されるカウンタ(44)とからなってい
ると、ブロック選択信号が示すブロックアドレスの通常
メモリ22へのアクセスを容易にカウントできるので都
合がよい。
The access frequency measuring means (4) is supplied with a block selection circuit (41) for latching a block selection signal and a signal corresponding to the chip selection signal to the normal memory (22). A selector (42) that outputs when the block address of this signal and the block address latched by the block selection circuit (41) match, the output of this selector (42), and the central processing unit (1) ) A ready (RDY) signal and a first gate (43) for outputting a logical product, and a process in which the output of the first gate (43) is issued to the clock terminal by the process selection signal generating means (3). When the counter (44) is provided with the selection signal input to the enable terminal, the block address indicated by the block selection signal is accessed to the normal memory 22. It is convenient because the easily can be counted.

【0008】なお、前記の高速メモリ配置決定手段
(5)が高速メモリ固定化信号が入力される高速メモリ
配置固定化FF(51)と、この高速メモリ配置固定化
FF(51)の出力と前記のセレクタ(42)の出力と
の論理積を前記の高速メモリ(21)のチップセレクト
端子に出力する第2のゲート(52)と、この第2のゲ
ート(52)の出力と前記の通常メモリ(22)へのチ
ップセレクト信号に対応する信号が入力され、前者の反
転信号と後者との論理積を前記の通常メモリ(22)の
チップセレクト端子に出力する第3のゲート(53)と
を有していると、通常メモリ22と高速メモリ21との
切換が容易にできるので都合がよい。
The high-speed memory layout fixing FF (51) to which the high-speed memory layout fixing means (5) receives the high-speed memory locking signal, and the output of the high-speed memory layout fixing FF (51) Second gate (52) for outputting a logical product of the output of the selector (42) of the second gate (52) and the output of the second gate (52) and the normal memory. A signal corresponding to the chip select signal to (22) is input, and a third gate (53) for outputting a logical product of the inverted signal of the former and the latter to the chip select terminal of the normal memory (22). It is convenient to have it because the normal memory 22 and the high-speed memory 21 can be easily switched.

【0009】[0009]

【作用】本発明に係る数値制御装置は、処理選択信号生
成手段3とアクセス頻度測定手段4と高速メモリ配置決
定手段5とを有し、人が高速で実行させたい処理を選択
すると、処理選択信号生成手段3は、通常メモリ22の
複数ブロックに記録されている種々の処理の入ったプロ
グラムを実行している間に、高速で実行させたい処理が
実行されている期間のみ処理選択信号を生成し、アクセ
ス頻度測定手段4に発する。アクセス頻度測定手段4
は、処理選択信号受信中に、入力されるブロック選択信
号が示すブロックアドレスにある通常メモリ22へ中央
演算処理装置1が何回アクセスしたかをカウントする。
高速メモリ配置決定手段5は、通常メモリ22のすべて
のブロックアドレスをブロック選択信号として順次アク
セス頻度測定手段4に発し、アクセス頻度測定手段4が
発するアクセス頻度をその都度記録し、最もアクセス頻
度の高いブロックアドレスを検索する。そして、検索を
終了する迄は、中央演算処理装置1がアクセスできるメ
モリは通常メモリ22の複数ブロックとし、検索終了後
は、最もアクセス頻度の高いブロックアドレスに高速メ
モリ21を配置する。
The numerical controller according to the present invention has the processing selection signal generating means 3, the access frequency measuring means 4 and the high speed memory allocation determining means 5, and when a person selects a processing to be executed at high speed, the processing selection is performed. The signal generating means 3 generates a process selection signal only during a period in which a process desired to be executed at high speed is executed while executing a program including various processes recorded in a plurality of blocks of the normal memory 22. Then, the access frequency measuring means 4 is issued. Access frequency measuring means 4
Counts how many times the central processing unit 1 has accessed the normal memory 22 at the block address indicated by the input block selection signal while receiving the processing selection signal.
The high-speed memory placement determining means 5 sequentially issues all block addresses of the normal memory 22 as block selection signals to the access frequency measuring means 4, records the access frequency emitted by the access frequency measuring means 4 each time, and has the highest access frequency. Search block address. Until the end of the search, the memory that can be accessed by the central processing unit 1 is a plurality of blocks of the normal memory 22, and after the end of the search, the high-speed memory 21 is arranged at the block address with the highest access frequency.

【0010】このため、取り付けられる機械やオプショ
ンの構成やユーザが作成するマクロプログラムなどが変
更されても、変更の時点で高速化させたい処理を選択し
さえすれば、最もアクセス頻度の高いブロックは通常メ
モリ22に代えて高速メモリ21が配置されることにな
るので、数値制御装置は高速化させたい処理を高速に実
行することができる。
Therefore, even if the machine to be attached, the configuration of options, or the macro program created by the user is changed, if the process desired to be accelerated is selected at the time of change, the block with the highest access frequency will be Since the high-speed memory 21 is arranged in place of the normal memory 22, the numerical control device can execute the processing desired to be executed at high speed.

【0011】[0011]

【実施例】以下、図面を参照して、本発明の1実施例に
係る数値制御装置についてさらに詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A numerical controller according to an embodiment of the present invention will be described in more detail below with reference to the drawings.

【0012】図1参照 図1は本発明の1実施例に係る数値制御装置のクレーム
対応図である。図1において、1は中央演算処理装置で
あり、2は中央演算処理装置1とバスを介して接続され
ているメモリ手段であり、3は処理選択信号生成手段で
あり、4は処理選択信号生成手段3が発する処理選択信
号が出ている間、ブロック選択信号に対応するブロック
アドレスの通常メモリ22がアクセスされる頻度をカウ
ントするアクセス頻度測定手段であり、5はブロック選
択信号をアクセス頻度測定手段4に出力し、アクセス頻
度測定手段4がカウントしたアクセス頻度を基に高速メ
モリの配置を決める高速メモリ配置決定手段である。以
下、それぞれについてハードウェアとソフトウェアの両
面から説明する。
Referring to FIG. 1, FIG. 1 is a diagram corresponding to claims of a numerical control device according to an embodiment of the present invention. In FIG. 1, 1 is a central processing unit, 2 is a memory means connected to the central processing unit 1 via a bus, 3 is a processing selection signal generating means, and 4 is a processing selection signal generation. Access frequency measuring means for counting the frequency of accessing the normal memory 22 of the block address corresponding to the block selection signal while the processing selection signal issued by the means 3 is being output, and 5 is the access frequency measuring means for the block selection signal. 4 is a high-speed memory allocation determining means for determining the allocation of the high-speed memory based on the access frequency counted by the access frequency measuring means 4. Hereinafter, each of them will be described in terms of both hardware and software.

【0013】図2参照 図2は本発明の1実施例に係る数値制御装置のハードウ
ェアの要部を示す構成図である。図2において、2は高
速メモリ21と通常メモリ22とを有するメモリ手段で
あり、通常メモリ22は高速メモリ21の容量以下にブ
ロック分けされている。図2はブロック番号が1、2、
3、4と4つに分けられた場合を示している。メモリ手
段2は、中央演算処理装置1とバス(アドレスバスとデ
ータバス)を介して接続され、プログラムやデータを格
納しており、中央演算処理装置1は格納されているプロ
グラムを順次実行して処理を行う。
FIG. 2 is a block diagram showing the essential parts of the hardware of the numerical controller according to one embodiment of the present invention. In FIG. 2, reference numeral 2 is a memory means having a high speed memory 21 and a normal memory 22, and the normal memory 22 is divided into blocks each having a capacity less than or equal to the capacity of the high speed memory 21. In Figure 2, the block numbers are 1, 2,
The case of being divided into three, four and four is shown. The memory means 2 is connected to the central processing unit 1 via a bus (address bus and data bus) and stores programs and data. The central processing unit 1 sequentially executes the stored programs. Perform processing.

【0014】6はデコーダである。中央演算処理装置1
は、実行する内容に対応したメモリ手段2のブロックア
ドレスをアドレスバスを経由してデコーダ6に発し、デ
コーダ6はそのアドレスをデコードする。デコーダ6
は、第3のゲート53を介してそのブロックアドレスに
ある通常メモリ22にチップセレクト信号を発する。デ
コーダ6は、中央演算処理装置1とメモリ手段2と共に
従来技術に係る数値制御装置においても使用されてい
た。ただ、従来はデコーダ6の出力は図2の如く第3の
ゲート53を経由することなく直接メモリ手段2の各ブ
ロックのチップセレクト端子に接続されていた。
Reference numeral 6 is a decoder. Central processing unit 1
Issues a block address of the memory means 2 corresponding to the content to be executed to the decoder 6 via the address bus, and the decoder 6 decodes the address. Decoder 6
Issues a chip select signal to the normal memory 22 at the block address via the third gate 53. The decoder 6 was used in the numerical control device according to the prior art together with the central processing unit 1 and the memory means 2. However, conventionally, the output of the decoder 6 was directly connected to the chip select terminal of each block of the memory means 2 without passing through the third gate 53 as shown in FIG.

【0015】3は処理選択信号生成手段であり、31は
処理選択FFである。プログラム中の、例えばデータ読
込みやデータ解析など、高速に実行させたい処理が決ま
ると、人は表示手段(図示されていない)に表示されて
いる種々の処理の中から高速に実行させたい処理を入力
手段(図示されていない)より入力する。そして、入力
手段より高速メモリ配置処理を起動させる。これによ
り、後述する処理選択信号生成手段3のソフトウェアに
より、高速に実行させたい処理が実行されている期間中
のみ処理選択FFを1にセットし、処理選択FF31が
処理選択信号を生成する。
Reference numeral 3 is a processing selection signal generating means, and reference numeral 31 is a processing selection FF. When a process to be executed at high speed in the program, such as data reading or data analysis, is determined, a person selects a process to be executed at high speed from various processes displayed on the display means (not shown). Input from input means (not shown). Then, the high-speed memory placement process is activated by the input means. As a result, the software of the process selection signal generation means 3 described later sets the process selection FF to 1 only during the period when the process desired to be executed at high speed is executed, and the process selection FF 31 generates the process selection signal.

【0016】図3参照 図3は、中央演算処理装置1が実行する処理に対する処
理選択FF31の動作を示すタイムチャートである。図
3において、処理A、処理B、処理Cなど処理信号は中
央演算処理装置1が実行する一連の処理の時間経過を示
している。処理Bは一連の処理の中で、高速に実行させ
たい処理であり、処理Bが実行されるとき処理選択FF
31はセット(矢印)され、処理Bが終了すると処理選
択FF31はリセット(矢印)される。
FIG. 3 is a time chart showing the operation of the processing selection FF 31 for the processing executed by the central processing unit 1. In FIG. 3, processing signals such as processing A, processing B, and processing C indicate the passage of time of a series of processing executed by the central processing unit 1. Process B is a process to be executed at high speed in a series of processes, and when the process B is executed, the process selection FF
31 is set (arrow), and when the process B is completed, the process selection FF 31 is reset (arrow).

【0017】図2再参照 4はアクセス頻度測定手段である。41はブロック選択
回路であり、メモリ手段2のブロックアドレスを示すブ
ロック選択信号が入力され、ブロックアドレスをラッチ
する。図2では、メモリ手段2のブロック数が4個であ
るので、2ビットのラッチを行う。42はセレクタであ
り、デコーダ6の出力のブロックアドレスとブロック選
択回路41がラッチしているブロックアドレスとが一致
するとき、1を出力する。43は、セレクタ42の出力
と中央演算処理装置1のレディ信号(RDY)とが入力
される第1のゲートである。44はカウンタであり、カ
ウンタのクロック端子には第1のゲート43の出力が、
イネーブル端子には処理選択FF31の出力が接続され
ている。カウンタ44の出力はデータバスに出力され
る。
Referring again to FIG. 2, reference numeral 4 is access frequency measuring means. A block selection circuit 41 receives a block selection signal indicating a block address of the memory means 2 and latches the block address. In FIG. 2, since the number of blocks of the memory means 2 is four, 2-bit latch is performed. A selector 42 outputs 1 when the block address output from the decoder 6 and the block address latched by the block selection circuit 41 match. Reference numeral 43 is a first gate to which the output of the selector 42 and the ready signal (RDY) of the central processing unit 1 are input. 44 is a counter, and the output of the first gate 43 is supplied to the clock terminal of the counter.
The output of the process selection FF 31 is connected to the enable terminal. The output of the counter 44 is output to the data bus.

【0018】今、ブロック選択回路41にブロック選択
信号00が入力されると、ブロック選択回路41は00
にラッチされ、デコーダ6がブロック1のチップセレク
ト信号を発するときセレクタ42は1を出力する。カウ
ンタ44は、中央演算処理装置1が高速に実行させたい
処理を実行中で、かつ、デコーダ6に入力されるブロッ
クアドレスとラッチされているブロックアドレスとが一
致しているときに、中央演算処理装置1のレディ信号が
1になると、その都度、カウントする。換言すると、高
速に実行させたい処理を実行中にラッチされているブロ
ックアドレスの通常メモリ22にアクセスした回数がこ
のカウンタ44に積算記録される。
When the block selection signal 00 is input to the block selection circuit 41, the block selection circuit 41 outputs 00.
When the decoder 6 issues the chip select signal of block 1, the selector 42 outputs 1. The counter 44 executes the central processing unit when the central processing unit 1 is executing a process to be executed at high speed and the block address input to the decoder 6 matches the latched block address. When the ready signal of the device 1 becomes 1, it counts each time. In other words, the number of times the normal memory 22 at the block address latched during the execution of the process desired to be executed at high speed is accessed is cumulatively recorded in the counter 44.

【0019】なお、高速に実行させたい処理とそうでな
い処理とが平行して走るとき(図3における処理Bと処
理A)、平行して走る期間に選択されていない処理を実
行するためにアクセスした回数も積算されるが、選択さ
れた処理を高速に実行させるために、選択されていない
処理も平行して走る期間だけは高速に実行させる必要が
あるからである。
When a process to be executed at high speed and a process not to be executed run in parallel (process B and process A in FIG. 3), access is made to execute a process not selected in the parallel running period. This is because the number of times of execution is integrated, but in order to execute the selected process at high speed, it is necessary to execute the non-selected process at high speed only during a period in which the processes run in parallel.

【0020】5は高速メモリ配置決定手段である。51
は高速メモリ配置固定化FFであり、52は第2のゲー
トであり、53は第3のゲートである。第2のゲートの
出力は高速メモリ21のチップセレクト端子に、第3の
ゲート53それぞれの出力は通常メモリ22それぞれの
チップセレクト端子に接続されている。
Reference numeral 5 is a high speed memory arrangement determining means. 51
Is a high-speed memory arrangement fixed FF, 52 is a second gate, and 53 is a third gate. The output of the second gate is connected to the chip select terminal of the high-speed memory 21, and the output of the third gate 53 is connected to the chip select terminal of the normal memory 22.

【0021】後述する高速メモリ配置決定手段5のソフ
トウェアにより、高速メモリ配置固定化FF51の入力
に0がセットされると、第2のゲート52の出力は0と
なり、高速メモリ21は活性化されず、第3のゲート5
3の出力はデコーダ6の出力が1になっている第3のゲ
ート53のみ出力が1となり、対応する通常メモリ22
は活性化される。高速メモリ配置固定化FF51の入力
に1がセットされると、第2のゲート52の出力は、セ
レクタ42が1を出力したとき、1となる。すなわち、
デコーダ6に入力されるブロックアドレスとブロック選
択回路41にラッチされているブロックアドレスとが一
致すると、第2のゲート52は1を出力し、高速メモリ
21を活性化させる。一方、このブロックアドレスに対
応する第3のゲート53の出力は0のままであるので、
対応する通常メモリ22は活性化されないままとなる。
換言すると、ブロック選択回路41にラッチされている
ブロックアドレスの通常メモリ22のみが高速メモリ2
1に変更され、他のブロックアドレスの通常メモリ22
はそのまま使用される。
When 0 is set to the input of the high speed memory arrangement fixing FF 51 by the software of the high speed memory arrangement determining means 5 which will be described later, the output of the second gate 52 becomes 0 and the high speed memory 21 is not activated. , Third gate 5
As for the output of the decoder 3, the output of the decoder 6 is 1 and only the output of the third gate 53 is 1.
Is activated. When 1 is set to the input of the high-speed memory arrangement fixing FF 51, the output of the second gate 52 becomes 1 when the selector 42 outputs 1. That is,
When the block address input to the decoder 6 and the block address latched in the block selection circuit 41 match, the second gate 52 outputs 1 and activates the high speed memory 21. On the other hand, since the output of the third gate 53 corresponding to this block address remains 0,
The corresponding normal memory 22 remains unactivated.
In other words, only the normal memory 22 of the block address latched by the block selection circuit 41 is the high-speed memory 2
Normal memory 22 of another block address
Is used as is.

【0022】ブロック選択回路41に出力している信号
はブロック選択信号であり、後述の高速メモリ配置決定
手段5のソフトウェアにより発される。
The signal output to the block selection circuit 41 is a block selection signal, and is generated by the software of the high speed memory layout determining means 5 which will be described later.

【0023】図4・図5参照 図4・図5は本発明の1実施例に係る数値制御装置のソ
フトウェアを示すフローチャート(その1とその2)で
あり、数値制御装置の管理ソフトウェアのなかに組み込
まれている。このフローチャートのうち、手順aから手
順iまでは手順bと手順cとを除いて処理選択信号生成
手段3の動作を規定するソフトウェアであり、手順jか
ら手順qまでは高速メモリ配置決定手段5の動作を規定
するソフトウェアである。以下、手順にしたがって説明
する。
4 and 5 are flow charts (No. 1 and No. 2) showing the software of the numerical control device according to one embodiment of the present invention. It has been incorporated. In this flowchart, steps a to i are software that defines the operation of the process selection signal generation means 3 except steps b and c, and steps j to q are the high-speed memory allocation determining means 5. It is software that defines the operation. The procedure will be described below.

【0024】先ず、人が入力手段を使用して高速化させ
たい処理を選択し、高速メモリ配置処理を起動させる。
First, a person uses the input means to select a process to be speeded up and activates the high speed memory placement process.

【0025】手順aでは、メモリ手段2のブロックアド
レスを書き込むブロックアドレスデータ領域とブロック
アドレスの数Nだけ用意されたアクセス頻度を書き込む
アクセス頻度データ領域とをそれぞれ0にリセットす
る。
In step a, the block address data area for writing the block address of the memory means 2 and the access frequency data area for writing the access frequency prepared for the number N of block addresses are reset to 0 respectively.

【0026】手順bでは、高速メモリ配置固定化FF5
1の入力に0にリセットする。高速メモリ配置決定手段
5のハードウェアは通常メモリ22のみが使用できるよ
うにする。次いで、メモリ手段2にプログラムを書込
む。
In step b, the high-speed memory placement fixed FF5
Reset to 0 on 1 input. The hardware of the high-speed memory arrangement determining means 5 allows only the normal memory 22 to be used. Then, the program is written in the memory means 2.

【0027】手順cでは、ブロックアドレスデータ領域
に書き込まれている値をブロック選択信号としてブロッ
ク選択回路41に出力する。
In step c, the value written in the block address data area is output to the block selection circuit 41 as a block selection signal.

【0028】手順dでは、予め決められている周期信号
(図3参照)の経過回数をセットする。
In step d, the number of times a predetermined periodic signal (see FIG. 3) has elapsed is set.

【0029】手順eでは、メモリ手段2に書込まれてい
るプログラムの実行を開始する。
In step e, the execution of the program written in the memory means 2 is started.

【0030】手順fでは、第1の高速化させたい処理が
始まったかを監視し、始まるまで待機し、始まれば次の
手順に進む。
In step f, it is monitored whether or not the first process to be speeded up has started, and the process waits until it starts. If it starts, the process proceeds to the next step.

【0031】手順f’では、第2の高速化させたい処理
が始まったかを監視し、始まるまで待機し、始まれば次
の手順に進む。
In step f ', it is monitored whether or not the second process to be speeded up has started, and the process waits until it starts. If it starts, the process proceeds to the next step.

【0032】手順gでは、処理選択FF31に1をセッ
トする。
In step g, 1 is set in the process selection FF 31.

【0033】手順hでは、第1の高速化させたい処理が
始まっており、かつ、終了したかを監視し、終了するま
で待機する。第1の高速化させたい処理が始まっていな
いか、または、始まっており、かつ、終了すれば次の手
順に進む。
In step h, it is monitored whether or not the first process to be speeded up has started and has ended, and the process waits until it ends. If the first processing to be speeded up has not started, or has started, and has ended, the procedure proceeds to the next step.

【0034】手順h’では、第2の高速化させたい処理
が始まっており、かつ、終了したかを監視し、終了する
まで待機する。第2の高速化させたい処理が始まってい
ないか、または、始まっており、かつ、終了すれば次の
手順に進む。
In step h ', it is monitored whether or not the second process to be speeded up has started and has been completed, and the process waits until it is completed. If the second process to be speeded up has not started, or has started, and has ended, the process proceeds to the next step.

【0035】手順hに入り手順iに進までの間、アクセ
ス頻度測定手段4は、手順cで出力したブロックアドレ
スにある通常メモリ22にアクセスする回数をカウント
している。
The access frequency measuring means 4 counts the number of times the normal memory 22 at the block address output in the procedure c is accessed until the procedure h is entered and the procedure i is advanced.

【0036】手順iでは、処理選択FF31を0にリセ
ットする。
In step i, the process selection FF 31 is reset to 0.

【0037】手順jでは、カウンタ44のカウンタ値を
取込み、前回取込んだ値との差の積算値を、手順cにお
いて出力したブロック選択信号であるブロックアドレス
と共に記憶する。
In step j, the counter value of the counter 44 is fetched, and the integrated value of the difference from the value fetched last time is stored together with the block address which is the block selection signal output in step c.

【0038】手順kでは、手順dでセットした周期信号
の経過回数を終了したか監視し、経過していなければ手
順fに戻り、手順fから手順jまでを繰り返し、2回目
の積算値を記憶する。経過しておれば、次の手順に進
む。
In step k, it is monitored whether or not the number of times of the periodic signal set in step d has ended. If not, the procedure returns to step f, steps f to j are repeated, and the second integrated value is stored. To do. If so, proceed to the next step.

【0039】手順lでは、手順eで開始したプログラム
の実行を停止する。
In step l, execution of the program started in step e is stopped.

【0040】手順mでは、手順jで取込んだ複数回の積
算値から平均値を演算し、これを手順cで出力したブロ
ックアドレスにある通常メモリ22へのアクセス頻度と
して、このブロックアドレスに対応するアクセス頻度デ
ータ領域に書込む。
In step m, the average value is calculated from the integrated values obtained in a plurality of times in step j, and the average value is calculated as the access frequency to the normal memory 22 at the block address output in step c, which corresponds to this block address. Write to the access frequency data area.

【0041】手順nでは、ブロックアドレスデータ領域
にある値に1を加算する。
In step n, 1 is added to the value in the block address data area.

【0042】手順oでは、ブロックアドレスデータ領域
にある値がメモリ手段2にあるブロック数Nを超えたか
を監視し、超えていなければ手順cに戻り、手順cから
手順nまでを繰り返し、次のブロックアドレスにある通
常メモリ22へのアクセス頻度を次のブロックアドレス
に対応するアクセス頻度データ領域に書込む。ブロック
アドレスデータ領域にある値がNを超えておれば、次の
手順に進む。
In step o, it is monitored whether the value in the block address data area exceeds the number N of blocks in the memory means 2, and if it does not exceed, the procedure returns to step c and steps c to n are repeated until the next step. The access frequency to the normal memory 22 at the block address is written in the access frequency data area corresponding to the next block address. If the value in the block address data area exceeds N, proceed to the next step.

【0043】手順pでは、N個のアクセス頻度データ領
域に書込まれたアクセス頻度を比較し、最大アクセス頻
度を有するブロックアドレスを検索する。そして、その
ブロックアドレスをブロック選択信号として出力する。
In step p, the access frequencies written in the N access frequency data areas are compared, and the block address having the maximum access frequency is searched. Then, the block address is output as a block selection signal.

【0044】手順qでは、高速メモリ配置固定化FF5
1の入力に1をセットし、高速メモリ配置決定手段5の
ハードウェアは手順pで検索したブロックアドレスにあ
る通常メモリ22に代えて高速メモリ21を配置する。
そして、高速メモリ21が配置されたメモリ手段2にプ
ログラムを書込む。
In the procedure q, the high-speed memory placement fixed FF5
The input of 1 is set to 1, and the hardware of the high-speed memory placement determining means 5 places the high-speed memory 21 in place of the normal memory 22 at the block address searched in step p.
Then, the program is written in the memory means 2 in which the high speed memory 21 is arranged.

【0045】以上により、フローチャートの手順を終了
する。なお、図4のフローチャートは高速化させたい処
理が二つの場合を示しているが、さらに多い場合は、高
速化させたいそれぞれの処理が実行される期間中処理選
択FFが1にセットされるようにすればよい。
With the above, the procedure of the flowchart is completed. Note that the flowchart of FIG. 4 shows a case where there are two processes to be speeded up, but when there are more processes, the process selection FF is set to 1 during the period when each process to be speeded up is executed. You can do this.

【0046】最後に、高速メモリ21は一つのブロック
である必要はなく、同一容量の複数のブロックに分けて
もよい。この場合、通常メモリ22の1ブロックの容量
は、ブロック分けした高速メモリ21と同一容量以下と
する。そして、アクセス頻度の高い順に通常メモリ22
を、順次、複数の高速メモリ21に代えてもよい。この
ようにすれば、高速メモリ21の容量を増やすことな
く、さらに高速化しうる。
Finally, the high speed memory 21 does not have to be one block, and may be divided into a plurality of blocks having the same capacity. In this case, the capacity of one block of the normal memory 22 is not more than the same capacity as the high-speed memory 21 divided into blocks. Then, the normal memory 22 is accessed in descending order of access frequency.
May be sequentially replaced with a plurality of high-speed memories 21. In this way, the speed can be further increased without increasing the capacity of the high speed memory 21.

【0047】[0047]

【発明の効果】以上説明したように、本発明に係る数値
制御装置によれば、高速化させたい処理を選択しさえす
れば、処理選択信号生成手段とアクセス頻度測定手段と
により、高速化させたい処理を実行するときに中央演算
処理装置がアクセスする回数をカウントし、高速メモリ
配置決定手段により、メモリ手段にある複数のメモリブ
ロックの内、最もアクセス頻度の高いブロックを検索
し、そのブロックのメモリを通常メモリから高速メモリ
に配置換えする。取り付けられる機械やオプションの構
成やユーザが作成するマクロプログラムなどが変更され
ても、その時点で、アクセス頻度の高いブロックのメモ
リが通常メモリから高速メモリに配置換えすることがで
きるから、高速化させたい処理が高速に実行される。
As described above, according to the numerical control device of the present invention, if the process to be speeded up is selected, the speed can be increased by the process selection signal generating means and the access frequency measuring means. The number of accesses by the central processing unit when executing a desired process is counted, and the high-speed memory placement determining unit searches the memory block having the highest access frequency among the plurality of memory blocks in the memory unit. Change the memory from normal memory to high-speed memory. Even if the machine to be installed, the configuration of options, or the macro program created by the user is changed, the memory of the block that is frequently accessed can be relocated from normal memory to high-speed memory at that time, so speed up. The desired processing is executed at high speed.

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

【図1】本発明の1実施例に係る数値制御装置のクレー
ム対応図である。
FIG. 1 is a diagram corresponding to claims of a numerical control device according to an embodiment of the present invention.

【図2】本発明の1実施例に係る数値制御装置のハード
ウェア構成図である。
FIG. 2 is a hardware configuration diagram of a numerical control device according to an embodiment of the present invention.

【図3】本発明の1実施例に係る中央演算処理装置の処
理と処理選択信号のタイムチャトである。
FIG. 3 is a time chart of processing and a processing selection signal of the central processing unit according to the embodiment of the present invention.

【図4】本発明の1実施例に係る数値制御装置のフロー
チャート(その1)である。
FIG. 4 is a flowchart (No. 1) of the numerical control device according to the embodiment of the present invention.

【図5】本発明の1実施例に係る数値制御装置のフロー
チャート(その2)である。
FIG. 5 is a flowchart (No. 2) of the numerical control device according to the embodiment of the present invention.

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

1 中央演算処理装置 2 メモリ手段 3 処理選択信号生成手段 4 アクセス頻度測定手段 5 高速メモリ配置決定手段 6 デコーダ 21 高速メモリ 22 通常メモリ 31 処理選択FF 41 ブロック選択回路 42 セレクタ 43 第1のゲート 44 カウンタ 51 高速メモリ配置固定化FF 52 第2のゲート 53 第3のゲート 1 central processing unit 2 memory means 3 processing selection signal generating means 4 access frequency measuring means 5 high speed memory arrangement determining means 6 decoder 21 high speed memory 22 normal memory 31 processing selection FF 41 block selection circuit 42 selector 43 first gate 44 counter 51 High-speed memory placement fixed FF 52 Second gate 53 Third gate

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 中央演算処理装置(1)と、 高速メモリ(21)と、該高速メモリ(21)の容量以
下にブロック分けされた複数ブロックの通常メモリ(2
2)とを有し、前記中央演算処理装置(1)とバスを介
して接続され、プログラムが格納されるメモリ手段
(2)と、 前記プログラムの中から選択された高速に実行させたい
処理が実行されている期間中処理選択信号を生成する処
理選択信号生成手段(3)と、 ブロック選択信号が入力され、前記処理選択信号生成手
段(3)が発する処理選択信号を受信中に前記中央演算
処理装置(1)が前記ブロック選択信号が示すブロック
アドレスにある前記通常メモリ(22)にアクセスした
回数をカウントするアクセス頻度測定手段(4)と、 前記通常メモリ(22)のすべてのブロックアドレスを
ブロック選択信号として順次前記アクセス頻度測定手段
(4)に発し、その都度、該アクセス頻度測定手段
(4)が発するアクセス頻度を記憶し、すべてのブロッ
クアドレスのアクセス頻度の中から最もアクセス頻度の
高いブロックアドレスを検索し、検索が終了するまでは
前記中央演算処理装置(1)がアクセスできるメモリは
前記通常メモリ(22)の複数ブロックとし、検索終了
後は最もアクセス頻度の高いブロックに前記高速メモリ
(21)を配置する高速メモリ配置決定手段(5)とを
有することを特徴とする数値制御装置。
1. A central processing unit (1), a high speed memory (21), and a plurality of blocks of normal memory (2) divided into blocks each having a capacity less than or equal to the capacity of the high speed memory (21).
2), which is connected to the central processing unit (1) via a bus and stores a program, and a memory means (2) for storing a program, and a process selected from the program that is to be executed at high speed. The processing selection signal generating means (3) for generating a processing selection signal during the period being executed and the block selection signal are input, and the central operation is performed while receiving the processing selection signal issued by the processing selection signal generating means (3). An access frequency measuring means (4) for counting the number of times the processing device (1) has accessed the normal memory (22) at the block address indicated by the block selection signal, and all block addresses of the normal memory (22). It is sequentially issued to the access frequency measuring means (4) as a block selection signal, and each time, the access frequency emitted by the access frequency measuring means (4) is stored, The block address having the highest access frequency is searched from the access frequencies of all the block addresses, and the memory that can be accessed by the central processing unit (1) is a plurality of blocks of the normal memory (22) until the search is completed. The numerical control device further comprises a high-speed memory arrangement determining means (5) for arranging the high-speed memory (21) in a block having the highest access frequency after completion of the search.
【請求項2】 前記アクセス頻度測定手段(4)は、ブ
ロック選択信号をラッチするブロック選択回路(41)
と、前記通常メモリ(22)へのチップセレクト信号に
対応する信号が入力され、該信号のブロックアドレスと
前記ブロック選択回路(41)がラッチしているブロッ
クアドレスとが一致するとき出力するセレクタ(42)
と、該セレクタ(42)の出力と前記中央演算処理装置
(1)のレディ(RDY)信号との論理積を出力する第
1のゲート(43)と、該第1のゲート(43)の出力
がクロック端子に前記処理選択信号生成手段(3)が発
する処理選択信号がイネーブル端子に入力されるカウン
タ(44)とからなることを特徴とする請求項1記載の
数値制御装置。
2. The access frequency measuring means (4) is a block selection circuit (41) for latching a block selection signal.
And a signal corresponding to the chip select signal to the normal memory (22) is input, and a selector (outputs when the block address of the signal matches the block address latched by the block selection circuit (41) ( 42)
And a first gate (43) for outputting a logical product of the output of the selector (42) and the ready (RDY) signal of the central processing unit (1), and the output of the first gate (43) 2. The numerical controller according to claim 1, further comprising a counter (44) having a clock terminal to which a processing selection signal generated by said processing selection signal generating means (3) is inputted to an enable terminal.
【請求項3】 前記高速メモリ配置決定手段(5)は、
高速メモリ固定化信号が入力される高速メモリ配置固定
化FF(51)と、該高速メモリ配置固定化FF(5
1)の出力と前記セレクタ(42)の出力との論理積を
前記高速メモリ(21)のチップセレクト端子に出力す
る第2のゲート(52)と、該第2のゲート(52)の
出力と前記通常メモリ(22)へのチップセレクト信号
に対応する信号が入力され、前者の反転信号と後者との
論理積を前記通常メモリ(22)のチップセレクト端子
に出力する第3のゲート(53)とを有することを特徴
とする請求項1、または、請求項2記載の数値制御装
置。
3. The high-speed memory placement determining means (5) comprises:
A high-speed memory arrangement fixing FF (51) to which a high-speed memory fixing signal is input, and a high-speed memory arrangement fixing FF (5
A second gate (52) for outputting a logical product of the output of 1) and the output of the selector (42) to the chip select terminal of the high speed memory (21); and the output of the second gate (52). A third gate (53) which receives a signal corresponding to the chip select signal to the normal memory (22) and outputs a logical product of the inverted signal of the former and the latter to the chip select terminal of the normal memory (22). The numerical controller according to claim 1 or 2, further comprising:
JP7055478A 1995-03-15 1995-03-15 Numerical controller Pending JPH08249041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7055478A JPH08249041A (en) 1995-03-15 1995-03-15 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7055478A JPH08249041A (en) 1995-03-15 1995-03-15 Numerical controller

Publications (1)

Publication Number Publication Date
JPH08249041A true JPH08249041A (en) 1996-09-27

Family

ID=12999731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7055478A Pending JPH08249041A (en) 1995-03-15 1995-03-15 Numerical controller

Country Status (1)

Country Link
JP (1) JPH08249041A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009230414A (en) * 2008-03-21 2009-10-08 Toshiba Corp Storage device having plurality of nonvolatile memory devices
US8023012B2 (en) 2004-08-23 2011-09-20 Fujifilm Corporation Image capture device correcting defective pixel information
JP2013073344A (en) * 2011-09-27 2013-04-22 Fuji Electric Co Ltd Programmable controller, program creation support device, digital control program and program creation support program
JP2015161997A (en) * 2014-02-26 2015-09-07 ファナック株式会社 Programmable controller having instruction cache for quickly processing branch instruction
JP2017016233A (en) * 2015-06-29 2017-01-19 ファナック株式会社 Numerical control device with function to automatically select storage destination in response to content of program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8023012B2 (en) 2004-08-23 2011-09-20 Fujifilm Corporation Image capture device correcting defective pixel information
JP2009230414A (en) * 2008-03-21 2009-10-08 Toshiba Corp Storage device having plurality of nonvolatile memory devices
JP2013073344A (en) * 2011-09-27 2013-04-22 Fuji Electric Co Ltd Programmable controller, program creation support device, digital control program and program creation support program
JP2015161997A (en) * 2014-02-26 2015-09-07 ファナック株式会社 Programmable controller having instruction cache for quickly processing branch instruction
US10120687B2 (en) 2014-02-26 2018-11-06 Fanuc Corporation Programmable controller
JP2017016233A (en) * 2015-06-29 2017-01-19 ファナック株式会社 Numerical control device with function to automatically select storage destination in response to content of program
US10437230B2 (en) 2015-06-29 2019-10-08 Fanuc Corporation Numerical controller having function of automatically selecting storage destination of machining program

Similar Documents

Publication Publication Date Title
US4888679A (en) Method and apparatus using a cache and main memory for both vector processing and scalar processing by prefetching cache blocks including vector data elements
US3771144A (en) Clock for computer performance measurements
JPH0212541A (en) Computing system and operation thereof
US6067606A (en) Computer processor with dynamic setting of latency values for memory access
EP0448205B1 (en) Re-configurable block length cache and method therefor
US6035377A (en) Method and apparatus for determining memory pages having greatest frequency of access in a non-uniform memory access computer system
RU99124789A (en) MEMORY ACCESS PROTECTION
JP2006500687A (en) Performance monitor and method
US6505282B1 (en) Method and apparatus for determining memory types of a multi-type memory subsystem where memory of the different types are accessed using column control signals with different timing characteristics
US6725349B2 (en) Method and apparatus for controlling of a memory subsystem installed with standard page mode memory and an extended data out memory
US6301642B1 (en) Shared memory bus arbitration system to improve access speed when accessing the same address set
JP2010531498A (en) Method, performance monitor, and system for processor performance monitoring
JP2002505775A (en) Digital circuit using memory for monitoring signals for occurrence of predefined breakpoint conditions
US6820091B2 (en) Dynamic buffer allocation
CA2016544A1 (en) Noncacheable address random access memory
JPH08249041A (en) Numerical controller
US6473772B1 (en) Apparatus and methods for dynamic simulation event triggering
US7075546B2 (en) Intelligent wait methodology
JPH05225060A (en) Information processor
JPH0540698A (en) Main storage page managing system
JP3123758B2 (en) Software coverage measurement device
US5233699A (en) Expanded cache memory system
JP2000148584A (en) Prefetching method and device
JPH0814791B2 (en) Processing system
JPH0415844A (en) Cache memory control circuit