JPH04205423A - Program creation device - Google Patents
Program creation deviceInfo
- Publication number
- JPH04205423A JPH04205423A JP2337781A JP33778190A JPH04205423A JP H04205423 A JPH04205423 A JP H04205423A JP 2337781 A JP2337781 A JP 2337781A JP 33778190 A JP33778190 A JP 33778190A JP H04205423 A JPH04205423 A JP H04205423A
- Authority
- JP
- Japan
- Prior art keywords
- program
- processing
- control
- message
- screen
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は実時間ソフトウェアの記述を効率良く行うこと
の可能なプログラム作成装置に関するものである。更に
詳しくは、本発明は複数のタスクを単一あるいは複数の
マイクロプロセッサによって並列処理させるための並列
処理プログラムを同一画面上において効率良(簡単に作
成可能なプログラグ作成装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program creation device that can efficiently write real-time software. More specifically, the present invention relates to a program creation device that can efficiently (and easily) create parallel processing programs on the same screen for processing multiple tasks in parallel by a single or multiple microprocessors.
制御機器制御、通信制御等の目的で搭載されるソフトウ
ェアは、概念的に言えば、ソフトウェアの内側と制御対
象の外界とが必ず存在し、外界に対して何らかの相互関
係を保ちながら動作を行うものである。そして、外界に
何らかの変化が起きたときには、ある限られた時間の中
でそれに対する処理を行う必要がある。このように、規
定された時間内に所定の処理を遂行しなければならない
性格のソフトウェアを実時間ソフトウェアと呼んでいる
。このような実時間ソフトウェアのうち、外界からの入
力としである刺激を受け、これに対して処理を行うとい
う系列で処理を実行していくソフトウェアは、離散的事
象駆動型実時間ソフトウェアと呼ばれており、いわゆる
マイクロプロセッサが組み込まれている制御機器のソフ
トウェアは通常はこの範晴に入るものである。Conceptually speaking, software installed for the purpose of control equipment control, communication control, etc. always exists inside the software and the outside world of the controlled object, and operates while maintaining some kind of mutual relationship with the outside world. It is. When some change occurs in the outside world, it is necessary to deal with it within a certain limited time. Software that must perform predetermined processing within a specified time is called real-time software. Among such real-time software, software that executes processing in a sequence of receiving a stimulus as input from the outside world and processing it is called discrete event-driven real-time software. Software for control equipment incorporating so-called microprocessors usually falls into this category.
近年、ソフトウェア工学の発展により、構造化プログラ
ミング言語、高水準言語等を利用して効率よくソフトウ
ェアを作成する手法が提案されており、これらはソフト
ウェア全般に渡って適用可能な手法である。しかしなが
ら、上記の離散的事象駆動型実時間ソフトウェアはその
他のソフトウェアに比べて特別な性格を有しており、ソ
フトウェア全般に渡って適用可能な作成手法の他にも、
かかるソフトウェアの作成を効率良く簡単に行うための
改良の余地が依然として残っている。In recent years, with the development of software engineering, methods have been proposed for efficiently creating software using structured programming languages, high-level languages, etc., and these methods are applicable to all types of software. However, the above-mentioned discrete event-driven real-time software has special characteristics compared to other software, and in addition to creation methods that can be applied to software in general, there are
There is still room for improvement in making the creation of such software efficient and easy.
すなわち、かかる離散的事象駆動型実時間ソフトウェア
は、製造ライン上に配置された複数の作業用ロボットの
駆動用ソフトウェアに代表されるヨウに、ローカルエリ
アネットワーク上で並列して動作する複数のプロセスを
記述する必要がある。In other words, such discrete event-driven real-time software is typically a software for driving multiple work robots placed on a manufacturing line, and multiple processes running in parallel on a local area network. It is necessary to write.
しかしながら、いままで行われているこのようなソフト
ウェアは、ある一つのプログラミング言語を用いてCR
T上で1ステツプづつ記述することによってプログラム
される。このような作成方法では、並列動作する複数の
プロセスをそれぞれ個別に作成し、しかる後に作成した
プロセスが各マイクロプロセッサ上で並列動作状態で実
行されるように、これらの個別作成したプロセスを合成
する必要がある。However, this kind of software that has been used up until now is based on CR using a certain programming language.
It is programmed by writing one step at a time on T. In this creation method, multiple processes that run in parallel are created individually, and then these individually created processes are synthesized so that the created processes are executed in parallel on each microprocessor. There is a need.
しかし、このようにして並列処理される複数のフロセス
をプログラミングしていたのでは、プログラム作成者は
、制御の全体的な流れと、個別的にマイクロプロセッサ
によって実行される制御の流れとを正確に認識すること
が困難であり、これらの整合性をとることが困難である
。このために、効率良く目標とするプログラムを作成す
ることが困難な場合が多い。However, by programming multiple processes to be processed in parallel in this way, the programmer cannot accurately determine the overall flow of control and the flow of control that is executed individually by the microprocessor. It is difficult to recognize them, and it is difficult to make them consistent. For this reason, it is often difficult to efficiently create a target program.
本発明の課題は、上記の点に鑑みて、このような離散的
事象駆動型実時間ソフトウェアの作成を効率良く簡単に
行うことの可能なプログラム作成装置を実現することに
ある。In view of the above points, an object of the present invention is to realize a program creation device that can efficiently and easily create such discrete event-driven real-time software.
〔課題を解決するための手段]
本発明者は、以上のような背景のもとに、離散的事象駆
動型実時間ソフトウェアの記述に適した言語およびその
ための開発支援環境を実現した。[Means for Solving the Problems] Based on the above background, the present inventor has realized a language suitable for describing discrete event-driven real-time software and a development support environment therefor.
以後、この言語をプラネット(PLANET)と呼ぶも
のとする。このプラネットを用いた本発明のプログラム
作成装置においては、プロセスの並列動作、同期等の諸
用件をペトリネットにもとづく記述形式で表現可能とし
ている。また、プログラミングの全てにわたって図式を
導入可能とし、処理用件の記述性、了解性の向上を図っ
ている。Hereafter, this language will be referred to as PLANET. In the program creation device of the present invention using this planet, various requirements such as parallel operation and synchronization of processes can be expressed in a description format based on Petri net. In addition, it is possible to introduce diagrams throughout the programming process, improving the descriptiveness and understandability of processing requirements.
すなわち、本発明は、ネットワーク上の複数の制御主体
によって並列処理されるプログラムを作成するためのプ
ログラム作成装置において、複数の制御主体を含むネッ
トワークのハードウェア情報を保持したハードウェア情
報保持手段と、プログラム作成領域を一枚の画面として
表示する画面表示手段と、前記表示画面上においてプロ
グラムを作成するプログラム作成手段と、作成されたプ
ログラムを機械語に翻訳する翻訳手段と、翻訳された機
械語からなるプログラムを記憶する記憶手段とから基本
的に構成されている。That is, the present invention provides a program creation device for creating a program to be processed in parallel by a plurality of control entities on a network, which includes: hardware information holding means that holds hardware information of a network including a plurality of control entities; screen display means for displaying a program creation area as one screen; program creation means for creating a program on the display screen; translation means for translating the created program into machine language; It basically consists of a storage means for storing a program.
上記のプログラム作成手段は、プラネットの言語要素で
ある、プログラムの時系列的に処理される各処理の内容
を表示する複数種類の図面パターンを発生可能なプログ
ラム作成用図形パターン発生手段と、上記のハードウェ
ア情報をプログラム作成用の一枚の表示画面上に入力可
能なハードウェア情報入力手段と、図形パターンを順次
に選択してプログラム表示画面上に表示するパターン選
択手段とを備えている。プログラム言語要素である図面
パターンは、処理内容を示す複数種類の図形パターンと
、処理要件の時系列的な流れ方向を示す有向枝と、少な
くとも二股に分岐し、時系列的に後続する処理要件が並
列処理されるべきものあることを示す第1の分岐有向枝
と、少なくとも二股に分岐した分岐枝が纏まって後続の
処理要件が複数の先行する処理要件終了の同期をとって
処理される処理動作であることを示す第2の分岐有向枝
とを含んでいる。The above program creation means includes a graphic pattern generation means for program creation that can generate multiple types of drawing patterns that display the contents of each process that is processed in chronological order of the program, which is a language element of Planet, and the above program creation means. It is equipped with hardware information input means that can input hardware information onto a single display screen for program creation, and pattern selection means that sequentially selects graphic patterns and displays them on the program display screen. Drawing patterns, which are programming language elements, consist of multiple types of graphic patterns that indicate processing contents, directed branches that indicate the chronological flow direction of processing requirements, and processing requirements that branch into at least two branches and that follow chronologically. A first directed branch indicating that there is something that should be processed in parallel, and at least two branched branches are combined, and subsequent processing requirements are processed in synchronization with the completion of multiple preceding processing requirements. and a second branching directed branch indicating that it is a processing operation.
一方、翻訳手段は、ハードウェア情報保持手段から得ら
れる情報に基づき、第1の分岐有向枝に後続する複数の
処理要素列のそれぞれを、複数の制御手段のぞれぞれに
より並列処理されるプログラムとして割り当てる並列処
理プログラム割当手段を有しており、操作者が一枚の画
面上に作成したプログラムが、この手段によって、自動
的に各制御手段毎に分類されて、これらの制御手段に割
当られる。On the other hand, the translation means causes each of the plurality of processing element sequences following the first branching branch to be processed in parallel by each of the plurality of control means, based on the information obtained from the hardware information holding means. It has a parallel processing program allocation means for allocating a program to be used as a parallel processing program, and the program created by the operator on one screen is automatically classified by each control means by this means, and the program is assigned to each control means. Assigned.
本発明のプログラム作成装置においては、プログラム作
成者は、画面表示手段によって表示されているプログラ
ム作成用の一枚の画面に対して、パターン選択手段によ
り、処理要件を示す図形パターンと、有向枝あるいは分
岐有向枝とを交互に選択するという操作を繰り返して、
プログラムを、同一画面上に作成できる。ここに、画面
表示手段により複数の画面を表示可能の場合には、同一
画面上に作成したプログラムの処理要素の下位階層側プ
ログラムは、その処理要素の下位階層として規定された
別の一枚の画面上に作成することができる。In the program creation device of the present invention, the program creator selects a graphic pattern indicating processing requirements and a directed branch on one screen for program creation displayed by the screen display means, using the pattern selection means. Or, by repeating the operation of alternately selecting branching and directed branches,
Programs can be created on the same screen. Here, if multiple screens can be displayed by the screen display means, the program on the lower level of the processing element of the program created on the same screen will be displayed on another sheet defined as the lower level of the processing element. can be created on the screen.
このようにして作成されたプログラムは、翻訳手段によ
って、マイクロプロセサを実際に駆動可能な機械語から
構成されるプログラムに変換される。この翻訳手段にお
ける変換処理においては、プログラム言語である有向枝
および二股状の有向枝で結合されている並行処理される
処理要素群を、ハードウェア情報に基づき、各制御主体
毎のプログラムに分類して、対応する制御手段に割りつ
ける。このように、本発明においては、並列処理される
プログラムを同一画面上において簡単に作成することが
できる。The program created in this manner is converted by a translation means into a program composed of machine language that can actually drive a microprocessor. In the conversion process in this translation means, a group of parallel processing elements connected by a directed branch and a bifurcated directed branch of the programming language are converted into a program for each control entity based on hardware information. Classify and assign to corresponding control means. In this way, in the present invention, programs to be processed in parallel can be easily created on the same screen.
作成されたプログラムはデバッガ手段によってデバッグ
される。このデバッグ手段により、作成時と同一の画面
が再生表示され、この画面上においてデバッグを行うこ
とができる。なお、デバッグされた後のプログラムは、
例えばl?ONなどの記憶媒体内に格納されて、実際の
処理装置上で走行されることになる。The created program is debugged by a debugger means. This debugging means reproduces and displays the same screen as when it was created, and debugging can be performed on this screen. The program after being debugged is
For example l? It will be stored in a storage medium such as ON and run on the actual processing device.
〔実施例] 以下に、本発明の詳細な説明する。〔Example] The present invention will be explained in detail below.
まず、本発明者によって新たに開発された実時間制御ソ
フトウェア記述に適したプログラム言語プラネット(P
LANET)の内容を説明する。First, the programming language Planet (P
The contents of LANET will be explained.
このプラネットでは、制御実体(外界からの入力事象と
内部処理を規定して分割されたタスク)群と制御実体と
の相互関係でソフトウェアを構成している。さらに、制
御実体の内部処理に含まれるプロセスの並列動作、同期
等の諸用件をペトリネットにもとづく記述形式で表現す
る。この際、プログラミングの全てにわたって図式を導
入することで、処理用件の記述性、了解性の向上を図っ
ている。In this planet, software is composed of a group of control entities (tasks divided by specifying input events from the outside world and internal processing) and the mutual relationships between the control entities. Furthermore, various requirements such as parallel operation and synchronization of processes included in the internal processing of the control entity are expressed in a description format based on Petri nets. At this time, by introducing diagrams throughout the programming process, we aim to improve the descriptiveness and understandability of processing requirements.
ブー ゛ ・・ に る1 ゛く ノエ。1. Noe in Boo.
実時間制御システムには、入力群(各種センサ群)/出
力群(アクチュエータ群)並びに通信路が結合されてい
る。多数の入出力をもつ比較的大規模なシステムでは、
機能ごとに入出力群が分割されている。分割された各入
出力群ごとに制御を行うモジュール(タスク)がシステ
ム内に複数存在し、これらのモジュールのやり取りでシ
ステムを記述するという手法が従来から適用されている
。A real-time control system is coupled with input groups (various sensor groups)/output groups (actuator groups) and communication paths. In relatively large systems with many inputs and outputs,
The input/output group is divided by function. A system has conventionally been used in which there are multiple modules (tasks) that control each divided input/output group, and the system is described by the interactions between these modules.
このように外界からの入力事象と内部処理が規定されて
おり、独立性があり、駆動されればシステム中に継続し
て存在する機能モジュールを、プラネットでは制御実体
あるいはサブシステムと称している。さらに制御実体同
士のやり取りをメツセージ送受信で行うものとしている
。In this way, input events from the outside world and internal processing are defined, and functional modules that are independent and continue to exist in the system when activated are called control entities or subsystems in Planet. Furthermore, the control entities communicate with each other by sending and receiving messages.
(制御実体のモデル化)
上記したように分割された制御実体の動作は、第1図に
示すモデルで表現できる。この図において、入力事象集
合Eは、制御実体が関与する各種センサおよび時間情報
の有限集合であり、時間の経過に伴ってeiからセンサ
等の状態遷移項目がストリーム的に入力される。入力メ
ツセージ集合Miは、制御実体にストリーム的に入力す
るメツセージの集合である。内部状態保持集合Sは制御
実体の内部状態を表現するベクトルである。出力要素集
合Oは制御実体が関与する各種アクチュエータを駆動す
る要素の集合、出力メツセージ集合は制御実体からスト
リーム的に出力されるメツセージの集合である。出力メ
ツセージは他の制御実体の入力メツセージになる。この
結合はネットワークを介してもよい。更に、入力事象集
合E、入力メツセージ集合Mi、および内部状態集合S
に基づき、出力要件集合0、出力メツセージ集合MOを
規定するF、Gなる写像が存在し、これらが制御実体の
内部処理を規定する。すなわち、第1図は刻々と変化す
るセンサの状態(E)を監視し、外部から到達したメツ
セージ(M i )を受理し、内部状態(S)を更新し
ながら入力に見合った出力要件(0)、出力メツセージ
(Mo)を生成する制御実体の動作を表現している。(Modeling of control entity) The operation of the control entity divided as described above can be expressed by the model shown in FIG. In this figure, the input event set E is a finite set of various sensors and time information related to the control entity, and state transition items such as sensors are input from ei in a stream manner as time passes. The input message set Mi is a set of messages that are input to the control entity in a stream manner. The internal state holding set S is a vector representing the internal state of the control entity. The output element set O is a set of elements that drive various actuators related to the control entity, and the output message set is a set of messages output from the control entity in a stream manner. Output messages become input messages for other control entities. This connection may be via a network. Furthermore, an input event set E, an input message set Mi, and an internal state set S
Based on , there are mappings F and G that define the output requirement set 0 and the output message set MO, and these define the internal processing of the control entity. In other words, FIG. 1 shows that the constantly changing sensor state (E) is monitored, the message (M i ) that arrives from the outside is received, and the internal state (S) is updated while the output requirement (0 ), which represents the operation of a control entity that generates an output message (Mo).
第2図は、ある組み込み産業機械の動作の簡単な部分を
プラネットで記述した例である。ここでは、産業機械の
動作が、rconsole J、r conveyOr
J、r assen+bly J、 partsman
ager」、[measurementsystem
Jと命名された5つの制御実体に分割されて、これら制
御実体の相互関係がそれぞれの視点から記述されている
。すなわち、矩形で囲まれたrconsole J、’
C0nVeyOr J、r assew+bly」、
「partsmanageB 、[measureme
ntsystem」が各制御実体を表現しており、矩形
図形の上辺、下辺に記述されているrbegin J、
rpalleJ等の制御実体に入出力するメツセージの
端子を表現している。更に、メツセージ端子は有向枝に
よって結合され、更新するメツセージの方向が矢印の向
きによって規定されている。制御実体はrbegin」
という特別な名前の入力端子にメツセージが到達したと
きに駆動され、制御実体の内部処理およびメツセージ送
受信機能が動作を開始する。メツセージは制御実体が送
信操作を行う毎に出力され、有向枝をパイプライン状に
FIFO管理がなされて交信する。FIG. 2 is an example in which a simple part of the operation of a certain embedded industrial machine is described using planets. Here, the operation of an industrial machine is determined by rconsole J, rconveyOr
J, r assen+bly J, partsman
ager”, [measurement system
It is divided into five control entities named J, and the mutual relationships among these control entities are described from each perspective. i.e. rconsole J,' surrounded by a rectangle
C0nVeyOr J, r assew+bly”,
"partsmanageB, [measureme
ntsystem" represents each control entity, and rbegin J, which is written on the top and bottom sides of the rectangle,
It represents the message terminal that is input/output to a control entity such as rpalleJ. Furthermore, the message terminals are connected by directed branches, and the direction of the message to be updated is defined by the direction of the arrow. The controlling entity is rbegin.”
It is activated when a message arrives at the specially named input terminal, and the control entity's internal processing and message sending/receiving functions begin operating. A message is output every time the control entity performs a sending operation, and FIFO management is performed on directed branches in a pipeline manner for communication.
第2図に記述されている処理要件は以下の通りである。The processing requirements described in FIG. 2 are as follows.
rconsole Jという制御盤をモニタする制御実
体から出力される開始要求によって、「C0nveyo
B、 rassetably」、rpartsman
ager」、[s+easurementsystem
Jの四つの制御実体が駆動される。r C0nVey
Or Jが運んできた入力バレットに、r p art
srsaneger Jが供給する部品がr asse
mbly」によって組み込まれ、rmeasureme
ntsystem 」を経由して’ C0nVe310
r Jがそれを運び出す。これと同時に、rmeasu
rementsystem Jが入力するパレットを受
理して出力した測定データを、組み込み産業機械外部に
送出する。rpartsmanager 」が部品不足
を検出したらrconsole Jに警告を発行する。A start request output from a control entity that monitors the control panel called rconsole J causes the
B, ``Rassetably'', partsman
ager”, [s+asurement system
Four control entities of J are driven. rC0nVey
In the input bullet brought by Or J, r part
The parts supplied by srsaneger J are r asse
mbly” and rmeasureme
ntsystem' via 'C0nVe310
r J carries it out. At the same time, rmeasu
rementsystem J receives the input pallet and outputs the measurement data to the outside of the built-in industrial machine. When ``partsmanager'' detects a shortage of parts, it issues a warning to rconsole J.
このように制御実体のやり取りを視点側に鳥緻図的に見
ることができるので、記述内容が理解しやすい。In this way, the exchange of control entities can be seen in a detailed diagram from the perspective side, making it easier to understand the written content.
(有向グラフによるシーケンス記述)
次に、制御実体の内部処理について、その構成手段を述
べる。内部処理の動作仕様において、経験上、「Oが○
の状態にあるとき、・が・すれば、◎を◎し、口が口の
状態に移行する」という断片的な宣言がよく用いられる
。この表現は、OOが事象入力前の制御実体の内部状a
(処理前状態)、・・が入力事象、◎◎が活動要件(応
答)、四日が処理の制御実体の内部状態(処理後状態)
をそれぞれ意味している。この四つの事柄で表現される
モデルを一般に刺激応答モデルと称している。(Sequence description using directed graph) Next, the configuration means for the internal processing of the control entity will be described. In the operational specifications of internal processing, from experience
A fragmentary declaration is often used: ``When you are in the state of , if you do, ◎ becomes ◎, and the mouth changes to the state of mouth.'' This representation means that OO is the internal state a of the control entity before the event input.
(Pre-processing state), ... is the input event, ◎◎ is the activity requirement (response), and the fourth day is the internal state of the processing control entity (post-processing state)
each means. A model expressed by these four things is generally called a stimulus-response model.
この宣言の個々の内容は極く単純なものであり、容易に
実現することが可能である。ところが実時間制御ソフト
ウェアの性格上、入力事象は非同期に複数発生し、内部
状態によって検出すべき事象が刻々と変化するので、複
雑に入り組み、このことが従来の逐次手続き型言語で問
題を記述する際の大きなネックになっている。The individual contents of this declaration are extremely simple and can be easily realized. However, due to the nature of real-time control software, multiple input events occur asynchronously, and the events to be detected change every moment depending on the internal state, making it complex and difficult to describe problems using traditional sequential procedural languages. This is a major bottleneck when doing so.
このような処理を素直に表現するために、プラネットで
は従来の文字列による一次元的な処理系列ではなく、ペ
トリネットに基づいた有向グラフ構造により記述方式を
採用している。すなわち、メツセージ入力端子を始端、
メツセージ出力端子を終端として、入力事象、活動要件
を節で表現し、それらを実行順序を規定する有向枝で結
合した図式で処理系列を記述する。内部状態は、その時
点で制御がどこにあるのか、すなわちペトリネットでい
うところのマーキングで表現される。In order to express such processing straightforwardly, Planet employs a description method using a directed graph structure based on Petri nets, rather than the conventional one-dimensional processing sequence using character strings. In other words, the message input terminal is the starting end,
A processing sequence is described using a diagram in which input events and activity requirements are expressed as clauses, with the message output terminal as the terminal, and these are connected by directed branches that define the order of execution. The internal state is expressed by where the control is at that moment, or in other words, by markings in a Petri net.
第3図には、プラネットで記述された制御実体の内部処
理の一例が示されている。入力する有向枝のない長円形
節(startと記入された節で、この名前が前述した
制御実体のメツセージ入力端子名に対応する)が処理系
列の始端を表現している。FIG. 3 shows an example of internal processing of a control entity described in planets. An elliptical node with no input directed branch (a node labeled "start" whose name corresponds to the message input terminal name of the control entity described above) represents the beginning of the processing sequence.
二重矩形節で囲まれた節(even tと記入されてい
る節であり、実際にはr 5ensorはオンしたか?
」などの事象検知のための条件判断の句が記述される)
が入力事象検出を示しており、記入されている事象が生
起したときにはその処理を終了する。−方、−重矩形節
で囲まれた節(actionとある節であり、実際には
’5olenoideをオンにする」などの゛レスポン
スのための句が記述される)は活動要件を示しており、
駆動されれば直ちに処理を遂行する。各節を結合する有
向枝は処理の実行順序関係を表現しており、この図のr
actionl J、raction2 Jから伸びる
有向枝のように複数に分岐するものは、後続する処理が
同時に実行されること、すなわち平行処理されることを
示している。また、raction2 」、「acti
on5 」にように複数の有向枝が入力する処理要件は
、その処理要件の全ての先行要素の処理が終了したとき
に駆動されること、すなわち同期を表現している。この
ように、実行順序が規定された処理系列は、制御実体の
メツセージ出力端子に対応する長円形節で終端する。A node surrounded by double rectangular nodes (a node written as event t, is the r 5 sensor actually turned on?
Conditional judgment phrases for event detection such as ” are written)
indicates input event detection, and when the entered event occurs, the process ends. - On the other hand, the clause surrounded by double rectangular clauses (a clause with the word action, which actually contains a phrase for a response such as 'turn on 5olenoide') indicates activity requirements. ,
When activated, processing is performed immediately. The directed edges connecting each node express the execution order relationship of processing, and r
A plurality of branches, such as directed branches extending from actionl J and action2 J, indicate that subsequent processing is executed simultaneously, that is, parallel processing is performed. In addition, ``action2'', ``acti
A processing requirement inputted by a plurality of directed edges such as "on5" is driven when all the preceding elements of the processing requirement are completed, that is, synchronization is expressed. In this manner, a processing sequence with a defined execution order terminates at an oval node corresponding to the message output terminal of the control entity.
(手続きの階層性)
前述した第3図に示すように、プラネットにおいては、
一連の纏まった処理群がそれぞれ一枚の図式として表現
される。当然、プログラム規模が大きくなると図式は巨
大になるし煩雑になり、分かりにくくなる。また、汎用
の手続きは共用で使用したいし、再帰的呼出機構も使い
たい。そこで、プラネットにおいては、ひとまとまりの
処理を一枚の図式に収め、それを上位抽象レベルの図式
中の一処理要件として呼び出すことができるようにして
いる。第4図にはこの関係を示しである。この関係を以
下に手続きの階層化と呼ぶ。下位階層の処理は、上位階
層の処理要件に制御が到達したときに駆動される。すな
わち、下位階層図式中のrbegin J入力端子に制
御が渡され、下位階層処理系列が実行を開始する。そし
て、下位階層の処理が進行し、rend J出力端子に
制御が到達したときに、下位階層中の全ての制御が破棄
されて、上位階層に制御が返される。返された制御は上
位階層中の処理要件を継続する。(Hierarchy of procedures) As shown in Figure 3 above, in Planet,
Each series of processing groups is expressed as a single diagram. Naturally, as the scale of the program increases, the diagram becomes huge, complicated, and difficult to understand. I also want to use general-purpose procedures in common, and I also want to use a recursive calling mechanism. Therefore, in Planet, a set of processes is contained in one diagram, and it is made possible to call it as one processing requirement in the diagram at a higher abstraction level. FIG. 4 shows this relationship. This relationship is hereinafter referred to as procedure hierarchy. The processing of the lower hierarchy is driven when control reaches the processing requirements of the upper hierarchy. That is, control is passed to the rbegin J input terminal in the lower hierarchy diagram, and the lower hierarchy processing sequence begins execution. Then, when the processing in the lower hierarchy progresses and the control reaches the rend J output terminal, all the controls in the lower hierarchy are discarded and control is returned to the upper hierarchy. The returned control continues processing requirements in the upper hierarchy.
以上要するに、−枚の画面上においては、その上下方向
が処理の時系列方向を意味しており、左右の広がりが処
理の並行性を意味している。そして、画面の、所謂深み
方向が階層性を意味している。これらの関係を第5図に
示しである。In short, on the - screen, the vertical direction means the chronological direction of the processing, and the horizontal spread means the parallelism of the processing. The so-called depth direction of the screen means hierarchy. These relationships are shown in FIG.
(言語構成要素)
以上においては、プラネットにおけるプログラミング形
式として、制御実体の相互関係、内部処理の記述方式に
ついて述べた。次に、プラネットにおける実際にプログ
ラムを記述するための各言語構成要素について定義する
。(Language Components) Above, we have described the mutual relationship of control entities and the description method of internal processing as a programming format in Planet. Next, we will define each language component for actually writing a program in Planet.
言語構成要素を以下に列記する。The language components are listed below.
プログラム枠 サブシステム ブロック メツセージ入出力端子 事象待ち節 活動処理節 条件分岐節 選択的事象待ち節 繰り返し制御枠 式とデータ型 各言語構成要素を以下に説明する。Program frame sub-system block Message input/output terminal event waiting clause Activity processing section conditional branch clause Selective event wait clause Repeat control frame Expressions and data types Each language component is explained below.
プログラム枠
制御実体の内部処理あるいはその下位階層の手続きを表
現する一枚の図式(画面)である。このプログラム枠に
は、第6図に示すように、名前を記入する欄が右下に設
定されている。ここの書かれた名前が制御実体あるいは
下位階層手続きの名前となる。この名前は識別子として
扱われ、メツセージの送り先を指定し、あるいは下位階
層の呼出し先を指定する場合に使用される。名前の構文
を以下に示す。It is a diagram (screen) that expresses the internal processing of a program frame control entity or its lower layer procedures. In this program frame, as shown in FIG. 6, a field for entering a name is set at the lower right corner. The name written here becomes the name of the control entity or lower layer procedure. This name is treated as an identifier and is used to specify the destination of a message or to specify a lower-level call destination. The name syntax is shown below.
名前::=文字1名前 文字1名前 数字文字:;=英
文字1仮名文字1−
サブシステム
制御実体を外界からみたときのものがサブシステムであ
る。この処理要件が現れる場合、第7図に示すように、
制御実体名が矩形の枠で囲まれた図形として表現される
。制御実体のメツセージ入出力端子は、サブシステムの
上辺、下辺上に位置して、端子名が付随している小矩形
枠で表現される。端子名は、同一のサブシステム中で唯
一である。プログラム中に同一の名前の端子が複数ある
場合には、その何代は共通のものとして解釈される。ネ
ットワークを介した制御システム間のメツセージ送受信
操作も、制御システム内部の制御実体間中心と同様に記
述される。なお、このときに必要なメツセージパラケト
の形状は、後述のコンパイラが自動的に生成する。Name::=Character 1 Name Character 1 Name Number Character: ;= Alphabet character 1 Kana character 1 - Subsystem A subsystem is what a control entity looks like from the outside world. When this processing requirement appears, as shown in Figure 7,
The control entity name is expressed as a figure surrounded by a rectangular frame. The message input/output terminals of the control entity are located on the top and bottom sides of the subsystem and are represented by small rectangular frames with terminal names attached. A terminal name is unique within the same subsystem. If there are multiple terminals with the same name in a program, their generations are interpreted as common. Message sending and receiving operations between control systems over a network are also described in the same way as between control entities within a control system. Note that the shape of the message parameter required at this time is automatically generated by a compiler, which will be described later.
制御実体はrbegin Jという名前をもつ入力端子
にメツセージが到達したときに活性化される。The control entity is activated when a message arrives at the input terminal named rbegin J.
その内部処理は、構成要素を節としてその実行順序を矢
印で規定されたプログラムネットで記述される。制御実
体の内部処理が進行して、制御が[end Jという名
前の出力端子に到達したとき、その制御実体中で動作す
る全ての制御が処理を中断して、破棄される。Its internal processing is described by a program net in which constituent elements are defined as nodes and their execution order is defined by arrows. When the internal processing of the control entity progresses and the control reaches the output terminal named [end J, all controls operating in the control entity interrupt processing and are discarded.
ブロック
制御実体の内部処理が大規模、複雑になる場合に手続き
を階層化して、上位階層プログラムの制御要件として記
述されたひとかたまりの副手続きプログラムを、ブロッ
クと呼んでいる。ブロックには名前が付けられており、
その名前を上位階層ブロックの処理要件に記入すること
により、下位階層ブロックを呼び出す。Block When the internal processing of a control entity becomes large-scale or complex, procedures are layered and a group of subprocedure programs written as control requirements for a higher-level program is called a block. Blocks are named
A lower hierarchy block is called by entering its name in the processing requirements of the upper hierarchy block.
上位階層中の処理要件に制御が到達した時点で、下位階
層ブロックが呼び出される。下位階層ブロックの呼出し
には、再帰、間接再帰が許可されている。呼び出された
下位階層ブロックは、rbegin」という名前の長円
形の端子から実行が開始され、処理が進行してrend
Jという名前の長円形の端子に制御が到達したときに
、そのブロック内部の全てのプロセスが中断して破棄さ
れる。その後、制御が上位階層の処理要件に返却されて
、上位階層ブロックの実行が継続される。When control reaches a processing requirement in the upper hierarchy, the lower hierarchy block is called. Recursion and indirect recursion are allowed for calling lower layer blocks. The called lower layer block starts execution from the oval terminal named "rbegin", and the process progresses to rend.
When control reaches the oblong terminal named J, all processes within that block are aborted and discarded. Control is then returned to the higher layer processing requirements and execution of the higher layer block continues.
ブロック呼出しに引数を与えることができ、その場合に
呼び出すブロック名の後に変数名あるいは値を「、」で
区切ったリストを括弧でくくって利用する。ブロックの
引数に変数が使用される場合、引数の与え方はいわゆる
名前呼出しで行われる。すなわち、上記階層で与えられ
た引数を下位階層で値を更新すると、上位階層に戻った
ときにその変数の値が変化する。Arguments can be given to a block call, in which case the name of the block to be called is followed by a list of variable names or values separated by "," enclosed in parentheses. When a variable is used as a block argument, the argument is given by what is called a name call. That is, if the value of an argument given in the above hierarchy is updated in a lower hierarchy, the value of that variable will change when returning to the upper hierarchy.
一例として、第8図に再帰呼出しを用いた「nの階乗を
求める」ブロックを示す。この例では[begin J
入力端子中の引数r[、に求めた値が格納され、rfa
ctorial Jを呼び出した結果として、その値が
利用される。下位階層ブロックの内に出現するメツセー
ジ入出力端子についてもう一度述べると、ブロックが制
御実体の下位手続きとして表現されているので、ブロッ
ク内に現れる入出力メツセージ端子は、そのブロックを
呼び出している制御実体のメツセージ端子として解釈さ
れる。As an example, FIG. 8 shows a "find factorial of n" block using recursive calls. In this example, [begin J
The obtained value is stored in the argument r[, in the input terminal, and rfa
As a result of calling ctorial J, that value is used. To explain again about the message input/output terminals that appear in lower hierarchy blocks, since the block is expressed as a lower procedure of a control entity, the input/output message terminals that appear in a block are Interpreted as a message terminal.
’begin端子」と’ end端子」の構文を以下に
示す。The syntax of the 'begin terminal' and 'end terminal' is shown below.
begin端子二二
=’begin’ 1’begin’ () l°be
gin’ (引数リスト)end端子::
=’end’ 1’end’(’TRUE’) 1’
end’(FALSE’)引数リスト::
=型宣言 名前1引数リスト、名前
1引数リスト、 型宣言 名前
引数リストは型土名前、あるいは名前が「 。begin terminal 22='begin'1'begin' () l°be
gin' (argument list) end terminal:: ='end'1'end'('TRUE')1'
end'(FALSE') argument list:: = type declaration name 1 argument list, name 1 argument list, type declaration name argument list is the type name or the name is ``.
」で区切られた恰好でできている。左から右に評価して
いき、型土名前ではその名前の引数が指定した型である
ことを宣言する。更に、名前だけが「、」で区切られた
ものはその引数が左の引数と同じ型であることを宣言し
ている。従って、int a、 b、 char c、
int d、 float f、 gの例では、「a
」と「b」はint型、[cJはchar型、rd、は
int型、「f」、’gJはfloat型であることを
宣言している。It is made up of characters separated by "." Evaluated from left to right, the type name declares that the named argument is of the specified type. Furthermore, names separated by "," declare that the argument is of the same type as the left argument. Therefore, int a, b, char c,
In the example of int d, float f, g, "a
" and "b" are of int type, [cJ is of char type, rd is of int type, and "f" and 'gJ are of float type.
下位階層の呼出しの構文を以下に示す。The syntax for calling the lower hierarchy is shown below.
下位階層呼出し二二2
名前1名前(値リスト)
1 名前1 名前(値リスト)
値リスト::=値I値リスト、値
プラネットでは分割コンパイルをサポートしており、同
一のソースファイル上にない下位階層手続きを呼び出す
ときには、最初に「@」を付けて記述する。Lower layer call 222 Name 1 Name (value list) 1 Name 1 Name (value list) Value list::= Value I value list, Value Planet supports separate compilation, and lower levels that are not on the same source file When calling a hierarchical procedure, add "@" at the beginning.
入出力端子
制御実体間のメツセージ送受信操作においては、受信の
受は口にあたる端子を入力端子と呼んでいる。一方、送
信の送り口に当たる端子を、出力端子と呼んでいる。入
出力端子を第9図に示す。入力端子と出力端子とは同一
の長円形をしている。In message transmission/reception operations between input/output terminal control entities, the terminal that is the mouth of the receiver is called the input terminal. On the other hand, the terminal corresponding to the transmission port is called the output terminal. The input/output terminals are shown in FIG. The input terminal and the output terminal have the same oval shape.
長円形に入力する矢印があるものが出力端子であり、そ
うでないものが入力端子である。入出力端子には名前が
付けられている。前述の手続きの階層性のところで説明
したrbegin J端子と、rend」端子は入出力
端子として扱われない。The one with an oval input arrow is the output terminal, and the one without is the input terminal. Input and output terminals are named. The rbegin J terminal and the ``rend'' terminal, which were explained in the section about the hierarchy of procedures above, are not treated as input/output terminals.
メツセージの送信操作は出力端子に制御が到達したとき
に行われる。メソセージの受信操作は、メソセージが入
力端子に到達したときに行われる。The message sending operation is performed when the control reaches the output terminal. The message receiving operation is performed when the message reaches the input terminal.
すなわち、入力端子はメツセージバッファーの役割をす
る。入力端子から矢印が結合している場合には、メツセ
ージが入力した時点でそのメツセージが読み出されて矢
印以降の処理が駆動される。That is, the input terminal serves as a message buffer. When an arrow is connected to an input terminal, when a message is input, the message is read out and the processing after the arrow is driven.
一方、矢印のない入力端子は、手続き系列で記述したメ
ツセージ続出操作によって、入力端子からメツセージが
読み出される。メツセージの続出操作は条件判断句の中
に入力端子名を記入することによって行われる。On the other hand, for input terminals without arrows, messages are read from the input terminals by a message successive operation described in a procedure sequence. The message successive operation is performed by writing the input terminal name in the condition judgment phrase.
入出力端子は制御実体を外界からみたサブシステムのメ
ツセージ端子に対応しいてる。すなわち、第8図に示す
ように、(a)の出力端子に制御が到達して、メツセー
ジ送信操作が行われると、(C)のようなメツセージ結
合によってメツセージが交信する。そのメツセージは(
b)の入力端子に到達し、メツセージを利用することが
できる。The input/output terminals correspond to the message terminals of the subsystem that view the control entity from the outside world. That is, as shown in FIG. 8, when control reaches the output terminal (a) and a message sending operation is performed, messages are exchanged by message combination as shown in (C). The message is (
The message reaches the input terminal b) and can be used.
また、(C)のようにメツセージ結合の様子を記述せず
に、(d)のように内部手続きの中で異なる制御実体の
メツセージを送受信することも可能である。It is also possible to send and receive messages from different control entities in an internal procedure as shown in (d) without describing how messages are combined as shown in (C).
メツセージにデータを載せる場合、第10図の(a)の
ように出力端子の名前と共に、値を「。When putting data in a message, write the value "." along with the name of the output terminal as shown in Figure 10 (a).
」で区切ったリストを括弧でくくって送出する(この場
合’(1,5,1,234)Jがそれです。" (in this case, it is '(1,5,1,234)J).
変数を用いることも可能である。)。一方、それを受け
るサブシステム間のメツセージ結合では、同図(b)の
ようにメツセージ端子の名前の後に、データの名前と型
を指定したリストを付けて記述する。この例では出力側
サブシステムのメツセージ端子のr (int x、
int y、 float Z) J、 側サブシステ
ムのメツセージ端子の「(x、y、z)」がデータリス
トである。更に受信側の制御実体の入力端子に、同図(
c)のような入力端子の名前の後に入力するデータと型
の指定されたリスト’(int a、 b、 floa
t f) Jを記入する。この例では、整数型のデータ
「1」、「5」及び浮動小数型のデータr1.234J
の三つの値がメツセージに載せられて交信している。こ
のメセージが(C)の入力端子に到達すると、入力端子
の引数「a」 rb」 rfjには、それぞれrl、r
5.rl、234Jの値が設定される。また(d)のよ
うに、制御実体の内部手続きの中で異なる制御実体にメ
ツセージを出力する場合には、サブシステムのメツセー
ジ端子に直接r (1,5,1,234)」の値並びを
記述すればデータが送信できる。It is also possible to use variables. ). On the other hand, when connecting messages between subsystems that receive messages, a list specifying the name and type of data is written after the name of the message terminal, as shown in FIG. 2(b). In this example, r (int x,
int y, float Z) J, "(x, y, z)" of the message terminal of the side subsystem is the data list. Furthermore, the same figure (
c) A specified list of data and types to input after the name of the input terminal like '(int a, b, float
t f) Fill in J. In this example, integer type data “1” and “5” and floating point type data r1.234J
These three values are placed in the message and communicated. When this message reaches the input terminal of (C), the input terminal arguments ``a'', ``rb'', and ``rfj'' contain rl and r, respectively.
5. The value of rl, 234J is set. Also, as shown in (d), when outputting a message to a different control entity in the internal procedure of the control entity, directly input the value sequence r (1, 5, 1, 234) to the message terminal of the subsystem. Data can be sent by writing it.
更に、メツセージ結合を示す第10図(b)の図上のメ
ツセージ中のデータを加工することができる。例えば、
メツセージの入力側サブシステムのメツセージ端子の値
並びを’(y、X、Z)Jと並びを変えれば、(c)の
入力引数ra、rl)」 「C」には値が交換されて、
それぞれ「5」 「IJ rl、234Jが設定され
る。また、[(x+1.7,2*z)Jのように式によ
る値の変換を行えば、得られた値r2J ’5J
r2.468」がそれぞれ設定される。Furthermore, the data in the message on the diagram of FIG. 10(b) showing the message combination can be processed. for example,
If the value order of the message terminal of the message input side subsystem is changed to '(y,
"5""IJ rl, 234J are set respectively. Also, if you convert the value using the formula like [(x+1.7,2*z)J, the obtained value r2J '5J
r2.468" are set respectively.
データを含んだメツセージを送受する場合、メツセージ
端子及び入出力端子間のデータの型の並びは一致してい
なければならない。When sending and receiving messages containing data, the data type order between the message terminal and the input/output terminal must match.
入出力端子、サブシステムのメツセージ端子の構文を以
下に示す。The syntax of input/output terminals and subsystem message terminals is shown below.
入力端子二ニー名前1名前()1名前(引数リスト)
出力端子::・名前1名前()1名前(値リストサブシ
ステムメツセージ出力端子::・名前1名前(変数束縛
リスト)
サブシステムメツセージ入力端子::・名前1名前(値
リスト)
変数束縛リスト::・型宣言 名前1名前1変数束縛リ
スト型宣言 名前1変速束縛リスト、名前
変数束縛リストは前述した引数リストとは異なった評価
をする0例として、引数リストで述べたものと同じ宣言
、
int a、 b、 char c、 int d、
float f、 gを用いる。変数束縛リストも同じ
く、型土名前あるいは名前が「、」で区切られている。Input terminal two names Name 1 name () 1 name (argument list) Output terminal::・Name 1 name () 1 name (value list Subsystem message output terminal::・Name 1 name (variable binding list) Subsystem message input Terminal::・Name 1 Name (value list) Variable binding list::・Type declaration Name 1 Name 1 Variable binding list Type declaration Name 1 variable speed binding list, name variable binding list are evaluated differently from the argument list described above. 0 As an example, the same declaration as mentioned in the argument list, int a, b, char c, int d,
Use float f, g. Similarly, the variable binding list has type names or names separated by ``,''.
名前だけが「5.で区切られているもの、例えば変数「
b」やrfJは内部変数や入力引数のように別の場所で
宣言されたものを記入する。そうすると、メツセージ端
子にメツセージが渡されてきたときに、メツセージ中の
データをその変数に格納するように動作する。Only the names are separated by "5." For example, variables "
b'' and rfJ are items declared elsewhere, such as internal variables and input arguments. Then, when a message is passed to the message terminal, the data in the message will be stored in that variable.
事象待ち節
外界からの入力自家を待つ処理を事象待ち節と称して、
第11図に示すように、二重の矩形節で記述する。処理
は「・が・になるまで待つ。」とすうものである。矩形
の中には「・は・か?」とすう条件判断句が記述される
。事象待ち節に制御が到達すると、条件判断句を評価す
る。条件判断句が真を返すまで、条件判断句の評価を繰
り返し行う。Event Waiting Clause The process of waiting for an input from the outside world is called an event waiting clause.
As shown in FIG. 11, it is described using double rectangular nodes. The process is to "wait until ...". Inside the rectangle, a conditional judgment phrase such as "・ha・ka?" is written. When control reaches the event wait clause, the conditional decision clause is evaluated. The conditional judgment phrase is evaluated repeatedly until the conditional judgment phrase returns true.
条件判断句として適用できるものは、以下の三種類であ
る。There are three types of conditional judgment phrases that can be applied:
■入力センサ状態の判断結果の値
例えば、スイッチがONされたか、入力ポートの値が特
定の値になったか等の条件判断である。(2) Value of judgment result of input sensor state For example, it is a condition judgment such as whether a switch is turned on or whether the value of an input port becomes a specific value.
0時間待ち要素
時間が経過したかという条件判断で、指定した時間だけ
処理を中断させるものである。Processing is interrupted for a specified time based on a conditional judgment as to whether the 0-hour waiting element time has elapsed.
■入力端子名
「その入力端子にメツセージが到達したか?」という条
件判断で、メツセージが到達すれば、メツセージ読み出
し操作を行う。■Input terminal name Based on the conditional judgment "Did a message arrive at that input terminal?" If a message arrives, a message read operation is performed.
活動処理節
外界に出力を行ったり、演算をしたり、値を代入したり
する処理を、活動処理と称して一重の矩形節で第12図
のように記述する。矩形節の中には、「◎を◎する」と
いう処理を行う句が記入される。Active Processing Section Processing that outputs to the outside world, performs calculations, and assigns values is called an active processing and is described in a single rectangular section as shown in FIG. 12. In the rectangular section, a phrase that performs the process of "turning ◎ into ◎" is written.
条件分岐節
手続き系列の条件分岐構造は条件分岐節によって記述さ
れる。第13図に条件分岐節の記述例を示す。条件分岐
節は、同図に示すように、矩形が積み重なった形状をし
ており、複数の出力点を持っている。各々の矩形の中に
は条件判断句が記入され、条件分岐節を通過した制御は
、複数ある出力点のうち条件の成り立つ出力点から出力
される。Conditional Branching Clause The conditional branching structure of a procedure sequence is described by a conditional branching clause. FIG. 13 shows a description example of a conditional branch clause. As shown in the figure, a conditional branching clause has a shape of stacked rectangles and has multiple output points. A condition judgment clause is written in each rectangle, and the control that has passed through the conditional branch clause is output from the output point where the condition is satisfied among the plurality of output points.
出力点が振り分けられるので、条件分岐を実現すること
になります。条件分岐節は左上隅から下に向かって評価
が開始され、条件が成立していれば下へ、そうでなけれ
ば右へ評価が逐次に進行する。Since the output points are distributed, conditional branching can be realized. Conditional branching clauses are evaluated starting from the top left corner and proceeding downwards if the condition is true, and to the right otherwise.
下に条件判断がないところまで評価が到達すれば、それ
に対応する出力点以降の処理が継続される。If the evaluation reaches a point where there is no condition judgment below, processing continues from the corresponding output point onward.
条件分岐節の条件判断句の中には、relse」という
特別な句を記入することができる。relseJは、「
条件が成立していなけば右へ評価が進む」という動作の
中で、最後に評価されて常に「真」になる。従って、条
件がすべて成立していなければ、r else Jの出
力点に制御が出力される。A special phrase "relse" can be entered in the condition judgment phrase of the conditional branch clause. relseJ is ``
If the condition is not met, the evaluation progresses to the right.''The evaluation always returns ``true'' at the end. Therefore, if all conditions are not met, control is output to the output point of r else J.
第13図の例の場合、まず「S−・・ONJが評価され
る。S−が入力されていれば次にrphc・・OFF」
が評価され、phcが入力されていなければ出力点aか
ら制御が出力される。phcが入力されていればri=
・2」が評価され、変数iが2であれば出力点すから制
御が出力される。変数iが2でなければ、r else
Jによって出力点Cから制御が出力される。最初にs
wが入力していなければ、右端のrelseJによって
出力点dから制御が出力される。In the case of the example in Figure 13, "S-...ONJ is evaluated first. If S- is input, then rhphc...OFF"
is evaluated, and if phc is not input, control is output from output point a. If phc is input, ri=
・2'' is evaluated, and if the variable i is 2, the control is output from the output point. If variable i is not 2, r else
Control is output from output point C by J. first s
If w is not input, control is output from output point d by relseJ at the right end.
選択的事象待ち節
実時間処理の用件のなかには、複数の事象を同時に検知
していてどれが一つの事象が検知されたら、その事象に
対応する処理を継続して、他の事象待ちを放棄するとい
う処理に帰着させる事柄がよくある。「ソレノイドに通
電した後にセンサが検出するのを待っていて、二重経っ
てもセンサが゛検出しなければ警告する」とすうように
制御対象の異常検出を時間待ち処理で行う問題や、「三
つのスイッチを監視していて、最初に入力されたスイッ
チにしたがって処理を行う」という問題が例として挙げ
られることができる。これを、プラネットでは選択的事
象待ちと称して、選択的事象待ち節によって第14図の
ように記述する。Selective Event Waiting Clause Some of the requirements for real-time processing include detecting multiple events at the same time, and when one event is detected, continuing the process corresponding to that event and abandoning waiting for other events. There are many cases where the process of doing so is the result. Problems such as waiting for the sensor to detect after energizing the solenoid and issuing a warning if the sensor does not detect it even after 2 times have elapsed. An example of this problem is ``monitoring three switches and performing processing according to the switch that is input first.'' In Planet, this is called selective event waiting, and is described using a selective event waiting clause as shown in FIG.
選択的事象待ち節は、二重矩形で囲まれた事象待ち節が
横に並んで、それぞれに出力点を待つ節で、条件分岐節
とよく僚た形状をしている。その実行規則は次のような
ものである。選択的事象待ち節が駆動されれば横に並ん
でいる全ての事象待ちを並行に駆動し、最も早く処理が
終了したものは、横に並んでいる他の処理をすべて棄却
して、事象が成立したものに対応する出力点以降の処理
を継続する。第14図(a)では、’5ensor =
、=ONJとrtimer == 2000 」の二つ
の選択的事象待ちである。つまり、センサが先に入力す
れば出力点aから抜は出し正常な処理を行うようにして
いる。また、先に時間が二重経てば出力点すからエラー
復帰処理を行うようにしている。また、第14図(b)
は、rswl == ON J、rsw2 == ON
J更にrsw3 == ON Jの三つの選択的事象
待ちである。三つのスイッチをスキャンしていて、最初
に入力されたスイッチに対応してそれぞれ出力点C1d
、eから制御が振り開けられる。A selective event-waiting clause is a node in which event-waiting clauses surrounded by double rectangles are lined up horizontally, each waiting for an output point, and has a shape that is similar to a conditional branching clause. Its execution rules are as follows. When the selective event wait clause is activated, all event waits in the horizontal line are driven in parallel, and the one that completes its processing earliest abandons all other processes in the horizontal line and waits for the event. Continue processing after the output point corresponding to the one established. In Figure 14(a), '5ensor =
,=ONJ and rtimer==2000''. In other words, if the sensor receives the input first, it will be extracted from the output point a and normal processing will be performed. Also, if the time doubles first, the output point is turned off, so error recovery processing is performed. Also, Fig. 14(b)
is rswl == ON J, rsw2 == ON
Furthermore, three selective events of rsw3 == ON J are awaited. While scanning three switches, each output point C1d corresponds to the first input switch.
, e, control is taken over.
選択的事象待ちの終了時に他の制御を棄却する操作は、
下位階層を呼び出しているときにも有効である。これは
非常に強力な特質で、一連の手続き系列を実行させなが
ら同時に停止要求を検知し、停止要求が発行されると動
作している手続き系列を中断させる処理が、選択事象待
ち節によって記述できる。第15図に列に示す。図中、
左側事象待ち節のrcycle 」は下位階層を持って
おり、機械を制御する一連の手続き系列を実行している
と仮定する。右側の事象待ち節rstop」は、この制
御実体に停止要求メツセージrstop」が入力される
のを待っているものである。同図中選択時事象待ち節に
制御が到達すると、’cycle、 Jが起動される。The operation of discarding other controls at the end of selective event waiting is
It is also effective when calling a lower layer. This is a very powerful feature; a process that detects a stop request while simultaneously executing a series of procedures, and interrupts the running procedure series when a stop request is issued can be described using the wait for selection event clause. . The columns are shown in FIG. In the figure,
It is assumed that the left event wait clause "rcycle" has a lower hierarchy and executes a series of procedures to control the machine. The event wait node ``rstop'' on the right side waits for the stop request message ``rstop'' to be input to this control entity. When the control reaches the select event wait node in the figure, 'cycle, J is activated.
これと同時に、停止要求メツセージを検知する処理も駆
動される。停止要求メツセージが入力されないうちは、
プログラムは手続きrcycle」によって機械の動作
を制御している。停止要求メツセージが到達することの
選択的事象待ち節の動作によって、rcycle 」を
実行している制御がすべて棄却され、rcycle J
実行が中断される。At the same time, processing for detecting a stop request message is also activated. Until a stop request message is input,
The program controls the operation of the machine using the procedure "rcycle". Due to the action of the selective wait for event clause upon arrival of the stop request message, all control running "rcycle" is relinquished and
Execution is interrupted.
その後、rstop」待ちの出力点以降で機械体のリセ
ット動作が行われ、処理が終了する。Thereafter, a reset operation of the mechanical body is performed after the output point of "waiting for "rstop", and the process ends.
繰り返し制御枠
処理系列の繰り返し構造を繰り返し枠で記述する。矢印
の結線でループを組むと繰り返し構造になるが、プログ
ラムが煩雑になるので繰り返し枠を使用することが望ま
しい。第16図に記述例を示しである。繰り返し枠は、
左上隅の制御手段を示す矩形節と右下隅のrend J
が囲まれた矩形節、更にこの二つの矩形を対角とする枠
によって構成される。Repeat control frame The repeat structure of the processing sequence is described using repeat frames. Creating loops using arrow connections will create a repeating structure, but this will complicate the program, so it is preferable to use repeating frames. FIG. 16 shows an example of the description. The repeating frame is
Rectangle node indicating control means in the upper left corner and rend J in the lower right corner
It is composed of a rectangular node surrounded by a frame, and a frame with these two rectangles as diagonals.
繰り返し制御枠は次のように動作する。左上隅の矩形節
に制御が到達してときから繰り返し構造が始まる。その
矩形節中に記述されている制御手段によって制御が振り
分けられるが、脱出条件が成り立っていないのでまだ制
御が繰り返し構造の中にあるときには、その矩形節から
右下隅の’and」矩形節までの手続き系列を実行する
。r end」矩形節に制御が到達すれば、再び左上隅
制御手段節に制御が移る。このようにして、両矩形節に
挟まれた手続き系列が繰り返し実行される。条件が成り
立って制御手段節によって繰り返し構造から脱出すると
、rend J矩形節以降の手続き系列が実行される。The repeat control frame operates as follows. The repeat structure begins when control reaches the rectangle node in the upper left corner. Control is distributed according to the control means described in the rectangle node, but if the escape condition is not satisfied and the control is still in the repeating structure, the control is distributed from the rectangle node to the 'and' rectangle node in the lower right corner. Executes a sequence of procedures. When the control reaches the ``r end'' rectangle node, the control is transferred to the upper left corner control means node again. In this way, the procedure series sandwiched between both rectangular nodes is repeatedly executed. When the condition is satisfied and the control means clause escapes from the repetition structure, the procedure sequence after the rend J rectangle clause is executed.
更に、条件分岐節あるいは選択的事象待つ節によって繰
り返し構造から強制的に脱出することもできる。制御手
段には、r 1oop J句・’while J句・「
until」句・’for J句が用意されている。Furthermore, it is also possible to forcibly escape from a repeating structure using a conditional branching clause or a clause that waits for a selective event. The control means includes r 1oop J clause, 'while J clause,
'until' clause and 'for J clause are provided.
■r 1oop J句
r 1oop J句は、無限ループを実現する。無条件
にrend J節に至る制御系列の実行を繰り返すもの
である。無限ループから脱出するには、条件分岐節や選
択的事象待ち節によって脱出させるようにする。■r 1oop J clauser 1oop J clause implements an infinite loop. It unconditionally repeats execution of the control sequence up to the rend J clause. To escape from an infinite loop, use a conditional branch clause or a selective event wait clause.
■「匈hile J句 「while J句の構文は以下の通りである。■「匈hile J haiku The syntax of the “while J clause is as follows.
while句::=’while’ (条件判断句)「
%1hile J句に制御が到達したときに括弧でくく
られた条件判断句が評価され、その結果が真であれば繰
り返し構造内に、偽ならばrend」節に制御が振り分
けられる。while clause::='while' (conditional judgment clause) "
When control reaches the %1hile J clause, the conditional judgment clause enclosed in parentheses is evaluated, and if the result is true, control is assigned to the repeating structure, and if it is false, control is assigned to the "rend" clause.
■runtil J句 runtilJ句の構文は以下の通りである。■runtil J phrase The syntax of the runtilJ clause is as follows.
unti1句::=’until’ (条件判断句)r
until 」句に制御が到達すると、runtil
J句以降のrend」の節に至る手続き系列が実行され
、rend 2節に制御が到達したときにruntil
」句中の括弧でくくられた条件判断句が評価される。until1 clause::='until' (conditional judgment clause) r
When control reaches the 'until' clause, the 'runtil' clause is reached.
The procedure sequence leading to the "rend" clause after the J clause is executed, and when control reaches the rend 2 clause, runtil is executed.
” The conditional judgment phrase enclosed in parentheses within the phrase is evaluated.
制御は、その結果が真ならばrend J iff以降
に、偽ならば’until J句以降に振り分けられる
。Control is distributed after the rend J iff if the result is true, and after the 'until J clause if the result is false.
■rfor」句 rfor」句の構文は以下の通りである。■rfor” phrase The syntax of the "rfor" clause is as follows.
for句::=’for’ 変数= 値 1 tO+
値l ’for’ 変数 = 値′tO゛値’
s tep ’ 定数
rfor」句は、加算な閉区間を順繰りにたどる制御手
段である。上記の「変数」は宣言されていなければなら
ない。例えばrfor i = x to y 5te
flcJのfor句では、区間開始値X及び区間終了値
yによって囲まれた領域r (r= (j l X<=
j<y))を、変数iをXから刻みCづつ増加させなか
らiがr内にあるまで繰り返される。for clause::='for' variable = value 1 tO+
Value l 'for' variable = value 'tO゛value'
The phrase "step 'constant rfor'" is a control means to iterate through additive closed intervals. The above "variables" must be declared. For example, rfor i = x to y 5te
In the for clause of flcJ, the area r (r= (j l X<=
j<y)) is repeated from increasing the variable i by C increments from X until i is within r.
式とデータ型 プラネットで操作できる基本データ型を以下に示す。Expressions and data types The basic data types that can be operated on Planet are shown below.
(基本データ) 以下に、それぞれのデータ型の詳細について述べる。(Basic data) Details of each data type are described below.
■char型
8ビツトの二進数である。符号無しのデータで0から2
55までの値をとる。文字や小さい整数を表現するのに
用いられる。■It is a char type 8-bit binary number. 0 to 2 with unsigned data
Takes values up to 55. Used to represent characters and small integers.
■int型
16ビツトの符号付き二進数である。−32768から
+32767までの値をとる。16ビツトのデータ中M
SBが符号を表現している。負の数は2の補数で表現さ
れる。−船釣に用いられる整数である。■It is an int type 16-bit signed binary number. It takes a value from -32768 to +32767. M in 16 bit data
SB represents the code. Negative numbers are expressed as two's complement numbers. -It is an integer used in boat fishing.
■long型
32ビツトの符号付き二進数である。−2147483
648から+2147483647jまでの非常に大き
な範囲の整数を表現することができる。int型と同様
に、負の数は2の補数で表現される。(2) It is a long type 32-bit signed binary number. -2147483
A very large range of integers can be represented from 648 to +2147483647j. Similar to the int type, negative numbers are expressed as two's complement numbers.
■float型
浮動小数点数である。符号ビット・指数部・仮数部あわ
せて32ビツトで構成されている。データのフォーマッ
トは5hort realと呼ばれているもので、IE
EE規格に準拠している。第17図にデータフォーマッ
トを示す。■It is a float type floating point number. It consists of a total of 32 bits including the sign bit, exponent part, and mantissa part. The data format is called 5hort real, and is compatible with IE
Conforms to EE standards. FIG. 17 shows the data format.
■bit型
I10ポートに接続とされているセンサ・アクチュエイ
タの操作を行わせるために使用される。bit型の変数
の操作は、bit変数の零判断、bit変数を1にする
、bit変数を0にする、の三つである。これ以外、例
えばorをとるとかandをとるとかはできない。■Used to operate the sensor/actuator connected to the bit type I10 port. There are three operations for bit type variables: determining whether the bit variable is zero, setting the bit variable to 1, and setting the bit variable to 0. Other than this, for example, it is not possible to perform an OR operation or an AND operation.
■port型
I10ボートの8ビット単位の操作を行うために使用す
る。port型はI10ボートアドレスで物理アドレス
が指定される。port型の変数を参照したときには、
char型のデータとして扱われる。port型の変数
に値を設定するには、bit型以外のデータを使用する
ことができ、このとき設定される値はchar型に型変
換されて格納される。■port type Used to perform operations in 8-bit units of the I10 port. For the port type, the physical address is specified by the I10 boat address. When referring to a port type variable,
It is treated as char type data. To set a value in a port type variable, data other than bit type can be used, and the value set at this time is converted to a char type and stored.
内部変数とI10変数
char型・int型弓ong型・float型のデー
タをメモリ上に格納することができる。これを行う言語
処理要素が内部変数宣言である。以下に内部変数宣言の
記述を示す。更に手続き中でI10ポートのデータ即ち
bit型及びport型のデータをアクセスする場合に
も、内部変数宣言と同様の宣言を行う。Internal variables and I10 variable data of char type, int type, ong type, and float type can be stored on the memory. The language processing element that does this is internal variable declaration. The description of the internal variable declaration is shown below. Furthermore, when accessing I10 port data, that is, bit type and port type data during a procedure, a declaration similar to the internal variable declaration is performed.
bit 5ensor 5olenoid。bit 5ensor 5olenoid.
ort out ort;
上の表において、変数ri」 ’j」 ’kJがint
型、r ch 」がchar型、rcount Jがl
ong型、「data」がfloat型として宣言され
、メモリ上にそれぞれの領域が確保される。bit型及
びport型のデータは、メモリ上に領域が確保されず
に、宣言された名前のI10データが使用されているこ
とをコンパイラに知らせるために使用される。ort out ort; In the table above, the variable ri'''j'''kJ is int
type, r ch ” is char type, rcount J is l
ong type and "data" are declared as float types, and respective areas are secured in memory. The bit type and port type data are used to notify the compiler that the I10 data with the declared name is being used without allocating an area in memory.
以下に内部変数宣言の構文を示す。The syntax of internal variable declaration is shown below.
内部変数宣言::・型宣言 名前1”global’型
宣言 名前
1内部変数宣言 2名前
1内部変数宣言 、型宣言
名前
1内部変数宣言 ;内部変数
宣言
1内部変数宣言 〔正定数〕
型宣言::=’char’¥l ’int’ l ’
long’ l ’float’I’bit’ l
’port’ )データ構造対宣言名内部変数の記憶領
域の確保の仕方について述べる。制御実体の内部手続き
は階層をなしている。Internal variable declaration::・Type declaration Name 1 "global' type declaration Name 1 Internal variable declaration 2 Name 1 Internal variable declaration, Type declaration Name 1 Internal variable declaration; Internal variable declaration 1 Internal variable declaration [Positive constant] Type declaration:: ='char'¥l 'int'l'
long' l 'float'I'bit' l
'port') Data structure vs. declaration name Describes how to secure storage area for internal variables. The internal procedures of the control entity are hierarchical.
最上位の手続きの中で宣言された変数は、静的なメモリ
上に確保され、プログラムの実行時に終始存在し続ける
。一方、下位階層として宣言されたブロック中で内部変
数が宣言されると、その内部変数は下位階層が起動され
たときにスタックフレーム上に、動的に生成される。そ
して、下位階層が手続き終了すると確保された変数領域
は消滅する。下位階層の手続きの中で、前記構文にある
ように’global Jという修飾子を型宣言の前に
記述すれば、最上位の静的に宣言された変数をアクセス
することができる。Variables declared in the top-level procedure are allocated in static memory and continue to exist throughout the program execution. On the other hand, when an internal variable is declared in a block declared as a lower layer, the internal variable is dynamically generated on the stack frame when the lower layer is activated. Then, when the lower layer completes the procedure, the secured variable area disappears. By writing the modifier 'global J' in front of the type declaration in the procedure at the lower level, as shown in the above syntax, the statically declared variables at the top level can be accessed.
下位階層呼び出しと入力引数
下位階層手続きを呼び出すときに与えられたデータを、
入力引数と呼んでいる。前述したように、rbegin
端子」に記入されている引数リストがそれにあたる。入
力引数で宣言されたデータも、内部変数と同様にアクセ
スすることができる。入力引数として前述した六つのデ
ータ型を与えることができる。下位階層呼び出し仕組み
は次のようなものである。入力引数には変数のアドレス
が渡される(これで名前呼び出しを実現する)。引数が
char型・int型・long型−float型のと
きには、メモリ上のアドレスが渡される。またbit型
・pOrt型のときにはI10ポートのアドレス、I1
0ボートアドレスとビット位置がそれぞれ渡される。入
力引数をアクセスするときには、与えられたアドレスか
らデータの値を得て使用する。下位階層呼び出しの引数
で変数名でない値が渡されたとき、例えばrl」 r3
.1415Jなどの即値や「i+1」のように演算結果
値の場合、変数でないのでアドレスが定義できない。こ
のような値を下位階層に渡すときに処理系は、まず−時
的なメモリ領域を確保して値を格納する。次に、その格
納した領域のアドレスを下位下層に渡すような走行コー
ドを生成する。Lower layer call and input argument The data given when calling the lower layer procedure,
They are called input arguments. As mentioned above, rbegin
This corresponds to the argument list written in "Terminal". Data declared in input arguments can also be accessed in the same way as internal variables. The six data types mentioned above can be given as input arguments. The lower layer calling mechanism is as follows. The address of the variable is passed to the input argument (this implements name calling). When the argument is of char type, int type, long type, or float type, an address on the memory is passed. Also, for bit type/pOrt type, I10 port address, I1
The 0-vote address and bit position are passed respectively. When accessing an input argument, the data value is obtained from the given address and used. When a value that is not a variable name is passed as an argument to a lower layer call, for example, "rl" r3
.. In the case of an immediate value such as 1415J or a calculation result value such as "i+1", the address cannot be defined because it is not a variable. When passing such a value to a lower layer, the processing system first secures a temporary memory area and stores the value. Next, a running code is generated that passes the address of the stored area to the lower layer.
メツセージ中のデータ
メツセージに含まれるデータのアクセスについて述べる
。メツセージは生成と消滅が頻繁に行われるので、スタ
ックフレームとは異なった独自の記憶領域管理を行う。Data in Messages This section describes access to data contained in messages. Since messages are frequently created and destroyed, they perform unique storage area management that is different from stack frames.
メツセージが入力された時点から、その中に含まれてい
るデータを、内部変数と同じようにアクセスすることが
できる。From the moment a message is entered, the data contained within it can be accessed in the same way as internal variables.
データ構造
char型・int型弓ont型・float型のメモ
リ上に配置される基本データ型は、配列及び構造体と呼
ばれる、より複雑なデータ構造を構成する。連続したメ
モリ領域に−まとまりになって配置されるので、様々な
アルゴリズムに適用し、様々な問題の表現がしやすくな
っている。以下に配列と構造体について述べていく。デ
ータ構造の取扱いは、Cに準拠している。Data Structures Basic data types such as char type, int type, ont type, and float type arranged in memory constitute more complex data structures called arrays and structures. Since they are arranged in groups in a continuous memory area, they can be applied to various algorithms and it is easy to express various problems. We will discuss arrays and structures below. The data structure is handled in accordance with C.
配列
配列はchar型・int型・long型・float
型、更に直後で述べる構造体のデータが指定された個数
だけ連続した領域が確保されて配置されているものであ
る。プラネットでは、多次元配列を使用することもでき
る。配列データはデータ名の直後にデータの要素数(正
の定数)を「0」でくくって宣言することで行う。各要
素が0から100までの属性値」をもつ集合で、10刻
みの度数分布を求めることを例にとって説明する。この
時、rinthist、gras[11) Jとヒスト
グラムを表現する配列を宣言する。配列中の要素は先頭
からの数えた要素数で指定する。配列の先頭要素ばOで
す。’histgrate [il 」は度数のi番
目の要素を指定していて、iのとる値は0から10の1
1種類である。このようにデータ構造を決定して配列の
全ての要素0の初期化する。その後、属性値atrの要
素が与えられると、h i S tgrall中rat
r/IOJ番目の要素を1増加させる。これを規定され
た集合の全ての要素について行うと、0かせ9の値をと
る要素数がhistgram [0] に、10から1
9の値をとる要素数がhistgram[11に000
0.100をとる要素数がhistgram[10]に
得られる。また多次元配列の場合には、rchar b
[10][5] Jのように[1でくくった要素数を並
べることで宣言する。この例ではchar型のデータが
10X5の二次元に束ねられていることを宣言している
。Array arrays are char type, int type, long type, float
A specified number of contiguous areas are secured and arranged for the type and the data of the structure described immediately below. Planets can also use multidimensional arrays. Array data is declared by enclosing the number of data elements (a positive constant) with "0" immediately after the data name. An example will be explained in which a frequency distribution in increments of 10 is determined for a set in which each element has an attribute value from 0 to 100. At this time, declare rinthist, gras[11) J, and an array representing the histogram. Elements in the array are specified by the number of elements counted from the beginning. The first element of the array is O. 'histgrate [il' specifies the i-th element of the frequency, and the value of i is 1 from 0 to 10.
There is one type. In this way, the data structure is determined and all elements of the array are initialized to 0. Then, when an element with attribute value atr is given, rat in h i S tgrall
Increment the r/IOJth element by 1. If this is done for all the elements of the specified set, the number of elements that take the value 0 skein 9 will increase from 10 to 1 in histgram [0].
The number of elements that take the value 9 is histgram[11000
The number of elements taking 0.100 is obtained in histgram[10]. In addition, in the case of a multidimensional array, rchar b
[10] [5] Declare by arranging the number of elements enclosed by 1 like J. This example declares that char type data is bundled in two dimensions of 10×5.
構造体
構造体は、プログラム上で表形式をとるデータを扱いた
いときに用いる。ある計測装置で測定した電流値をれい
にとる。測定データには測定箇所が複数あると測定項目
、連続して測定を続けると測定日時、そして電流値など
複数のデータが含まれていることがある。「電流値」と
−言で表現しても、それが複数の項目で構成されている
。この事柄を第18図のように構造体として宣言して、
使用することができる。構造体にはその型を指定する名
前がつけられてる。この場合、「CurrentDat
a Jがそれにあたるものである。プログラム上で構造
体データを扱うときには、変数・引数の宣言時に構造体
の共に名前を宣言して使用する。Structures Structures are used when you want to handle tabular data in a program. Take the current value measured by a certain measuring device. Measurement data may include multiple data such as measurement items if there are multiple measurement points, measurement date and time if measurements are continued, and current values. Even though it is expressed as a "current value", it is composed of multiple items. Declare this matter as a structure as shown in Figure 18,
can be used. A structure has a name that specifies its type. In this case, "CurrentDat
aJ corresponds to this. When handling structure data in a program, declare the name along with the structure when declaring variables and arguments.
構造体の中で宣言された項目をメンバと呼んでいる。構
造体として宣言されたデータは項目単位で、演算をする
ことができる。構造体中の特定のメンバを指定するには
第18図のように、「、」を用いて行う。構造体のメン
バには、別に宣言された構造体を用いることができる。Items declared within a structure are called members. Data declared as a structure can be operated on item by item. To specify a specific member in the structure, use "," as shown in FIG. A separately declared structure can be used as a structure member.
またメンバに配列することもできる。They can also be arrayed into members.
定数
1とか3.1415あるいはa゛等の即値を定数と呼ぶ
。定数には、文字定数・整定数・浮動小数点定数が設け
られています。An immediate value such as constant 1, 3.1415, or a is called a constant. Constants include character constants, integer constants, and floating point constants.
演算子
以上に述べてきた基本データについて様々な演算をする
ことができる。Cの演算子と同じ記述法をしている。演
算子には単項演算子、二項演算子、三項演算子、代入演
算子がある。Operators Various operations can be performed on the basic data described above. It uses the same notation as C operators. Operators include unary operators, binary operators, ternary operators, and assignment operators.
プーネント
次に、プラネットを用いてプログラムの作成を行うプロ
グラム作成装置の構成を説明する。Next, the configuration of a program creation device that creates programs using Planet will be described.
全体のシステム(ハードウェア)は、例えば、以下の各
部分から構成できる。The entire system (hardware) can be composed of, for example, the following parts.
制御本体側
マイクロプロセッサ
(エディタ、コンパイラ)
主記憶袋W(容量:640キロバイト以上)デイスプレ
ィ(アナログRGBデイスプレィ)
コンソール(マウス)
ターゲット側
駆動系
プロセッサ
通信装置
記憶装置
また、プラネット環境として用意される主要ソフトウェ
アを以下に列記する。Control unit side microprocessor (editor, compiler) Main memory bag W (capacity: 640 kilobytes or more) Display (analog RGB display) Console (mouse) Target side drive system processor Communication device Storage device Also, main software prepared as a planet environment are listed below.
xed、exe エディタ
xpl、exe パーサ
xp2.exe 中間コードジェネレータxp
3.exe 280コードジエネレータxp3c
c、exe C言語テンプレート用データジェネレ
ータ
xp4.exe ネットワークリンカcomm
drv、exe HDLC通信ドライバxnet、e
xe 1(DLCネットワークコンフィギュレータ
xdb、 exe デバッグモニタx io、
exe I 10チx 7カxhex、exe
ROM化ユーティリティプラネットを用いたプログ
ラム開発の流れを第19図を参照して説明する。xed, exe editor xpl, exe parser xp2. exe intermediate code generator xp
3. exe 280 code generator xp3c
c, exe C language template data generator xp4. exe network linker comm
drv, exe HDLC communication driver xnet, e
xe 1 (DLC network configurator xdb, exe debug monitor x io,
exe I 10x 7xhex, exe
The flow of program development using the ROMized utility planet will be explained with reference to FIG. 19.
プラネットプログラムはエディタxedで編集される。The planet program is edited with the editor xed.
編集されたプログラム情報は、パーサxplで構文のチ
エツクが行われる。パーサは一枚の図式毎の中間コード
を生成する。パーサxplで生成されたこれらの中間コ
ードは、ソータxp12によって宣言されたプロセサ(
制御主体)毎に、必要とされる中間コードが取り込まれ
て、大きなひとまとまりの中間コードファイルに変換さ
れる。この中間コードファイルをコードジェネレータx
p3にかけて、280のマシンコードを生成する。なお
、PC9801、PC2B6/386で動作させる場合
には8086のマシンコードジェネレータが作成されな
いので、同様な動作を行うプログラムをC言語で記述す
る必要がある。実行時に必要となる通信パケットの情報
は、Cのヘッダファイルとして出力されるので、これを
取り込んで使用する。このヘッダファイルを生成するの
に必要なデータを生成させるために、PC9801の場
合はxp3ccをかける必要がある。The edited program information is checked for syntax by the parser xpl. The parser generates intermediate code for each diagram. These intermediate codes generated by the parser xpl are the processors declared by the sorter xp12 (
The required intermediate code is captured for each control entity (control entity) and converted into a large set of intermediate code files. Save this intermediate code file to code generator x
p3 to generate 280 machine codes. Note that when operating on a PC9801 or PC2B6/386, an 8086 machine code generator is not created, so a program that performs a similar operation must be written in C language. Information on communication packets required during execution is output as a C header file, so this is imported and used. In order to generate the data necessary to generate this header file, in the case of PC9801, it is necessary to apply xp3cc.
このようにして生成されたz80マシンコードあるいは
C用のヘッダ情報は、リンカxp4によって、ネットワ
ーク上を飛び交うパケットに含まれるコマンドフィール
ドが整えられて実際に動作するコードに変換される。更
に、リンカχp4はz80のアセンブラで記述された’
、tel」ファイルを取り込む。すなわち、プラネット
とアセンブラのリンクが必要な場合には、リンカxp4
をかける段階でそのリンク作業が行われる。The Z80 machine code or C header information generated in this way is converted into code that actually operates by adjusting the command fields included in the packets flying over the network by the linker xp4. Furthermore, the linker χp4 was written in Z80 assembler.
, tel" file. In other words, if you need to link planet and assembler, use linker xp4
The linking work is done at the stage of applying.
ここで、プラネット開発環境が使用するファイルを以下
に列記する。Here, the files used by Planet Development Environment are listed below.
・、src
ソースファイルである。このファイル中に、プログラム
の図形情報が全て格納されている。・, src source file. All graphical information of the program is stored in this file.
ソースファイルを複数個作成して、リンクすることも可
能である。It is also possible to create multiple source files and link them.
dtstruc、def データ構造体の構成を格納したものである。dtstruc, def It stores the configuration of a data structure.
ソースファイルを構文解析する際に必要である。Required when parsing source files.
・、pl
・、srcを構文解析した後に生成される中間コードフ
ァイルである。−枚の図式毎に中間コードファイルが生
成され、ソースファイル・、srcに含まれる全ての図
式の解析結果が含まれている。. , pl ., is an intermediate code file generated after parsing src. - An intermediate code file is generated for each diagram, and contains the analysis results of all diagrams included in the source file .src.
hardimare、def
ネットワークのトポロジー(形状)と、ネットワーク上
の各プロセサ(制御主体)名およびネットワークアドレ
ス、並びに各プロセッサが使用しているI10ボートお
よびI10ビットの名前とアドレスを格納している。中
間コードファイル・、Plを寄せ集めてプロセサ毎の走
行コードを生成するために使用される。hardimare, def Stores the topology (shape) of the network, the name and network address of each processor (control entity) on the network, and the name and address of the I10 port and I10 bit used by each processor. It is used to collect intermediate code files, Pl, and generate running code for each processor.
5rcs、tab
ソータxp2の入力ファイルであり、このファイル内に
は、使用する全てのソースファイル・、srcの名前が
記入されている。このファイルはASCII ファイル
であり、市販のAs(、IIエディタでユーザーにより
作成されるものである。5rcs, tab This is an input file for the sorter xp2, and the names of all the source files to be used are written in this file. This file is an ASCII file and is created by the user using a commercially available As(,II) editor.
◎、p1
ソータxp2によって、プロセサ毎に作成されるファイ
ルである。このファイルは各プロセサが必要する全ての
図式の中間コードがまとめられて格納されている。I1
0ポートのアドレス等のハードウェアに密接した情報は
、中間コードファイル・、Plには含まれていないが、
ソータxp2ニヨってファイル◎、p2に付与される。◎, p1 This is a file created for each processor by sorter xp2. This file stores all the graphical intermediate codes required by each processor. I1
Information closely related to the hardware such as the address of the 0 port is not included in the intermediate code file.
Sorter xp2 niyo is given to file ◎, p2.
ここに、「◎」はプロセサ塩を指している。Here, "◎" indicates processor salt.
◎、tr
デバッガに入力されるデバッグ情報ファイルである。ソ
ースファイルの所在、プログラムの階層構造等が格納さ
れている。◎, tr This is a debug information file input to the debugger. The location of source files, the hierarchical structure of the program, etc. are stored.
cpus、 tab
プログラム上に出現するプロセサのリストを格納したフ
ァイルである。このファイル中には、プロセサ塩、プロ
セサのタイプ、そのネットワーク上のアドレスが含まれ
ている。このファイルはASCII ファイルである。cpus, tab This is a file that stores a list of processors that appear on the program. This file contains the processor salt, processor type, and its network address. This file is an ASCII file.
◎、 cod
z80コードジェネレータxp3が出力する実走行コー
ドのバイナリファイルである。◎, cod This is a binary file of the actual running code output by the Z80 code generator xp3.
◎、p3
ネットワーク上でのリンクを必要とするプログラムのた
めに、パケットのフォーマットの定義、その定義のため
−の参照テーブルの実アドレス等のネットワーク情報が
格納されている。更に、外部ライブラリの参照のための
アセンブラとのリンク情報も含まれている。◎, p3 For programs that require links on the network, network information such as the definition of the packet format and the real address of the reference table for that definition is stored. Furthermore, link information with the assembler for referencing external libraries is also included.
◎、dbx
コードジェネレータが生成するデバッグ情報ファイルで
ある。ソースファイル上で記述されているものが、実コ
ードのどのアドレスに対応しているのか等の情報が格納
されている。◎, dbx This is a debug information file generated by the code generator. Information such as which address in the actual code corresponds to what is written in the source file is stored.
◎、bin
リンカxp4が生成する走行可能なバイナリファイルで
ある。デバッガxdbからダウンロードしたり、ROM
に焼いたりして、実機を動かすことのできる最終的な出
力ファイルである。◎, bin This is a runnable binary file generated by linker xp4. Download from debugger xdb or ROM
This is the final output file that can be used to run the actual machine.
0.cm
プロセサのタイプがz80でないときに、リンカxp4
が生成するCプログラム用ヘッダファイルである。0. cm When the processor type is not z80, the linker xp4
This is a C program header file generated by .
プラネット処理系であるコンパイラにおける各部分の入
出カフアイルの関係を以下に列記する。The relationship between the input and output files of each part of the compiler, which is a planet processing system, is listed below.
入力ヱエ乙上主 処理系 狙力又工不止各・、src
・、srchardware、d
ef xed hardware、defd
tstruc、def dtstruc
、def・、src xpl ・、p
idtstruc、def
−以上の・、pi xp2 cpus、tab
srcs、 tab CPU毎の◎
、p2cpu毎の◎、tr
◎、 p2 xp3 ◎、 c
od◎、dbx
◎、p3
cpus 、 tab xp4 ◎
、bin◎、 cod
◎、p3
次に、エディタの動作およびコンパイラを構成している
各処理部の動作を説明する。Input 〱〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〈〉〈〈〈
・,srchardware,d
ef xed hardware, defd
tstruc, def dtstruc
,def・,src xpl・,p
idtstruc, def - or more, pi xp2 cpus, tab
srcs, tab ◎ for each CPU
, p2 per cpu ◎, tr ◎, p2 xp3 ◎, c
od◎, dbx◎, p3 cpus, tab xp4◎
, bin ◎, cod ◎, p3 Next, the operation of the editor and the operation of each processing unit making up the compiler will be explained.
(エディタxed)
エディタxedは、プラネットプログラムの図形情報を
編集し、その図形情報を蓄積するソースファイルを生成
する。プログラム情報には、プログラマが作成したプラ
ネットの手続きを蓄積する・、srcファイル、ハード
ウェアの入出力ボート情報を蓄積するhardware
、defファイル、およびデータ構造体宣言の情報を蓄
積するdtstruc、defファイルがある。これら
三種類のファイルがエディタxedでエデイツトされる
。(Editor xed) Editor xed edits the graphic information of the planet program and generates a source file that stores the graphic information. Program information includes a src file that stores planet procedures created by the programmer, and a hardware file that stores hardware input/output boat information.
, def file, and dtstruc, def file that stores information on data structure declarations. These three types of files are edited using the editor xed.
プラネットプログラムは一枚の画面毎に形成されており
、画面単位のエデイツトが必要である。The planet program is created for each screen, and requires editing for each screen.
従って、予め一枚の画面中に許容できる最大の領域長を
設定し、その最大長だけの連続した記憶領域を一単位と
して記憶の管理を行うようになっている。この単位記憶
領域をメモリブロックと呼ぶ。Therefore, the maximum allowable area length in one screen is set in advance, and storage is managed using a continuous storage area of the maximum length as one unit. This unit storage area is called a memory block.
また、エディタでは複数の画面を一度に表示、編集でき
るよにするために、複数のメモリブロックを主記憶ある
いは補助記憶中に保持できるようになっている。ここに
、プラネットプログラムはその言語仕様から画面が階層
的木構造をもっている。Additionally, the editor can hold multiple memory blocks in main memory or auxiliary memory in order to display and edit multiple screens at once. Here, the screen of the Planet program has a hierarchical tree structure due to its language specifications.
従ってブロック管理情報を表わすものとして、第20図
に示すようなブロックタッグ(Block Tag)が
設定される。Therefore, a block tag as shown in FIG. 20 is set to represent block management information.
エデイツト作業は、例えばマウスとキーボードによって
行われる。またこの作業はマルチウィンドウ方式で行わ
れる。上記したようにプラネットプログラムは一枚の図
式毎に作成される。図式を表示した一枚のシートが一つ
のウィンドウに対応する。ウィンドウには、プログラム
図式の他にハ−ドウエアのアドレス宣言、データ構造体
宣言も含まれている。これらのウィンドウを重ねて表示
しながら幾つものウィンドウを同時にエデイツト可能で
ある。すなわち、プラネットプログラム管理情報はウィ
ンドウシステムと連結されており、第21図に示すリス
ト構造となっている。従って、以下の手順によりマウス
のイベントからプラネットプログラム画面情報が得られ
る。Editing work is performed using, for example, a mouse and keyboard. This work is also done using a multi-window method. As mentioned above, a planet program is created for each diagram. One sheet displaying a diagram corresponds to one window. In addition to the program diagram, the window also includes hardware address declarations and data structure declarations. It is possible to edit several windows at the same time while displaying these windows one on top of the other. That is, the planet program management information is connected to the window system and has a list structure as shown in FIG. Therefore, planet program screen information can be obtained from mouse events by the following procedure.
■マウスのイベントのLV座標からウィンドウシステム
が該当ランドウの識別子を得る。■The window system obtains the identifier of the corresponding land from the LV coordinates of the mouse event.
■表示ブロックリスト中、このウィンドウ識別子の一致
する要素を探索し、ブロック管理情報rBIock T
ag Jを得る。■ Search the display block list for an element that matches this window identifier, and retrieve the block management information rBIock T
Get ag J.
■このrBlock Tag 」中のブロック本体の内
容に基づき、記憶媒体内から画面情報を得る。■Obtain screen information from the storage medium based on the contents of the block body in this rBlock Tag.
ここで、プラネットコンパイラは、ネットワーク上に複
数のプロセサが存在する場合には、それぞれのプロセサ
上で動作するそれぞれの走行コードを一度に作成する。Here, if there are multiple processors on the network, the planet compiler creates each running code that runs on each processor at once.
このために、コンパイラは、ネットワーク上にどのよう
なプロセサが存在するのか、各プロセサがどのような構
造で結合されているのか、プロセサ上にどのようなI1
0ボートが組み込まれ、どのボートアドレスにどのよう
なハードウェアが接続されているのかといった情報が必
要である。かかる情報を規定することをハードウェア宣
言という。この宣言はプログラムの手続きと同様に必ず
必要なものである。この宣言を、第22図に示すような
ネットワーク構造のシステムを例に挙げて説明する。For this purpose, the compiler determines what kind of processors exist on the network, what kind of structure each processor is connected to, and what kind of I1 on the processor.
0 port is installed, and information such as what kind of hardware is connected to which boat address is required. The specification of such information is called a hardware declaration. This declaration is absolutely necessary, just like the program procedure. This declaration will be explained using a system with a network structure as shown in FIG. 22 as an example.
まず、この宣言における各プロセサの宣言について説明
する。ネットワーク上のプロセサはそれ自体が制御実体
であるので名前が必要となる。図示の例では、プロセサ
r hos t 」にrmeasurement」とr
assembly Jの二つのプロセサが結合されて
いる。更に、rs+easurement Jにはrs
ubm」が接続されている。この図において左肩に記述
されている数字がネットワークアドレスを表している。First, the declaration of each processor in this declaration will be explained. Processors on a network require names because they are themselves controlling entities. In the illustrated example, the processor "r host" has "rmeasurement" and r
Two processors of assembly J are combined. Furthermore, rs+easurement J has rs
ubm" is connected. In this figure, the number written on the left shoulder represents the network address.
各プロセサの宣言は、プロセサ塩、プロセサのタイプお
よびネットワーク形状をそれぞれ特定することにより行
われる。プロセサ塩はキーボードから制御実体名として
記述できる文字列を入力することによって特定される。Each processor is declared by specifying the processor salt, processor type, and network shape, respectively. A processor salt is specified by inputting a character string that can be written as a control entity name from the keyboard.
プロセサのタイプは例えば以下のキーワードのうちの一
つを入力することによって特定される。コンパイラはプ
ロセサのタイプ毎に異なる出力を生成する
Jupiter’ 5TD−バスシステムJup
iterの駆動系に合わせた走行コードを生
成する。The type of processor is specified, for example, by inputting one of the following keywords. The compiler produces different output for each type of processor.Jupiter' 5TD-Bus SystemJup
Generate a running code that matches the drive system of the iter.
10 IOシステムIO用の駆動系に合わ
せた走行コードを生成する。10 IO system Generate a running code that matches the drive system for IO.
パーソナルコンピュータ パーソナルコンピュータ上で動 作するCプログラムのために、 通信パケットの形状を宣言した ヘッダファイルを生成する。プ ログラム実体は、ユーザがCに よりプログラムする。Personal computer Runs on a personal computer For the C program to be created, Declared the shape of the communication packet Generate header files. P The program entity is created by the user in C. Program more.
次に、ネットワーク形状の宣言を説明する。この宣言は
木構造におけるネットワークにおいて、−階層中に存在
するプロセサの宣言を行うことである。図示のネットワ
ークでは、n+easurementとassen+b
lyが結合されているので、プロセサhos tに対し
てこれらのプロセサmeasurement とass
emblyが宣言される。第23図(A)には、−階層
中に存在する三つのプロセサを宣言した例を示しである
。この図において、左から順に、ネットワークアドレス
、プロセサタイプ、プロセサ塩が宣言されている。また
、これらのプロセサのネットワーク関係が上下の配置関
係で示されている。このようにして、ネットワーク−階
層文のプロセサ接続関係が宣言される。ここに、図示の
ネットワークにおいては、プロセサsubmも宣言しな
ければならない。このプロセサは+weasureme
ntの下位層に接続されている。これを宣言するために
はmeasuresentに対して第23図(B)に示
すようにsubmを宣言する。プラネットコンパイラは
、このようなネットワーク宣言の情報をもとに、プログ
ラム中に含まれているプロセサを検出し、そのプロセサ
に割り振るべき走行コードを作成する。Next, the declaration of network shape will be explained. This declaration is to declare the processors existing in the -hierarchy in a tree-structured network. In the network shown, n+asurement and assen+b
Since ly is coupled, these processors measurement and ass for processor host
assembly is declared. FIG. 23(A) shows an example in which three processors existing in the - hierarchy are declared. In this figure, from the left, the network address, processor type, and processor salt are declared. Furthermore, the network relationship of these processors is shown in terms of their vertical arrangement. In this way, the network-hierarchical statement processor connection relationship is declared. Here, in the illustrated network, the processor subm must also be declared. This processor is +weasureme
It is connected to the lower layer of nt. To declare this, subm is declared for measureresent as shown in FIG. 23(B). The planet compiler detects the processor included in the program based on such network declaration information, and creates running code to be allocated to that processor.
(コンパイラ)
ユーザが入力したプラネットプログラムの図形情報を、
制御機器上で直接実行可能なプログラムに変換する処理
系であり、ペトリネットの実行制御規則をプログラム解
析時に導入し、グラフ理論における叶S 、 BFS
、 DAC等のような手法を用いて、コントロールフロ
ー、データフローラ解析シ、図形で得られるプラネット
プログラム構造を並列に動作する複数の逐次プロセスに
展開する。このようにして生成された各プロセスに対し
て、マイクロプロセサのコード選択、生成コードの最適
化を適用して実走行コードを生成している。以下に、コ
ンパイラの各処理系について説明する。(Compiler) The graphic information of the planet program input by the user is
It is a processing system that converts programs into programs that can be directly executed on control equipment, and it introduces Petri net execution control rules during program analysis, and is based on graph theory's Kano S and BFS.
, DAC, etc. are used to develop the planet program structure obtained from control flow, data flow analysis, and graphics into multiple sequential processes that operate in parallel. For each process generated in this manner, microprocessor code selection and generated code optimization are applied to generate actual running code. Each processing system of the compiler will be explained below.
パーサxpl
パーサxplは、エディタxedで作成されたプラネッ
トプログラムの図形情報ファイル・、srcを解析して
、仮想機械の走行コードである三番地コードを生成する
。プログラムの三番地コードは・、plという中間コー
ドファイルに格納される。パーサxplは一枚のプログ
ラム枠毎に解析を行う。生成された一枚毎のプログラム
情報は、以陣の操作で一つにまとめられて、大きなプロ
グラムを構成することになる。Parser xpl The parser xpl analyzes the graphic information file .src of the planet program created with the editor xed, and generates the third address code, which is the running code of the virtual machine. The third address code of the program is stored in intermediate code files named .pl. Parser xpl analyzes each program frame. The generated program information for each sheet is combined into one by a simple operation to form a large program.
ソータxp2
ソータxp2は、パーサxplが出力するブロック毎の
解析結果を、中間コードレベルでリンクする。Sorter xp2 Sorter xp2 links the analysis results for each block output by parser xpl at the intermediate code level.
リンクされた中間コードは、プロセサ毎にファイルに格
納される。このファイルを次に述べるコードジェネレー
タにかけて、実際に走行−可能なマシンコードをプロセ
サ毎に得ることができる。The linked intermediate code is stored in a file for each processor. By applying this file to the code generator described below, machine code that can actually be run can be obtained for each processor.
ソータxp2の動作を述べると次のようになる。The operation of the sorter xp2 will be described as follows.
■まず、エディタxedで作成されたhardware
、defファイルに格納されているプロセサ「◎」を求
める。■First, the hardware created with the editor xed
, find the processor "◎" stored in the def file.
■プロセサの名前と一致するブロックを、指定された入
力ファイル群の中から検索して、そのブロックの中間コ
ードを、◎、p2というファイルに格納する。◎ Search the specified input file group for a block that matches the name of the processor, and store the intermediate code of that block in a file named ◎ and p2.
■更にプロセサの名前とおづいつのブロックが下位階層
ブロックを呼び出している場合には、その下位階層ブロ
ックを検索して、◎、p2に追加する。(2) Furthermore, if the processor name and block call a lower layer block, search for that lower layer block and add it to ◎ and p2.
また、それらのブロックが起動している全ての制御実体
のブロックも同じように検索して、◎、p2ファイルに
追加する。In addition, the blocks of all control entities activated by these blocks are searched in the same way and added to the ◎, p2 file.
■必要される全てのブロック◎、p2ファイルに格納す
るときに、そのプロセサ◎が漏っているI10ボートと
ビットのアドレス、名前の情報を検索して、ブロック中
において、I10ポート、ビットを使用している場合に
はそれらのアドレスを◎、p2ファイルに書き込む。■When storing all the necessary blocks◎ and p2 files, the processor◎ searches for the address and name information of the leaked I10 ports and bits, and uses the I10 ports and bits in the block. If so, write those addresses to the p2 file.
■下位階層ブロックがアクセスしているグローバル変数
をリンクする。■Link global variables accessed by lower hierarchy blocks.
ここで、このソータxp2を起動させる前に、入力ファ
イルリストを定義する5rcs、tabというファイル
を作成しておく必要がある。このファイルは、市販のA
SCIIファイルエディタで編集可能である。Here, before starting this sorter xp2, it is necessary to create files 5rcs and tab that define the input file list. This file is a commercially available A
It can be edited with a SCII file editor.
二〇5rcs、tabファイルの中にプログラムが必要
とする全てのソースファイルの名前を記入しておく。205. Enter the names of all source files required by the program in the rcs and tab files.
ソータxp2はこのファイルを読むことにより入力ファ
イルを検知し、前述の動作を行う。Sorter xp2 detects the input file by reading this file and performs the operations described above.
コードジェネレータxp3
コードジェネレータxp3は、ソータxp2が出力する
仮想機械の中間コードを入力として、それと等価なz8
0が走行可能なマシンコードを生成する。Code generator xp3 The code generator xp3 takes as input the intermediate code of the virtual machine output by the sorter xp2, and generates the equivalent z8
0 generates runnable machine code.
生成されるマシンコードは、後述するプラネット駆動系
に依存している。上記のソータxp2が出力する◎、p
2ファイルには、プロセサが単体で走行可能な全ての情
報が含まれている。ジェネレータxp3はその情報をも
とに、マシンコードばがりでなく、ネットワーク上のリ
ンク情報、他言語とのリンク情報を生成する。The generated machine code depends on the planet drive system described below. The above sorter xp2 outputs ◎,p
The 2 files contain all the information that the processor can run on its own. Based on this information, the generator xp3 generates not only machine code but also link information on the network and link information with other languages.
リンカxp4
リンカxp4は、コードジェネレータxp3が生成する
ネットワーク上のリンク情報と、アセンブラとのリンク
情報をもとに、それらの要件をすべてリンクして、プラ
ネット駆動系上で実際に動作可能なマシンコードを生成
する。またCで記述されたプロセサに対して、ネットワ
ーク上でリンクするためのC用ヘッダファイルを作成す
る。リンカxp4は、コードジェネレータの出力を受け
て動作する。まず、コードジェネレータが出力するネッ
トワーク上のリンク情報の整合性を検出して、ネットワ
ーク上を飛び交う通信パケットの形状を決定する。次に
、アセンブラで記述されたモジュールをリンクするため
の情報をもとに、指定されたライブラリファイルからそ
のモジュールを検索して、走行コードを追加する。この
ようにして得られた走行コードを、実走行コードファイ
ルとして出力する。プラネットプログラム中に複数のプ
ロセサが記述されていると、全てのプロセサの実走行コ
ードファイルを一度に生成する。Linker xp4 The linker xp4 links all the requirements based on the link information on the network generated by the code generator xp3 and the link information with the assembler, and creates machine code that can actually operate on the planet drive system. generate. Also, for a processor written in C, a C header file is created for linking on the network. The linker xp4 operates upon receiving the output of the code generator. First, the consistency of the link information on the network output by the code generator is detected, and the shape of communication packets flying over the network is determined. Next, based on the information for linking the module written in assembler, the module is searched for in the specified library file and running code is added. The running code obtained in this manner is output as an actual running code file. If multiple processors are described in the planet program, the actual running code files for all processors are generated at once.
(デバッガxdb)
プラネットのコンパイラを介して得られた実行可能なマ
シンコードが正しく動作するか否かは、デバッグモニタ
を用いて検証できる。デバッグモニタプログラムは例え
ば、PC9801、PC286/386上で実行可能で
ある。このデバッガの内容は、プログラムのダウンロー
ド、プログラムのトレース、I10ボートのモニタリン
グ、変数の参照および更新などの機能がある。このデバ
ッガにより、ターゲトプロセサの動作をソースレベルで
監視することが可能である。ソースレベルでデバッグ可
能であるので、デバッグ作業を効率良く行うことができ
。なお、このデバッグ作業は、エディタによるプログラ
ム作成と同様にマウスとキーボードを使用して、マルチ
ランドウ上で行うことができる。(Debugger xdb) Whether executable machine code obtained through Planet's compiler operates correctly can be verified using a debug monitor. The debug monitor program can be executed on, for example, a PC9801 or a PC286/386. This debugger has functions such as downloading programs, tracing programs, monitoring I10 ports, and referencing and updating variables. This debugger allows the operation of the target processor to be monitored at the source level. Since debugging is possible at the source level, debugging can be done efficiently. Note that this debugging work can be performed on a multi-landscape using a mouse and keyboard in the same way as when creating a program using an editor.
ターゲットプロセサのモニタリングは、デバッガxdb
が走行する処理系とターゲットプロセサが専用のHDL
C通信改選で結合されたネットワークを介して行う。タ
ーゲットプロセサに通信路を介して問い合わせコマンド
を発行し、その応答に基づきターゲットプロセサの状態
を監視する。Monitoring of the target processor is done using the debugger xdb.
The processing system that runs and the target processor are dedicated HDL
It is carried out via a network connected by C communication reform. An inquiry command is issued to the target processor via a communication path, and the state of the target processor is monitored based on the response.
ここで、プラネットプログラムを動作させるターゲット
プロセサ駆動系の実行時の負荷を軽減するために、ネッ
トワークコンフィギユレーションという作業が行われる
。この作業は、通信の制御を行う基板にネットワークの
様々な情報を予め付与することであり、これによって通
信基板と駆動系とを並列に動作させて、機能分散を図る
ためのものである。このコンフィギユレーションが行わ
れた駆動系では、この情報が例えばバッファ・ノブ用の
RAMなどの記憶装置内に保持される。Here, an operation called network configuration is performed in order to reduce the load during execution on the target processor drive system that runs the planet program. This work involves providing in advance various information about the network to the board that controls communication, and thereby allows the communication board and drive system to operate in parallel to achieve functional distribution. In a drive system with this configuration, this information is held in a storage device, such as a RAM for a buffer knob.
デバッグ動作を説明する。まず、画面上にプラネット駆
動系のネットワーク情報を表示する。すなわち、エディ
タxedで編集したファイルhardimare、de
fのネットワーク情報を表示する。この表示画面をプロ
セサウィンドウと呼び、第24図に示すように表示され
る。この図において、各プロセサの左肩の数字がネット
ワークアドレスであり、左下の数字がプロセサの識別子
である。これらの情報は、ファイルhardware、
def内の情報からコンパイラが自動的に生成したもの
である。Describe debugging operations. First, the network information of the planet drive system is displayed on the screen. In other words, the file hardimare, de edited with the editor xed
Display network information for f. This display screen is called a processor window and is displayed as shown in FIG. In this figure, the number on the left side of each processor is the network address, and the number on the lower left side is the processor identifier. This information is stored in the file hardware,
It is automatically generated by the compiler from the information in def.
次に、モニターすべきターゲットプロセサを指定して、
そのプロセサの走行コードに含まれている全ての手続き
の階層情報を表示させる。この手続きはソータxp2と
リンカXρ4によって寄せ集められた手続きである。第
25図には、プロセサ「hosJの階層図を示しである
。この階層情報のうちの目標とするフ゛ロックにおける
ソースプログラムを呼び出す。指定されたソースプログ
ラムはソースファイルから検索される。第26図には呼
び出されたra+ain」というブロックのソースプロ
グラムを表示しである。このようにしてソースプログラ
ムを呼び出した後は、このプログラムが指定したターゲ
ットプロセサにダウンロードされる。Next, specify the target processor to monitor,
Displays the hierarchical information of all procedures included in the running code of that processor. This procedure is a procedure put together by sorter xp2 and linker Xρ4. FIG. 25 shows a hierarchical diagram of the processor ``hosJ.'' The source program in the target block of this hierarchical information is called. The specified source program is searched from the source files. shows the source program of the called block ``ra+ain''. After calling the source program in this way, this program is downloaded to the specified target processor.
次に、ブレークポイントの設定が行われる。成る処理要
件の所にブレークポイントが設定されると、その設定が
行われた旨の表示がこの処理要件の枠の部分に表示され
る。ブレークポイントの設定後は、ターゲットプロセサ
の実行を開始する。Next, breakpoints are set. When a breakpoint is set at a processing requirement, an indication that the breakpoint has been set is displayed in the frame of this processing requirement. After setting the breakpoint, start execution of the target processor.
ターゲットプロセサの実行中においては、作成した状態
の図形情報からなるソースプログラムが継続して表示さ
れており、ブレークポイントが設定されている節の部分
に制御が到達すると、その節の部分に例えば赤色の円が
点滅して、その旨が表示され、ここの部分で制御が停止
する。While the target processor is running, the source program consisting of the graphic information in the created state is continuously displayed, and when control reaches a section where a breakpoint is set, that section is displayed in red, for example. The circle will blink to indicate this, and control will stop at this point.
ブレークポイントに到達しているプロセスをトレースて
−ステップづつ制御を実行させる場合には、処理位置を
示す赤色の円が動作中の処理要件の中に順次表示される
。When tracing a process that has reached a breakpoint and executing control step by step, red circles indicating processing positions are sequentially displayed in the processing requirements that are in operation.
このようにしてデバッグされた後のプログラムは、EF
ROMなどの記憶媒体内に格納される。The program after being debugged in this way is EF
It is stored in a storage medium such as ROM.
プーネ・・トの \
次に、上記のように作成されたプラネットプログラムを
実行するための駆動系を説明する。\Next, the drive system for executing the planet program created as described above will be explained.
第27図に駆動系(カーネル)の全体構成を示す。図に
おいて矢印はプロセスの流れを示す。ここに、プロセス
とはカーネル内で活性化されているプログラムコントロ
ールを指している。FIG. 27 shows the overall configuration of the drive system (kernel). In the figure, arrows indicate the flow of the process. Here, a process refers to a program control activated within the kernel.
図において、In1tial Control は、カ
ーネルが立ち上がった時点で、初期に実行すべきプロセ
スを(もしあれば) Process Executi
onに送る。cp/inは、他プロセスからのパケット
を受理する通信ポートである。パケット自身もプロセス
である。In the figure, InInitial Control controls the process to be executed initially (if any) when the kernel starts up.
Send to on. cp/in is a communication port that accepts packets from other processes. The packet itself is also a process.
Rx packet Manangesentは、受理
したパケットに評価して、パケットで表現された処理を
行う。必要に応じてプロセスをProcess Exe
ncutionへ送る。The Rx packet manager evaluates the received packet and performs the processing expressed in the packet. Process Exe if necessary
Send to ncution.
Process Executionは、In1tia
l Control或いはRx Packet Man
agementから送られてきたプロセスを順繰りに実
行する。実行しているプロセサが時間待ち要求を発行す
れば、該プロセスをDelay C。Process Execution is In1tia
l Control or Rx Packet Man
The processes sent from the agent are executed in order. If a running processor issues a time wait request, the process is delayed to Delay C.
ntrolへ送る。また、実行プロセスが他プロセサ実
行要求を発行すれば、該要求をプロセスに整形してTx
Packet Managea+entへ送る。De
lay Contr。Send to ntrol. Also, if the execution process issues a request for execution by another processor, the request is formatted into the process and Tx
Send to Packet Managea+ent. De
lay contr.
1は、Process Executiontから送ら
れたプロセスを待ち時間をパラメータとして受理し。該
プロセスを指定された時間だけ保持してその後再びPr
ocess Executionに送出する。Tx P
acket Managementは、受理したプロセ
スをCPloutを介して、化プロセサに送出する。1 accepts the process sent from Process Execution with the waiting time as a parameter. Hold the process for a specified period of time and then run Pr again.
Send to cess Execution. TxP
acket Management sends the accepted process to the conversion processor via CPlout.
(プロセスの並列駆動制御)
プラネットプログラムの実行中においては、プロセサ内
にプロセスが一つ以上存在する。複数のプロセスを同時
的に動作させるための手法としては、TSS(Time
Shearing System)が一般的に採用さ
れている。しかし、この手法では、共有変数を複数のプ
ロセスがアクセスすることに起因して必ず副作用が発生
する。この副作用がプログラム検証時に大きなネックに
なり、デバッグを困難にしている原因と考えられるので
、代替手法の必要性がある。以下に、この点を詳細に説
明する。(Parallel drive control of processes) While the planet program is being executed, one or more processes exist in the processor. As a method for running multiple processes simultaneously, TSS (Time
Shearing System) is generally adopted. However, with this method, side effects always occur due to multiple processes accessing shared variables. This side effect is considered to be a major bottleneck during program verification and makes debugging difficult, so there is a need for an alternative method. This point will be explained in detail below.
機器組み込み型ソフトウェアの特質に鑑みると、対象と
なる制御機器の動作は、CPUの処理能力に比べて充分
に遅いものであると見なすことができる。例えば、機械
体を制御するI10ボードのホトカプラの応答速度でさ
えもlOミリ秒のオーダーであり、この程度の時間があ
れば、z80であってもかなりの処理を実行することが
可能である。この点に鑑みれば、並行して動作する複数
のプロセスは、どこかの事象待ちに[引っ掛かり引っ掛
かり」実行されている。そして、事象が生起すれば一瞬
のうちに応答処理をこなすことになる。このように、一
般的には事象生起の時間間隔に比べて、応答処理に要す
る時間は極めて少ない。この点を考慮して、本プラネッ
ト駆動系においては並行駆動処理の原理として以下の内
容のものを採用している。Considering the characteristics of device-embedded software, the operation of the target control device can be considered to be sufficiently slow compared to the processing capacity of the CPU. For example, even the response speed of the photocoupler of the I10 board that controls the machine body is on the order of 10 milliseconds, and with this amount of time, even a Z80 can perform a considerable amount of processing. In view of this, multiple processes running in parallel are executed ``catch-by-catch'' while waiting for some event. Then, when an event occurs, response processing is completed in an instant. In this way, the time required for response processing is generally extremely short compared to the time interval between event occurrences. In consideration of this point, the following principle of parallel drive processing is adopted in this planet drive system.
複数のプロセスがそれぞれ事象待ち状態にある場合を考
慮する。この場合には、各プロセスは事象の生起を検知
する。事象が生起していなければ、他のプロセスを実行
するように、システムコール(SWAP)を行う。この
ようにして、複数の事象待ちを順繰りに検知して、事象
が生起したときにはプロセスは応答処理を直ちに行い、
しかる後にシーケンス中の次に事象待ち処理まで走行す
る。Consider the case where multiple processes are each waiting for an event. In this case, each process detects the occurrence of an event. If no event has occurred, a system call (SWAP) is made to execute another process. In this way, multiple event waits are sequentially detected, and when an event occurs, the process immediately handles the response.
After that, the sequence moves to the next event waiting process.
すなわち、Process Executionは、I
n1tial C。That is, Process Execution is I
n1tial C.
ntrol 、Rx Packet Manageme
nt 或いはDelay C。ntrol, Rx Packet Manageme
nt or Delay C.
n tro lから送られてくるプロセスを蓄積する。Accumulate processes sent from ntrol.
これらのプロセスは第28図に示すように、リングキュ
ーに結合することで蓄積する。更に、Rungなるプロ
セスへのポインタを設定する。Process Exc
ecutionの並行動作形態は次のようになる。These processes accumulate by binding to a ring queue, as shown in FIG. Furthermore, a pointer to a process named Rung is set. ProcessExc
The parallel operation mode of execution is as follows.
■Rungの指示するプロセスのProgram Co
de addressタグが示すコードアドレスに制御
を渡す。■Program Co of the process instructed by Rung
Control is passed to the code address indicated by the de address tag.
■制御を渡されたプロセスは、与えられたコードを走行
し、Program Excecutionに制御を戻
す。- The process to which control has been handed runs the given code and returns control to Program Execution.
■RunHの指示するプロセスを一つ進める。- Advance one process instructed by RunH.
■上記の■ないし■までの動作を繰り返す。■Repeat the steps from ■ to ■ above.
プロセスの走行コード詳細について説明する。The details of the process running code are explained below.
第29図には、revent lを検出した後に、ac
tion 1を実行し、更にevent 2を検知する
」という逐次手続きと、revent 3を検知した後
、action 2を実行する」という逐次手続きの例
が示されている。この図において、(b)と(d)とに
現れているUPDATEPCというコードはシステムコ
ールである。これは上記の5WAPでプロセス駆動が行
われるときに、走行コードアドレスを、tlPDATE
Pcの直後に設定する機能を果たす。プロセスの実行を
走行コードを追って述べる。手続き列(b)を走行する
プロセスが(ア)に到達すると、UPDATAPCによ
ってそのプロセスを表すPCB(Process Co
ntrol Block)には(イ)のアドレスが登録
される。次に(イ)の事象検知を行い、これが生起して
いなければ(つ)の5WAPによってプロセスの実行が
中断される。再び、そのプロセスが実行されるときには
、このUPDATAPCで設定された(イ)のアドレス
から実行される。event 1が生起していなければ
再び5WAPによって実行が中断される。しかし、この
event 1が生起していれば、(1)のactio
n 1の実行コードを走行して、次に事象待ちのための
(オ)のUPDATEPCを行って、事象待ちeven
t 2を検知する。同様にして、event 3を検知
する手続きが行われる。In FIG. 29, after detecting revent l, ac
Examples of the sequential procedure ``execute action 1 and then detect event 2'' and the sequential procedure ``after detecting event 3, execute action 2'' are shown. In this figure, the code UPDATEPC appearing in (b) and (d) is a system call. This will change the running code address to tlPDATE when the process is driven using the above 5WAP.
Performs the function of setting immediately after Pc. The execution of the process is described by following the running code. When the process running in procedure sequence (b) reaches (a), the PCB (Process Column) representing that process is updated by UPDATAPC.
The address (a) is registered in the (ntrol Block). Next, the event (a) is detected, and if this event has not occurred, the execution of the process is interrupted by (a) 5WAP. When the process is executed again, it is executed from the address (a) set by this UPDATAPC. If event 1 has not occurred, execution is interrupted again by 5WAP. However, if this event 1 occurs, the action of (1)
Run the execution code of n1, then perform UPDATEPC (e) for waiting for an event, and wait for an event
Detect t2. Similarly, a procedure for detecting event 3 is performed.
(プロセスの駆動制?il)
プロセスへの順繰りなCPUタイムのサービスを行わせ
るためには、それぞれのプロセスに対応しているPCB
は、上述したように駆動系内でリングキュー(駆動キュ
ー)に結合されている。駆動キューに結合されているP
CBがその時点で実行される。この駆動キューに対剋て
PCBを挿入し、あるいは削除するシステムコールが用
意されている。(Process drive system?il) In order to provide sequential CPU time service to processes, it is necessary to use a PCB that corresponds to each process.
is coupled to the ring cue (drive cue) within the drive system as described above. P coupled to the driving queue
CB is executed at that point. System calls are provided for inserting or deleting PCBs in this drive queue.
このウチ、システムコールFORKは、プラネットプロ
グラムの実行時に、駆動キューに新たなPCBを挿入す
ることで、新しいプロセスを生成して並列に動作させる
ためのものである。このFORl[には起動したい手続
きの先頭アドレスがパラメータとして設定されている。The system call FORK inserts a new PCB into the drive queue when the planet program is executed to generate a new process and run it in parallel. The starting address of the procedure to be started is set as a parameter in this FORl[.
プロセスの実行の側面から述べると、あるプロセスがF
ORKシステムコールに到達したときには、駆動系は新
たなプロセスを一つ得てそれを駆動キューに挿入する。From the aspect of process execution, if a process
When the ORK system call is reached, the drive system gets a new process and inserts it into the drive queue.
この新たに挿入されたプロセスの処理後に、FORKを
発行したプロセスが実行を継続する。FORKは処理を
終了した後には、生成したプロセスの識別子を発生する
。After processing this newly inserted process, the process that issued the FORK continues execution. After FORK completes processing, it generates an identifier for the generated process.
この手続きを第30図に示しである。図に示すように、
Process Exwcution下で実行状態にあ
るプロセスの走行コードがProcess Excec
utionに対してFORKを発行することにより、他
コードがプロセスを得て、並行駆動状態に参加する。こ
の手続きの入力パラメータとして被駆動コードアドレス
をあたえ、FORK手続きを呼び出すことにより、プロ
セス識別子が出力パラメータとして得られる。This procedure is shown in FIG. As shown in the figure,
The running code of the process running under Process Exwcution is Process Excec.
By issuing a FORK to the application, other code acquires the process and participates in the parallel drive state. By giving the driven code address as an input parameter to this procedure and calling the FORK procedure, the process identifier is obtained as an output parameter.
次にABORTシステムコールは、一連の逐次的手続き
列を実行し終えたプロセスを放棄するときに発行される
。これが発行されると、駆動系はそのプロセスに対応す
るPCBを駆動キューから削除して棄却する。すなわち
、第31図に示すように、実行状態にあるプロセスが走
行終了し、プロセス駆動を放棄する場合、このプロセス
がProcess Executionに対してABO
RTを発行することで、このプロセスは並行駆動系から
除外されることになる。The ABORT system call is then issued to abandon a process that has completed executing a series of sequential procedures. When this is issued, the drive system removes the PCB corresponding to that process from the drive queue and discards it. That is, as shown in FIG. 31, when a running process finishes running and abandons process driving, this process issues an ABO to Process Execution.
Issuing an RT will remove this process from the concurrent drive system.
KILLシステムコールは、実行中のプロセスを別のプ
ロセスから破棄したい場合に発行される。入力パラメー
タとして、プロセスの識別子が必要となる。KILLが
発行されたときに、駆動系は指定されたプロセスに対応
するPCBを駆動キューから削除して破棄する。この後
に、KILLを発行したプロセスが実行を継続する。す
なわち、第32図に示すように、実行状態にあるプロセ
スの走行コードがProcess Execution
に対して他プロセスの中止要求KILLを発行すること
により、他プロセスを並列駆動系から除外する。KIL
L手続きの入力パラメータとして、手続きFORKによ
って返されたプロセス識別子を用いる。即ち、関連し合
って並列駆動しているプロセス群は、中止すべきプロセ
スの識別子を認識する手段を有している必要がある。The KILL system call is issued when a running process is desired to be destroyed by another process. The process identifier is required as an input parameter. When a KILL is issued, the drive system removes the PCB corresponding to the specified process from the drive queue and discards it. After this, the process that issued the KILL continues execution. That is, as shown in FIG. 32, the running code of the process in the execution state is Process Execution.
The other process is excluded from the parallel drive system by issuing a KILL request to terminate the other process. KIL
The process identifier returned by procedure FORK is used as an input parameter of the L procedure. That is, a group of related processes running in parallel must have means for recognizing the identifier of the process to be canceled.
DELAVシステムコールは、入力パラメータで指定さ
れた時間だけプロセス駆動を中断させるときに発行され
る。このコールを発行したプロセスに対応するPCBが
、駆動キューから削除され、指定された時間の後に再び
駆動キューに挿入される。The DELAV system call is issued to suspend process operation for a period of time specified by an input parameter. The PCB corresponding to the process that issued this call is removed from the drive queue and reinserted into the drive queue after the specified time.
挿入された後に、DELAYを発行した次にアドレスか
ら実行が行われる。このように、指定時間だけ待つ処理
が実現される。After being inserted, execution is performed from the next address after issuing DELAY. In this way, the process of waiting for a specified time is realized.
(プロセス同期処理)
第33図に示すような接続構造を持つプラネットプログ
ラムを例にして説明する。このプログラムにはプロセス
の並行駆動とそれらの同期が記述されている。ここにお
いては、二つのプロセスが必要となる。処理系列が二つ
に別れているからである。これらのプロセスの同期は図
に示すように、−船釣にはカウンタによって実現される
。ここでは、麟νalueがその変数である。まず、最
初に同期カウンタを0に初期化する(ア)。次に、「1
llbを実行するようにコードを生成する(イ)。この
後に、矢印が二つに別れているので、左側の処理系列を
現時点のプロセスで実行し、右側を新しいプロセスで実
行するように、FORKシステムコールを実行する(つ
)。二〇FORKは処理を終了すると次のアドレスから
実行を開始するので、(1)の位置に左側の走行モジュ
ールm2を配置する。ここに、同期は(キ)、(り)の
ように実現されるので、そのコードのところに飛び込む
ようになる(オ)。次に並行動作すべきモジュールm3
を配置する(力)。同期を実現するコードは二つのプロ
セスが走行する。最初に到達したプロセスはmvalu
eを増加させて1にする。mvalueは2ではないの
で、最初に到達したプロセスは破棄される。次に到達し
たプロセスがmvalueを2にする。この結果、プロ
セスは破棄されずにモジュールm4を走行スる。(Process synchronization processing) A planet program having a connection structure as shown in FIG. 33 will be explained as an example. This program describes parallel driving of processes and their synchronization. Two processes are required here. This is because the processing series is divided into two. The synchronization of these processes is achieved by counters as shown in the figure. Here, Rinnualue is the variable. First, the synchronization counter is initialized to 0 (a). Next, “1
Generate code to execute llb (b). After this, the arrow splits into two, so execute the FORK system call so that the processing sequence on the left side is executed in the current process, and the process sequence on the right side is executed in a new process. 20 FORK starts execution from the next address after finishing the process, so the left traveling module m2 is placed at the position (1). Here, synchronization is realized like (ki) and (ri), so you can jump to that code (o). Module m3 that should run in parallel next
Place (force). The code that implements synchronization runs in two processes. The first process reached is mvalu
Increase e to 1. Since mvalue is not 2, the process that reaches it first is discarded. The next process that arrives sets mvalue to 2. As a result, the process is not discarded and runs through module m4.
ここにおける例では、2であるが、mva Iueとの
比較値は入力する矢印の本数と一致する。(ア)、(キ
)、(り)の機構により、同期を取る処理が実現される
。最後の同期機構に到達したプロセスは処理を継続して
、それ以外は破棄される動作を行うことになる。In this example, it is 2, but the comparison value with mva Iue matches the number of input arrows. The mechanisms (a), (g), and (ri) realize synchronization processing. The process that reaches the last synchronization mechanism will continue processing, and all other processes will be discarded.
(階層管理)
階層管理はスタックを用いて実現している。各プロセス
に現階層のスタックフレームを表現スるefp 、 a
rpとスタックポインタspを付与する。各プロセスは
、それ自身のフレームポインタとオフセットによって、
内部データをアクセスする。第34図を参照して下位階
層をインボークするときの手続きを以下に示す。(Hierarchical management) Hierarchical management is achieved using a stack. efp, a which represents the stack frame of the current layer to each process.
Add rp and stack pointer sp. Each process has its own frame pointer and offset.
Access internal data. Referring to FIG. 34, the procedure for invoking a lower hierarchy will be described below.
■出力データを格納する記憶領域を得るために、スタッ
クポインタSPを領域長だけ減じる(SPI)。(2) To obtain a storage area for storing output data, reduce the stack pointer SP by the area length (SPI).
■入力データをブツシュする(SF3)。■Bush input data (SF3).
■現在のフレームポインタ(aprとefp)をブツシ
ュする(SF3)。■ Bush the current frame pointers (apr and efp) (SF3).
■戻りアドレスをブツシュする(SF3)。■Bush the return address (SF3).
■現時点のスタックポインタ値を新しいフレームポイン
タとする。すなわち、aprを自分のプロセサ10に設
定し、efpをSF3に設定する。- Set the current stack pointer value as the new frame pointer. That is, apr is set to its own processor 10, and efp is set to SF3.
■下位階層コードアドレスにジャンプする。■Jump to lower layer code address.
下位階層が処理を終了して制御を上位階層に渡すときに
手続きは次のようになる。When the lower layer finishes processing and passes control to the higher layer, the procedure is as follows.
■スタックポインタをフレームポインタの値にする(S
F3)。■ Set the stack pointer to the frame pointer value (S
F3).
■戻りアドレスをポツプする(SF3)。■Pop the return address (SF3).
■フレームポインタをポツプする(SF3)。■Pop the frame pointer (SF3).
■現時点のフレームポインタ値を■でポツプした値に更
新する。■Update the current frame pointer value to the value popped in ■.
■■でポツプしたアドレスにジャンプする。Jump to the address popped up with ■■.
更に、制御が上位階層に渡った時の手続きを以下に示す
。Furthermore, the procedure when control is passed to a higher layer is shown below.
■入力データ領域を破棄するために、スタックポインタ
SPを領域長だけ増加させる。(2) To discard the input data area, increase the stack pointer SP by the area length.
■出力データをポツプする。■Pop the output data.
以下に、下位階層ブロックを呼び出すときにプラネット
コンパイラが生成する実走行コードを説明する。プラネ
ットプログラムでは、上位階層ブロック中に出現する処
理要件の種類によって、ことなる呼出し方を行う。下位
階層ブロックで使用される入力引数、戻り番地、内部変
数は、スタック上に確保され、LIFO管理がなされる
。これにより、再帰呼出しも実現可能となっている。The actual running code generated by the planet compiler when calling a lower layer block will be explained below. In the planet program, different calling methods are used depending on the type of processing requirements that appear in the upper layer block. Input arguments, return addresses, and internal variables used in lower hierarchy blocks are secured on the stack and LIFO managed. This makes recursive calls possible.
まず、活動処理節が下位階層をもっている場合には、次
のような走行コードでその呼出しを実現する。First, if the active processing section has a lower hierarchy, implement its invocation using the following running code.
GETSTACK
push parameter(n)’s point
erpush parameter(n−1)’poi
nterpush parameter(1)’poi
ntercall subargument
add sp、pushed 5izeABORTST
ACK
プログラムを実行しているプロセスのスタックは通常は
、プロセスと駆動系共用の汎用的なメモリ領域に設定さ
れている。下位階層を呼び出す時にはスタックを必要と
するが、このときスタックは上述した独自の記憶管理機
構を導入したLIFOにより実現される。その記憶管理
機構にスタックを要求するものが、前述したGETST
ACKシステムコールである。このシステムコールを行
うと、発行したプロセスに固有のスタックが割り当てら
れて、そのプロセスが下位階層を呼び出すことが可能と
なる。GETSTACK push parameter(n)'s point
erpush parameter(n-1)'poi
nterpush parameter(1)'poi
intercall subargument add sp, pushed 5izeABORTST
The stack of the process executing the ACK program is normally set in a general-purpose memory area that is shared by the process and the drive system. A stack is required when calling a lower layer, and in this case, the stack is realized by LIFO, which incorporates the above-mentioned unique storage management mechanism. The one that requests a stack from the storage management mechanism is the GETST mentioned above.
This is an ACK system call. When this system call is made, a unique stack is allocated to the issuing process, allowing that process to call lower layers.
プラネットでは、下位階層の引数としてパラメータのポ
インタを渡す。これにより名前呼出しを実現している。In Planet, a parameter pointer is passed as an argument to a lower layer. This realizes name calling.
このため、入力引数が存在する場合には、変数のアドレ
ス、I10ポートあるいはビットのアドレスを、引数並
びの右から順にプ・ンシュする。このようにして呼び出
した下位階層では、スタックフレームポインタからの正
のオフセットで入力引数をアクセスする。下位階層で入
力引数が存在する場合には、下位階層を呼び出す場合に
、その引数のアドレスをブツシュする。次に、suba
rgumentを呼び出して、下位階層から制御が戻っ
てくると、呼び出す前にブツシュした入力引数の領域長
だけスタックポインタを増加させて、以前にGETST
ACKで得られたスタックポインタ値に復帰させる。さ
らに、記憶管理機構に割り当れられていたスタックを返
すシステムコールであるABORTSTACKを発行す
る。Therefore, if an input argument exists, the variable address, I10 port, or bit address is pushed in order from the right of the argument list. Lower layers called in this way access input arguments at positive offsets from the stack frame pointer. If there is an input argument in the lower hierarchy, the address of that argument is bushed when calling the lower hierarchy. Next, suba
When control is returned from the lower layer after calling rgument, the stack pointer is increased by the area length of the input argument that was pressed before the call, and the stack pointer is
The stack pointer value obtained by ACK is restored. Furthermore, it issues ABORTSTACK, which is a system call that returns the stack allocated to the storage management mechanism.
事象待ち節に下位階層が有る場合には、次にようにして
その呼出しが行われる。If the event wait clause has a lower hierarchy, it is called as follows.
GETSTACK
push parameter(n)’s point
erpush parameter(n−1)’s p
ointerpush parameter(1)’s
pointerUPDATEPC
call subargument
Test HL register pair and
SWAヱis zer。GETSTACK push parameter(n)'s point
erpush parameter (n-1)'s p
ointerpush parameter(1)'s
pointerUPDATEPC call subbargument Test HL register pair and
SWA is zer.
add sp、pushed 5izeABORTST
ACK
スタックを得て入力引数のポインタをブツシュするとこ
ろまでは、上記の活動処理節の場合と同一であるが、そ
れ以降が異なっている。すなわち、下位階層が条件判断
句の場合、条件判断結果が。add sp, pushed 5izeABORTST
The steps up to obtaining the ACK stack and pushing the input argument pointer are the same as in the activity processing section described above, but the rest is different. In other words, if the lower layer is a conditional judgment phrase, the conditional judgment result is.
)ILレジスタベアに返ってくるように、コンパイラは
走行コードを生成する。事象待ち節の場合では、下位階
層を呼び出した後にHLレジスタベアを判断し、この肛
レジスタが0でなくなるまで、下位階層の呼出しをつつ
けるというニーとを生成する。) The compiler generates running code to return the IL register bear. In the case of an event wait clause, the HL register bear is determined after calling the lower layer, and a need is generated to continue calling the lower layer until this register is no longer 0.
この際、スタックをその都度確保していると、スタック
確保の時間を無視できなくなる。このために、スタック
に入力引数をブツシュした後に、UPDATEPCシス
テムコールを発行する。並行して動作する他のプロセス
に制御が渡ったときにも、入力引数の領域が破壊されな
いような実行制御方式を採用しているので、呼出し続け
る下位階層をUPDATEPCと5WAPで挟むことも
可能である。下位階層が0ではない値を返してくると、
スタックは開放される。選択的事象待ち節の場合にも、
これと同様な走行コードが生成される。At this time, if the stack is secured each time, the time required to secure the stack cannot be ignored. To do this, issue the UPDATEPC system call after pushing the input arguments onto the stack. It uses an execution control method that prevents the input argument area from being destroyed even when control is passed to another process running in parallel, so it is possible to sandwich lower layers that continue to be called between UPDATEPC and 5WAP. be. If the lower layer returns a non-zero value,
The stack is freed. Also in the case of selective event-waiting clauses,
A running code similar to this will be generated.
次に、条件分岐節の呼出し機構は、前述した事象待ち節
のそれを簡単にしたものであり、以下の通りとなる。Next, the calling mechanism of the conditional branch clause is a simplified version of that of the event wait clause described above, and is as follows.
GETSTACK
push parameter(n>”s point
erpush parameter(n−1)’poi
nterpush paran+eter(1)’s
pointercall subargus+ent
add sp、pushed 5izeABORTST
ACK
Test HL register pairand
jump true address if non−
zer。GETSTACK push parameter(n>”s point
erpush parameter(n-1)'poi
nterpush paran+eter(1)'s
pointercall subargus+ent
add sp, pushed 5izeABORTST
ACK Test HL register pair
jump true address if non-
zer.
すなわち、呼び出された下位階層は、条件判断結果を肛
レジスタベアに返すので、その値を評価して条件分岐構
造を実現するように、走行コードを生成する。That is, since the called lower layer returns the condition judgment result to the register bearer, running code is generated so as to evaluate the value and realize the conditional branch structure.
(プロセサ間のメツセージ通信制御)
複数のプロセサを結合するメツセージは、専用のHDL
Cシリアル通信回線上で行われる。プラネットコンパイ
ラは、プログラム中の制御実体の入出力端子に対応した
有限長のメツセージバッファを生成する。プロセスがメ
ツセージ交信を必要とするとき、メツセージバッファに
対して、read/evriteオペレーションを行う
。(Message communication control between processors) Messages that connect multiple processors are processed using a dedicated HDL.
This is done over a C serial communication line. The planet compiler generates finite-length message buffers corresponding to the input/output terminals of control entities in the program. When a process needs to communicate a message, it performs read/evrite operations on the message buffer.
メツセージバッファは、メツセージにデータが含まれて
いる場合には、データ長が固定で、有限長のリングバッ
ファとして構成され、バッファ中に存在する有効なメツ
セージの個数、メツセージデータの続出ポインタ、書込
みポインタ、データプールから構成されている。メツセ
ージにデータが含まれていない場合には、メツセージ数
だけで構成される。When a message contains data, the data length is fixed and the message buffer is configured as a finite-length ring buffer. , consists of a data pool. If the message does not contain data, it consists only of the number of messages.
まず、制御実体間のメツセージ通信を説明する。First, message communication between control entities will be explained.
第35図に示すように、制御実体Aが出力するメツセー
ジを制御実体Bが受は取る操作を例に説明する。プラネ
ットコンパイラは、出力端子に制御が到達するものにつ
いて、制御実体Aのメツセージバッファoutputに
対して−riteオペレーションを行うように走行コー
ドを生成する。また、サブシステムのメツセージ端子か
ら矢印が出力されているものでは、制御実体Aのメツセ
ージバッファou tpu tにreadオペレーショ
ンを行うコードを生成スル。readオペレーション後
に制御実体Bのメツセージバッファ1npou tにw
riteオペレーションを行うコードを配置する。一方
、制御実体Bの内部処理では、メツセージバッファ1n
putにreadオペレーションを行うような走行コー
ドを生成する。As shown in FIG. 35, an operation in which control entity B receives and receives a message output from control entity A will be explained as an example. The planet compiler generates running code to perform a -rite operation on the message buffer output of control entity A for those whose control reaches the output terminal. Also, if an arrow is output from the message terminal of the subsystem, a code is generated to perform a read operation to the message buffer output of control entity A. After the read operation, the message buffer 1npout of control entity B is
Place the code that performs the write operation. On the other hand, in the internal processing of control entity B, message buffer 1n
Generate a running code that performs a read operation on a put.
このようにして、制御実体Aの内部処理が出力したメツ
セージが制御実体Bの内部処理で使用されることになる
。In this way, the message output by the internal processing of control entity A is used in the internal processing of control entity B.
ここに、プラネットプログラム
身も制御実体であるので、プロセサ間のメツセージ通信
も、上述した制御実体間のメンセージ通信と同一の機構
で実現される。この場合、メツセージバッファのrea
d/writeオペレーション、およびそれらを行うた
めの事象検知は、通信路を介して外部プロセサに対する
遠隔プロシージャコールで行われる。成るメツセージバ
ッファのread/ivriteオペレーションは、ネ
ットワーク中のどのプロセサからも要求を発行可能とな
っている。かかる発行操作には各種のパラメータが必要
である。以下に、これらのパラメータを説明すると共に
、プロシージャコールの機能を説明する。Here, since the planet program itself is a control entity, message communication between processors is also realized by the same mechanism as the above-mentioned message communication between control entities. In this case, the message buffer rea
d/write operations, and the event detection to perform them, are performed in remote procedure calls to an external processor via a communication path. The read/ivrite operations of the message buffer consisting of the following can be issued by any processor in the network. Such a publishing operation requires various parameters. Below, we will explain these parameters and the function of the procedure call.
プロセサ識別子
遠隔プロシージャコールを行うためにはネットワークの
パラメータが必要である。すなわち、特定にプロセサに
対して処理要求(プロシージャコール)を発行するため
には、どのプロセサに送りのかといった宛先が必要とな
る。これを表現しているのがプロセサ識別子である。プ
ラネットプログラム中に宣言されている全てのプロセサ
には、ネットワーク上での位置番号が付されている。こ
の識別子は、ファイルhardware.defで宣言
されるネットワークの木構造を、深さ優先でトラバース
しながらインクリメンタルに設定される。これは、前述
したようにコンパイラによって自動的に行われる。一方
、ネットワークのコンフィギユレーション時に、ネット
ワークの接続形状、プロセサ識別子の情報が全てのプロ
セサに配布される。したがって、ネットワークの稼働時
には、プロセサ識別子を指定するのみで、ネットワーク
形状を意識することなく宛先を指定することが可能であ
る。Processor Identifier Network parameters are required to perform a remote procedure call. That is, in order to issue a processing request (procedure call) to a specific processor, a destination such as which processor to send the request to is required. This is expressed by the processor identifier. All processors declared in a planet program are assigned a position number on the network. This identifier is the file hardware. It is set incrementally while traversing the network tree structure declared in def in a depth-first manner. This is done automatically by the compiler as described above. On the other hand, at the time of network configuration, information on the network connection shape and processor identifiers is distributed to all processors. Therefore, when the network is in operation, it is possible to specify the destination without being aware of the network shape by simply specifying the processor identifier.
メツセージバッファ識別子
プロセサの走行コード中には、複数のメツセージバッフ
ァが存在することが考えられる。これらのメツセージバ
ッファのうち、それに対して操作を行うのかを指定する
ために、メツセージバッファ識別子が必要である。この
識別子もコンパイラによって自動的に生成される。プロ
セサ識別子と、このメツセージバッファ識別子によって
、どのプロセサのどのメツセージバッファに、オペレー
ションを行うのかを特定する。Message Buffer Identifier There may be multiple message buffers in the running code of the processor. A message buffer identifier is required to specify which of these message buffers is to be operated on. This identifier is also automatically generated by the compiler. The processor identifier and message buffer identifier specify which message buffer of which processor is to be operated on.
遠隔プロシージャコール
遠隔プロシージャーコールにより、以下の4つのステッ
プからなるメツセージ通信機能が実現される。Remote Procedure Call A message communication function consisting of the following four steps is realized by a remote procedure call.
■メツセージバッファが満杯であるか否かの検知
■メツセージバッファの−riteオペレーション
■メツセージバッファが空であるか否かの検知
■メツセージバッファのreadオペレーション−41
として、外部のプロセサXの中のメツセージバッファX
に%1riteオペレーションを行う操作を述べる。プ
ロセサXにバッファXが満杯であるか否かの検知要求を
発行する。バッファが満杯であるときには、Xが満杯で
ないという報告が返ってくるまでプロセサXに対しであ
る周期で検知要求を発行しつづける。そして、プロセサ
Xに対して、メツセージ中のデータを付与して、バッフ
ァへの−rite要求を発行する。以上の操作でメツセ
ージがプロセサにに渡ることになる。■ Detecting whether the message buffer is full ■ Message buffer -rite operation ■ Detecting whether the message buffer is empty ■ Message buffer read operation -41
, the message buffer X in the external processor
The following describes the operation of performing the %1rite operation. A request to detect whether buffer X is full is issued to processor X. When the buffer is full, detection requests are continued to be issued to processor X at certain intervals until a report that X is not full is returned. Then, it attaches the data in the message to processor X and issues a -rite request to the buffer. With the above operations, the message will be passed to the processor.
次に、プロセサχの中のメンセージバッファにread
オペレーションを行う操作を述べる。バ・ソファが空で
あるという返事が返ってくと、バッファが空でなくなる
で、ある周期でプロセサに検知要求を出力しつづける。Next, write a read to the message buffer in processor χ.
Describe the operations to be performed. When a reply is returned that the buffer is empty, the buffer is no longer empty and detection requests are continued to be output to the processor at certain intervals.
バッファが空でなくなると、プロセサに対してバッファ
のread要求を発行する。When the buffer is no longer empty, a buffer read request is issued to the processor.
read要求を受は取ったプロセサはreadオペレー
ションを行い、メツセージに付与されているデータを伴
って返事を送る。以上の操作により、メツセージがプロ
セサから渡ってくる。The processor that receives the read request performs a read operation and sends a reply along with the data attached to the message. With the above operations, messages are passed from the processor.
以上説明したように、本発明のプログラム作成装置にお
いては、画面表示手段によってプログラム作成用の画面
が表示され、この画面上で、図形パターン発生手段から
発生されるプログラム言語要素を選択してプログラムが
作成可能である。そして、プログラム言語要素としては
、有向枝および分岐有向枝が含まれており、特に分岐有
向枝によって分岐された複数の処理列は、コンパイラに
よって自動的に並列処理されるプログラムに変換される
ようになっている。従って、本発明によれば、複数の制
御手段が存在するネットワークなどにおける並行駆動用
プログラムなどを効率良く簡単に作成することが可能と
なる。As explained above, in the program creation device of the present invention, the screen for creating a program is displayed by the screen display means, and on this screen, the program language elements generated by the graphic pattern generation means are selected and the program is executed. Can be created. The programming language elements include directed branches and branching directed branches, and in particular, multiple processing sequences branched by branching directed branches are automatically converted into programs that are processed in parallel by the compiler. It has become so. Therefore, according to the present invention, it is possible to efficiently and easily create programs for parallel driving in networks where a plurality of control means exist.
また、上記のプログラム作成用画面を複数枚表示可能の
場合には、同一画面上に作成したプログラムの各処理要
素の下位階層側プログラムを、その処理要素の下位階層
として規定された別の一枚の画面上に作成することがで
きる。よって、大きなプログラムの作成を、トップダウ
ンあるいはボトムアップに効率良く作成することが可能
である。In addition, if it is possible to display multiple screens for program creation, the program on the lower level of each processing element of the program created on the same screen can be displayed on another screen defined as the lower level of that processing element. can be created on the screen. Therefore, it is possible to efficiently create a large program in a top-down or bottom-up manner.
一方、本発明によるデバッグ手段は、作成時と同一の画
面を再生表示し、この画面上においてデバッグを行うこ
とが可能である。したがって、プログラムの検証位置を
直観的に認識することができ、かかるデバッグ作業が簡
単にできるという利点もある。On the other hand, the debugging means according to the present invention is capable of reproducing and displaying the same screen as that at the time of creation, and debugging can be performed on this screen. Therefore, there is an advantage that the verification position of the program can be intuitively recognized and such debugging work can be easily performed.
第1図はプログラミング言語であるプラネットにおける
制御実体のモデルを示すブロック図である。
第2図はプラネットを用いて制御実体相互間の関係を記
述した例を示す説明図である。
第3図はプラネットによる制御実体の内部処理の記述例
を示す説明図である。
第4図はプラネットによる手続きの階層性を示す説明図
である。
第5図は第4図と同じくプラネットによる手続きの階層
性を示す説明図である。
第6図はプラネットのプログラム枠を示す説明図である
。
第7図はプラネットのサブシステムの記述例を示す説明
図である。
第8図はプラネットによる下位階層呼出しの記述例を示
す説明図である。
第9図はプラネットによるメツセージ送受信操作の記述
例を示す説明図である。
第10図はプラネットによるデータを含みメツセージ送
受の記述例を示す説明図である。
第11図はプラネットによる事象待つ節の記述例を示す
説明図である。
第12図はプラネットによる活動処理節の記述例を示す
説明図である。
第13図はプラネットによる条件分岐節の記述例を示す
説明図である。
第14図はプラネットによる選択事象待ち節の記述形式
を示す説明図である。
第15図は手続きを中断させるプラネットプログラム例
を示す説明図である。
第16図はプラネットによる繰り返し制御構造の記述例
を示す説明図である。
第17図は浮動小数点型データのフォーマットを示す図
である。
第18図はプラネットにおけるデータ構造体の記述例を
示す説明図である。
第19図はプラネットを用いたプログラム開発の流れを
示す説明図である。
第20図はブロック管理状態を示す説明図である。
第21図は表示ブロックリストを示す説明図である。
第22図はハードウェア宣言を説明するためのブロック
図である。
第23図はネ・ントワーク宣言の手順を説明するための
説明図である。
第24図はプロセサウィンドウを示す図である。
第25図は成るプロセサの階層構造を表示する画面を示
す図である。
第26図は第25図の画面に表示されている「*air
Bというブロックのソースプログラムを表示した画面を
示す図である。
第27図はプラネット駆動系(カーネル)の全体構成の
ブロック図である。
第28図はプロセスのりングキューを示す図である。
第29図は事象検知と応答処理の展開例を示す説明図で
ある。
第30図はrFORK、手続きを示す説明図である。
第31図はrABORTJ手続きを示す説明図である。
第32図はrK I LL、手続きを示す説明図である
。
第33図は複数のプロセスの同期を取る例を示す説明図
である。
第34図は階層管理を示す説明図である。
第35図はメツセージ通信の例を示す説明図である。
〔符号の説明]
xed・・・エディタ
xpl・・・パーサ
xp2・・・ソータ
xp3・・・コードジェネレータ
xp4・・・リンカ
xdb・・・デバッガ。
べ山
第6図
W!J7図
第8図
第9図
第10図
(b) (d)第11rl!
i
第12図
第13図
Ob cd
、114因
第15図
器:
第16図
第17図
第18山
(G)
D
第21図
第22図
第23図
(A)
(B)
’ 1liJ24図
@25図
第27図
第281
(G)
(c)
第29図
第30図
第31図
7JpJ32図
&lA φ
第34図
(c)
(b)
′6−FIG. 1 is a block diagram showing a model of a control entity in the Planet programming language. FIG. 2 is an explanatory diagram showing an example of describing relationships between control entities using planets. FIG. 3 is an explanatory diagram showing an example of description of internal processing of a control entity by Planet. FIG. 4 is an explanatory diagram showing the hierarchy of procedures by Planet. FIG. 5, like FIG. 4, is an explanatory diagram showing the hierarchy of procedures by planets. FIG. 6 is an explanatory diagram showing the program frame of Planet. FIG. 7 is an explanatory diagram showing a description example of a planet subsystem. FIG. 8 is an explanatory diagram showing an example of a description of a lower layer call by a planet. FIG. 9 is an explanatory diagram showing an example of a description of a message sending/receiving operation by Planet. FIG. 10 is an explanatory diagram showing an example of a description of message transmission and reception including data by Planet. FIG. 11 is an explanatory diagram showing an example of the description of the event wait clause by Planet. FIG. 12 is an explanatory diagram showing an example of the description of the activity processing section by Planet. FIG. 13 is an explanatory diagram showing an example of a description of a conditional branch clause by Planet. FIG. 14 is an explanatory diagram showing the description format of the selection event wait clause by Planet. FIG. 15 is an explanatory diagram showing an example of a planet program that interrupts a procedure. FIG. 16 is an explanatory diagram showing a description example of a repetitive control structure using planets. FIG. 17 is a diagram showing the format of floating point type data. FIG. 18 is an explanatory diagram showing a description example of a data structure in Planet. FIG. 19 is an explanatory diagram showing the flow of program development using Planet. FIG. 20 is an explanatory diagram showing the block management state. FIG. 21 is an explanatory diagram showing a display block list. FIG. 22 is a block diagram for explaining hardware declaration. FIG. 23 is an explanatory diagram for explaining the network declaration procedure. FIG. 24 is a diagram showing the processor window. FIG. 25 is a diagram showing a screen displaying the hierarchical structure of the processors. Figure 26 shows the "*air" screen displayed on the screen in Figure 25.
FIG. 3 is a diagram showing a screen displaying a source program of block B. FIG. FIG. 27 is a block diagram of the overall configuration of the planet drive system (kernel). FIG. 28 is a diagram showing a process ring queue. FIG. 29 is an explanatory diagram showing an example of development of event detection and response processing. FIG. 30 is an explanatory diagram showing the rFORK procedure. FIG. 31 is an explanatory diagram showing the rABORTJ procedure. FIG. 32 is an explanatory diagram showing the rK I LL procedure. FIG. 33 is an explanatory diagram showing an example of synchronizing a plurality of processes. FIG. 34 is an explanatory diagram showing hierarchical management. FIG. 35 is an explanatory diagram showing an example of message communication. [Description of symbols] xed...Editor xpl...Parser xp2...Sorter xp3...Code generator xp4...Linker xdb...Debugger. Besan Figure 6 W! J7 Figure 8 Figure 9 Figure 10 (b) (d) 11th rl!
i Fig. 12 Fig. 13 Ob cd , 114 factor Fig. 15 Fig. 16 Fig. 17 Fig. 18 Mountain (G) D Fig. 21 Fig. 22 Fig. 23 (A) (B) ' 1liJ24 Fig. @ 25 Figure 27 Figure 281 (G) (c) Figure 29 Figure 30 Figure 31 Figure 7JpJ32 &lA φ Figure 34 (c) (b) '6-
Claims (4)
理されるプログラムを作成するためのプログラム作成装
置において、 前記複数の制御主体を含むネットワークのハードウェア
情報を保持したハードウェア情報保持手段と、プログラ
ム作成領域を表示画面上に表示する画面表示手段と、前
記表示画面上においてプログラムを作成するプログラム
作成手段と、作成されたプログラムを機械語に翻訳する
翻訳手段と、翻訳された機械語からなるプログラムを記
憶する記憶手段とを有し、 前記プログラム作成手段は、前記プログラムの時系列的
に処理される各処理の内容を表示する複数種類の図面パ
ターンを発生可能なプログラム作成用図形パターン発生
手段と、前記ハードウェア情報を前記表示画面上に入力
可能なハードウェア情報入力手段と、前記図形パターン
を順次に選択して前記プログラム表示画面上に表示する
パターン選択手段とを備え、前記図形パターンは、処理
内容を示す複数種類の図形パターンと、処理要件の時系
列的な流れ方向を示す有向枝と、少なくとも二股に分岐
し、時系列的に後続する処理要件が並列処理されるべき
ものあることを示す第1の分岐有向枝と、少なくとも二
股に分岐した分岐枝が纏まって後続の処理要件が複数の
先行する処理要件終了の同期をとって処理される処理動
作であることを示す第2の分岐有向枝とを有しており、 前記翻訳手段は、前記ハードウェア情報保持手段から得
られる情報に基づき、前記第1の分岐有向枝に後続する
複数の処理要素列のそれぞれを、前記複数の制御手段の
ぞれぞれにより並列処理されるプログラムとして割り当
てる並列処理プログラム割当手段を有しており、 前記パターン選択手段により、処理要件を示す図形パタ
ーンと前記有向枝あるいは分岐有向枝とを交互に選択し
て、前記複数の制御手段によって実行される並列処理プ
ログラムを、同一画面上で作成するようになっているこ
とを特徴とするプログラム作成装置。(1) A program creation device for creating a program to be processed in parallel by a plurality of control entities on a network, comprising: a hardware information holding means that holds hardware information of a network including the plurality of control entities; and a program creation device. A screen display means for displaying an area on a display screen, a program creation means for creating a program on the display screen, a translation means for translating the created program into machine language, and a program consisting of the translated machine language. and a storage means for storing the program, the program creation means having a graphic pattern generation means for program creation capable of generating a plurality of types of drawing patterns that display the contents of each process processed in chronological order in the program; hardware information input means capable of inputting the hardware information onto the display screen; pattern selection means sequentially selecting the graphic patterns and displaying them on the program display screen; There are multiple types of graphical patterns that indicate the content, directed branches that indicate the chronological flow direction of the processing requirements, and that there are at least two branches, and the processing requirements that follow the chronological order should be processed in parallel. A first branching directed branch shown in FIG. and a branching directed branch, and the translation means converts each of the plurality of processing element sequences subsequent to the first branching directed branch into the first branching directed branch based on the information obtained from the hardware information holding means. It has parallel processing program allocation means for allocating programs to be processed in parallel by each of the plurality of control means, and the pattern selection means selects the graphic pattern indicating the processing requirements and the directed branch or branching directed branch. 1. A program creation device, wherein a parallel processing program to be executed by the plurality of control means is created on the same screen by alternately selecting the following.
数枚のプログラム作成用画面を表示可能であり、一つの
画面上に作成されたプログラムの各図形パターンによっ
て表示される処理要素の下位プログラムは、別の前記画
面上に作成可能であり、前記処理要素と、別の画面に形
成された前記下位プログラムとの階層関係を規定する階
層管理手段を有していることを特徴とするプログラム作
成装置。(2) In claim 1, the screen display means is capable of displaying a plurality of program creation screens, and the lower order of the processing elements displayed by each graphic pattern of the program created on one screen. The program is characterized in that the program can be created on another screen, and has a hierarchy management means that defines a hierarchical relationship between the processing element and the lower program formed on the other screen. Creation device.
プログラムをデバッグするためのデバッグ手段を有して
おり、このデバッグ手段は、デバッグ時に、作成された
プログラムを、その作成時と同一の図形パターンによっ
て再生表示する再生表示手段と、再生表示されたプログ
ラム上において、デバッグ中におけるプログラム実行位
置を表示する表示手段とを有していることを特徴とする
プログラム作成装置。(3) In claim 1 or 2, the device has debugging means for debugging the created program, and the debugging means is capable of debugging the created program at the time of debugging. What is claimed is: 1. A program creation device comprising: a reproduction display means for reproducing and displaying a graphic pattern; and a display means for displaying a program execution position during debugging on the reproduced program.
理される処理要素の部分においては並列処理されている
複数の処理部分を同時的に表示可能となっていることを
特徴とするプログラグ作成装置。(4) The program according to claim 3, wherein the display means is capable of simultaneously displaying a plurality of processing parts that are processed in parallel in a part of processing elements that are processed in parallel. Creation device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP02337781A JP3102030B2 (en) | 1990-11-30 | 1990-11-30 | Program creation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP02337781A JP3102030B2 (en) | 1990-11-30 | 1990-11-30 | Program creation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04205423A true JPH04205423A (en) | 1992-07-27 |
JP3102030B2 JP3102030B2 (en) | 2000-10-23 |
Family
ID=18311905
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP02337781A Expired - Fee Related JP3102030B2 (en) | 1990-11-30 | 1990-11-30 | Program creation device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3102030B2 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08278957A (en) * | 1995-04-04 | 1996-10-22 | Fujitsu Ltd | Analysis support device for infeasible and infinite solutions |
JPH10500510A (en) * | 1994-05-16 | 1998-01-13 | アップル コンピュータ, インコーポレイテッド | A computer system that automatically generates an instance of a task specified by the user |
JPH10320187A (en) * | 1997-05-19 | 1998-12-04 | Mitsubishi Electric Corp | System modeling system and data communication system |
JP2000112737A (en) * | 1998-10-01 | 2000-04-21 | Seiko Epson Corp | Program creation device |
JP2000112736A (en) * | 1998-10-01 | 2000-04-21 | Seiko Epson Corp | Program creation device |
JP2006338660A (en) * | 2005-05-30 | 2006-12-14 | Honda Research Inst Europe Gmbh | How to develop parallel / distributed applications |
JP2013513141A (en) * | 2009-12-04 | 2013-04-18 | ユミコア アクチェンゲゼルシャフト ウント コンパニー コマンディートゲゼルシャフト | System and method for system automation based on tree sequence interpretation of actions |
JP2013235381A (en) * | 2012-05-08 | 2013-11-21 | Sumitomo Heavy Ind Ltd | Data editing apparatus and data editing method |
CN110083351A (en) * | 2019-04-22 | 2019-08-02 | 北京百度网讯科技有限公司 | Method and apparatus for generating code |
-
1990
- 1990-11-30 JP JP02337781A patent/JP3102030B2/en not_active Expired - Fee Related
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10500510A (en) * | 1994-05-16 | 1998-01-13 | アップル コンピュータ, インコーポレイテッド | A computer system that automatically generates an instance of a task specified by the user |
JPH08278957A (en) * | 1995-04-04 | 1996-10-22 | Fujitsu Ltd | Analysis support device for infeasible and infinite solutions |
JPH10320187A (en) * | 1997-05-19 | 1998-12-04 | Mitsubishi Electric Corp | System modeling system and data communication system |
JP2000112737A (en) * | 1998-10-01 | 2000-04-21 | Seiko Epson Corp | Program creation device |
JP2000112736A (en) * | 1998-10-01 | 2000-04-21 | Seiko Epson Corp | Program creation device |
JP2006338660A (en) * | 2005-05-30 | 2006-12-14 | Honda Research Inst Europe Gmbh | How to develop parallel / distributed applications |
JP2013513141A (en) * | 2009-12-04 | 2013-04-18 | ユミコア アクチェンゲゼルシャフト ウント コンパニー コマンディートゲゼルシャフト | System and method for system automation based on tree sequence interpretation of actions |
US9317307B2 (en) | 2009-12-04 | 2016-04-19 | Umicore Ag & Co. Kg | System and method for system automation based on interpreting a tree sequence of operations |
JP2013235381A (en) * | 2012-05-08 | 2013-11-21 | Sumitomo Heavy Ind Ltd | Data editing apparatus and data editing method |
CN110083351A (en) * | 2019-04-22 | 2019-08-02 | 北京百度网讯科技有限公司 | Method and apparatus for generating code |
CN110083351B (en) * | 2019-04-22 | 2023-06-27 | 北京百度网讯科技有限公司 | Method and device for generating code |
Also Published As
Publication number | Publication date |
---|---|
JP3102030B2 (en) | 2000-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0689132B1 (en) | Visualizing object-oriented software | |
US5412756A (en) | Artificial intelligence software shell for plant operation simulation | |
US7567890B1 (en) | Conversion of model components into references | |
US8667462B1 (en) | Model and subsystem function signatures | |
EP0360769A2 (en) | Method for sharing common values implicitly among communicating generative objects | |
JPH07182194A (en) | Method and apparatus for automatic generation of testing driver for selective execution of testing function by computer apparatus | |
CN102289362A (en) | Segmented symbolic execution device and working method thereof | |
Fauth et al. | Automated generation of DSP program development tools using a machine description formalism | |
JP2007511834A (en) | Method and system for reversible design tree transformation | |
Zhang et al. | VisPro: A visual language generation toolset | |
Bruno et al. | Petri-net based simulation of manufacturing cells | |
JPH04205423A (en) | Program creation device | |
US8798971B2 (en) | System and method for using a truth table graphical function in a statechart | |
EP0231594A2 (en) | Interactive multilevel hierarchical data flow programming system | |
JP3318051B2 (en) | Translation processing method | |
Graf | A visual environment for the design of distributed systems | |
Lor | Automatic Synthesis of SARA Design Models From System | |
Schwan et al. | A system for parallel programming | |
Ferrucci et al. | Exploiting visual languages in software engineering | |
Berthold | Explicit and implicit parallel functional programming: Concepts and implementation | |
Ellershaw et al. | Program visualization-the state of the art | |
JPH034943B2 (en) | ||
Song | A general model for component-based software | |
Aspnäs et al. | Using a Graphical Environment to Program | |
Kruppai et al. | Building Neural Networks as Dataflow Graphs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070825 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080825 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080825 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090825 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |