JPH07121102A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH07121102A
JPH07121102A JP5269197A JP26919793A JPH07121102A JP H07121102 A JPH07121102 A JP H07121102A JP 5269197 A JP5269197 A JP 5269197A JP 26919793 A JP26919793 A JP 26919793A JP H07121102 A JPH07121102 A JP H07121102A
Authority
JP
Japan
Prior art keywords
gene
register file
instruction
register
stored
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.)
Withdrawn
Application number
JP5269197A
Other languages
Japanese (ja)
Inventor
Hitoshi Ishikawa
仁 石川
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP5269197A priority Critical patent/JPH07121102A/en
Publication of JPH07121102A publication Critical patent/JPH07121102A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the program execution time by employing genetic algorithm for the scheduling process of a register file and decreasing the frequency of memory access. CONSTITUTION:A gene is constituted of a register file number sequence based upon the replacement order of a register file. A compiler 12 judges whether or not data required for the execution of each instruction read in when a source program is compiled are stored in an internal register 11 at the time of its execution, and accesses an external memory 2 and outputs an object instruction to replace corresponding data to the internal register 11 on the basis of the gene unless the data are stored. The frequencies of access to the external memory 2 are calculated, gene by gene, and adaptability is found on the basis of the frequencies; and respective genes are duplicated according to the adaptability, and the genes after the duplication are crossed. Some of register file numbers of the genes after the crossing are mutated and this series of processes is repeated for specific generations.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ソースプログラム中の
各命令をコンパイルしてそのオブジェクト命令を出力す
ると共に、内部レジスタに格納されるデータをスケジュ
ーリング手順に基づいて入替えるオブジェクト命令を出
力するコンパイラを備えたプログラマブルコントローラ
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is a compiler that compiles each instruction in a source program and outputs its object instruction, and also outputs an object instruction for replacing data stored in an internal register based on a scheduling procedure. The present invention relates to a programmable controller having.

【0002】[0002]

【従来の技術】ロードストア方式のCPUを利用したプ
ログラマブルコントローラ(以下、PLCという)にお
いては、通常、外部メモリへのアクセス命令実行時間が
内部レジスタへのアクセス命令実行時間よりも非常に長
いため、外部メモリへのアクセス回数が多いプログラム
の場合、この部分の実行時間がプログラム全体へ与える
影響が非常に大きくなる。
2. Description of the Related Art In a programmable controller (hereinafter, referred to as PLC) using a load / store system CPU, the access instruction execution time to an external memory is usually much longer than the access instruction execution time to an internal register. In the case of a program that accesses the external memory a large number of times, the execution time of this part greatly affects the entire program.

【0003】従って、外部メモリへのアクセス回数を減
らしてプログラム実行時間の短縮化を図るためにCPU
内部のレジスタ(以下、レジスタという)のレジスタフ
ァイルを有効利用することが不可欠で、レジスタファイ
ルへ1度あるデータを読み込んでおけば、その後そのデ
ータへのアクセスはすべてレジスタファイルに対して行
うことが提案されている。
Therefore, in order to shorten the program execution time by reducing the number of accesses to the external memory, the CPU
It is essential to make effective use of the register file of internal registers (hereinafter referred to as registers). Once data has been read into the register file, all subsequent access to that data can be made to the register file. Proposed.

【0004】[0004]

【発明が解決しようとする課題】しかし、レジスタファ
イルは有限でそれほど容量がないため、ユーザプログラ
ムに合わせてレジスタファイルのスケジューリング、す
なわちファイルの内容を入替える必要があるが、どのよ
うなスケジューリング手順でレジスタファイルを入替え
れば外部メモリへのアクセス回数を最も減少できるのか
明らかにされてない。
However, since the register file is finite and not so large in capacity, it is necessary to schedule the register file according to the user program, that is, to replace the contents of the file. It has not been clarified whether the number of accesses to the external memory can be reduced most by replacing the register file.

【0005】また、最近、情報処理の分野では、問題解
決の一つの手法として遺伝的アルゴリズム(GA;Gen
etic Algorithm)の導入が提案されている。
Recently, in the field of information processing, a genetic algorithm (GA; Gen) has been used as one of the methods for problem solving.
The introduction of etic Algorithm) has been proposed.

【0006】そこで、本発明は、このような問題に着目
してなされたもので、レジスタファイルのスケジューリ
ングに遺伝的アルゴリズムを取り入れることによって外
部メモリへのアクセス回数を減少させて、プログラム実
行時間を短縮化することができるPLCを提供すること
を目的とする。
Therefore, the present invention has been made in view of such a problem. By incorporating a genetic algorithm in the scheduling of the register file, the number of accesses to the external memory is reduced and the program execution time is shortened. It is an object of the present invention to provide a programmable PLC.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、本発明では、ソースプログラム中の各命令をコンパ
イルしてそのオブジェクト命令を出力すると共に、内部
レジスタに格納されるデータをスケジューリング手順に
基づいて入替えるオブジェクト命令を出力するコンパイ
ラを備えたプログラマブルコントローラであって、上記
コンパイラは、スケジューリング手順を示す内部レジス
タのレジスタファイル番号列を遺伝子として複数記憶す
る遺伝子プール記憶手段と、ソースプログラム中の各命
令を順次読み込んで、その命令のオブジェクト命令を出
力すると共に、その命令実行の際に必要とされるデータ
が内部レジスタのレジスタファイルに格納されているか
否かを判断して、格納されていない場合には上記遺伝子
プール記憶手段に記憶された各遺伝子に基づいてレジス
タファイルを指定し、当該レジスタファイルへ上記デー
タが格納されるよう外部メモリへアクセスするオブジェ
クト命令を出力するコンパイル手段と、上記コンパイル
手段から出力される外部メモリにアクセスするオブジェ
クト命令の数を遺伝子毎に算出して、その命令数に基づ
き各遺伝子の適合度を求める適合度演算手段と、上記適
合度演算手段によって求められた適合度に応じて各遺伝
子を複製する遺伝子複製手段と、上記遺伝子複製手段に
よって複製された各遺伝子を交叉させ新たな遺伝子を作
成する遺伝子交叉手段と、上記遺伝子交叉手段によって
作成された新たな遺伝子を構成するレジスタファイル番
号の幾つかを任意の確率で任意のレジスタ番号に突然変
異させる遺伝子突然変異手段と、上記コンパイル手段、
上記適合度演算手段、上記遺伝子複製手段、上記遺伝子
交叉手段および上記遺伝子突然変異手段に各々の処理を
繰返し所定回数実行させ、所定回数実行後に各々の処理
を停止させる繰返し制御手段と、を具備することを特徴
とする。
In order to achieve the above object, according to the present invention, each instruction in a source program is compiled and its object instruction is output, and the data stored in an internal register is based on a scheduling procedure. A programmable controller having a compiler for outputting an object instruction to be replaced according to the above, wherein the compiler stores gene pool storage means for storing a plurality of register file number sequences of internal registers indicating a scheduling procedure as genes, and When instructions are sequentially read, the object instruction of the instruction is output, and whether the data required for executing the instruction is stored in the register file of the internal register, and it is not stored Is described in the above gene pool storage means A register file is specified on the basis of each generated gene, and a compiling means for outputting an object instruction to access the external memory so that the data is stored in the register file, and an external memory output from the compiling means are accessed. A fitness calculating means for calculating the number of object instructions for each gene and finding the fitness of each gene based on the number of instructions, and a gene for replicating each gene according to the fitness calculated by the fitness calculating means. The replication means, the gene crossover means for crossing over each gene duplicated by the gene duplication means to create a new gene, and some of the register file numbers constituting the new gene created by the gene crossover means are optional. Gene mutation means for mutating to any register number with the probability of Compile means,
The fitness calculation means, the gene duplication means, the gene crossover means and the gene mutation means are repeatedly executed a predetermined number of times, and a repetition control means for stopping each processing after the predetermined number of times is executed. It is characterized by

【0008】[0008]

【作用】本発明に係るコンパイラでは、スケジューリン
グ手順を示す内部レジスタのレジスタファイル番号列を
遺伝子として複数記憶し、ソースプログラム中の各命令
を順次読み込んで、その命令のオブジェクト命令を出力
すると共に、その命令実行の際に必要とされるデータが
内部レジスタのレジスタファイルに格納されているか否
かを判断して、格納されていない場合には上記遺伝子プ
ール記憶手段に記憶された各遺伝子に基づいてレジスタ
ファイルを指定し、当該レジスタファイルへ上記データ
が格納されるよう外部メモリへアクセスするオブジェク
ト命令を出力する。
In the compiler according to the present invention, a plurality of register file number sequences of internal registers indicating the scheduling procedure are stored as genes, each instruction in the source program is sequentially read, and the object instruction of the instruction is output and It is judged whether or not the data required for executing the instruction is stored in the register file of the internal register, and if it is not stored, the register is performed based on each gene stored in the gene pool storage means. A file is specified, and an object instruction for accessing the external memory so that the above data is stored in the register file is output.

【0009】そして、外部メモリにアクセスするオブジ
ェクト命令の命令数を遺伝子毎に算出して、その命令数
に基づき各遺伝子の適合度を求めて、適合度に応じて各
遺伝子を複製し、続いて複製された各遺伝子を交叉させ
新たな遺伝子を作成すると共に、新たな遺伝子を構成す
るレジスタファイル番号の幾つかを任意の確率で任意の
レジスタ番号に突然変異させる。このような処理を繰返
し所定回数実行させ、所定回数実行後に各処理を停止す
る。
Then, the number of object instructions for accessing the external memory is calculated for each gene, the fitness of each gene is obtained based on the number of instructions, and each gene is duplicated according to the fitness. Each duplicated gene is crossed over to create a new gene, and at the same time, some of the register file numbers constituting the new gene are mutated to arbitrary register numbers. Such processing is repeatedly executed a predetermined number of times, and each processing is stopped after the predetermined number of times of execution.

【0010】[0010]

【実施例】以下、本発明に係るPLCの実施例について
説明する。
Embodiments of the PLC according to the present invention will be described below.

【0011】図1は、本発明に係るPLCの実施例の構
成を示している。
FIG. 1 shows the configuration of an embodiment of a PLC according to the present invention.

【0012】このPLCは、CPU1と、入出力データ
を格納した外部メモリ(IOM)2と、ラダー表記等で
ユーザが作成したソースプログラムおよびそのオブジェ
クトプログラムが格納されるユーザプログラムプログラ
ムメモリ3とを有する。
This PLC has a CPU 1, an external memory (IOM) 2 for storing input / output data, and a user program program memory 3 for storing a source program created by the user in ladder notation and its object program. .

【0013】CPU1は、内部レジスタ11と、ユーザ
が作成したソースプログラムのコンパイルを行ってその
オブジェクト命令を出力すると共に、遺伝的アルゴリズ
ム(GA)によって後述するレジスタファイルのスケジ
ューリングを行うコンパイラ12と、オブジェクト命令
を外部メモリ2または内部レジスタ11にアクセスしな
がら実行する命令実行部13とを有している。
The CPU 1 compiles an internal register 11, a source program created by a user, outputs the object instruction thereof, and a compiler 12 for scheduling a register file described later by a genetic algorithm (GA), and an object. It has an instruction execution unit 13 that executes an instruction while accessing the external memory 2 or the internal register 11.

【0014】内部レジスタ11は、例えばワード単位等
のデータ格納エリアであるレジスタファイルを複数有し
ており、外部メモリ2に記憶されたデータの内の一部を
そのレジスタファイルに格納するように構成されてい
る。
The internal register 11 has a plurality of register files which are data storage areas in word units, for example, and is configured to store a part of the data stored in the external memory 2 in the register file. Has been done.

【0015】コンパイラ12は、その機能がブロックで
示されており、コンパイル部21と、遺伝子プール記憶
部22と、適合度演算部23と、遺伝子複製部24と、
遺伝子交叉部25と、遺伝子突然変異部26と、繰返し
制御部27とから構成されている。
The function of the compiler 12 is shown by blocks, and the compiling unit 21, the gene pool storage unit 22, the fitness calculation unit 23, the gene duplication unit 24,
It comprises a gene crossover section 25, a gene mutation section 26, and a repetitive control section 27.

【0016】コンパイル部21は、ソースプログラム中
の各命令を順次読み込んで、その命令のオブジェクト命
令を出力すると共に、詳細は後述するがその命令実行の
際に必要とされるデータが内部レジスタのレジスタファ
イルに格納されているか否かを判断して、格納されてい
ない場合には後述する遺伝子プール記憶部22に記憶さ
れた各遺伝子に基づいてレジスタファイルを指定し、当
該レジスタファイルへ上記データが格納されるよう外部
メモリ2へアクセスするオブジェクト命令を出力するよ
うに構成されている。
The compiling unit 21 sequentially reads each instruction in the source program and outputs the object instruction of the instruction, and the data necessary for executing the instruction is an internal register as described later in detail. It is determined whether or not it is stored in the file, and if it is not stored, the register file is specified based on each gene stored in the gene pool storage unit 22 described later, and the above data is stored in the register file. The object instruction for accessing the external memory 2 is output.

【0017】また、遺伝子プール記憶部22は、スケジ
ューリング手順を示す内部レジスタ11のレジスタファ
イル番号列を遺伝子として複数記憶しており、適合度演
算部23は、コンパイル部21から出力される外部メモ
リ2にアクセスするオブジェクト命令の数を遺伝子毎に
算出して、その命令数に基づき各遺伝子の適合度を求め
るように、遺伝子複製部24は、適合度演算部24によ
って求められた適合度に応じて各遺伝子を複製するよう
に構成されている。
Further, the gene pool storage unit 22 stores a plurality of register file number sequences of the internal register 11 indicating the scheduling procedure as genes, and the fitness calculating unit 23 outputs the external memory 2 output from the compiling unit 21. The gene duplication unit 24 calculates the number of object instructions for accessing each gene for each gene and determines the fitness of each gene based on the number of instructions according to the fitness calculated by the fitness calculator 24. It is configured to replicate each gene.

【0018】さらに、遺伝子交叉部25は、遺伝子複製
部24によって複製された各遺伝子を交叉して新たな遺
伝子を作成するように、遺伝子突然変異部26は、遺伝
子交叉部25によって作成された新たな遺伝子を構成す
るレジスタファイル番号の幾つかを任意の確率で任意の
レジスタ番号に突然変異させるように、繰返し制御部2
7は、上記処理部21〜26に各々の処理を繰返し所定
回数実行させ、所定回数実行後に各々の処理を停止させ
るように構成されている。
Furthermore, the gene crossover section 25 crosses over each gene duplicated by the gene duplication section 24 to create a new gene, and the gene mutation section 26 is constructed by the new gene crossover section 25. Iterative control unit 2 so as to mutate some of the register file numbers that make up various genes to arbitrary register numbers with arbitrary probability.
The processing unit 7 is configured to cause the processing units 21 to 26 to repeatedly execute each processing a predetermined number of times, and to stop each processing after the predetermined number of times of execution.

【0019】なお、本実施例では、コンパイラ12は便
宜上CPU1内部に設けて説明するが、本発明では、C
PU1内部でなく、CPU1外部のツール(図示せず)
等にそのコンパイラ12の機能を持たせ、ツールがユー
ザの作成したソースプログラムをコンパイルすると共に
そのオブジェクトプログラムを直接ユーザプログラムメ
モリ3に転送し、ユーザプログラムメモリ3がオブジェ
クトプログラムのみを格納するような構成にしても良
い。
In this embodiment, the compiler 12 is provided inside the CPU 1 for the sake of convenience, but in the present invention, C is used.
Tools outside CPU1 rather than inside PU1 (not shown)
Etc. having the function of the compiler 12, the tool compiles the source program created by the user, transfers the object program directly to the user program memory 3, and the user program memory 3 stores only the object program. You can

【0020】図2は、本実施例で実行される遺伝的アル
ゴリズムによるレジスタファイルのスケジューリング処
理で採用される遺伝子の構造を示している。
FIG. 2 shows the structure of genes used in the register file scheduling process by the genetic algorithm executed in this embodiment.

【0021】遺伝子は、図に示すように、“2,5,
3,6,1,・・・”という内部レジスタ11のデータ
格納単位を示すレジスタファイルの入替順位に基づいて
配列されたレジスタファイル番号列から構成されてお
り、この場合には、“2”の番号のレジスタファイルか
ら最初に入替えられることを示している。
As shown in the figure, the genes are "2, 5,
3, 6, 1, ... "The register file number sequence is arranged based on the order of replacement of the register files indicating the data storage unit of the internal register 11, and in this case, it is" 2 ". Indicates that the number register file is replaced first.

【0022】次に、コンパイラ12における遺伝的アル
ゴリズムによるレジスタファイルのスケジューリング処
理を説明する。
Next, the register file scheduling process by the compiler 12 by the genetic algorithm will be described.

【0023】まずは、このスケジューリング処理中で適
合度を計算するために必要なデータについて説明する。
First, the data required for calculating the goodness of fit during the scheduling process will be described.

【0024】図3に、適合度計算のために必要なデータ
を示す。
FIG. 3 shows data required for calculating the goodness of fit.

【0025】このデータには、スケジュール管理用テー
ブルTに格納されるレジスタファイルの制御データと、
プログラム実行時の外部メモリ2へのアクセストータル
回数を示すメモリアクセストータル回数(MEMACC)とが
ある。
This data includes control data of a register file stored in the schedule management table T,
There is a total number of memory accesses (MEMACC) indicating the total number of accesses to the external memory 2 during program execution.

【0026】レジスタファイルの制御データには、内部
レジスタ11の格納領域である各レジスタファイルのレ
ジスタファイル番号R0,R1,…と対応して3つの制
御データ、すなわち当該レジスタファイルに格納される
データのチャネルアドレス(table[ ].address)と、当
該レジスタファイルが使用されているか否かを示す使用
/非使用フラグ( table[ ].on use )と、当該レジス
タファイルの内容が外部メモリ2の内容と変化している
か否かを示す変更済みフラグ(table[ ].modified )と
がある。なお、使用/非使用フラグ( table[ ].on us
e )は、使用されているとき“1”がセットされ、非使
用のときは“0”がセットされる。また、変更済みフラ
グ(table[ ].modified )は、レジスタファイルの内容
が外部メモリ2の内容と変更されていなければ“0”が
セットされ、外部メモリ2の内容から変更された場合に
は“1”がセットされることになる。
The control data of the register file includes three control data corresponding to the register file numbers R0, R1, ... Of each register file which is the storage area of the internal register 11, that is, the data stored in the register file. Channel address (table [] .address) and used / unused flag (table [] .on) indicating whether the register file is used or not use) and a modified flag (table [] .modified) indicating whether or not the contents of the register file are different from the contents of the external memory 2. Note that the usage / non-use flag (table [] .on us
For e), "1" is set when it is used, and "0" is set when it is not used. The modified flag (table [] .modified) is set to "0" if the contents of the register file have not been changed from the contents of the external memory 2, and "0" if the contents of the external memory 2 have been changed. 1 "will be set.

【0027】次に、遺伝的アルゴリズムによるレジスタ
ファイルのスケジューリング処理を説明する。
Next, a register file scheduling process using a genetic algorithm will be described.

【0028】図4は、このレジスタファイルのスケジュ
ーリング処理の全体を示している。この処理では、遺伝
子を構成する各レジスタファイル番号の順位を“j”で
示し、遺伝子[j]という場合には、j番目のレジスタ
ファイル番号を示すものとする。また、ラダーソースプ
ログラムを構成する各命令の順位を“i”で示し、命令
[i]という場合には、i番目の命令を示すものとす
る。
FIG. 4 shows the entire scheduling process of this register file. In this processing, the order of each register file number that constitutes a gene is indicated by "j", and the gene [j] indicates the j-th register file number. Further, the order of each instruction constituting the ladder source program is indicated by "i", and the instruction [i] indicates the i-th instruction.

【0029】まず、適合度を計算する場合には、図3で
説明したレジスタファイルにおける制御用データの初期
化処理を後述する図5に示すように行い(ステップ20
0)、続いてラダーソースプログラム中の命令の順位を
示すiに“0”をセットすると共に(ステップ21
0)、遺伝子中のレジスタファイル番号の順位を示すj
に“0”をセットする(ステップ220)。
First, in the case of calculating the degree of conformity, the initialization processing of the control data in the register file described with reference to FIG. 3 is performed as shown in FIG. 5 described later (step 20).
0), and then set "0" to i indicating the order of the instruction in the ladder source program (step 21).
0), j indicating the rank of the register file number in the gene
Is set to "0" (step 220).

【0030】そして、コンパイル部21がユーザプログ
ラムメモリ3から順次ラダーソースプログラムの命令
[i]の読み込みを行い(ステップ230)、その際デ
ータ入替え部23が当該命令[i]についてレジスタフ
ァイルの入替えの必要があるか否か、すなわち当該命令
[i]実行の際に必要なチャネルデータが内部レジスタ
11のレジスタファイルに格納されているか否かを後述
する図6に示すように判断する(ステップ240)。
Then, the compiling unit 21 sequentially reads the instructions [i] of the ladder source program from the user program memory 3 (step 230), and at this time, the data exchanging unit 23 exchanges the register file for the instruction [i]. Whether or not it is necessary, that is, whether or not the channel data necessary for executing the instruction [i] is stored in the register file of the internal register 11 is determined as shown in FIG. 6 described later (step 240). .

【0031】ここで、レジスタファイルの入替え必要有
りと判断された場合には(ステップ240“Yes”)、
遺伝子[j]のレジスタファイル番号のレジスタファイ
ルを入替え対象として入替えを後述する図7に示すよう
に行うと共に(ステップ250)、jの値を1インクリ
メントして(ステップ260)、続いて次の命令を指定
するためiの値を1インクリメントする(ステップ27
0)。その一方、レジスタファイルの入替え必要なしと
判断された場合には(ステップ240“No”)、レジ
スタファイルの入替えも、jの値のインクリメントも行
わずに、iの値を1インクリメントする(ステップ27
0)。
If it is determined that the register files need to be replaced (step 240 "Yes"),
The register file of the register file number of gene [j] is replaced as the replacement target as shown in FIG. 7 described later (step 250), the value of j is incremented by 1 (step 260), and then the next instruction is issued. The value of i is incremented by 1 to specify (step 27
0). On the other hand, if it is determined that the register file does not need to be replaced (step 240 “No”), the value of i is incremented by 1 without replacing the register file or incrementing the value of j (step 27).
0).

【0032】そして、レジスタファイルに記憶されたデ
ータを読み出して当該命令の評価、すなわち後述する図
8に示すように当該命令がOUT系の命令か否かの判断
処理およびオブジェクト出力を行い(ステップ28
0)、続いて当該命令がラダーソースプログラムの終り
に達したか否かを判断して(ステップ290)、ラダー
ソースプログラムの終りに達してない場合には(ステッ
プ290“No”)、次の新たな命令[i]の読み込み
を行って(ステップ230)、上記と同様のステップ2
40〜290の処理を行う。
Then, the data stored in the register file is read out to evaluate the instruction, that is, to judge whether the instruction is an OUT instruction or not and to output the object as shown in FIG. 8 (step 28).
0), then it is judged whether or not the instruction has reached the end of the ladder source program (step 290), and if the end of the ladder source program has not been reached (step 290 “No”), the next A new instruction [i] is read (step 230) and the same step 2 as above is performed.
Processes 40 to 290 are performed.

【0033】一方、ラダーソースプログラムの終りに達
した場合には(ステップ290“Yes”)、この遺伝子
が他の遺伝子と比べどれだけ優れているかを示す適合度
の計算を後述する図9に示すようにメモリアクセストー
タル回数(MEMACC)を基にして行い(ステップ30
0)、次いでこのようなステップ200〜300までの
処理を全ての遺伝子について行ったか否かを判断する
(ステップ310)。
On the other hand, when the end of the ladder source program is reached (step 290 "Yes"), the calculation of the goodness-of-fit showing how superior this gene is to other genes is shown in FIG. 9 described later. Based on the total number of memory accesses (MEMACC) (step 30
0), and then it is determined whether or not the processes of steps 200 to 300 have been performed for all genes (step 310).

【0034】ここで、全ての遺伝子について行っていな
い場合には(ステップ310“No”)、このようなス
テップ200〜300までの処理を他の遺伝子について
繰返すようにする。
If all the genes have not been performed (step 310 "No"), the processes of steps 200 to 300 are repeated for other genes.

【0035】これに対し、全ての遺伝子についてステッ
プ200〜300までの処理を行っている場合には(ス
テップ310“Yes”)、後述する図10に示すように
遺伝子複製部24が各遺伝子をその適合度に応じて複製
し(ステップ320)、続いて後述する図11に示すよ
うに遺伝子交叉部25が複製後の遺伝子間で交叉を行い
(ステップ330)、さらに後述する図12に示すよう
に遺伝子突然変異26が交叉後の新たな遺伝子を構成す
るレジスタファイル番号の幾つかを任意の確率で任意の
レジスタ番号に突然変異させる(ステップ340)。こ
れで遺伝的アルゴリズムの1世代が終了する。
On the other hand, when all the genes are processed in steps 200 to 300 (step 310 "Yes"), the gene duplication unit 24 copies each gene to the corresponding gene as shown in FIG. Replication is performed according to the fitness (step 320), and then the gene crossover unit 25 performs crossover between the replicated genes as shown in FIG. 11 described later (step 330), and further as shown in FIG. 12 described later. The gene mutation 26 mutates some of register file numbers constituting a new gene after crossover to arbitrary register numbers with an arbitrary probability (step 340). This completes one generation of the genetic algorithm.

【0036】そして、遺伝的アルゴリズムの場合には、
通常このようなステップ200〜340までの処理を所
定世代繰り返して解となる遺伝子を進化すなわち改良す
る必要があるため、繰返し制御部28が1世代終了する
度に予め定めた所定の世代数繰り返したか否かを判断し
て(ステップ350)、その所定世代数まで達してない
場合には(ステップ350“No”)、ステップ200
〜340までの各遺伝子についての適合度計算から突然
変異までの処理を繰り返すようにする一方、所定世代繰
り返したと判断した場合には(ステップ350“Ye
s”)、レジスタファイルのスケジューリング処理を終
了する。
In the case of the genetic algorithm,
Usually, it is necessary to evolve or improve the gene to be the solution by repeating the processes of steps 200 to 340 for a predetermined number of times. Therefore, each time the iterative control unit 28 completes one generation, a predetermined number of generations is repeated. Whether or not it is determined (step 350), and when the predetermined number of generations has not been reached (step 350 “No”), step 200
The process from the fitness calculation to the mutation for each gene up to 340 is repeated, but when it is determined that the predetermined generation has been repeated (step 350 “Ye
s ”), the register file scheduling process ends.

【0037】なお、実際には適合度の計算とコンパイル
とは同時に行うことも可能なので、上記コンパイル部2
1中に適合度演算部23を入れて考えても良く、上記ス
テップ200〜310までの処理をコンパイル部21お
よび適合度演算部23が行うものと考える。
In practice, it is possible to perform the calculation of the goodness of fit and the compilation at the same time.
It may be considered that the compatibility calculation unit 23 is included in 1 and the processes of steps 200 to 310 are performed by the compilation unit 21 and the compatibility calculation unit 23.

【0038】図5は、図4のステップ200に示すレジ
スタファイルにおける制御用データの初期化処理を詳細
に示している。
FIG. 5 shows in detail the initialization processing of the control data in the register file shown in step 200 of FIG.

【0039】この処理では、まずkに初期値“0”をセ
ットして(ステップ300)、チャネルアドレス(tabl
e[k].address)を初期化し(ステップ310)、次いで
使用/非使用フラグ( table[k].on use )を初期化し
(ステップ320)、さらに変更済みフラグ(table
[k].modified )を初期化して(ステップ330)、k
を1インクリメントする(ステップ340)。そして、
このような処理をレジスタファイル数分繰り返したか否
かを判断して(ステップ350)、レジスタファイル数
分繰り返してない場合には(ステップ350“N
o”)、次のkに対応した各制御用データについて初期
化を行い(ステップ310〜330)、レジスタファイ
ル数分繰り返した場合には(ステップ350“Ye
s”)、この初期処理を終了する。
In this process, first an initial value "0" is set in k (step 300), and the channel address (tabl
e [k] .address) is initialized (step 310) and then used / not used flag (table [k] .on use) is initialized (step 320), and the changed flag (table
[k] .modified) is initialized (step 330), k
Is incremented by 1 (step 340). And
It is judged whether or not such processing is repeated for the number of register files (step 350), and if it is not repeated for the number of register files (step 350 "N").
o ”), initialization is performed for each control data corresponding to the next k (steps 310 to 330), and when it is repeated for the number of register files (step 350“ Ye
s ”), the initial processing is terminated.

【0040】図6は、図4のステップ240に示すレジ
スタファイル入替え判断処理を詳細に示している。
FIG. 6 shows in detail the register file replacement judgment processing shown in step 240 of FIG.

【0041】この処理では、まずkに初期値“0”をセ
ットして(ステップ400)、使用/非使用フラグ( t
able[k].on use )を参照することによりレジスタファ
イル番号kが使用されているか否かを判断し(ステップ
410)、続いてそのチャネルアドレス(table[k].add
ress)を参照することにより当該アドレスがラダーソー
スプログラムから読み込んだ命令[i]の実行に必要と
されるデータのチャネルアドレスと一致するか否かの判
断を行う(ステップ420)。
In this processing, first, an initial value "0" is set in k (step 400), and the use / non-use flag (t
able [k] .on It is determined whether the register file number k is used by referring to (use) (step 410), and then the channel address (table [k] .add).
By referring to (ress), it is judged whether or not the address matches the channel address of the data required to execute the instruction [i] read from the ladder source program (step 420).

【0042】そして、レジスタファイル[k]が使用さ
れ(ステップ410“Yes”)、かつ、そのチャネルア
ドレス(table[k].address)が当該命令[i]実行に必
要なデータのチャネルアドレス(Address )と一致する
と判断された場合には(ステップ420“Yes”)、レ
ジスタファイルの入替え必要なしを示す“0”を返す。
Then, the register file [k] is used (step 410 "Yes"), and the channel address (table [k] .address) of the register file [k] is the channel address (Address of the data necessary for executing the instruction [i]. If it is determined that the register file does not need to be replaced, "0" is returned.

【0043】一方、レジスタファイル[k]が使用され
てない場合(ステップ410“No”)、およびそのレ
ジスタファイル[k]が使用されていてもそのチャネル
アドレス(table[k].address)が当該命令[i]実行に
必要なデータのチャネルアドレス(Address )と一致し
ないと判断された場合には(ステップ410“Yes”,
ステップ420“No”)、kの値を1インクリメント
して(ステップ440)、以上の処理をレジスタファイ
ル数分繰り返したか否かを判断して(ステップ45
0)、レジスタファイル数分繰り返してない場合には
(ステップ450“No”)、その新たなkで上記ステ
ップ410、420の判断処理を行うようにする一方、
kの値がレジスタファイル数分繰り返した場合には(ス
テップ450“Yes”)、当該命令[i]実行に必要な
データがレジスタファイルに格納されてないことを示し
ているため、レジスタファイルの入替え必要有りを示す
“1”を返す。
On the other hand, when the register file [k] is not used (step 410 "No"), and even when the register file [k] is used, the channel address (table [k] .address) is the same. When it is determined that the data does not match the channel address (Address) of the data required to execute the instruction [i] (step 410 “Yes”,
Step 420 "No"), the value of k is incremented by 1 (step 440), and it is determined whether the above processing has been repeated for the number of register files (step 45).
0) If it is not repeated for the number of register files (step 450 “No”), the determination process of steps 410 and 420 is performed with the new k, while
If the value of k is repeated for the number of register files (step 450 “Yes”), it indicates that the data necessary for executing the instruction [i] is not stored in the register file, and therefore the register file is replaced. Returns "1" indicating that it is necessary.

【0044】図7は、図4のステップ250に示すレジ
スタファイルの入替え処理を詳細に示している。
FIG. 7 shows in detail the register file replacement processing shown in step 250 of FIG.

【0045】この処理では、まずkを遺伝子[j]のレ
ジスタファイル番号、すなわち遺伝子の先頭からj番目
に記述されているレジスタファイル番号にセットし(ス
テップ500)、続いてそのレジスタファイル番号の使
用/非使用フラグ( table[k].on use )を参照してレ
ジスタファイル[k]が使用されているか否かの判断を
行うと共に(ステップ510)、その変更済みフラグ
(table[k].modified )を参照してそのレジスタファイ
ル[k]のレジスタファイルの内容が外部メモリ2の内
容と変更しているか否かの判断を行う(ステップ52
0)。
In this process, k is first set to the register file number of gene [j], that is, the jth register file number from the beginning of the gene (step 500), and then that register file number is used. / Non-use flag (table [k] .on (use) is used to determine whether the register file [k] is being used (step 510) and the modified flag (table [k] .modified) is referenced to that register file [k]. It is judged whether or not the contents of the register file of the above are changed from the contents of the external memory 2 (step 52).
0).

【0046】ここで、レジスタファイル[k]が使用さ
れていて(ステップ510“Yes”)、かつ、その内容
が外部メモリ2の内容から変更されていると判断された
場合には(ステップ520“Yes”)、必要であれば当
該レジスタファイル[k]の内容を外部メモリ(IO
M)2に書き込むストア系のオブジェクト命令を出力し
(ステップ530)、メモリアクセストータル回数(ME
MACC)の値を1インクリメントする(ステップ54
0)。
If it is determined that the register file [k] is being used (step 510 "Yes") and its contents are changed from the contents of the external memory 2 (step 520 " Yes ”), and if necessary, the contents of the register file [k] are stored in the external memory (IO
M) The store type object instruction to be written to 2 is output (step 530) and the total number of memory accesses (ME
The value of MACC) is incremented by 1 (step 54)
0).

【0047】一方、レジスタファイル[k]が使用され
ていない場合(ステップ510“No”)、およびレジ
スタファイル[k]が使用されているが、その内容が外
部メモリ2の内容から変更していないと判断された場合
には(ステップ510“Yes”,ステップ520“N
o”)、当該レジスタファイル内のデータを外部メモリ
2へ書き込まないようにする。
On the other hand, when the register file [k] is not used (step 510 "No"), and the register file [k] is used, the contents are not changed from the contents of the external memory 2. If it is determined that the result is (step 510 “Yes”, step 520 “N”).
o "), the data in the register file is not written to the external memory 2.

【0048】次いで、両場合とも、必要であれば当外部
メモリ(IOM)2に格納された当該データをレジスタ
ファイル[k]に読み込むロード系のオブジェクト命令
を出力し(ステップ550)、続いてメモリアクセスト
ータル回数(MEMACC)の値を1インクリメントして(ス
テップ560)、当該レジスタファイル[k]の使用/
非使用フラグ( table[k].on use )に使用を示す
“1”をセットすると共に(ステップ570)、さらに
その変更済みフラグ(table[k].modified )に外部メモ
リ2の内容からの変更なしを示す“0”をセットして
(ステップ580)、そのチャネルアドレス(table
[k].address)に当該命令のアドレス(Address)を設定
する(ステップ590)。
Then, in both cases, if necessary, a load-type object instruction for reading the data stored in the external memory (IOM) 2 into the register file [k] is output (step 550), and then the memory is continued. The value of the total access count (MEMACC) is incremented by 1 (step 560), and the register file [k] is used /
Unused flag (table [k] .on The use flag is set to "1" indicating use (step 570), and the changed flag (table [k] .modified) is set to "0" indicating no change from the contents of the external memory 2. (Step 580), the channel address (table
The address (Address) of the instruction is set in [k] .address) (step 590).

【0049】図8は、図4のステップ280に示す命令
の評価処理を示している。
FIG. 8 shows the evaluation processing of the instruction shown in step 280 of FIG.

【0050】この処理では、読み込んだ当該命令[i]
がOUT系の命令であるか否かを判断して(ステップ6
00)、OUT系の命令の場合のみ(ステップ600
“Yes”)、レジスタファイル[k]の変更済みフラグ
(table[k].modified )に当該レジスタファイルの内容
が外部メモリ2の内容から変更されていることを示す
“1”をセットし(ステップ610)、続いてコンパイ
ル部21が命令に応じたオブジェクトの出力を行い(ス
テップ620)、この評価処理を終了する。
In this processing, the read instruction [i]
Is an OUT type instruction (step 6
00), only for OUT type instructions (step 600
"Yes"), and the modified flag (table [k] .modified) of the register file [k] is set to "1" indicating that the content of the register file has been modified from the content of the external memory 2 (step 610), and then the compiling unit 21 outputs an object according to the instruction (step 620), and this evaluation process ends.

【0051】図9は、図4のステップ300に示す適合
度計算処理の際に使用される関数の一例を示している。
FIG. 9 shows an example of a function used in the fitness calculation processing shown in step 300 of FIG.

【0052】適合度は、“適合度=f(MEMACC)”、す
なわちメモリアクセストータル回数(MEMACC)の関数f
で算出される。関数fとしては、メモリアクセストータ
ル回数(MEMACC)が小さいほど大きい値を返す、すなわ
ちメモリアクセストータル回数(MEMACC)が小さいほど
適合度が大きくなるような関数を使用し、例えば(a)
に示すような一次関数や、(b)に示すようなシグモイ
ド関数が挙げられる。図10は、図4のステップ320
に示す遺伝子の複製処理を簡単に示している。複製処理
では、遺伝子a,bを適合度に応じ、すなわち適合度の
大きいものほど多く作成するようにする。
The goodness of fit is "fitness = f (MEMACC)", that is, a function f of the total number of memory accesses (MEMACC).
It is calculated by. As the function f, a function that returns a larger value as the total memory access count (MEMACC) becomes smaller, that is, the adaptability increases as the total memory access count (MEMACC) becomes smaller, for example, (a)
Examples thereof include a linear function as shown in and a sigmoid function as shown in (b). FIG. 10 shows step 320 of FIG.
The replication process of the gene shown in is briefly shown. In the duplication process, the genes a and b are created according to the goodness of fit, that is, the larger the goodness of fit is.

【0053】図11は、図4のステップ330に示す遺
伝子の交叉処理を簡単に示している。交叉処理では、2
つの遺伝子a,b間で、遺伝子a,bを構成するレジス
タファイル番号列“987654”,“123456”
を同じ位置(図では、“^”で示している)で各々分断
し、それぞれの前半部(あるいは後半部)を入替えて、
“987456”というレジスタファイル番号列からな
る遺伝子cと、“123654”というレジスタファイ
ル番号列からなる遺伝子dとを作成するようにする。
FIG. 11 briefly shows the gene crossover processing shown in step 330 of FIG. 2 in crossover processing
Register file number sequence "987654", "123456" that constitutes genes a and b between two genes a and b
At the same position (indicated by "^" in the figure), and replace the first half (or second half) of each
A gene c consisting of a register file number sequence "987456" and a gene d consisting of a register file number sequence "123654" are created.

【0054】図12は、図4のステップ340に示す遺
伝子の突然変異処理を簡単に示している。突然変異処理
では、前述の通り遺伝子aについて突然変異を起こさせ
る場合には、遺伝子aのレジスタファイル番号列“12
3456”のうち例えば任意のビットである4ビット目
の“5”を他の任意のレジスタファイル番号である
“9”に変更するようにする。
FIG. 12 briefly shows the gene mutation process shown in step 340 of FIG. In the mutation processing, when the mutation is to be caused to the gene a as described above, the register file number sequence “12” of the gene a is used.
For example, the fourth bit "5" of 3456 "is changed to another arbitrary register file number" 9 ".

【0055】以上詳細に説明したように、本実施例で
は、CPU1内のコンパイラ12は、コンパイル部21
によるソースプログラムのコンパイル時に、遺伝的アル
ゴリズムを使用したレジスタファイルのスケジューリン
グ処理を行って、スケジューリング手順である各遺伝子
に基づいてレジスタファイルの入替えを行うと共にその
適合度を世代毎に算出し、さらに遺伝子をその適合度に
応じて複製、交叉、突然変異と所定世代繰り返して進化
させる。
As described above in detail, in the present embodiment, the compiler 12 in the CPU 1 has the compiling unit 21.
When the source program is compiled by, the register file is scheduled using a genetic algorithm, the register file is replaced based on each gene that is the scheduling procedure, and the fitness is calculated for each generation. Are evolved by repeating replication, crossover, and mutation for a predetermined generation according to their fitness.

【0056】このため、世代を繰返すにしたがって、適
合度の高い、すなわち外部メモリ2へのアクセス回数が
少ない遺伝子ほど残り、その割合が増え、その遺伝子に
基づいてレジスタファイルのスケジューリング処理を行
うことになるので、所定世代を繰返した後、命令実行部
11がコンパイル後のオブジェクトプログラムを実行す
る際には、外部メモリ2へのアクセス回数が減少し、プ
ログラム実行時間を短縮化することが可能になる。
Therefore, as the generations are repeated, genes having a higher degree of conformity, that is, the number of times of accessing the external memory 2 is smaller, remain and the ratio increases, and the scheduling processing of the register file is performed based on the genes. Therefore, when the instruction execution unit 11 executes the compiled object program after repeating the predetermined generation, the number of accesses to the external memory 2 is reduced, and the program execution time can be shortened. .

【0057】なお、遺伝子の初期値としてまったくラン
ダムな値から出発した場合に、ある程度優れた遺伝子の
値を全遺伝子数の半分だけ初期設定した方法より優れた
結果が得られるケースのあることが実験的にわかった。
これより、初期状態としてあまりに解としての遺伝子を
決定してしまうと、遺伝子の多様性に初めから制限が加
えられ、最適解に収束しにくくなる、すなわちそれ以上
優れた遺伝子が発生しにくくなることを示しており、レ
ジスタファイルのスケジューリング手順の算出において
も、遺伝子には多様なものが必要であることを示してい
る。
It should be noted that, when starting from a completely random value as an initial value of a gene, it is possible to obtain an excellent result in some cases as compared with a method in which the value of a gene having a certain degree of goodness is initialized by half of the total number of genes. I understand.
From this, if too many genes are determined as solutions in the initial state, the diversity of genes will be limited from the beginning, and it will be difficult to converge to the optimal solution, that is, it will be difficult to generate better genes. In the calculation of the scheduling procedure of the register file, various genes are required.

【0058】[0058]

【発明の効果】以上説明したように、本発明では、レジ
スタファイルのスケジューリング処理に遺伝的アルゴリ
ズムを取り入れて、スケジューリング手順であるレジス
タファイルの入替順位を示すレジスタファイル番号列を
遺伝子とし、ソースプログラムのコンパイル時に各遺伝
子に基づきレジスタファイルの入替えを行うと共にその
適合度を世代毎に算出して、各遺伝子をその適合度に応
じて複製、交叉、突然変異させる処理を何世代も繰り返
して遺伝子を進化させる。
As described above, according to the present invention, a genetic algorithm is incorporated into the scheduling process of the register file, and the register file number sequence indicating the order of replacement of the register file, which is a scheduling procedure, is used as a gene, and the source program Register files are replaced based on each gene at compile time, the fitness is calculated for each generation, and genes are evolved by repeating the process of duplicating, crossing, and mutating each gene according to the fitness for many generations. Let

【0059】このため、世代を繰返すにしたがって、適
合度の高い、すなわち外部メモリへのアクセス回数が少
ない遺伝子の割合が増え、その遺伝子に基づいてレジス
タファイルのスケジューリング処理が行われるので、所
定世代後、プロセッサがオブジェクトプログラムを実行
する際には、外部メモリへのアクセス回数が減少して、
プログラム実行時間を短縮化できる。
For this reason, as the number of generations is repeated, the proportion of genes having a high degree of compatibility, that is, the number of times of accessing the external memory is small, increases, and the scheduling processing of the register file is performed based on the genes. , When the processor executes the object program, the number of accesses to the external memory decreases,
The program execution time can be shortened.

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

【図1】本発明に係るPLCの実施例の構成を示すブロ
ック図。
FIG. 1 is a block diagram showing a configuration of an embodiment of a PLC according to the present invention.

【図2】本実施例のスケジューリング処理で採用される
遺伝子の構造を示す説明図。
FIG. 2 is an explanatory diagram showing the structure of a gene adopted in the scheduling process of this example.

【図3】適合度計算のために必要なデータを示す説明
図。
FIG. 3 is an explanatory diagram showing data required for calculation of fitness.

【図4】レジスタファイルのスケジューリング処理を示
すフローチャート。
FIG. 4 is a flowchart showing a scheduling process of a register file.

【図5】制御用データの初期化処理を示すフローチャー
ト。
FIG. 5 is a flowchart showing a control data initialization process.

【図6】レジスタファイル入替え判断処理を示すフロー
チャート。
FIG. 6 is a flowchart showing register file replacement determination processing.

【図7】レジスタファイルの入替え処理を示すフローチ
ャート。
FIG. 7 is a flowchart showing a register file replacement process.

【図8】命令の評価処理を示すフローチャート。FIG. 8 is a flowchart showing an instruction evaluation process.

【図9】適合度計算処理の際に使用される関数の一例を
示す説明図。
FIG. 9 is an explanatory diagram showing an example of a function used in a fitness calculation process.

【図10】遺伝子の複製処理を示す説明図。FIG. 10 is an explanatory diagram showing a gene replication process.

【図11】遺伝子の交叉処理を示す説明図。FIG. 11 is an explanatory diagram showing a gene crossover process.

【図12】遺伝子の突然変異処理を示す説明図。FIG. 12 is an explanatory diagram showing a gene mutation process.

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

1 CPU(プロセッサ) 2 外部メモリ 3 ユーザプログラムメモリ 11 内部レジスタ 12 コンパイラ 13 命令実行部 21 コンパイル部 22 遺伝子プール記憶部(遺伝子プール記憶手段) 23 適合度演算部(適合度演算手段) 24 遺伝子複製部(遺伝子複製手段) 25 遺伝子交叉部(遺伝子交叉手段) 26 遺伝子突然変異部(遺伝子突然変異手段) 27 繰返し制御部(繰返し制御手段) 1 CPU (processor) 2 External memory 3 User program memory 11 Internal register 12 Compiler 13 Instruction execution unit 21 Compile unit 22 Gene pool storage unit (Gene pool storage unit) 23 Fitness calculation unit (Fit calculation unit) 24 Gene replication unit (Gene replication unit) 25 Gene crossover unit (Gene crossover unit) 26 Gene mutation unit (Gene mutation unit) 27 Repeat control unit (Repeat control unit)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ソースプログラム中の各命令をコンパイ
ルしてそのオブジェクト命令を出力すると共に、内部レ
ジスタに格納されるデータをスケジューリング手順に基
づいて入替えるオブジェクト命令を出力するコンパイラ
を備えたプログラマブルコントローラであって、 上記コンパイラは、 スケジューリング手順を示す内部レジスタのレジスタフ
ァイル番号列を遺伝子として複数記憶する遺伝子プール
記憶手段と、 ソースプログラム中の各命令を順次読み込んで、その命
令のオブジェクト命令を出力すると共に、その命令実行
の際に必要とされるデータが内部レジスタのレジスタフ
ァイルに格納されているか否かを判断して、格納されて
いない場合には上記遺伝子プール記憶手段に記憶された
各遺伝子に基づいてレジスタファイルを指定し、当該レ
ジスタファイルへ上記データが格納されるよう外部メモ
リへアクセスするオブジェクト命令を出力するコンパイ
ル手段と、 上記コンパイル手段から出力される外部メモリにアクセ
スするオブジェクト命令の数を遺伝子毎に算出して、そ
の命令数に基づき各遺伝子の適合度を求める適合度演算
手段と、 上記適合度演算手段によって求められた適合度に応じて
各遺伝子を複製する遺伝子複製手段と、 上記遺伝子複製手段によって複製された各遺伝子を交叉
させ新たな遺伝子を作成する遺伝子交叉手段と、 上記遺伝子交叉手段によって作成された新たな遺伝子を
構成するレジスタファイル番号の幾つかを任意の確率で
任意のレジスタ番号に突然変異させる遺伝子突然変異手
段と、 上記コンパイル手段、上記適合度演算手段、上記遺伝子
複製手段、上記遺伝子交叉手段および上記遺伝子突然変
異手段に各々の処理を繰返し所定回数実行させ、所定回
数実行後に各々の処理を停止させる繰返し制御手段と、 を具備することを特徴とするプログラマブルコントロー
ラ。
1. A programmable controller including a compiler that compiles each instruction in a source program and outputs an object instruction thereof, and outputs an object instruction that replaces data stored in an internal register based on a scheduling procedure. Therefore, the compiler sequentially reads each instruction in the source program and a gene pool storage unit that stores a plurality of register file number sequences of internal registers indicating the scheduling procedure as genes, and outputs the object instruction of the instruction. , Determines whether or not the data required for executing the instruction is stored in the register file of the internal register, and if not stored, based on the genes stored in the gene pool storage means. Register file , A compile means for outputting an object instruction to access an external memory so that the data is stored in the register file, and a number of object instructions for accessing the external memory output from the compile means are calculated for each gene, The fitness calculating means for obtaining the fitness of each gene based on the number of instructions, the gene duplicating means for duplicating each gene according to the fitness determined by the fitness computing means, and the gene duplication means Gene crossover means for crossing over each gene to create a new gene, and a gene for mutating some of register file numbers constituting the new gene created by the above-mentioned gene crossover means to any register number with an arbitrary probability Mutation means, the compiling means, the fitness calculating means, the gene Ltd. unit, a programmable controller, wherein for a predetermined number of times repeatedly executed each processing comprises a repeating control means for stopping each of the process after a predetermined number of executions that the said gene crossover means and the genetic mutation means.
JP5269197A 1993-10-27 1993-10-27 Programmable controller Withdrawn JPH07121102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5269197A JPH07121102A (en) 1993-10-27 1993-10-27 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5269197A JPH07121102A (en) 1993-10-27 1993-10-27 Programmable controller

Publications (1)

Publication Number Publication Date
JPH07121102A true JPH07121102A (en) 1995-05-12

Family

ID=17469033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5269197A Withdrawn JPH07121102A (en) 1993-10-27 1993-10-27 Programmable controller

Country Status (1)

Country Link
JP (1) JPH07121102A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005032018A (en) * 2003-07-04 2005-02-03 Semiconductor Energy Lab Co Ltd Microprocessor using genetic algorithm
US7107586B2 (en) 2000-08-07 2006-09-12 Matsushita Electric Industrial Co., Ltd. Intermediate object linking method and unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7107586B2 (en) 2000-08-07 2006-09-12 Matsushita Electric Industrial Co., Ltd. Intermediate object linking method and unit
JP2005032018A (en) * 2003-07-04 2005-02-03 Semiconductor Energy Lab Co Ltd Microprocessor using genetic algorithm

Similar Documents

Publication Publication Date Title
Kandemir et al. Compiler-directed scratch pad memory hierarchy design and management
US5689712A (en) Profile-based optimizing postprocessors for data references
Zanakis Heuristic 0-1 linear programming: An experimental comparison of three methods
US5937188A (en) Instruction creation device
Jacquelin et al. On optimal tree traversals for sparse matrix factorization
US5960182A (en) Hardware-software co-simulation system, hardware-software co-simulation method, and computer-readable memory containing a hardware-software co-simulation program
JP4791959B2 (en) Block modeling I / O buffer
Kandemir et al. A linear algebra framework for automatic determination of optimal data layouts
Aumann et al. Highly efficient asynchronous execution of large-grained parallel programs
Savage et al. A unified model for multicore architectures
CN103065067B (en) The filter method of sequence fragment and system in short sequence assembling
Bhattacharjee et al. Crossbar-constrained technology mapping for ReRAM based in-memory computing
Velev et al. Bit-level abstraction in the verification of pipelined microprocessors by correspondence checking
JPH0844550A (en) Program production device/method
JPH07121102A (en) Programmable controller
Su et al. Automatic generation of invariants in processor verification
JP3683281B2 (en) High speed memory access processing apparatus and method
Janikow et al. Genetic algorithms. Simulating nature's methods of evolving the best design solution
Zhu et al. A general logic synthesis framework for memristor-based logic design
Mala et al. A hybrid test optimization framework-coupling genetic algorithm with local search technique
Hart Locally-adaptive and memetic evolutionary pattern search algorithms
Elver et al. VerC3: A library for explicit state synthesis of concurrent systems
Kandemir et al. A framework for interprocedural locality optimization using both loop and data layout transformations
Mokhov et al. Language and hardware acceleration backend for graph processing
Knerr et al. Novel genome coding of genetic algorithms for the system partitioning problem

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010130