JP3716604B2 - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP3716604B2
JP3716604B2 JP07476598A JP7476598A JP3716604B2 JP 3716604 B2 JP3716604 B2 JP 3716604B2 JP 07476598 A JP07476598 A JP 07476598A JP 7476598 A JP7476598 A JP 7476598A JP 3716604 B2 JP3716604 B2 JP 3716604B2
Authority
JP
Japan
Prior art keywords
instruction
program
instructions
application
branch
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.)
Expired - Lifetime
Application number
JP07476598A
Other languages
Japanese (ja)
Other versions
JPH11272462A (en
Inventor
哲仁 渡辺
岸  正弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric FA Components and Systems Co Ltd
Original Assignee
Fuji Electric FA Components and Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric FA Components and Systems Co Ltd filed Critical Fuji Electric FA Components and Systems Co Ltd
Priority to JP07476598A priority Critical patent/JP3716604B2/en
Publication of JPH11272462A publication Critical patent/JPH11272462A/en
Application granted granted Critical
Publication of JP3716604B2 publication Critical patent/JP3716604B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)
  • Programmable Controllers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、情報処理装置に関する。
【0002】
【従来の技術】
情報処理装置は、一般的に、その多くがマイクロプログラム制御方式を採用している。これは、命令(マシン語)より一段下位のレベルのマイクロ命令(命令のレベルで指定する動作より簡単な基本的な動作を指定するもの)を用いて、命令で規定されている機能を実現する為の制御信号を作り出すものである。マイクロ命令は、通常、それぞれの機種に応じて決められた長さのbit 長をもち、data系のregister類等の機能ブロックとその接続関係に対応して幾つかのフィールドが定義されている。
【0003】
図11は、従来のマイクロプログラム制御方式による情報処理装置の構成の一例を示すブロック図であり、同図には一例としてPLC(プログラマブル・コントローラ)の構成図を示す。尚、プログラマブル・コントローラは通常PCと略すが、後述するPC(プログラムカウンタ)と混同するので、ここではPLCというものとする。
【0004】
同図に示すPLCは、アプリケーションプログラムメモリ501、データメモリ502、マイクロ(μ)プログラムメモリ503、デコーダ504、PLR(パイプラインレジスタ)505、命令フェッチ制御回路510、μ−SQC(μシーケンサ)520、演算実行部530、及びデータメモリ転送制御回路540等より構成される。
【0005】
アプリケーションプログラムメモリ501は、アプリケーションプログラムを格納するメモリである。このアプリケーションプログラムは、主にユーザ側で後述する開発ツール(プログラミングツール)を用いて設計されたラダー図等のプログラムが、PLC側の変換/逆変換機能によってそのPLCで用いられる形式に変換されたものである。尚、逆変換機能は、PLC側で得たRASデータ等を開発ツール(モニタ装置)に送信する際、及びPLC側に格納されたプログラムを開発ツールに読み込む際等に用いられる。
【0006】
データメモリ502は、アプリケーションプログラム及びOS(オペレーティングシステム)において使用する各種データを格納する外部データメモリであり、例えば制御対象機器の稼働状況を示すセンサ計測値やデータ等を一時的に記憶するRAM等である。
【0007】
マイクロ(μ)プログラムメモリ503は、μ−OSプログラムを格納すると共にアプリケーションプログラムの命令のインタプリタを格納するメモリである。ここでμ−OSプログラムについて説明しておく。PLC内には、メーカー側で予め作成して格納しておくシステムプログラムが存在するが、このシステムプログラムがマイクロ命令レベルの命令群として格納されているものをここではμ−OSプログラムと呼ぶ。
【0008】
デコーダ504は、マイクロ(μ)プログラムメモリ503から出力されるμ命令をデコードし、演算器・データ変換器・データ転送制御部・フェッチ制御回路部及び各種H/W(ハードウェア)の制御信号を生成し、これをPLR505及びデータメモリ転送制御回路540内のPLR545に出力する。
【0009】
PLR(パイプラインレジスタ)505は、デコーダ504から出力される各種制御信号をパイプライン方式で記憶し、各種H/Wブロックにこれら制御信号を接続するレジスタであり、フェッチ動作(命令レジスタへの命令格納)と命令実行動作のパイプライン動作を可能にするものである。
【0010】
命令フェッチ制御回路510は、アプリケーションプログラムの命令フェッチ動作を制御する回路であり、命令レジスタ511、PC(プログラムカウンタ)512、PCスタック513、及びプログラムメモリ転送制御回路514より構成される。
【0011】
命令レジスタ511は、上記プログラムメモリ501に格納されているアプリケーションプログラムを1命令ずつフェッチし出力するレジスタである。PC512は、次に実行すべき(あるいは実行中の)命令が記憶されているプログラムメモリ501のアドレスを保持し1命令実行毎に+1インクリメントするカウンタである。PCスタック513は、例えばサブルーチンコール時にPC512の格納内容を一時退避させ、リターン時に退避データをPC512に復帰させるためのスタックである。プログラムメモリ転送制御回路514は、後述するμ−OS(マイクロオペレーティングシステム)プログラムの制御下のもとに、上記プログラムメモリ501のアクセス制御及びPC512/PCスタック513の動作を制御する回路である。
【0012】
μ−SQC(マイクロシーケンサ)520は、マイクロプログラムの実行制御(マイクロプログラムメモリのアドレス制御)を行う回路であり、デコーダ521、μ−PC(マイクロプログラムカウンタ)522、アダー523、μ−PCスタック524、及びMPX(マルチプレクサ)525より構成される。
【0013】
デコーダ521は、命令フェッチ制御回路510内の命令レジスタ511から出力される1命令をデコードし、この1命令を解釈実行する処理(以後、“インタプリタ”という)が格納されているμプログラムメモリ503のアドレス(以後、“MAPアドレス”という)を生成/出力する。
【0014】
μ−PC522は、μプログラムメモリ503に格納されているプログラムを順次実行していく為のPC(アドレスレジスタ)であり、アダー523とペアで使用することにより“+1”インクリメントするカウンタを構成する。
【0015】
μ−PCスタック524は、マイクロプログラムの実行処理において、サブルーチンコール時にμ−PC522を一時退避させ、リターン時にμ−PC522を復帰する為のスタックである。
【0016】
MPX525は、μプログラムメモリ503のアドレスを選択するマルチプレクサであり、デコーダ521から出力される“MAPアドレス”、μ−PC522からの出力(アダー523で+1加算された順序アドレス)、μ−PCスタック524から出力されるサブルーチンリターンアドレス、及び上記PLR505から出力されるマイクロプログラムの分岐アドレス(JMP、CALL)の中から、選択的にμプログラムメモリ503(及びアダー523にも)へ出力する。
【0017】
演算実行部530は、キャッシュレジスタ間、及びIMMデータ(後述する“直接数値”)とレジスタ間の各種演算及び各種データ変換を実行する機能ブロックであり、キャッシュレジスタ531、各種演算器・データ変換器532、及びMPX533より構成される。
【0018】
キャッシュレジスタ531は、各種演算・データ変換で使用するデータを記憶したり、各種H/W(ハードウェア)レジスタ・外部メモリとのデータ転送に使用されるデータを格納するレジスタである。
【0019】
各種演算器・データ変換器532は、アプリケーションプログラム及びμ−OSプログラムの指示に従って、各種算術/論理演算、シフト、BDC/DBC等の演算・データ変換処理を行う。
【0020】
MPX533は、各種演算器・データ変換器532による演算結果出力とデータメモリ502から読み出したデータ(リードデータ)とを、選択的にキャッシュレジスタ531に出力する。
【0021】
データメモリ転送制御回路540は、アプリケーションプログラム及びμ−OSプログラムにおいて、データメモリ502をアクセスするときの制御を行う回路であり、アドレス生成デコード541、MPX542、MAR543、デコーダ544、及びPLR545より構成される。
【0022】
アドレス生成デコード541は、命令フェッチ制御回路510の命令レジスタ511から出力されるアドレスオペランドに基づいて、不図示の記憶域に記憶されているオペランドデータ型より、アプリケーションプログラムからのデータメモリアクセス時のアドレスを生成する。
【0023】
MPX542は、μ−OSプログラムがデータメモリ502をアクセスするアドレス(キャッシュレジスタ531の出力A)と、アプリケーションプログラムからのデータメモリ502アクセス時のアドレス(アドレス生成デコード541の出力)を入力して、両者から選択して、MAR543及びデコーダ544へ出力する。
【0024】
MAR(メモリアドレスレジスタ)543は、MPX542から出力されるμ−OSプログラムまたはアプリケーションプログラムからのデータメモリ502アクセス時のアドレスを記憶するレジスタである。尚、アプリケーションプログラムからのアドレス格納タイミングは、PLR505への各種制御信号の格納タイミングと同時である。
【0025】
デコーダ544は、上記MPX542の出力を入力し、データメモリ502のアクセス選択信号CSを生成/出力する。
PLR545は、デコーダ544の出力(アクセス選択信号CS)とデコーダ504の出力(各種データメモリ転送制御信号)を、各々パイプライン方式で記憶し、これらの出力信号をデータメモリ502に接続するためのレジスタである。PLR545は、フェッチ動作(命令レジスタへの命令格納)と転送実行動作のパイプライン動作を可能にする。
【0026】
上記構成の従来の情報処理装置(PLC)の動作の概要について、以下に説明する。尚、図11にはPLCの全ての構成を示しているわけではなく、また同図に示す構成ブロック間の全ての配線を示しているものでもない。
▲1▼システムリセットが解除後に、μ−PC522が“0”となって、μ−SQC(マイクロシーケンサ)520の制御下のもとに、μプログラムメモリ503上のμ−OSプログラムが実行されて、プロセッサ全体のH/W(ハードウェア)初期化が行われる。これよりアプリケーションプログラムを実行できる環境が構築され(PC512の初期値セット等)、システムスタートコマンド待ち状態となる。
▲2▼μ−OSプログラムは、システムスタートコマンドを認識すると、命令フェッチ制御回路510にアプリケーションプログラムの実行を許可する。この時、μ−SQC520は、デコーダ521からのアプリケーションプログラム待ち状態となる。
▲3▼命令フェッチ制御回路510は、アプリケーションプログラムメモリ501から、PC512が指示するアドレスの命令コードをフェッチし、命令レジスタ511に格納する。そして、PC512を自動的にインクリメントして、上記メモリ501から次の命令コードのフェッチを行う処理を繰り返す。
▲4▼命令レジスタ511より出力される命令コードは、μ−SQC520のデコーダ521でデコードされる。これより、その命令をインタプリト実行するμプログラムメモリ上に処理アドレスが生成される。デコーダ521から出力されるアドレス情報は、MPX525により選択出力されて、μプログラムメモリ503のアドレスバスに入力する。これより、μプログラムメモリ503から、上記命令コードに対応するμ命令が、デコーダ504に出力される。デコーダ504は、上記μ命令をデコードし、演算器・データ変換器・データ転送制御部・フェッチ制御回路部及び各種H/Wの制御信号を生成する。そして、PLR505にこれら各種演算及び転送の制御指令がセットされ、各種H/Wブロックに指令が渡る。
▲5▼転送命令の場合は、このとき同時に、データメモリ転送制御回路540内のMAR543にデータメモリ502のアドレスがセットされるようになっている。また、同時に、μ−SQC520の制御下のもとに、μプログラムメモリ503から次のμ命令の読み出しが始まる。
【0027】
演算命令の場合は、演算実行部530が所定の演算を実行し、キャッシュメモリに演算結果が格納される。同時に、次のμ命令を読み出してデコーダ504でデコードしてPLR505に取り込む処理が始まる。
【0028】
アプリケーションプログラムの分岐制御は、μ−OSから命令フェッチ制御回路510のPC512及びPCスタック513をレジスタアクセスすることにより行われる。
【0029】
ところで、ここで、アプリケーションプログラムの1命令に対応するμ命令の処理が、1クロックで終る場合もあれば、複数クロックかかる場合もある。この時の、命令フェッチ制御回路510内の命令レジスタ511への命令コードの取込み、PLR505へのH/W制御指令のセット、及び演算実行部530、データメモリ転送制御回路540の動作(キャッシュレジスタ531またはデータメモリ502へのライト動作等)のタイミングを図12に示す。
【0030】
図12(a)は1クロックで終る場合の動作タイミング、図12(b)は複数クロックかかる場合の動作タイミングを示す。
図12(b)に示すように、複数クロック掛かる命令の一例として、例えば(+ A B)の演算を行う場合、アプリケーションプログラムの命令コード“ADD B”に対応するμプログラムの命令コードは“LD A”“ADD”となり、2クロック掛かる。
【0031】
尚、図11では特に図示していないが、PLR505においてあるアプリケーションプログラム命令に対応する処理が完了するときに、命令フェッチ制御回路510に対して命令レジスタ511の書き換え許可(マップ許可)が与えられるようになっており、これを図12(a)、(b)において@で示している。
【0032】
次に、従来のプログラム開発環境について説明する。
図13は、従来のプログラムの開発ルートを説明する為の図である。
アプリケーションプログラムの開発は、主にユーザ側において、図13(a)に示すアプリケーションプログラムの開発ツール550上でプログラマ等がプログラムを作成すると(例えばプログラミングツール上でラダー回路図等を作成すると)、そのオブジェクトが生成されて、アプリケーションプログラムメモリ501に格納される。このとき、メモリ501に格納されるアプリケーションプログラムの命令コードは、例えば図14に示す形式となっている。これについては後に説明する。
【0033】
一方、μプログラムの開発は、主にPLCメーカー側において、図13(b)に示すシステム設計者専用のμプログラム開発ツール560により、システム設計者がμ−OSとインタプリタをプログラミング開発すると、これらのオブジェクトが生成されて、μプログラムメモリ503に格納される。このとき、メモリ503に格納されるμ−OSとインタプリタの命令コードは、例えば図15に示す形式となっている。これについては後に説明する。尚、μ−OSは各種H/W制御やアプリケーションプログラムの実行管理を行うものであり、インタプリタはアプリケーションプログラムの解釈実行を行う為のものである。
【0034】
図14は、従来のアプリケーションプログラムの命令コード(マシン語)の一例を示す図である。
同図において、命令コードは、基本部(32ビット)と拡張部(32ビット)とにより構成される。基本部は、命令種別を示すオペコード、当該命令の命令形態が基本部のみか基本部+拡張部であるかを示す拡張ビット、データ種別及びサイズを示すデータ型、データが存在する位置及びデータのアクセス方法(間接アクセス)を示すデータ記憶域(これらをまとめてオペランド種別という)、及びアドレスまたは数値を示すオペランド(16ビット)から構成される。
【0035】
オペコードとしては、例えば、ADD、SUB、MLT、BDC、DBC、LD、ST等がある。データ型としては、例えば、ビット型、ビット反転型、1語整数型、2語整数型、実数型等がある。データ記憶域には、式(または前回の演算結果値)、定数、メモリ、インデックス、メモリ間接、パラメータ等が格納される。
【0036】
オペランドは、アドレスの場合、基本部のみのときには16ビットアドレス、基本部+拡張部のときには32ビットアドレスとなる。一方、数値の場合、基本部のみのときには16ビット直接数値、基本部+拡張部のときには32ビット直接数値となる。アドレスまたは数値のオペランドが16ビットを越えた場合に、基本部+拡張部の命令形態となる。このとき、基本部の拡張ビットは‘1’になっている。命令フェッチ制御回路510は、基本部の拡張ビットが‘1’であるときには、基本部と拡張部がそろった時点でこの命令コードを命令レジスタ511へ書込む。
【0037】
図15は、従来のマイクロプログラムの命令コード(マイクロ命令)の一例を示す図である。
同図に示すように、マイクロプログラムの命令コードは、μ−SQCの分岐制御、各種演算・データ転送制御、及び各種H/W制御の3つのフィールドで構成される。マイクロ命令は、通常、それぞれの機種に応じて決められた長さのビット長をもつが、一般に1ステップが約80〜100ビット程度の命令ビット長になっている。
【0038】
分岐制御のフィールドは、μプログラムの命令実行順序制御(MAP、CONT、JMP、CALL、RET等)を行うBOP(ブランチオペレーション)、条件分岐のときの条件選択(S、Z、CY、OVF等)を行うTC(テストコンディション)、JMP、CALL時のμプログラムの分岐アドレスを示すBRA(ブランチアドレス)からなる。尚、MAPは次のアプリ命令を選択させる命令であり、CONTは次アドレスを選択させる命令である。
【0039】
演算・データ転送制御のフィールドは、16ビット/32ビット、符号の有無等を示すMD(演算モード)、演算/データ変換機能の指定(ADD、SUB、MLT、BDC、DBC等)を行うAFC(演算ファンクション)、演算時のソース/ディスティネーションレジスタ指定を行う演算ソース/ディスティネーションレジスタ(RS1、RS2、RD)、直接数値間演算時の数値データであるIMM(直接数値)、各種データ転送制御(RD、WT、転送データサイズ等)、演算/転送に必要な各種データパス上のMPXの選択指令を行う各種データパス経路選択からなる。
【0040】
各種H/W制御のフィールドは、各種周辺H/Wの制御に使用されるものであり、例えば各種フラグのセット/リセット等に使用される。
【0041】
【発明が解決しようとする課題】
上述した従来のマイクロプログラム制御方式を用いる情報処理装置(PLC等)においては、2階層のプログラム制御(アプリケーションプログラムメモリの制御とμプログラムメモリの制御)を行うことにより、アプリケーションプログラムの実行とμ−OSによる各種システム制御を行っていた。アプリケーションプログラムを実行する際には、その命令を逐一μプログラムのインタプリタにより解釈実行していた。
【0042】
このように従来のマイクロプログラム処理方式を用いた情報処理装置(PLC等)では、上記のような2階層のプログラム実行制御の処理系が必要である為、以下の問題が生じる。
(1)H/W(ハードウェア)量が多くなってしまい、システムのダウンサイジング化が困難である。特に、マイクロプログラムメモリは、制御命令ビット数にもよるが、高速で大規模なメモリが必要となってしまう。例えば図11に示したPLCの場合には、例えば、(8K〜32K)×(80〜100bit)で20ns程度の高速で大規模なメモリが必要となっていた為、これを仮に高速EPROMで構成するとIC11個程が必要であった。また、上記の様にアプリケーションプログラムメモリ制御処理系とμプログラムメモリ制御処理系の2系統(2階層)の回路があることもH/W(ハードウェア)量が多くなる一因となっている。
(2)上記の様にマイクロプログラムメモリのメモリ容量が大規模となり、マイクロプログラムメモリをLSIの中に入れることができない為に、マイクロプログラムメモリを外部ROM等で実現すると、ROMのアクセスタイムがネックとなり、システムクロック周波数を上げることができないという問題があった。
(3)更に、マイクロプログラムメモリを構成する高速EPROMは高価であり、これを多数使用すると当然コスト高となってしまう。更に、上記2系統(2階層)のメモリアドレス管理機構が必要であることも、コスト高の原因となっていた。
【0043】
本発明の課題は、システムのダウンサイジングを可能にし、システムクロック周波数を上げることができ、コストダウン/低消費電力化を実現できる情報処理装置を提供することである。
【0044】
【課題を解決するための手段】
本発明による第1の情報処理装置は、アプリケーションレベルの転送命令およびビットシーケンス命令を行うオペランド属性付命令と、各種演算・OSレベルのデータ転送・各種ハードウェア制御を行うマイクロ命令である汎用命令とより成る統合命令コード体系を備え、該オペランド属性付命令および一部の汎用命令により記述されるアプリケーションプログラムと、前記汎用命令により記述されるOSプログラムを格納するプログラム格納手段と、
該プログラム格納手段に格納されているアプリケーションプログラムまたはOSプログラムから順次フェッチした命令に対して、分岐制御手段により分岐制御を行うことで、該プログラム格納手段をアドレス制御して実行させる1階層のプログラム実行制御手段と、を有する。
【0045】
上記第1の情報処理装置によれば、統合命令コード体系の命令により記述されたアプリケーションプログラムとOSプログラムをプログラム格納手段に共存して格納し、プログラム実行制御手段によりこのプログラム格納手段をアドレス制御することでプログラム実行できるようにしたので、従来のようなマイクロプログラム制御処理系を加えた2階層のプログラム実行制御処理系は必要なく、上記プログラム実行制御手段による1階層の処理系によりプログラムを実行することができる。このように従来のマイクロプログラム制御処理系に係わるハードウェアを削除したことにより、システムのダウンサイジングを可能にし、システムクロック周波数を上げることができ、コストダウン/低消費電力化を実現できる。
【0046】
本発明による第2の情報処理装置は、アプリケーションレベルの転送命令およびビットシーケンス命令を行うオペランド属性付命令と、各種演算・OSレベルのデータ転送・各種ハードウェア制御を行うマイクロ命令である汎用命令とより成る統合命令コード体系を備え、該オペランド属性付命令および一部の汎用命令により記述されるアプリケーションプログラムと、前記汎用命令により記述されるOSプログラムを格納するプログラム格納手段と、該プログラム格納手段に格納されているアプリケーションプログラムまたはOSプログラムから順次フェッチした命令に対して、分岐制御手段により分岐制御を行うことで、該プログラム格納手段をアドレス制御して命令を順次読出し実行させる1階層のプログラム実行制御手段と、該プログラム実行制御手段で読出した命令が前記オペランド属性付命令である場合のみ該命令をマイクロプログラム制御方式で解釈/実行するマイクロプログラム制御処理手段と、を有する。
【0047】
上記第2の情報処理装置によれば、上記第1の情報処理装置と略同様に、システムのダウンサイジングを可能にし、システムクロック周波数を上げることができ、コストダウン/低消費電力化を実現でき、更にシステムのトータルの高速化を実現できる。
【0048】
【発明の実施の形態】
以下、図面を参照して、本発明の実施形態について説明する。
図1は、本発明の一実施形態(第1の実施例)の情報処理装置の構成を示すブロック図であり、ここでは一例としてPLC(プログラマブルコントローラ)の構成を示す。
【0049】
同図に示すPLCは、アプリケーション/OSプログラムメモリ1、デコーダ2、PLR3、デ−タメモリ4、命令フェッチ制御回路10、演算実行部20、及びデータメモリ転送制御回路30等より構成される。
【0050】
同図に示すPLCの構成を図11に示す従来のPLCの構成と概略的に比較すると、従来のPLCに存在したμ−SQC520、μプログラムメモリ503は、本実施形態のPLCには存在しない。また、本実施形態のPLCの命令フェッチ制御回路10には分岐制御を行う機能が追加されている。本実施形態のPLCは、概略的には、この分岐制御を行う機能と、後述する統合命令コード体系により各命令が記述されているアプリケーションプログラム、システム組込みマクロ関数、及びOSプログラム(いずれも後述するアプリケーション/OSプログラムメモリ1に共存して格納されている)とにより、μ−SQC520、μプログラムメモリ503を削除できるようにしたものである。詳細については、以下に、順次、説明していくものとする。
【0051】
まず、図1に示すPLCの各構成について、詳細に説明する。
アプリケーション/OSプログラムメモリ1は、OSプログラム、システム組込みマクロ関数、及びアプリケーションプログラムが共存して格納されるメモリ(RAM/ROM)である。詳細は、後に図3を参照して説明するが、これら各プログラム(または関数)は、上記統合命令コード体系に属するオペランド属性付命令または汎用命令により記述されている。
【0052】
デコーダ2は、命令フェッチ制御回路10内の命令レジスタ11から出力されるオペランド属性付命令または汎用命令(これらについては後に図2を参照して詳述する)をデコードして、演算器・データ変換器・データ転送制御部・フェッチ制御回路部及び各種H/Wの制御信号を生成し、これをPLR3に出力する。
【0053】
尚、後述するように、オペランド属性付命令は、アプリケーションレベルの転送命令であるので、デコーダ2をこの単純な転送命令に対応する転送制御信号を生成する仕様にすれば、従来のようなμプログラムメモリのインタプリタによる解釈/実行は必要なく、命令レジスタ11からの出力を直接デコーダ2に入力して処理させることができる。
【0054】
PLR(パイプラインレジスタ)3は、デコーダ2から出力される各種制御信号をパイプラインして記憶し、各種H/Wブロックにこれら制御信号を接続するレジスタであり、フェッチ動作(命令レジスタへの命令格納)と命令実行動作のパイプライン動作を可能にするものである。
【0055】
データメモリ4は、従来例のデータメモリ502と略同様であるので、ここでは特に説明しない。
命令フェッチ制御回路10は、命令レジスタ11、PC(プログラムカウンタ)12、PCスタック13、プログラムメモリ転送制御回路14、及び分岐制御回路15より構成される。
【0056】
命令レジスタ11は、上記プログラムメモリ1より順次フェッチされるOSプログラム、またはシステム組込みマクロ関数、あるいはアプリケーションプログラムの1命令を、一時記憶して、デコーダ2、分岐制御回路15、アドレス生成デコーダ31に出力するレジスタである。PC12は、分岐制御回路15の制御に応じて、次に実行すべき(あるいは実行中の)命令が記憶されているプログラムメモリ1のアドレスを保持する。PCスタック13は、例えば後述するマクロ関数コール時にPC12の格納内容を一時退避させるスタックである。プログラムメモリ転送制御回路14については特に説明しない。
【0057】
分岐制御回路15は、アプリケーションプログラム、OSプログラム中のJMP、CALL、RET命令等によって発生するPC12及びPCスタック13の制御を、OSプログラムを介在させることなく直接行う為の機能を有する。分岐制御回路15の構成/動作については、後に詳細に説明する。
【0058】
上記図1に示す構成のPLCの動作概要について、以下に説明する。
(1)まず、最初に、システムリセット後(立ち上げ時)は、命令フェッチ制御回路10内のPC12は‘0’となっており、これよりアプリケーション/OSプログラムメモリ1のアドレス‘0’番地に格納されている命令(図2に示すOSプログラムの先頭命令)がフェッチされて命令レジスタ11に一時記憶される。そして、このフェッチされた命令は、命令レジスタ11からデコーダ2に出力され、デコーダ2においてデコードされて、演算器・データ変換器・データ転送制御部・フェッチ制御回路部及び各種H/W(ハードウェア)の制御信号が生成される。そして、この制御信号がPLR3を介して出力されて各種H/Wの制御(演算・転送等)が行われる。このようにして、順次、OSプログラムの命令をフェッチして実行していくことにより、プロセッサ全体のH/W初期化とアプリケーションプログラムの実行環境が構築される。そして、システムのスタートコマンド待ち状態となる。
【0059】
OSプログラムの命令コードは、全て、汎用命令である。汎用命令は、基本的にはRISC化してあり、1クロックで処理できる。また演算実行部20においても各種関数を1クロックで処理できる。
(2)上記のように、OSプログラムによりシステムの初期化が行われた後、システムコマンドが認識されると、アプリケーションプログラムの実行に移る。すなわち、まず、アプリケーション/OSプログラムメモリ1内のアプリケーションプログラムが格納されている記憶領域の先頭番地が、PC12にセットされる。そして、このPC12にセットされたアドレスの命令から順次フェッチし実行していく。アプリケーションプログラムの命令コードは、オペランド属性付命令または汎用命令である。但し、アプリケーションプログラムの汎用命令は、OSプログラムのように全ての汎用命令を用いることはできず、“汎用命令の一部”を用いることができる(特に、OSプログラム専用のH/W資源を直接アクセスする命令は、後述するアプリケーションプログラム開発環境では生成できないようになっている)。
【0060】
アプリケーションプログラムの各命令の処理動作については、後に詳しく説明する。
図2は、アプリケーション/OSプログラムメモリ1の格納内容とプログラム開発環境を説明する為の図である。
【0061】
同図に示すように、アプリケーション/OSプログラムメモリ40には、OSプログラム41、システム組込みマクロ関数42、及びアプリケーションプログラム43が共存して格納される。
【0062】
上述してあるように、PLCでは、一般的に、メーカー側でシステムプログラムを作成する。本実施形態においても、OSプログラム41及びシステム組込みマクロ関数42を、主にメーカー側で作成してアプリケーション/OSプログラムメモリ40に格納する。すなわち、同図に示すシステム設計者専用の開発ツール53によって、システム設計者によってOSプログラム、システム組込みマクロ関数が開発され、そのオブジェクトが汎用命令の形式で生成され、アプリケーション/OSプログラムメモリ40に格納される。OSプログラムは、各種H/W制御、アプリケーションプログラムの実行管理を行う。システム組込みマクロ関数は、詳しくは後述するが、アプリケーションプログラムの命令において、H/Wで1クロックで実行できない命令に対応して、この命令を実行させる為のアルゴリズムを組んだOSレベルの汎用命令列である(よって、以下、OSマクロ関数とも言う)。
【0063】
尚、システム設計者専用の開発ツール53では、オペランド属性付命令を生成することもできる。これは、例えば、システム開発時に、システム設計者がオペランド属性付命令のマシン語も生成して、これをアプリケーションプログラム43の領域に格納して、デバック確認を行う等するためである。これより、アプリケーションプログラムからはOSプログラム専用のH/W資源を直接アクセスできないようにインタロックがとれることが可能になり、システムの安全が確保できる。
【0064】
一方、主にユーザー側において、プログラミングツール等を用いてラダー図等でプログラムが設計され、そのオブジェクトが生成されると、このオブジェクトがPLC内のマシン語生成機能52によって変換/逆変換処理されてオペランド属性付命令または汎用命令に変換され、アプリケーション/OSプログラムメモリ40に格納される。尚、図1には特に図示していないが、PLC内には開発ツールインタフェースプロセッサが備えられており、このプロセッサによって上記変換/逆変換処理が実行される。
【0065】
図3(a)、(b)は、上記オペランド属性付命令と汎用命令の命令コード体系の一例を示す図である。
図3(a)には、オペランド属性付命令60の命令コード体系の一例を示してある。
【0066】
同図において、オペランド属性付命令60は、基本部と拡張部より成る。基本部は、MSBビット61、オペコード62、拡張ビット63、データ型64、データ記憶域65、及びオペランド66より成る。MSBビット61は、オペランド属性付命令と汎用命令とを区別するためのビットであり、例えば‘1’の場合はオペランド属性付命令、‘0’の場合は汎用命令であるものと認識される。オペコード62は命令種別を示す。拡張ビット63は拡張部の有/無を示す。データ型64はデータ種別及びサイズを示す。データ記憶域65はデータが存在する位置及びデータのアクセス方法を示す。オペランド66はアドレスまたは数値を示す。拡張部については、MSBビット67を除いて、従来の図14に示す命令コードにおける拡張部と略同様である。MSBビット67はMSBビット61と同じくオペランド属性付命令と汎用命令とを区別するためのビットである。
【0067】
オペランド属性付命令60は、その命令コード体系は従来の図14に示すアプリケーションの命令コードと略同様であるが、オペコード62で取り扱う命令種別の数がかなり少なくて済む。例えば従来では128種類であったものが32種類で済むようになっている。これは、例えばAにBを加算する処理を例にすると、従来は“LD ”→“ADD B”であったものが、本実施形態では“LD A”(オペランド属性付命令)→“LD B”(オペランド属性付命令)→“ADD”(汎用命令)というように命令をRISC化し1クロックで処理できるようにすると共に、演算処理等をオペランドを伴わない汎用命令(ADD等の演算命令)で実現しているからである。これによって、オペランド属性付命令で扱う命令種別を、転送命令及びコントローラで高速演算が要求されるビットシーケンス命令(ビットリード、ビットアンド、ビットオア、ビットノット等)のみにとどめられるので、命令種別が非常に少なくて済む。
【0068】
図3(b)には、汎用命令70の命令コード体系の一例を示してある。
汎用命令は、マイクロ命令のようにハードウェアを直接制御できるレベルの命令であるが、従来の図15に示すマイクロプログラムの命令コードが水平型で80〜100ビット程度であったのに対し、垂直型32ビット構造をとっている。
【0069】
同図に示す汎用命令70は、MSBビット71、命令種別72、及びオペランド部73より成る。
MSBビット71は、上記オペランド属性付命令60のMSBビット61と同じく、当該命令コードがオペランド属性付命令であるか汎用命令であるかを示すビットであり、同図に示す例では汎用命令を示すビットは‘0’である。
【0070】
命令種別72には、演算命令、iMM演算、転送命令、分岐命令等があり、同図には各命令種別毎のオペランド部73の構成例を示してある。演算命令の場合にはオペランド部73は演算種別、モード、RS1、RS2、RDより構成される。同様に、オペランド部73は、iMM演算の場合には演算種別、モード、RD、直接数値より構成され、転送命令の場合には転送制御、パス経路選択、RS1/RD、I/Oレジスタアドレスより構成され、分岐命令の場合には分岐制御、条件選択、分岐アドレスより構成される。尚、汎用命令70の命令種別72に転送命令が存在するのは、OSプログラムにおいて用いるからであり、アプリケーションプログラムの場合には、上述してある通り、転送命令はオペランド属性付命令により実現する。また、分岐命令も、アプリケーションプログラムの場合とOSプログラムの場合とで内容的に異なる場合がある。例えば、アプリケーションプログラムにおけるJMP命令は相対分岐であるがOSプログラムにおけるJMP命令は絶対分岐である。これは、アプリケーションプログラムを、プログラムメモリ1上をプログラム単位で移動可能としている為である。
【0071】
本実施形態の分岐命令においては、上記絶対分岐、相対分岐のほかに、拡張絶対無条件分岐命令を備えている。以下、分岐処理に関して、図4、図5を参照して説明する。
【0072】
図4は、図1の分岐制御回路15の構成の一例を示す概略ブロック図である。同図において、分岐制御回路15は、命令デコーダ81、加算器82、MPX(マルチプレクサ)83、NOREG 84、PCCHGRG 85、NEXT PC レジスタ86、アプリ実行モード制御FF(フリップフロップ)87、及びMPX(マルチプレクサ)88等より構成される。
【0073】
命令デコーダ81は、命令レジスタ11より出力される1命令をデコードして、各種制御信号の生成/出力や、後述する相対分岐アドレス、絶対分岐アドレス、マクロ番号またはサブルーチン番号等を生成/出力する。
【0074】
命令デコーダ81によるデコード処理について図5を参照して説明する。
図5は、命令デコーダによる命令のデコード論理を示す一覧表である。
同図には汎用命令についてのみ示してあるが、オペランド属性付命令の場合にはPC12を1インクリメントする制御信号を出力する。
【0075】
同図において、命令レジスタ11より出力される命令が、“演算命令”、“iMM演算命令”、“転送命令”のいずれかの汎用命令である場合には、命令デコーダ81はPC12を+1インクリメントする制御信号を出力する。
【0076】
“分岐命令”である場合には、その分岐命令の種類に応じた処理が行われる。分岐命令は、基本分岐命令と拡張絶対(無条件)分岐命令とに大別され、更に基本分岐命令は絶対分岐命令と相対分岐命令とに分けられる。
【0077】
絶対分岐命令には、無条件命令と条件付命令とがある。
無条件命令には、具体例としてJMP、CALL、RET等の命令がある。
JMP命令の場合、命令デコーダ81は、命令コード中に含まれる分岐アドレス(図3(b)参照)をMPX83に出力して(図4に“絶対分岐アドレス”と記す)、これをMPX83より選択出力させ、PC12にセットさせる。
【0078】
CALL命令の場合には、JMP命令の場合と同様に分岐アドレスをPC12にセットさせると共に、そのときPC12にセットされていたデータをPCスタック13に退避させる。そして、RET命令によって、PCスタック13に退避させたデータをPC12に戻す。
【0079】
条件付命令の場合は、(特に説明しない)条件が成立するときには上記無条件命令と同じである。条件不成立のときはPC12を+1インクリメントする。
相対分岐命令には、無条件JMP命令と条件付JMP命令がある。
【0080】
無条件JMP命令の場合、命令デコーダ81は当該命令コードに含まれる分岐アドレスを加算器82に出力する(図4に“相対分岐アドレス”と記してある)。そして、加算器82によって、現在PC12にセットされているアドレスがこの相対分岐アドレスに加算されて、加算結果がMPX83に出力され、MPX83より選択出力されてPC12にセットされる。
【0081】
条件付JMP命令の場合は、条件成立のときには上記無条件JMP命令と同じである。条件不成立のときはPC12を+1インクリメントする。
拡張絶対(無条件)分岐命令は、拡張絶対無条件JMP命令と拡張絶対無条件CALL命令とに分けられる。
【0082】
拡張絶対(無条件)分岐命令については、後に図6、図7、図8を参照して詳細に説明するが、ここでは概略的に説明しておく。尚、命令デコーダ81は、デコード結果に応じて各種制御信号を出力して、命令フェッチ制御回路10内の他の構成要素を制御する。
【0083】
拡張絶対無条件JMP命令である場合、命令デコーダ81は、当該命令中に含まれる分岐アドレス(絶対分岐アドレス)のデータをMPX83に出力し、PC12にセットさせる。また、当該命令中に含まれるマクロ番号またはサブルーチン番号のデータを、NOREG(ナンバーレジスタ)84に一時記憶させる。また、戻り番地をNEXT PCレジスタ86に退避させる。更に、アプリ実行モード制御FF87を制御して、そのAPLフラグビット(アプリケーション実行中であるかOS実行中であるかを示すフラグであり、ここでは‘0’のときOS実行中、‘1’のときアプリケーション実行中を示すものとする)を‘0’にする。これより、処理はOSに移される。OS側では、上記NOREG84を参照することによって、起動すべきマクロ番号またはサブルーチン番号を知ることができる。尚、マクロ番号は、後述するOSマクロ関数を起動するときに用いられる。
【0084】
拡張絶対無条件CALL命令である場合、命令デコーダ81は、上記拡張絶対無条件JMP命令の場合と略同様の処理を行うが、戻り番地は、NEXT PCレジスタ86に退避させるのではなく、PCスタック13に退避させる。
【0085】
以下、図6〜図8を参照して、拡張絶対無条件分岐命令を用いる処理の具体例について説明する。拡張絶対無条件分岐命令は、アプリケーションでのみ使用する分岐命令の一種であり、以下に説明するように種々の専用命令がある。
【0086】
図6は、拡張絶対無条件分岐命令を用いてOSマクロ関数を起動する処理を説明するための図である。
アプリケーションプログラムの1命令が、H/Wにおいて1クロックで処理できない場合がある。このような場合に対して、本実施形態のPLCでは、図2に示すようにアプリケーション/OSプログラムメモリ1内にシステム組込みマクロ関数42(OSマクロ関数)を登録しておく。
【0087】
OSマクロ関数は、アプリケーションプログラムの1命令に対応するH/W処理を行わせる為の連続する複数の命令群である。そして、このOSマクロ関数を起動する為に拡張絶対無条件分岐命令を用いており、この命令によって指定されるOSマクロ関数の先頭番地が、PC12にセットされることになる。これについて、以下に詳細に説明する。
【0088】
図6(a)には、このようなマクロ関数起動用の拡張絶対無条件分岐命令であるマクロコール命令の一例を示してある。同図において、マクロコール命令90は、基本部と拡張部より成り、基本部はMSBビット91、分岐命令の種類として“CALLまたはJMP”92、OS起動関数種別として“マクロコール”93、及びマクロ番号94の各フィールドより成る。拡張部は、MSBビット95と、当該命令によって起動すべきOSマクロ関数の先頭番地を示す絶対分岐アドレス96(19ビット)とより成る。各OSマクロ関数の命令群の最後には専用の復帰命令であるRET命令(APLビット付きRET命令)が備えられおり、このRET命令によってアプリケーションプログラムの実行モードに復帰する。同図に示すRET命令100は、MSBビット101、分岐命令102、RET命令であることを示すRET103、及びアプリ実行モード制御フラグをOS実行モードからアプリ実行モードへ戻す制御を行わせる為のAPLビット104より成る。
【0089】
図6(b)は、マクロコール命令による処理の一例を示すフローチャートである。同図において、ステップS1、S2の処理は、オペランド属性付命令の実行の一例であり、特に説明しない。
【0090】
ステップS1、S2の処理を実行後、ステップS3でマクロコール命令(例えば“CALL MAC X‘10’;X‘10’はマクロ番号)が分岐制御回路15内の命令デコーダ81でデコードされることにより、上述した各種制御処理が行われ、OSプログラム(システム組込みマクロ関数)の処理へと移行する。
【0091】
すなわち、▲1▼戻り番地(同図ではアプリケーションプログラムにおいてステップS3のマクロコール命令の次の命令であるステップS8の“ST C”命令のメモリ格納アドレス)をPCスタック13に退避させる。
【0092】
▲2▼起動すべきマクロ関数のマクロ番号(X‘10’)を、NOREG84にセットする。
▲3▼アプリ実行モード制御FF87のAPLフラグを‘0’(OS実行中であることを示す)にする。
【0093】
▲4▼起動すべきマクロ関数の先頭番地(マクロコール命令90の絶対分岐アドレス96)を、MPX83より選択出力させ、PC12にセットさせる。
上述したようにして、マクロ番号(X‘10’)のマクロ関数の処理を開始する。上述してあるように、マクロ関数は複数の命令より成り、各命令を順次フェッチして実行していく。同図に示すステップS4〜ステップS6の処理は、本発明の出願人が扱っているPLC装置における処理を一例として示しているので、ここでは特に詳細には説明しないが、ステップS4でスタック内のパラメータA,Bを取り出し、ステップS5でMAC X‘10’のデータ処理を実行し、ステップS6で演算結果を演算結果レジスタにセットする。
【0094】
そして、最後に、RET命令によりアプリケーションプログラムへと復帰する。これは、分岐制御回路15内の命令デコーダ81がRET命令をデコードすることにより、まず、APLビット104に応じてアプリ実行モード制御FF87を制御してAPLフラグを‘1’(アプリ実行中であることを示す)にする。次に、PCスタック13に退避させてあった戻り番地をPC12にセットさせる。これにより、アプリケーションプログラムのステップS8の“ST C”命令の実行へと移行していく。
【0095】
図7は、本実施形態の情報処理装置におけるサブルーチン処理を説明する為の図である。
本実施形態の情報処理装置(PLC)におけるサブルーチン処理は、サブルーチンコール及びサブルーチンエンド処理を、拡張絶対無条件分岐命令(SUBコール命令、SUBエンド命令)によって、予めOSプログラム中に備えてあるサブルーチンコール関数、サブルーチンエンド関数を起動することにより行う。
【0096】
図7(a)は、サブルーチン処理の為の拡張絶対無条件分岐命令(SUBコール命令、SUBエンド命令)の一例を示す図である。
同図において、拡張絶対無条件分岐命令110は、基本部と拡張部とより成る。基本部は、MSBビット111、分岐命令として“JMP”112、OS起動関数種別として“SUBコールまたはSUBエンド”113、及びSUB番号114より成る。拡張部は、MSBビット115及び絶対分岐アドレス116(19ビット)より成る。また、サブルーチン処理では、後述する図7(b)におけるステップS15、S16の処理を、I/O制御レジスタ転送命令によって行う。図7(a)にはI/O制御レジスタ転送命令の一例も示してある。同図に示すI/O制御レジスタ転送命令120は、図3(b)に示す〔転送命令〕の一形態であり、MSBビット121、転送命令122、転送制御として“I/O転送”123、パス経路選択124、“RS1”125、及びI/Oレジスタアドレス126より成る。
【0097】
図7(b)は、サブルーチン処理の一例を示すフローチャートである。
同図において、ステップS11、S12の処理は、オペランド属性付命令の実行の一例であり、特に説明しない。
【0098】
ステップS11、S12の処理の後、ステップS13においてSUBコール命令“X‘20’”(X‘20’はSUB番号)が命令デコーダ81に入力されると、命令デコーダ81によって当該命令がデコードされて上述した各種制御処理が行われ、OSプログラム(サブルーチンコール関数)の処理へと移行する。
【0099】
すなわち、▲1▼戻り番地(同図ではアプリケーションプログラムにおいてステップS13のSUBコール命令の次の命令であるステップS21の“ST C”命令のメモリ格納アドレス)を、“NEXT PCレジスタ”86に退避させる。
【0100】
▲2▼起動すべきサブルーチンコール関数のSUB番号(X‘20’)を、NOREG84にセットする。
▲3▼アプリ実行モード制御FF87のAPLフラグを‘0’(OS実行中であることを示す)にする。
【0101】
▲4▼起動すべきサブルーチンコール関数の先頭番地(拡張絶対無条件分岐命令110の絶対分岐アドレス116)を、MPX83より選択出力させ、PC12にセットさせる。
【0102】
上述したようにして、SUB番号(X‘20’)のサブルーチンコール関数によるSUBコール処理を開始する。
まず、上記の様に“NEXT PCレジスタ”86に退避させた戻り番地をOS作業領域に退避して、パラメータポインタを更新する(ステップS14)。次に、NOREG84よりSUB番号(X‘20’)を求め、これより不図示のサブルーチンエントリーテーブルによりSUB番号(X‘20’)のサブルーチンプログラムの格納アドレス(アプリケーション/OSプログラムメモリ1内のアプリケーションプログラム43においてSUB番号(X‘20’)のサブルーチンプログラムが格納されている記憶領域の先頭番地)を求める。
【0103】
そして、求めたアドレスを上記I/O制御レジスタ転送命令120によりPCCHGRG85にセットする(ステップS15)。PCCHGRG85は、OSプログラムからアプリケーションプログラムに復帰するときに、OS側で復帰先のアプリケーションのアドレスをセットする為のレジスタである。
【0104】
最後に、PCチェンジ命令によりPCCHGRG85に記憶された上記アドレスがPC12にセットされると共に、APLフラグが‘1’(アプリケーション実行中であることを示す)に切換えられる(ステップS16)。PCチェンジ命令は、実際には、上記I/O制御レジスタ転送命令120によって、あるI/O制御レジスタへのライト動作を行うことにより実行される。
【0105】
上述したように、OSプログラムによって、実行すべきサブルーチンプログラムの開始アドレスが求められ、この開始アドレスがPC12にセットされ、実行権がアプリケーションに戻されることにより、“X‘20’”のサブルーチン処理が開始される(ステップS17)。
【0106】
そして、サブルーチンプログラム命令が順次フェッチされ実行されていく。サブルーチンプログラムの最後の命令は、サブルーチンエンド命令(拡張絶対無条件分岐命令110)となっており、このSUBエンド命令によって上記OSプログラム中に備えられているサブルーチンエンド関数を起動することにより(ステップS18)、すなわち起動すべきサブルーチンエンド関数の先頭番地(拡張絶対無条件分岐命令110の絶対分岐アドレス116)を、MPX83より選択出力させ、PC12にセットさせると共に、APLフラグを‘0’(OS実行中であることを示す)に切換えることにより、サブルーチンプログラムの終了処理(SUBエンド処理)が実行される。
【0107】
SUBエンド処理では、まず、上記ステップS14の処理で更新したパラメータポインタを復帰させると共に、同じく上記ステップS14の処理でOS領域のスタックへ退避させてあった戻り番地を、I/O制御レジスタ転送命令120によりPCCHGRG85にセットする(ステップS19)。そして、上記“PCチェンジ命令”によりPCCHGRG85に記憶された上記戻り番地をPC12にセットすると共に、APLフラグを‘1’(アプリケーション実行中であることを示す)に切換える(ステップS20)。これより、アプリケーションプログラムにおいて上記ステップS13のサブルーチンコール命令の次の命令(ST C)から順次実行されていくことになる(ステップS21)。
【0108】
尚、APLフラグが‘0’(OS実行モード)のときには、アプリケーションレベルの割込みはマスクされるようになっている。また、このAPLフラグは、デバッグにおいても利用される。
【0109】
図8は、本実施形態の情報処理装置におけるプログラム終了処理を説明する為の図である。
あるアプリケーションプログラムの実行完了の際には、専用の拡張絶対無条件分岐命令(プログラムエンド命令)を用いて、予めOSプログラム中に備えてあるプログラムエンド関数を起動して、プログラム終了処理を行う。
【0110】
図8(a)に、上記プログラムエンド命令の一例を示す。
同図において、プログラムエンド命令130は、基本部と拡張部とより成る。基本部は、MSBビット131、分岐命令として“JMP”132、OS起動関数種別として“PEND”133、及びプログラム番号134より成る。拡張部は、MSBビット135及び絶対分岐アドレス136(19ビット)より成る。
【0111】
図8(b)は、プログラムエンド処理の一例を示すフローチャートである。
同図に示すように、あるアプリケーションプログラムが、ステップS31の“ST C”命令の実行を以て処理を完了する場合、当該プログラムの最後に付加されているPEND命令を実行することにより(ステップS32)、OS実行モードに移り、OSプログラムによるPEND処理が実行される。
【0112】
PLC装置においては複数のアプリケーションプログラムを順次実行していく制御処理もある。OSプログラムにおけるPEND処理は、まず各種タスクスケジューラ処理を実行し(ステップS33)、次に実行すべき他のアプリケーションプログラムがある場合にはその先頭番地をPCCHGRG85にセットし(ステップS34)、PCチェンジ命令により他のアプリケーションプログラムの処理に移る(ステップS35)。
【0113】
上記ステップS33の各種タスクスケジューラ処理については特に詳細には説明しないが、割込み処理でのPEND命令の場合、同レベルの他のタスク要求があるときには要求PGポインタを抽出し、同レベルの他のタスク要求がないときにはディスパッチ処理を行う。一方、ディフォルトレベルのPEND命令の場合には、次のタスク番号を決定し、プログラムポインタを抽出する。
【0114】
上述したように、本発明の第1の実施例の情報処理装置では、従来、アプリケーションプログラムの命令コード体系とμプログラムの命令コード体系であったものを、アプリケーションレベルの転送命令より成るオペランド属性付命令と、H/Wを直接制御できる汎用命令とより成る単一の統合命令コード体系にしている。そして、従来、アプリケーションプログラム実行制御回路と大規模なμプログラム制御回路(μプログラムメモリ503、μ−SQC520等)より成る2階層のプログラム実行制御の処理系であったものを、大規模なμプログラム制御回路を削除して、アプリケーション/OSプログラムメモリ1を制御する1階層のプログラム実行制御の処理系で構成している。
【0115】
アプリケーションプログラムの実行において、オペランド属性付命令は、その殆どがLD、ST等の単純な転送命令であるので、この命令に対してデコーダ2で生成すべき制御信号はほとんど所定の単純なものであり、これより容易にデコーダ2をオペランド属性付命令に対応する仕様とすることができる。これより、オペランド属性付命令の実行においても、μプログラム制御回路によるインタプリタを必要とせず、直接、デコーダ2でデコードできる。
【0116】
また、アプリケーションプログラムは、H/Wで1クロックで処理できない命令の場合や、割込処理(サブルーチン実行処理)を行う場合等に対して、各々の専用の拡張絶対無条件分岐命令を備えている。そして、図6、図7、図8等で説明したように、この各専用の命令に応じて分岐制御回路15が制御動作を行うことで、OSマクロ関数やサブルーチン関数等が起動されて、上記各処理が実行される。
【0117】
このように構成することにより、第1の実施例の情報処理装置では大規模なμプログラム制御回路を削除できるので、実際のH/W量を大幅に減少させることができる。事実上、図1におけるアプリケーション/OSプログラムメモリ1とデータメモリ4を除いた全ての構成要素を、LSIの中に入れることが可能となっている。
【0118】
これより、従来ではμプログラム制御処理系のH/Wが大きく(特にμプログラムメモリ503に外部メモリ(ROM)を使用せざると得ない為)、システムのダウンダイジング化が困難、ROMのアクセスタイムがネックとなりシステムクロック周波数を上げることが困難、高価なROMを多く使用するのでコスト高となる等の問題があったが、第1の実施例では上記のように大規模なμプログラム制御処理系のH/Wを削除できたので(特に外部メモリを使用しなくて済むので)、これらの問題を解決できる。すなわち、システムのダウンサイジング化を実現でき、システムクロック周波数を上げることができ、プログラムメモリとデータメモリを除いた全ての回路を1チップLSIの中に組込むことが可能となる。このように第1の実施例の情報処理装置では、コストダウン、ダウンサイジング化、高速化、低消費電力化等の様々な効果が得られる。
【0119】
次に、図9、図10を参照して、第2の実施例について説明する。
上述した図1の構成の情報処理装置では、従来のμプログラム制御処理系のH/Wを完全に削除している為、図6で説明したようにアプリケーションプログラムの1命令(オペランド属性付命令)がH/Wにおいて1クロックで処理できない場合には、マクロコール命令によりOSマクロ関数をCALLすることにより対応していた。
【0120】
しかしながら、実際上、上記マクロコール命令の使用頻度がかなり高いものとなる場合が多い為、分岐制御回路15による上記CALL制御処理が頻繁に起こると、その処理時間がネックとなって、結果としてシステムの高速化を充分に果たせなかった。
【0121】
そこで、第2の実施例では、図9に示すようにμプログラム制御回路220を設け、オペランド属性付命令の場合のみμプログラム制御方式で処理を行うようにしている。
【0122】
図9は、第2の実施例による情報処理装置の構成を示すブロック図であり、図1の場合と同様に一例としてPLC(プログラマブルコントローラ)の構成を示している。
【0123】
同図において、第2の実施例によるPLCは、アプリケーション/OSプログラムメモリ201、セレクトデコーダ202、PLR203、データメモリ204、命令フェッチ制御回路210、μプログラム制御回路220、演算実行部230、及びデータメモリ転送制御回路240等を有する。
【0124】
アプリケーション/OSプログラムメモリ201、PLR203、データメモリ204、演算実行部230、及びデータメモリ転送制御回路240については、図1に示すものと略同様であるので、ここでは特に説明しない。
【0125】
μプログラム制御回路220は、プリデコーダ221、μ−SQC222、μプログラムメモリ223、デコーダ224、及びPLR225より成る。
プリデコーダ221は、命令レジスタから命令が出力される毎に、当該命令がオペランド属性付命令であるか否かを識別し、識別結果に応じた選択信号をセレクトデコーダ202に対して出力する。セレクトデコーダ202は、基本的にセレクタとデコーダより構成され、命令レジスタ211の出力とμプログラムメモリ223の出力をセレクタに入力して、プリデコーダ221より出力される選択信号に応じていずれか一方の入力をデコーダに選択出力して、デコード処理するものである。
【0126】
μプログラムメモリ223は、オペランド属性付命令を解釈実行するインタプリタ(μ命令)を格納しているメモリである。μプログラムメモリ223より出力されるμ命令は、13ビット(BRA:9ビット)の分岐制御フィールドと31ビットの演算・転送制御フィールドより成る合計44ビットのフィールド構成である。13ビット(BRA:9ビット)の分岐制御フィールドはデコーダ224に出力され、31ビットの演算・転送制御フィールドはセレクトデコーダ202へ出力される。このように、セレクトデコーダ202に入力されるμ命令のフィールド構成を、図3に示す汎用命令(垂直32ビット構造)と(MSBビット71が無い点を除けば)略同様にすることにより、セレクトデコーダ202をほとんど「セレクタ+“図1のデコーダ2”」の形で実現することができる。
【0127】
デコーダ224、及びPLR225は、図11の従来例においてPLR505がμ−SQC520に対して出力していたμ−SQCにおける分岐制御の為の制御信号等を生成してμ−SQC222に出力するための構成である。
【0128】
図9に示すように、第2の実施例では、第1の実施例の構成に対してμプログラム制御回路220を追加しているが、実際のH/W量は、従来の構成より極めて少なくて済む。第2の実施例においても、第1の実施例と同様に、図9におけるアプリケーション/OSプログラムメモリ201とデータメモリ204を除いた全ての構成要素を、LSIの中に入れることが、事実上可能となっている。
【0129】
これは、特にμプログラムメモリ223が、オペランド属性付命令を解釈実行するインタプリタのみを格納しており、またオペランド属性付命令は命令種別が少ないので、必要なメモリ容量が非常に少なくて済むからである。μプログラムメモリ223の容量は、例えば(512w×44bit )で済む。更に、μ−SQC222は、メモリアドレスビットが9ビットで済む。
【0130】
これより、従来ではμプログラムメモリとして大規模なメモリが必要となる為に、外部メモリを使用していた(EPROMで構成するとIC11個)が、第2の実施例では極小規模(事実上LSIの中に入れることが出来る規模)のメモリで済み、第1の実施例と比較しても実際のH/W量の増加は極僅かである。
【0131】
よって、従来、システムのダウンダイジング化が困難、ROMのアクセスタイムがネックとなりシステムクロック周波数を上げることが困難、高価なROMを多く使用するのでコスト高となる等の問題があったが、第2の実施例においても第1の実施例と略同様にこれらの問題を解決でき、更に上記のように特にOSマクロ関数による処理の頻度が高い場合には、第1の実施例に比べて更にシステムの高速化を実現することができる。
【0132】
図10は、μ転送命令における転送モード切替えを説明する為の図である。
上述してあるように、転送命令には、アプリケーションレベル(オペランド属性付命令)の転送命令とμ命令レベルの転送命令(μ転送命令という)とがあり、当該情報処理装置内には(特に図示していないが)アプリケーションレベルの転送命令では制御できないH/W資源(レジスタ等)が存在する。
【0133】
ここでは、μ転送命令中にOSENビット(オペランド属性付命令による転送モードを使用するかμ命令による転送モードを使用するかを選択させる為のビット)を備えることにより、例えばμプログラム中でメモリ間接アクセスする場合等に容易に転送モード切替えを実現できるようにする方法について説明する。
【0134】
尚、当該μ転送命令における転送モード切替えは、図9に示す第2の実施例の情報処理装置を前提にしている。
図10(a)は、μ転送命令のフィールド構成の一例を示す図である。
【0135】
同図に示すように、μ転送命令250のフィールド構成は、基本的には図3に示す〔転送命令〕と略同様であるが、MSBビットは無く、OSENビットが追加されている。すなわち、μ転送命令250は、転送命令251、OSENビット252、転送制御253、パス経路選択254、RS1/RD255、及びIOレジスタアドレス256より構成される。
【0136】
ここでは、オペランド属性付命令の転送命令が16ビット転送、μ転送命令は32ビット転送であるものとして、以下に、μ転送命令における転送モード切替えの具体的な一例について説明する。
【0137】
図10(b)において、アプリケーションプログラム実行中に図10(c)に示すメモリ260の100番地を間接アクセスするためのオペランド属性付命令を実行する場合(ステップS41)、このオペランド属性付命令がμプログラムメモリ223でインタプリタされて成るμプログラム処理は、まず100番地に格納されているデータ(200番地を示すデータ)をリードして不図示のMAR(中間アドレスレジスタ)にセットする(ステップS42)。このとき、OSENビット252は‘0’になっておりμ命令の転送モードを使用するので、上記データ転送は32ビット転送で行う。そして、次のμ転送命令では、MARにセットされたデータより200番地に格納されているデータ(50)を読み出して、これを不図示のレジスタ“R10”にセットする(ステップS43)。このとき、OSENビット252は‘1’になっておりオペランド属性付命令の転送モードを使用するので、データ転送は16ビット転送になる。このように、OSENビットを用いることにより、容易に16ビット転送/32ビット転送の切替えが行えて所望の処理を行わせることができる。
【0138】
尚、上記実施形態では、PLCを例にして説明したが、これに限るものではなく、他の情報処理装置にも適用できる。
【0139】
【発明の効果】
以上、詳細に説明したように、本発明の情報処理装置は、オペランド属性付命令と汎用命令とより成る統合命令コード体系によるアプリケーションプログラム、システム組込み関数及びOSプログラムをプログラムメモリに格納し、このプログラムメモリのアドレス(PC)制御(例えば各種専用命令に応じたシステム組込み関数やOSプログラムに備えられている専用の関数を起動/復帰制御等)を行う1階層のプログラム実行制御処理系より構成される。
【0140】
従来のマイクロプログラム制御方式では、命令体系が通常の命令とその一段下のレベルのマイクロ命令とに分かれ、プログラムメモリに格納されている命令の順次読み出し制御を行うプログラム実行制御処理系統と、この命令を解釈/実行するためにμプログラムメモリに格納されているマイクロ命令の順次読み出し制御を行うμプログラム実行制御処理系統とより成る2階層のプログラム実行制御処理系であったが、本発明の情報処理装置では上記μマイクロプログラム実行制御処理系のハードウェアを削除でき、1階層のプログラム実行制御処理系により実現できる。
【0141】
これによって、システムのダウンサイジングを可能にし、システムクロック周波数を上げることができ、コストダウン/低消費電力化を実現できる。特に従来μプログラムメモリに必要とされる記憶容量が非常に大きい為に外部メモリとして構成していた情報処理装置であった場合には、これを1チップ(LSI)の中に入れることが出来るようになるので上記効果は非常に顕著なものとなる。
【0142】
あるいは、使用頻度が高く命令種別が少ない上記オペランド属性付命令のみをマイクロプログラム制御方式で処理する構成にすることにより、上記効果に加えて更にシステム全体の高速化を実現することができる。
【図面の簡単な説明】
【図1】本発明の一実施形態による情報処理装置の構成を示すブロック図である。
【図2】アプリケーション/OSプログラムメモリの格納内容とプログラム開発環境を説明する為の図である。
【図3】オペランド属性付命令と汎用命令の命令コード体系の一例を示す図であり、(a)はオペランド属性付命令、(b)は汎用命令の命令コード体系の一例を示す。
【図4】図1の分岐制御回路の構成の一例を示す概略ブロック図である。
【図5】命令デコーダによる命令のデコード論理を示す一覧表である。
【図6】拡張絶対無条件分岐命令を用いてOSマクロ関数を起動する処理を説明するための図である。
【図7】本実施形態の情報処理装置におけるサブルーチン処理を説明する為の図である。
【図8】本実施形態の情報処理装置におけるプログラム終了処理を説明する為の図である。
【図9】第2の実施例による情報処理装置の構成を示すブロック図である。
【図10】μ転送命令における転送モード切替えを説明する為の図である。
【図11】従来のマイクロプログラム処理方式による情報処理装置の構成の一例を示すブロック図である。
【図12】(a)は1クロックで終る場合の動作タイミング、(b)は複数クロックかかる場合の動作タイミングを示す図である。
【図13】従来のプログラムの開発ルートを説明する為の図である。
【図14】従来のアプリケーションプログラムの命令コード(マシン語)の一例を示す図である。
【図15】従来のマイクロプログラムの命令コードの一例を示す図である。
【符号の説明】
1 アプリケーション/OSプログラムメモリ
2 デコーダ
3 PLR
4 データメモリ
10 命令フェッチ制御回路
11 命令レジスタ
12 PC(プログラムカウンタ)
13 PCスタック
14 プログラムメモリ転送制御回路
15 分岐制御回路
20 演算実行部
21 キャッシュレジスタ
22 各種演算器/データ変換器
23 MPX
30 データメモリ転送制御回路
31 アドレス生成デコーダ
32 MPX
33 MAR
34 デコーダ
35 PLR
40 プログラムメモリ
41 OSプログラム
42 システム組込みマクロ関数
43 アプリケーションプログラム
51 開発ツール
52 マシン語生成機能
53 開発ツール(システム設計者専用)
60 オペランド属性付命令
61 MSBビット
62 オペコード
63 拡張ビット
64 データ型
65 データ記憶域
66 オペランド
70 汎用命令
71 MSBビット
72 命令種別
73 オペランド部
81 命令デコーダ
82 加算器
83 MPX
84 NOREG
85 PCCHGRG
86 NEXT PCレジスタ
87 アプリ実行モード制御フリップフロップ
88 MPX
90 マクロコール命令
91 MSBビット
92 CALL/JMP(OS起動関数種別)
93 マクロコール
94 マクロ番号
95 MSBビット
96 絶対分岐アドレス
100 RET命令
101 MSBビット
102 分岐命令
103 RET(命令種別)
104 APLビット
110 拡張絶対無条件分岐命令(サブルーチンコール命令/サブルーチンエンド命令)
111 MSBビット
112 JMP(分岐命令)
113 SUBコール/SUBエンド(OS起動関数種別)
114 SUB番号
115 MSBビット
116 絶対分岐アドレス
120 I/O制御レジスタ転送命令
121 MSBビット
122 転送命令
123 I/O転送(転送制御)
124 パス経路選択
125 RS1
126 I/Oレジスタアドレス
130 プログラムエンド命令
131 MSBビット
132 JMP(分岐命令)
133 PEND(OS起動関数種別)
134 プログラム番号
201 アプリケーション/OSプログラムメモリ
202 デコーダ
203 PLR
204 データメモリ
210 命令フェッチ制御回路
211 命令レジスタ
212 PC(プログラムカウンタ)
213 PCスタック
214 プログラムメモリ転送制御回路
215 分岐制御回路
220 μプログラム制御回路
221 プリデコーダ
222 μ−SQC
223 μプログラムメモリ
224 デコーダ
225 PLR
230 演算実行部
231 キャッシュレジスタ
232 各種演算器/データ変換器
233 MPX
240 データメモリ転送制御回路
241 アドレス生成デコーダ
242 MPX
243 MAR
244 デコーダ
245 PLR
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an information processing apparatus.
[0002]
[Prior art]
In general, many information processing apparatuses employ a microprogram control system. This implements the function specified by the instruction using a microinstruction that is one level lower than the instruction (machine language) (which specifies a basic operation that is simpler than the operation specified at the instruction level). Control signal for the purpose. A microinstruction usually has a bit length that is determined according to each model, and several fields are defined corresponding to functional blocks such as data registers and their connection relations.
[0003]
FIG. 11 is a block diagram showing an example of the configuration of an information processing apparatus according to a conventional microprogram control system. FIG. 11 shows a configuration diagram of a PLC (programmable controller) as an example. The programmable controller is usually abbreviated as PC, but is confused with a PC (program counter) described later, and is referred to as PLC here.
[0004]
The PLC shown in the figure includes an application program memory 501, a data memory 502, a micro (μ) program memory 503, a decoder 504, a PLR (pipeline register) 505, an instruction fetch control circuit 510, a μ-SQC (μ sequencer) 520, The calculation execution unit 530 and the data memory transfer control circuit 540 are configured.
[0005]
The application program memory 501 is a memory that stores application programs. In this application program, a program such as a ladder diagram designed mainly using a development tool (programming tool) described later on the user side is converted into a format used in the PLC by a conversion / inverse conversion function on the PLC side. Is. The inverse conversion function is used when RAS data or the like obtained on the PLC side is transmitted to the development tool (monitor device), and when a program stored on the PLC side is read into the development tool.
[0006]
A data memory 502 is an external data memory that stores various data used in an application program and an OS (operating system). For example, a RAM that temporarily stores sensor measurement values and data indicating the operating status of a control target device, and the like It is.
[0007]
The micro (μ) program memory 503 is a memory that stores a μ-OS program and an interpreter of an application program instruction. Here, the μ-OS program will be described. In the PLC, there is a system program that is created and stored in advance by the manufacturer. The system program stored as a group of instructions at the microinstruction level is referred to as a μ-OS program here.
[0008]
The decoder 504 decodes the μ instruction output from the micro (μ) program memory 503, and outputs control signals for the arithmetic unit, data converter, data transfer control unit, fetch control circuit unit, and various H / W (hardware). The data is generated and output to the PLR 505 and the PLR 545 in the data memory transfer control circuit 540.
[0009]
A PLR (pipeline register) 505 stores various control signals output from the decoder 504 in a pipeline manner, and connects these control signals to various H / W blocks. A fetch operation (instruction to the instruction register) Storage) and instruction execution operation pipeline operation.
[0010]
The instruction fetch control circuit 510 is a circuit that controls an instruction fetch operation of the application program, and includes an instruction register 511, a PC (program counter) 512, a PC stack 513, and a program memory transfer control circuit 514.
[0011]
The instruction register 511 is a register that fetches and outputs the application program stored in the program memory 501 one instruction at a time. The PC 512 is a counter that holds the address of the program memory 501 in which an instruction to be executed next (or is being executed) is stored and increments by +1 for each instruction execution. The PC stack 513 is a stack for temporarily saving the contents stored in the PC 512 when, for example, a subroutine call and returning the saved data to the PC 512 when returning. The program memory transfer control circuit 514 is a circuit that controls access to the program memory 501 and the operation of the PC 512 / PC stack 513 under the control of a μ-OS (micro operating system) program, which will be described later.
[0012]
The μ-SQC (micro sequencer) 520 is a circuit that performs micro program execution control (address control of the micro program memory), and includes a decoder 521, μ-PC (micro program counter) 522, an adder 523, and a μ-PC stack 524. , And MPX (multiplexer) 525.
[0013]
The decoder 521 decodes one instruction output from the instruction register 511 in the instruction fetch control circuit 510 and stores the process for interpreting and executing this one instruction (hereinafter referred to as “interpreter”) in the μ program memory 503. An address (hereinafter referred to as “MAP address”) is generated / output.
[0014]
The μ-PC 522 is a PC (address register) for sequentially executing programs stored in the μ program memory 503, and constitutes a counter that increments by “+1” when used as a pair with the adder 523.
[0015]
The μ-PC stack 524 is a stack for temporarily saving the μ-PC 522 at the time of a subroutine call and returning the μ-PC 522 at the time of return in the execution process of the micro program.
[0016]
The MPX 525 is a multiplexer that selects the address of the μ program memory 503, the “MAP address” output from the decoder 521, the output from the μ-PC 522 (the order address added by +1 by the adder 523), and the μ-PC stack 524. Are selectively output to the μ program memory 503 (and also to the adder 523) from the subroutine return address output from the PLR 505 and the branch address (JMP, CALL) of the microprogram output from the PLR 505.
[0017]
The arithmetic execution unit 530 is a functional block that executes various operations and various data conversions between cache registers and between IMM data (“direct numerical value” to be described later) and registers, and includes a cash register 531, various arithmetic units and data converters. 532 and MPX533.
[0018]
The cache register 531 is a register that stores data used for various operations / data conversion, and stores data used for data transfer with various H / W (hardware) registers / external memory.
[0019]
The various arithmetic units / data converters 532 perform arithmetic / data conversion processes such as various arithmetic / logical operations, shifts, BDC / DBC, and the like according to instructions of the application program and the μ-OS program.
[0020]
The MPX 533 selectively outputs the calculation result output from the various calculators / data converters 532 and the data (read data) read from the data memory 502 to the cache register 531.
[0021]
The data memory transfer control circuit 540 is a circuit that performs control when accessing the data memory 502 in the application program and the μ-OS program, and includes an address generation decode 541, MPX 542, MAR 543, decoder 544, and PLR 545. .
[0022]
The address generation decode 541 is based on the address operand output from the instruction register 511 of the instruction fetch control circuit 510, and the address at the time of data memory access from the application program based on the operand data type stored in the storage area (not shown). Is generated.
[0023]
The MPX 542 receives an address (output A of the cache register 531) at which the μ-OS program accesses the data memory 502 and an address when the data memory 502 is accessed from the application program (output of the address generation decode 541). And output to the MAR 543 and the decoder 544.
[0024]
The MAR (memory address register) 543 is a register that stores an address when the data memory 502 is accessed from the μ-OS program or application program output from the MPX 542. The address storage timing from the application program is the same as the storage timing of various control signals in the PLR 505.
[0025]
The decoder 544 receives the output of the MPX 542 and generates / outputs the access selection signal CS of the data memory 502.
The PLR 545 stores the output of the decoder 544 (access selection signal CS) and the output of the decoder 504 (various data memory transfer control signals) in a pipeline manner, and registers for connecting these output signals to the data memory 502 It is. The PLR 545 enables a pipeline operation such as a fetch operation (instruction storage in an instruction register) and a transfer execution operation.
[0026]
An outline of the operation of the conventional information processing apparatus (PLC) having the above configuration will be described below. Note that FIG. 11 does not show all the configurations of the PLC, and does not show all the wirings between the configuration blocks shown in the figure.
(1) After the system reset is released, the μ-PC 522 becomes “0”, and the μ-OS program on the μ program memory 503 is executed under the control of the μ-SQC (micro sequencer) 520. Then, H / W (hardware) initialization of the entire processor is performed. As a result, an environment in which the application program can be executed is constructed (such as an initial value set of the PC 512), and a system start command wait state is entered.
(2) When the μ-OS program recognizes the system start command, it permits the instruction fetch control circuit 510 to execute the application program. At this time, the μ-SQC 520 waits for an application program from the decoder 521.
(3) The instruction fetch control circuit 510 fetches the instruction code at the address designated by the PC 512 from the application program memory 501 and stores it in the instruction register 511. Then, the PC 512 is automatically incremented, and the process of fetching the next instruction code from the memory 501 is repeated.
(4) The instruction code output from the instruction register 511 is decoded by the decoder 521 of the μ-SQC 520. As a result, a processing address is generated on the μ program memory that interprets and executes the instruction. The address information output from the decoder 521 is selectively output by the MPX 525 and input to the address bus of the μ program memory 503. As a result, the μ instruction corresponding to the instruction code is output from the μ program memory 503 to the decoder 504. The decoder 504 decodes the μ instruction and generates an arithmetic unit, a data converter, a data transfer control unit, a fetch control circuit unit, and various H / W control signals. Then, control commands for these various calculations and transfers are set in the PLR 505, and the commands are passed to various H / W blocks.
(5) In the case of a transfer command, the address of the data memory 502 is set in the MAR 543 in the data memory transfer control circuit 540 at the same time. At the same time, reading of the next μ instruction from the μ program memory 503 starts under the control of the μ-SQC 520.
[0027]
In the case of an operation instruction, the operation execution unit 530 executes a predetermined operation, and the operation result is stored in the cache memory. At the same time, the process of reading the next μ instruction, decoding it by the decoder 504, and taking it into the PLR 505 starts.
[0028]
Branch control of the application program is performed by register access to the PC 512 and the PC stack 513 of the instruction fetch control circuit 510 from the μ-OS.
[0029]
Incidentally, here, the processing of the μ instruction corresponding to one instruction of the application program may be completed in one clock, or may take a plurality of clocks. At this time, the instruction code is fetched into the instruction register 511 in the instruction fetch control circuit 510, the H / W control command is set to the PLR 505, and the operation of the arithmetic execution unit 530 and the data memory transfer control circuit 540 (cache register 531). FIG. 12 shows the timing of a write operation to the data memory 502 or the like.
[0030]
FIG. 12 (a) shows the operation timing when it ends with one clock, and FIG. 12 (b) shows the operation timing when it takes a plurality of clocks.
As shown in FIG. 12B, as an example of an instruction that takes a plurality of clocks, for example, when an operation of (+ A B) is performed, the instruction code of the μ program corresponding to the instruction code “ADD B” of the application program is “LD”. A "" ADD "and it takes 2 clocks.
[0031]
Although not particularly shown in FIG. 11, when the processing corresponding to an application program instruction in the PLR 505 is completed, rewriting permission (map permission) of the instruction register 511 is given to the instruction fetch control circuit 510. This is indicated by @ in FIGS. 12 (a) and 12 (b).
[0032]
Next, a conventional program development environment will be described.
FIG. 13 is a diagram for explaining a conventional program development route.
When the application program is developed on the user side by a programmer or the like on the application program development tool 550 shown in FIG. 13A (for example, a ladder circuit diagram or the like is created on the programming tool), An object is generated and stored in the application program memory 501. At this time, the instruction code of the application program stored in the memory 501 has a format shown in FIG. 14, for example. This will be described later.
[0033]
On the other hand, the μ program is developed mainly by the PLC manufacturer when the system designer develops the μ-OS and interpreter using the μ program development tool 560 dedicated to the system designer shown in FIG. 13B. An object is generated and stored in the μ program memory 503. At this time, the instruction code of the μ-OS and the interpreter stored in the memory 503 has a format shown in FIG. 15, for example. This will be described later. Note that the μ-OS performs various H / W control and execution management of application programs, and the interpreter is for interpreting and executing application programs.
[0034]
FIG. 14 is a diagram illustrating an example of an instruction code (machine language) of a conventional application program.
In the figure, the instruction code is composed of a basic part (32 bits) and an extension part (32 bits). The basic part is an opcode indicating the instruction type, an extension bit indicating whether the instruction form of the instruction is only the basic part or the basic part + extended part, a data type indicating the data type and size, a position where the data exists, and the data It is composed of a data storage area indicating an access method (indirect access) (collectively referred to as operand type) and an operand (16 bits) indicating an address or a numerical value.
[0035]
Examples of the opcode include ADD, SUB, MLT, BDC, DBC, LD, and ST. Examples of the data type include a bit type, a bit inversion type, a one-word integer type, a two-word integer type, and a real number type. The data storage area stores formulas (or previous calculation result values), constants, memories, indexes, memory indirects, parameters, and the like.
[0036]
In the case of an address, an operand is a 16-bit address when only the basic part is used, and a 32-bit address when the basic part is an extension part. On the other hand, in the case of a numerical value, a 16-bit direct numerical value is obtained when only the basic part is used, and a 32-bit direct numerical value is obtained when the basic part + extended part is used. When the address or numeric operand exceeds 16 bits, the instruction form of the basic part + the extension part is used. At this time, the extension bit of the basic part is “1”. The instruction fetch control circuit 510 writes the instruction code to the instruction register 511 when the basic part and the extended part are aligned when the extension bit of the basic part is “1”.
[0037]
FIG. 15 is a diagram showing an example of an instruction code (microinstruction) of a conventional microprogram.
As shown in the figure, the instruction code of the microprogram is composed of three fields of μ-SQC branch control, various arithmetic / data transfer controls, and various H / W controls. A microinstruction usually has a bit length determined according to each model, but generally one step has an instruction bit length of about 80 to 100 bits.
[0038]
Branch control fields include BOP (branch operation) that performs instruction execution order control (MAP, CONT, JMP, CALL, RET, etc.) of μ program, and condition selection at conditional branch (S, Z, CY, OVF, etc.) TC (test condition), JMP, and BRA (branch address) indicating the branch address of the μ program during CALL. MAP is an instruction for selecting the next application instruction, and CONT is an instruction for selecting the next address.
[0039]
The calculation / data transfer control fields are 16 bits / 32 bits, MD (calculation mode) indicating the presence / absence of a sign, etc., and AFC (AD, SUB, MLT, BDC, DBC, etc.) for specifying the calculation / data conversion function. Calculation function), calculation source / destination register (RS1, RS2, RD) for specifying source / destination register at the time of calculation, IMM (direct numerical value) which is numerical data at the time of calculation between direct numerical values, various data transfer control ( RD, WT, transfer data size, etc.), and various data path route selections for instructing MPX selection on various data paths necessary for calculation / transfer.
[0040]
The various H / W control fields are used for controlling various peripheral H / Ws, and are used for setting / resetting various flags, for example.
[0041]
[Problems to be solved by the invention]
In an information processing apparatus (PLC or the like) using the above-described conventional microprogram control system, application program execution and μ− are performed by performing two-level program control (control of application program memory and control of μ program memory). Various system controls were performed by the OS. When the application program is executed, the instructions are interpreted and executed by the interpreter of the μ program one by one.
[0042]
As described above, an information processing apparatus (PLC or the like) using a conventional microprogram processing system requires the processing system of the two-layer program execution control as described above.
(1) The amount of H / W (hardware) increases, and downsizing of the system is difficult. In particular, the microprogram memory requires a high-speed and large-scale memory depending on the number of control instruction bits. For example, in the case of the PLC shown in FIG. 11, for example, a high-speed and large-scale memory of about 20 ns with (8K to 32K) × (80 to 100 bits) is required. Then about 11 ICs were required. In addition, the presence of two systems (two layers) of the application program memory control processing system and the μ program memory control processing system as described above is one factor that increases the amount of H / W (hardware).
(2) Since the memory capacity of the microprogram memory becomes large as described above and the microprogram memory cannot be put in the LSI, if the microprogram memory is realized by an external ROM, the ROM access time becomes a bottleneck. Thus, there is a problem that the system clock frequency cannot be increased.
(3) Furthermore, the high-speed EPROM that constitutes the microprogram memory is expensive. If a large number of these are used, the cost is naturally increased. Furthermore, the need for the above-mentioned two-system (two-layer) memory address management mechanism has also been a cause of high costs.
[0043]
An object of the present invention is to provide an information processing apparatus that enables downsizing of a system, can increase a system clock frequency, and can realize cost reduction / low power consumption.
[0044]
[Means for Solving the Problems]
A first information processing apparatus according to the present invention includes: Perform application level transfer instructions and bit sequence instructions Instruction with operand attribute , Microinstructions that perform various operations, OS level data transfer, and various hardware controls An instruction with an operand attribute having an integrated instruction code system composed of general-purpose instructions and An application program described by some general-purpose instructions, and a program storage means for storing an OS program described by the general-purpose instructions;
Application program or OS program stored in the program storage means By performing branch control by branch control means for instructions fetched sequentially from And a one-layer program execution control means for executing the program storage means by controlling the address.
[0045]
According to the first information processing apparatus, the application program and the OS program described by the instructions of the integrated instruction code system are coexistingly stored in the program storage means, and the program storage control means addresses the program storage means. Therefore, the program execution control processing system having the two-layer structure including the conventional microprogram control processing system is not necessary, and the program is executed by the one-layer processing system by the program execution control means. be able to. Thus, by eliminating the hardware related to the conventional microprogram control processing system, the system can be downsized, the system clock frequency can be increased, and cost reduction / low power consumption can be realized.
[0046]
A second information processing apparatus according to the present invention includes: Perform application level transfer instructions and bit sequence instructions Instruction with operand attribute , Microinstructions that perform various operations, OS level data transfer, and various hardware controls An instruction with an operand attribute having an integrated instruction code system composed of general-purpose instructions and An application program described by some general-purpose instructions, a program storage means for storing an OS program described by the general-purpose instructions, and an application program or OS program stored in the program storage means By performing branch control by branch control means for instructions fetched sequentially from One level of program execution control means for sequentially reading and executing instructions by controlling the address of the program storage means, and only when the instruction read by the program execution control means is the instruction with operand attribute, the microprogram control system And a microprogram control processing means for interpreting / executing.
[0047]
According to the second information processing apparatus, as in the first information processing apparatus, the system can be downsized, the system clock frequency can be increased, and cost reduction / low power consumption can be realized. In addition, the total speed of the system can be realized.
[0048]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing the configuration of an information processing apparatus according to an embodiment (first example) of the present invention. Here, the configuration of a PLC (programmable controller) is shown as an example.
[0049]
The PLC shown in FIG. 1 includes an application / OS program memory 1, a decoder 2, a PLR 3, a data memory 4, an instruction fetch control circuit 10, an arithmetic execution unit 20, a data memory transfer control circuit 30, and the like.
[0050]
When the configuration of the PLC shown in the figure is roughly compared with the configuration of the conventional PLC shown in FIG. 11, the μ-SQC 520 and the μ program memory 503 existing in the conventional PLC do not exist in the PLC of this embodiment. In addition, a function for performing branch control is added to the instruction fetch control circuit 10 of the PLC of the present embodiment. The PLC of the present embodiment generally has a function for performing this branch control, an application program in which each instruction is described by an integrated instruction code system described later, a system built-in macro function, and an OS program (all of which will be described later). The application program / OS program memory 1), the μ-SQC 520 and the μ program memory 503 can be deleted. Details will be described in order below.
[0051]
First, each configuration of the PLC shown in FIG. 1 will be described in detail.
The application / OS program memory 1 is a memory (RAM / ROM) in which an OS program, a system built-in macro function, and an application program coexist. Details will be described later with reference to FIG. 3. Each of these programs (or functions) is described by an instruction with operand attributes or a general-purpose instruction belonging to the integrated instruction code system.
[0052]
The decoder 2 decodes an instruction with operand attributes or a general-purpose instruction (which will be described in detail later with reference to FIG. 2) output from the instruction register 11 in the instruction fetch control circuit 10, and performs arithmetic unit / data conversion. Generator / data transfer control unit / fetch control circuit unit and various H / W control signals are generated and output to the PLR 3.
[0053]
As will be described later, since the instruction with operand attribute is an application level transfer instruction, if the decoder 2 is designed to generate a transfer control signal corresponding to this simple transfer instruction, the conventional μ program There is no need for interpretation / execution by a memory interpreter, and the output from the instruction register 11 can be directly input to the decoder 2 for processing.
[0054]
A PLR (pipeline register) 3 is a register that pipelines and stores various control signals output from the decoder 2 and connects these control signals to various H / W blocks, and fetch operation (instructions to the instruction register) Storage) and instruction execution operation pipeline operation.
[0055]
Since the data memory 4 is substantially the same as the conventional data memory 502, it is not specifically described here.
The instruction fetch control circuit 10 includes an instruction register 11, a PC (program counter) 12, a PC stack 13, a program memory transfer control circuit 14, and a branch control circuit 15.
[0056]
The instruction register 11 temporarily stores one instruction of the OS program, the system built-in macro function, or the application program sequentially fetched from the program memory 1 and outputs it to the decoder 2, branch control circuit 15, and address generation decoder 31. Register. Under the control of the branch control circuit 15, the PC 12 holds the address of the program memory 1 in which the instruction to be executed next (or being executed) is stored. The PC stack 13 is a stack for temporarily saving the contents stored in the PC 12 when, for example, a macro function to be described later is called. The program memory transfer control circuit 14 will not be described in particular.
[0057]
The branch control circuit 15 has a function for directly controlling the PC 12 and the PC stack 13 generated by an application program, a JMP, CALL, RET instruction, etc. in the OS program without interposing the OS program. The configuration / operation of the branch control circuit 15 will be described later in detail.
[0058]
An outline of the operation of the PLC having the configuration shown in FIG. 1 will be described below.
(1) First, after system reset (at the time of startup), the PC 12 in the instruction fetch control circuit 10 is “0”, and from this, the address “0” of the application / OS program memory 1 is set. The stored instruction (the first instruction of the OS program shown in FIG. 2) is fetched and temporarily stored in the instruction register 11. Then, the fetched instruction is output from the instruction register 11 to the decoder 2 and decoded by the decoder 2, and an arithmetic unit, a data converter, a data transfer control unit, a fetch control circuit unit, and various H / W (hardware) ) Is generated. And this control signal is output via PLR3 and various H / W control (calculation, transfer, etc.) is performed. In this way, by sequentially fetching and executing the instructions of the OS program, the H / W initialization of the entire processor and the execution environment of the application program are constructed. Then, the system waits for a system start command.
[0059]
All instruction codes of the OS program are general-purpose instructions. General-purpose instructions are basically RISC and can be processed in one clock. The arithmetic execution unit 20 can also process various functions in one clock.
(2) As described above, after the system is initialized by the OS program, when the system command is recognized, the application program is executed. That is, first, the start address of the storage area where the application program in the application / OS program memory 1 is stored is set in the PC 12. Then, the instructions at the addresses set in the PC 12 are sequentially fetched and executed. The instruction code of the application program is an instruction with an operand attribute or a general-purpose instruction. However, the general-purpose instructions of the application program cannot use all general-purpose instructions like the OS program, and can use “part of general-purpose instructions” (particularly, directly access the H / W resources dedicated to the OS program). The instruction to be generated cannot be generated in the application program development environment described later).
[0060]
The processing operation of each instruction of the application program will be described in detail later.
FIG. 2 is a diagram for explaining the contents stored in the application / OS program memory 1 and the program development environment.
[0061]
As shown in the figure, an OS program 41, a system built-in macro function 42, and an application program 43 are coexistingly stored in the application / OS program memory 40.
[0062]
As described above, in a PLC, a manufacturer generally creates a system program. Also in this embodiment, the OS program 41 and the system built-in macro function 42 are created mainly by the manufacturer and stored in the application / OS program memory 40. That is, the system designer develops an OS program and a system built-in macro function by the system designer-dedicated development tool 53 shown in the figure, and the object is generated in the form of general-purpose instructions and stored in the application / OS program memory 40. Is done. The OS program performs various H / W control and execution management of application programs. The system built-in macro function, which will be described in detail later, corresponds to an instruction that cannot be executed in one clock by H / W in the instruction of the application program, and an OS level general-purpose instruction sequence that includes an algorithm for executing this instruction. (Thus, hereinafter also referred to as OS macro function).
[0063]
Note that the development tool 53 dedicated to system designers can also generate instructions with operand attributes. This is because, for example, at the time of system development, the system designer also generates a machine language of an instruction with operand attributes, stores it in the area of the application program 43, and performs debugging confirmation. As a result, the application program can be interlocked so that the H / W resources dedicated to the OS program cannot be directly accessed, and the safety of the system can be ensured.
[0064]
On the other hand, when a program is designed mainly on the user side using a programming tool or the like with a ladder diagram and the object is generated, the object is converted / inverted by the machine language generation function 52 in the PLC. It is converted into an instruction with an operand attribute or a general-purpose instruction and stored in the application / OS program memory 40. Although not particularly shown in FIG. 1, a development tool interface processor is provided in the PLC, and the conversion / inverse conversion processing is executed by this processor.
[0065]
FIGS. 3A and 3B are diagrams showing an example of the instruction code system of the instruction with operand attribute and the general-purpose instruction.
FIG. 3A shows an example of an instruction code system of the instruction 60 with operand attribute.
[0066]
In the figure, an instruction 60 with operand attribute includes a basic part and an extension part. The basic part includes an MSB bit 61, an operation code 62, an extension bit 63, a data type 64, a data storage area 65, and an operand 66. The MSB bit 61 is a bit for distinguishing an instruction with operand attribute from a general-purpose instruction. For example, when it is “1”, it is recognized as an instruction with operand attribute, and when it is “0”, it is a general-purpose instruction. The operation code 62 indicates the instruction type. The extension bit 63 indicates the presence / absence of the extension part. The data type 64 indicates the data type and size. The data storage area 65 indicates the location where the data exists and the data access method. The operand 66 indicates an address or a numerical value. The extension part is substantially the same as the extension part in the conventional instruction code shown in FIG. 14 except for the MSB bit 67. The MSB bit 67 is a bit for distinguishing an operand attributed instruction from a general-purpose instruction, like the MSB bit 61.
[0067]
The instruction code system of the operand attributed instruction 60 is substantially the same as the instruction code of the application shown in FIG. 14, but the number of instruction types handled by the operation code 62 is considerably small. For example, the conventional 128 types can be replaced with 32 types. For example, when the process of adding B to A is taken as an example, conventionally, “LD” A In this embodiment, the instruction “→ B” is “LD A” (an instruction with operand attribute) → “LD B” (an instruction with operand attribute) → “ADD” (general-purpose instruction). This is because RISC processing can be performed in one clock, and arithmetic processing and the like are realized by general-purpose instructions (arithmetic instructions such as ADD) that do not involve operands. Only the bit sequence instructions (bit read, bit-and-bit, bit-or, bit-not, etc.) that require high-speed operation by the transfer instruction and the controller can be used, so that the number of instruction types is very small.
[0068]
FIG. 3B shows an example of the instruction code system of the general-purpose instruction 70.
The general-purpose instruction is an instruction at a level where the hardware can be directly controlled like a micro-instruction, but the instruction code of the conventional microprogram shown in FIG. It has a type 32 bit structure.
[0069]
A general-purpose instruction 70 shown in the figure includes an MSB bit 71, an instruction type 72, and an operand part 73.
The MSB bit 71 is a bit indicating whether the instruction code is an instruction with an operand attribute or a general instruction, like the MSB bit 61 of the instruction 60 with an operand attribute. In the example shown in FIG. The bit is '0'.
[0070]
The instruction type 72 includes an operation instruction, an iMM operation, a transfer instruction, a branch instruction, and the like, and the configuration example of the operand unit 73 for each instruction type is shown in FIG. In the case of an arithmetic instruction, the operand part 73 is composed of an arithmetic type, a mode, RS1, RS2, and RD. Similarly, the operand part 73 is composed of an operation type, mode, RD, and direct numerical value in the case of iMM operation, and in the case of a transfer instruction, from transfer control, path route selection, RS1 / RD, and I / O register address. In the case of a branch instruction, it consists of branch control, condition selection, and branch address. The reason why the transfer instruction exists in the instruction type 72 of the general-purpose instruction 70 is that it is used in the OS program. In the case of the application program, the transfer instruction is realized by the instruction with operand attribute as described above. In addition, the branch instruction may differ in content between the application program and the OS program. For example, the JMP instruction in the application program is a relative branch, whereas the JMP instruction in the OS program is an absolute branch. This is because the application program can be moved on the program memory 1 in units of programs.
[0071]
The branch instruction of this embodiment includes an extended absolute unconditional branch instruction in addition to the absolute branch and the relative branch. Hereinafter, branch processing will be described with reference to FIGS. 4 and 5.
[0072]
FIG. 4 is a schematic block diagram showing an example of the configuration of the branch control circuit 15 of FIG. In the figure, the branch control circuit 15 includes an instruction decoder 81, an adder 82, an MPX (multiplexer) 83, a NOREG 84, a PCCHGRG 85, a NEXT PC register 86, an application execution mode control FF (flip-flop) 87, and an MPX (multiplexer). ) 88 and the like.
[0073]
The instruction decoder 81 decodes one instruction output from the instruction register 11 and generates / outputs various control signals and generates / outputs a relative branch address, an absolute branch address, a macro number, a subroutine number, etc., which will be described later.
[0074]
Decoding processing by the instruction decoder 81 will be described with reference to FIG.
FIG. 5 is a list showing instruction decoding logic by the instruction decoder.
In the figure, only general-purpose instructions are shown, but in the case of an instruction with operand attribute, a control signal for incrementing the PC 12 by 1 is output.
[0075]
In the figure, when the instruction output from the instruction register 11 is a general-purpose instruction of any one of “operation instruction”, “iMM operation instruction”, and “transfer instruction”, the instruction decoder 81 increments the PC 12 by +1. Output a control signal.
[0076]
If it is a “branch instruction”, processing according to the type of the branch instruction is performed. Branch instructions are broadly classified into basic branch instructions and extended absolute (unconditional) branch instructions, and basic branch instructions are further divided into absolute branch instructions and relative branch instructions.
[0077]
Absolute branch instructions include unconditional instructions and conditional instructions.
Examples of unconditional instructions include instructions such as JMP, CALL, and RET.
In the case of the JMP instruction, the instruction decoder 81 outputs the branch address (see FIG. 3B) included in the instruction code to the MPX 83 (denoted as “absolute branch address” in FIG. 4) and selects it from the MPX 83. The data is output and set in the PC 12.
[0078]
In the case of the CALL instruction, the branch address is set in the PC 12 as in the case of the JMP instruction, and the data set in the PC 12 at that time is saved in the PC stack 13. Then, the data saved in the PC stack 13 is returned to the PC 12 by the RET instruction.
[0079]
A conditional instruction is the same as the unconditional instruction when a condition (not specifically described) is satisfied. When the condition is not satisfied, PC12 is incremented by +1.
Relative branch instructions include unconditional JMP instructions and conditional JMP instructions.
[0080]
In the case of an unconditional JMP instruction, the instruction decoder 81 outputs the branch address included in the instruction code to the adder 82 (indicated as “relative branch address” in FIG. 4). Then, the adder 82 adds the address currently set in the PC 12 to this relative branch address, and the addition result is output to the MPX 83, selectively output from the MPX 83 and set in the PC 12.
[0081]
The conditional JMP instruction is the same as the unconditional JMP instruction when the condition is satisfied. When the condition is not satisfied, PC12 is incremented by +1.
The extended absolute (unconditional) branch instruction is divided into an extended absolute unconditional JMP instruction and an extended absolute unconditional CALL instruction.
[0082]
The extended absolute (unconditional) branch instruction will be described later in detail with reference to FIGS. 6, 7, and 8, but will be described briefly here. The instruction decoder 81 outputs various control signals according to the decoding result, and controls other components in the instruction fetch control circuit 10.
[0083]
If the instruction is an extended absolute unconditional JMP instruction, the instruction decoder 81 outputs the data of the branch address (absolute branch address) included in the instruction to the MPX 83 and causes the PC 12 to set it. Further, the macro number or subroutine number data included in the instruction is temporarily stored in a NOREG (number register) 84. Further, the return address is saved in the NEXT PC register 86. Further, the application execution mode control FF 87 is controlled, and its APL flag bit (a flag indicating whether the application is being executed or the OS is being executed. To indicate that the application is being executed). Thus, the process is transferred to the OS. On the OS side, the macro number or the subroutine number to be activated can be known by referring to the NOREG 84. The macro number is used when starting an OS macro function described later.
[0084]
In the case of an extended absolute unconditional CALL instruction, the instruction decoder 81 performs substantially the same processing as in the case of the extended absolute unconditional JMP instruction, but the return address is not saved in the NEXT PC register 86 but is stored in the PC stack. Evacuate to 13.
[0085]
A specific example of processing using the extended absolute unconditional branch instruction will be described below with reference to FIGS. The extended absolute unconditional branch instruction is a kind of branch instruction used only in an application, and there are various dedicated instructions as described below.
[0086]
FIG. 6 is a diagram for explaining processing for starting an OS macro function using an extended absolute unconditional branch instruction.
One instruction of the application program may not be processed with one clock in H / W. In such a case, in the PLC of the present embodiment, a system built-in macro function 42 (OS macro function) is registered in the application / OS program memory 1 as shown in FIG.
[0087]
The OS macro function is a group of a plurality of consecutive instructions for performing H / W processing corresponding to one instruction of the application program. The extended absolute unconditional branch instruction is used to activate the OS macro function, and the start address of the OS macro function designated by this instruction is set in the PC 12. This will be described in detail below.
[0088]
FIG. 6A shows an example of a macro call instruction which is such an extended absolute unconditional branch instruction for starting a macro function. In the figure, a macro call instruction 90 includes a basic part and an extension part. The basic part is an MSB bit 91, a branch instruction type "CALL or JMP" 92, an OS activation function type "macro call" 93, and a macro. It consists of fields 94. The extension section includes an MSB bit 95 and an absolute branch address 96 (19 bits) indicating the start address of the OS macro function to be activated by the instruction. At the end of each OS macro function instruction group, a dedicated return instruction RET instruction (RET instruction with an APL bit) is provided, and the RET instruction returns to the application program execution mode. The RET instruction 100 shown in the figure includes an MSB bit 101, a branch instruction 102, a RET 103 indicating a RET instruction, and an APL bit for performing control for returning the application execution mode control flag from the OS execution mode to the application execution mode. 104.
[0089]
FIG. 6B is a flowchart showing an example of processing by a macro call instruction. In the figure, the processing of steps S1 and S2 is an example of execution of an instruction with operand attributes and will not be particularly described.
[0090]
After executing the processes of steps S1 and S2, a macro call instruction (for example, “CALL MAC X′10 ′; X′10 ′ is a macro number) is decoded by the instruction decoder 81 in the branch control circuit 15 in step S3. Then, the various control processes described above are performed, and the process proceeds to the process of the OS program (system built-in macro function).
[0091]
That is, {circle over (1)} the return address (the memory storage address of the “STC” instruction in step S8, which is the instruction next to the macro call instruction in step S3 in the application program) is saved in the PC stack 13.
[0092]
(2) The macro number (X′10 ′) of the macro function to be activated is set in the NOREG 84.
(3) Set the APL flag of the application execution mode control FF 87 to “0” (indicating that the OS is being executed).
[0093]
(4) The leading address of the macro function to be activated (the absolute branch address 96 of the macro call instruction 90) is selectively output from the MPX 83 and set in the PC 12.
As described above, processing of the macro function with the macro number (X′10 ′) is started. As described above, the macro function is composed of a plurality of instructions, and each instruction is sequentially fetched and executed. The processing in steps S4 to S6 shown in the figure is an example of processing in the PLC apparatus handled by the applicant of the present invention, and is not described in detail here. The parameters A and B are taken out, data processing of MAC X'10 'is executed in step S5, and the calculation result is set in the calculation result register in step S6.
[0094]
Finally, the application program is restored by the RET instruction. This is because when the instruction decoder 81 in the branch control circuit 15 decodes the RET instruction, first, the application execution mode control FF 87 is controlled according to the APL bit 104 and the APL flag is set to “1” (the application is being executed). To show). Next, the return address saved in the PC stack 13 is set in the PC 12. As a result, the process proceeds to the execution of the “ST C” instruction in step S8 of the application program.
[0095]
FIG. 7 is a diagram for explaining subroutine processing in the information processing apparatus of the present embodiment.
The subroutine processing in the information processing apparatus (PLC) of this embodiment is a subroutine call and subroutine end processing that are provided in advance in the OS program by an extended absolute unconditional branch instruction (SUB call instruction, SUB end instruction). This is done by starting a function or subroutine end function.
[0096]
FIG. 7A shows an example of an extended absolute unconditional branch instruction (SUB call instruction, SUB end instruction) for subroutine processing.
In the figure, an extended absolute unconditional branch instruction 110 includes a basic part and an extended part. The basic part includes an MSB bit 111, a branch instruction “JMP” 112, an OS activation function type “SUB call or SUB end” 113, and a SUB number 114. The extension consists of MSB bit 115 and absolute branch address 116 (19 bits). Further, in the subroutine processing, processing in steps S15 and S16 in FIG. 7B described later is performed by an I / O control register transfer instruction. FIG. 7A also shows an example of an I / O control register transfer instruction. The I / O control register transfer instruction 120 shown in FIG. 3 is a form of the [transfer instruction] shown in FIG. 3B. A path route selection 124, “RS1” 125, and an I / O register address 126 are included.
[0097]
FIG. 7B is a flowchart illustrating an example of subroutine processing.
In the figure, the processing of steps S11 and S12 is an example of execution of an instruction with operand attributes, and will not be particularly described.
[0098]
After the processing of steps S11 and S12, when a SUB call instruction “X′20 ′” (X′20 ′ is a SUB number) is input to the instruction decoder 81 in step S13, the instruction decoder 81 decodes the instruction. Various control processes described above are performed, and the process proceeds to the process of the OS program (subroutine call function).
[0099]
That is, {circle over (1)} the return address (the memory storage address of the “STC” instruction in step S21 which is the instruction next to the SUB call instruction in step S13 in the application program) is saved in the “NEXT PC register” 86. .
[0100]
(2) The SUB number (X'20 ') of the subroutine call function to be activated is set in the NOREG 84.
(3) Set the APL flag of the application execution mode control FF 87 to “0” (indicating that the OS is being executed).
[0101]
(4) The MPX 83 selectively outputs the head address of the subroutine call function to be activated (the absolute branch address 116 of the extended absolute unconditional branch instruction 110) and sets it in the PC 12.
[0102]
As described above, the SUB call process by the subroutine call function of the SUB number (X′20 ′) is started.
First, the return address saved in the “NEXT PC register” 86 as described above is saved in the OS work area, and the parameter pointer is updated (step S14). Next, the SUB number (X′20 ′) is obtained from the NOREG 84, and the subroutine program storage address (application program in the OS / OS program memory 1) of the SUB number (X′20 ′) is obtained from the subroutine entry table (not shown). In 43, the first address of the storage area in which the subroutine program of the SUB number (X'20 ') is stored is obtained.
[0103]
Then, the obtained address is set in PCCHGRG 85 by the I / O control register transfer instruction 120 (step S15). The PCCHGRG85 is a register for setting the return destination application address on the OS side when returning from the OS program to the application program.
[0104]
Finally, the address stored in the PCCHGRG 85 is set in the PC 12 by the PC change command, and the APL flag is switched to “1” (indicating that the application is being executed) (step S16). The PC change command is actually executed by performing a write operation to a certain I / O control register by the I / O control register transfer command 120.
[0105]
As described above, the start address of the subroutine program to be executed is obtained by the OS program, this start address is set in the PC 12, and the execution right is returned to the application, so that the subroutine processing "X'20 '" is executed. Start (step S17).
[0106]
Subroutine program instructions are sequentially fetched and executed. The last instruction of the subroutine program is a subroutine end instruction (extended absolute unconditional branch instruction 110), and the subroutine end function provided in the OS program is activated by this SUB end instruction (step S18). ), That is, the head address of the subroutine end function to be activated (the absolute branch address 116 of the extended absolute unconditional branch instruction 110) is selectively output from the MPX 83 and set in the PC 12, and the APL flag is set to “0” (OS is being executed) The subroutine program end process (SUB end process) is executed.
[0107]
In the SUB end process, first, the parameter pointer updated in the process of step S14 is restored, and the return address that has been saved in the OS area stack in the process of step S14 is also used as the I / O control register transfer instruction. 120 is set to PCCHGRG85 (step S19). Then, the return address stored in the PCCHGRG 85 by the “PC change command” is set in the PC 12 and the APL flag is switched to “1” (indicating that the application is being executed) (step S20). Thus, the application program is sequentially executed from the instruction (STC) next to the subroutine call instruction in step S13 (step S21).
[0108]
When the APL flag is “0” (OS execution mode), application level interrupts are masked. The APL flag is also used for debugging.
[0109]
FIG. 8 is a diagram for explaining program end processing in the information processing apparatus of the present embodiment.
When the execution of an application program is completed, a program end function is preliminarily started by using a dedicated extended absolute unconditional branch instruction (program end instruction), and a program end process is performed.
[0110]
FIG. 8A shows an example of the program end instruction.
In the figure, the program end instruction 130 includes a basic part and an extension part. The basic part includes an MSB bit 131, a branch instruction “JMP” 132, an OS activation function type “PEND” 133, and a program number 134. The extension consists of MSB bit 135 and absolute branch address 136 (19 bits).
[0111]
FIG. 8B is a flowchart illustrating an example of the program end process.
As shown in the figure, when an application program completes processing by executing the “ST C” instruction in step S31, by executing the PEND instruction added to the end of the program (step S32), The OS execution mode is entered, and the PEND process by the OS program is executed.
[0112]
In the PLC device, there is also a control process for sequentially executing a plurality of application programs. In the PEND process in the OS program, first, various task scheduler processes are executed (step S33), and if there is another application program to be executed next, its head address is set in PCCHGRG85 (step S34), and a PC change instruction Thus, the processing of another application program is started (step S35).
[0113]
The various task scheduler processes in step S33 will not be described in detail. However, in the case of a PEND instruction in the interrupt process, when there is another task request at the same level, a request PG pointer is extracted and another task at the same level is extracted. Dispatch processing is performed when there is no request. On the other hand, in the case of the PEND instruction at the default level, the next task number is determined and the program pointer is extracted.
[0114]
As described above, in the information processing apparatus according to the first embodiment of the present invention, the instruction code system of the application program and the instruction code system of the μ program are conventionally provided with operand attributes composed of transfer instructions at the application level. A single integrated instruction code system comprising instructions and general-purpose instructions that can directly control H / W is employed. In the past, a processing system for two-layer program execution control comprising an application program execution control circuit and a large-scale μ program control circuit (μ program memory 503, μ-SQC 520, etc.) is replaced with a large-scale μ program. The control circuit is deleted, and a one-layer program execution control processing system for controlling the application / OS program memory 1 is configured.
[0115]
In the execution of the application program, most of the instructions with operand attributes are simple transfer instructions such as LD and ST, so the control signal to be generated by the decoder 2 for this instruction is almost a predetermined simple one. Thus, it is possible to make the specification of the decoder 2 corresponding to the instruction with the operand attribute more easily. As a result, even when the instruction with operand attribute is executed, the decoder 2 can directly decode it without requiring an interpreter by the μ program control circuit.
[0116]
The application program also has a dedicated extended absolute unconditional branch instruction for an instruction that cannot be processed in one clock by H / W, an interrupt process (subroutine execution process), or the like. . Then, as described in FIGS. 6, 7, 8, etc., the branch control circuit 15 performs a control operation in accordance with each dedicated instruction, thereby starting the OS macro function, the subroutine function, etc. Each process is executed.
[0117]
With this configuration, the information processing apparatus of the first embodiment can delete a large-scale μ program control circuit, so that the actual H / W amount can be significantly reduced. Virtually all the components except the application / OS program memory 1 and the data memory 4 in FIG. 1 can be placed in the LSI.
[0118]
As a result, the H / W of the μ program control processing system has been large in the past (particularly because an external memory (ROM) must be used for the μ program memory 503), making downsizing of the system difficult, and ROM access There are problems such as time being a bottleneck and it is difficult to increase the system clock frequency, and many expensive ROMs are used, resulting in high costs. However, in the first embodiment, a large-scale μ program control process is performed as described above. Since the H / W of the system can be deleted (especially, it is not necessary to use an external memory), these problems can be solved. That is, downsizing of the system can be realized, the system clock frequency can be increased, and all circuits except the program memory and the data memory can be incorporated in a one-chip LSI. As described above, in the information processing apparatus according to the first embodiment, various effects such as cost reduction, downsizing, high speed, and low power consumption can be obtained.
[0119]
Next, a second embodiment will be described with reference to FIGS.
In the information processing apparatus having the configuration shown in FIG. 1 described above, since the H / W of the conventional μ program control processing system is completely deleted, one instruction of the application program (instruction with operand attribute) as described in FIG. Is unable to process in 1 clock in H / W, it has been dealt with by CALLing the OS macro function with a macro call instruction.
[0120]
However, in practice, the frequency of use of the macro call instruction is often quite high. Therefore, if the CALL control processing by the branch control circuit 15 occurs frequently, the processing time becomes a bottleneck, resulting in the system It was not possible to fully speed up.
[0121]
Therefore, in the second embodiment, as shown in FIG. 9, a μ program control circuit 220 is provided, and processing is performed by the μ program control method only in the case of an instruction with operand attribute.
[0122]
FIG. 9 is a block diagram showing the configuration of the information processing apparatus according to the second embodiment, and shows the configuration of a PLC (programmable controller) as an example as in the case of FIG.
[0123]
In the figure, the PLC according to the second embodiment includes an application / OS program memory 201, a select decoder 202, a PLR 203, a data memory 204, an instruction fetch control circuit 210, a μ program control circuit 220, an operation execution unit 230, and a data memory. A transfer control circuit 240 and the like are included.
[0124]
The application / OS program memory 201, the PLR 203, the data memory 204, the operation execution unit 230, and the data memory transfer control circuit 240 are substantially the same as those shown in FIG.
[0125]
The μ program control circuit 220 includes a predecoder 221, a μ-SQC 222, a μ program memory 223, a decoder 224, and a PLR 225.
Each time an instruction is output from the instruction register, the predecoder 221 identifies whether or not the instruction is an instruction with an operand attribute, and outputs a selection signal corresponding to the identification result to the select decoder 202. The select decoder 202 is basically composed of a selector and a decoder, and inputs the output of the instruction register 211 and the output of the μ program memory 223 to the selector, and either one of them according to the selection signal output from the predecoder 221. The input is selected and output to a decoder for decoding.
[0126]
The μ program memory 223 stores an interpreter (μ instruction) that interprets and executes an instruction with operand attributes. The μ instruction output from the μ program memory 223 has a field structure of a total of 44 bits including a 13-bit (BRA: 9-bit) branch control field and a 31-bit operation / transfer control field. The 13-bit (BRA: 9-bit) branch control field is output to the decoder 224, and the 31-bit operation / transfer control field is output to the select decoder 202. Thus, the field structure of the μ instruction input to the select decoder 202 is made substantially the same as that of the general-purpose instruction (vertical 32-bit structure) shown in FIG. The decoder 202 can be realized almost in the form of “selector +“ decoder 2 in FIG. 1 ”.
[0127]
The decoder 224 and the PLR 225 are configured to generate a control signal or the like for branch control in the μ-SQC that the PLR 505 outputs to the μ-SQC 520 in the conventional example of FIG. It is.
[0128]
As shown in FIG. 9, in the second embodiment, the μ program control circuit 220 is added to the configuration of the first embodiment, but the actual H / W amount is much smaller than the conventional configuration. I'll do it. Also in the second embodiment, as in the first embodiment, it is practically possible to put all the components except the application / OS program memory 201 and the data memory 204 in FIG. 9 into the LSI. It has become.
[0129]
This is because, in particular, the μ program memory 223 stores only an interpreter that interprets and executes instructions with operand attributes, and the instructions with operand attributes have few instruction types, so that the required memory capacity can be very small. is there. The capacity of the μ program memory 223 may be (512 w × 44 bits), for example. Further, the μ-SQC 222 only needs 9 memory address bits.
[0130]
Thus, since a large-scale memory is conventionally required as the μ program memory, an external memory has been used (11 ICs when configured with an EPROM). In other words, the actual increase in the H / W amount is negligible compared to the first embodiment.
[0131]
Therefore, there have been problems such as difficulty in downsizing the system, difficulty in increasing the system clock frequency due to the ROM access time, and high cost because many expensive ROMs are used. In the second embodiment, these problems can be solved in substantially the same manner as in the first embodiment. Further, as described above, especially when the frequency of processing by the OS macro function is high, the second embodiment is further compared with the first embodiment. The system can be speeded up.
[0132]
FIG. 10 is a diagram for explaining transfer mode switching in the μ transfer instruction.
As described above, transfer instructions include an application level (instruction with operand attribute) transfer instruction and a μ instruction level transfer instruction (referred to as a μ transfer instruction). There are H / W resources (registers, etc.) that cannot be controlled by application level transfer instructions (not shown).
[0133]
Here, the OSEN bit (a bit for selecting whether to use the transfer mode based on the operand attribute instruction or the transfer mode based on the μ instruction) is included in the μ transfer instruction. A method for facilitating switching of the transfer mode when accessing is described.
[0134]
The transfer mode switching in the μ transfer instruction is based on the information processing apparatus of the second embodiment shown in FIG.
FIG. 10A shows an example of the field configuration of the μ transfer instruction.
[0135]
As shown in the figure, the field configuration of the μ transfer instruction 250 is basically the same as the [transfer instruction] shown in FIG. 3, but there is no MSB bit and an OSEN bit is added. That is, the μ transfer instruction 250 includes a transfer instruction 251, an OSEN bit 252, a transfer control 253, a path route selection 254, an RS1 / RD 255, and an IO register address 256.
[0136]
Here, a specific example of transfer mode switching in the μ transfer instruction will be described below assuming that the transfer instruction of the operand attributed instruction is 16-bit transfer and the μ transfer instruction is 32-bit transfer.
[0137]
In FIG. 10B, when an instruction with operand attribute for indirect access to the address 100 of the memory 260 shown in FIG. 10C is executed during execution of the application program (step S41), the instruction with operand attribute is μ. In the μ program processing that is interpreted by the program memory 223, data stored at the address 100 (data indicating the address 200) is first read and set in a MAR (intermediate address register) (not shown) (step S42). At this time, since the OSEN bit 252 is “0” and the μ instruction transfer mode is used, the data transfer is performed by 32-bit transfer. In the next μ transfer instruction, the data (50) stored at the address 200 is read from the data set in the MAR, and this is set in the register “R10” (not shown) (step S43). At this time, since the OSEN bit 252 is “1” and the transfer mode of the instruction with operand attribute is used, the data transfer is 16-bit transfer. As described above, by using the OSEN bit, it is possible to easily switch between 16-bit transfer and 32-bit transfer and perform desired processing.
[0138]
In the above-described embodiment, the PLC has been described as an example. However, the present invention is not limited to this and can be applied to other information processing apparatuses.
[0139]
【The invention's effect】
As described above in detail, the information processing apparatus of the present invention stores an application program, a system built-in function, and an OS program based on an integrated instruction code system composed of an instruction with operand attributes and a general-purpose instruction in a program memory. Consists of a one-level program execution control processing system that performs memory address (PC) control (for example, system built-in functions corresponding to various dedicated instructions and dedicated functions provided in the OS program start / return control) .
[0140]
In the conventional microprogram control system, the instruction system is divided into a normal instruction and a microinstruction of a level one level below, and a program execution control processing system that performs sequential read control of instructions stored in the program memory, and this instruction Is a two-layer program execution control processing system comprising a μ program execution control processing system that performs sequential read control of microinstructions stored in the μ program memory to interpret / execute In the apparatus, the hardware of the μ micro program execution control processing system can be deleted, and can be realized by a one-layer program execution control processing system.
[0141]
As a result, the system can be downsized, the system clock frequency can be increased, and cost reduction / low power consumption can be realized. Particularly in the case of an information processing apparatus configured as an external memory because the storage capacity required for the conventional μ program memory is very large, it can be put in one chip (LSI). Therefore, the above effect becomes very remarkable.
[0142]
Alternatively, by adopting a configuration in which only the instruction with the operand attribute having a high use frequency and a low instruction type is processed by the microprogram control method, the speed of the entire system can be further increased in addition to the above effect.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an information processing apparatus according to an embodiment of the present invention.
FIG. 2 is a diagram for explaining the contents stored in an application / OS program memory and a program development environment.
FIGS. 3A and 3B are diagrams illustrating an example of an instruction code system of an operand attributed instruction and a general-purpose instruction, where FIG. 3A illustrates an example of an instruction with an operand attribute, and FIG. 3B illustrates an example of an instruction code system of a general-purpose instruction;
4 is a schematic block diagram illustrating an example of a configuration of a branch control circuit in FIG. 1. FIG.
FIG. 5 is a list showing instruction decoding logic by an instruction decoder;
FIG. 6 is a diagram for explaining processing for starting an OS macro function using an extended absolute unconditional branch instruction;
FIG. 7 is a diagram for explaining subroutine processing in the information processing apparatus according to the embodiment;
FIG. 8 is a diagram for explaining program end processing in the information processing apparatus according to the embodiment;
FIG. 9 is a block diagram showing a configuration of an information processing apparatus according to a second embodiment.
FIG. 10 is a diagram for explaining transfer mode switching in a μ transfer instruction;
FIG. 11 is a block diagram illustrating an example of a configuration of an information processing apparatus using a conventional microprogram processing method.
FIGS. 12A and 12B are operation timings when ending with one clock, and FIGS. 12B are diagrams showing operation timings when a plurality of clocks are required;
FIG. 13 is a diagram for explaining a conventional program development route;
FIG. 14 is a diagram illustrating an example of an instruction code (machine language) of a conventional application program.
FIG. 15 is a diagram illustrating an example of an instruction code of a conventional microprogram.
[Explanation of symbols]
1 Application / OS program memory
2 Decoder
3 PLR
4 Data memory
10 Instruction fetch control circuit
11 Instruction register
12 PC (program counter)
13 PC stack
14 Program memory transfer control circuit
15 Branch control circuit
20 Calculation execution part
21 Cash register
22 Various computing units / data converters
23 MPX
30 Data memory transfer control circuit
31 Address generation decoder
32 MPX
33 MAR
34 Decoder
35 PLR
40 program memory
41 OS program
42 System built-in macro functions
43 Application programs
51 Development tools
52 Machine language generation function
53 Development tools (for system designers only)
60 Instruction with operand attribute
61 MSB bit
62 Opcode
63 Extension bit
64 data types
65 Data storage
66 Operand
70 General instructions
71 MSB bit
72 Instruction type
73 Operand part
81 instruction decoder
82 Adder
83 MPX
84 NOREG
85 PCCHGRG
86 NEXT PC register
87 Application execution mode control flip-flop
88 MPX
90 Macro call instruction
91 MSB bit
92 CALL / JMP (OS startup function type)
93 Macro Call
94 Macro number
95 MSB bit
96 Absolute branch address
100 RET instruction
101 MSB bit
102 Branch instruction
103 RET (instruction type)
104 APL bit
110 Extended absolute unconditional branch instruction (subroutine call instruction / subroutine end instruction)
111 MSB bits
112 JMP (branch instruction)
113 SUB call / SUB end (OS startup function type)
114 SUB number
115 MSB bits
116 Absolute branch address
120 I / O control register transfer instruction
121 MSB bit
122 Transfer instruction
123 I / O transfer (transfer control)
124 Path selection
125 RS1
126 I / O register address
130 Program end instruction
131 MSB bit
132 JMP (branch instruction)
133 PEND (OS startup function type)
134 Program number
201 Application / OS program memory
202 decoder
203 PLR
204 Data memory
210 Instruction fetch control circuit
211 Instruction register
212 PC (program counter)
213 PC stack
214 Program memory transfer control circuit
215 Branch control circuit
220 μ program control circuit
221 Predecoder
222 μ-SQC
223 μ program memory
224 decoder
225 PLR
230 Calculation Execution Unit
231 Cash register
232 Various arithmetic units / data converters
233 MPX
240 Data memory transfer control circuit
241 Address generation decoder
242 MPX
243 MAR
244 decoder
245 PLR

Claims (7)

アプリケーションレベルの転送命令およびビットシーケンス命令を行うオペランド属性付命令と、各種演算・OSレベルのデータ転送・各種ハードウェア制御を行うマイクロ命令である汎用命令とより成る統合命令コード体系を備え、
該オペランド属性付命令および一部の汎用命令により記述されるアプリケーションプログラムと、前記汎用命令により記述されるOSプログラムを格納するプログラム格納手段と、
該プログラム格納手段に格納されているアプリケーションプログラムまたはOSプログラムから順次フェッチした命令に対して、分岐制御手段により分岐制御を行うことで、該プログラム格納手段をアドレス制御して実行させる1階層のプログラム実行制御手段と、
を有することを特徴とする情報処理装置。
It has an integrated instruction code system consisting of operand attributed instructions that perform application level transfer instructions and bit sequence instructions, and general instructions that are microinstructions that perform various operations, OS level data transfer, and various hardware controls .
An application program described by the operand attribute-added instruction and a part of general-purpose instructions, and a program storage means for storing an OS program described by the general-purpose instructions;
A one-level program execution in which the branch control unit performs branch control on instructions sequentially fetched from the application program or the OS program stored in the program storage unit, thereby controlling the program storage unit for address control. Control means;
An information processing apparatus comprising:
前記プログラム格納手段は、更に、ハードウェアで1クロックで処理できない命令に対応して、該命令を実行させる為のアルゴリズムを組んだマクロ関数を格納し、
前記アプリケーションプログラムは、対応するマクロ関数の識別情報を有する専用の拡張絶対無条件分岐命令を備え、
前記プログラム実行制御手段は、該拡張絶対無条件分岐命令に応じて動作モードをアプリケーション実行モードからOS実行モードへ移すと共に、該拡張絶対無条件分岐命令の識別情報に基づいて実行すべき命令に対応するマクロ関数を起動することを特徴とする請求項記載の情報処理装置。
The program storage means further stores a macro function in which an algorithm for executing the instruction is executed in response to an instruction that cannot be processed in one clock by hardware,
The application program includes a dedicated extended absolute unconditional branch instruction having identification information of a corresponding macro function,
The program execution control means shifts the operation mode from the application execution mode to the OS execution mode according to the extended absolute unconditional branch instruction, and corresponds to an instruction to be executed based on the identification information of the extended absolute unconditional branch instruction. the information processing apparatus according to claim 1, wherein invoking the macro function.
前記OSプログラムはアプリケーションプログラムにおける分岐処理用の専用の関数を備え、前記アプリケーションプログラムは、該関数を起動するための専用の拡張絶対無条件分岐命令を備え、前記プログラム実行制御手段は、該拡張絶対無条件分岐命令に応じて、動作モードをアプリケーション実行モードからOS実行モードへ移すと共に前記OSプログラムが備える分岐処理用の専用の関数を起動することを特徴とする請求項記載の情報処理装置。The OS program includes a dedicated function for branch processing in the application program, the application program includes a dedicated extended absolute unconditional branch instruction for starting the function, and the program execution control means includes the extended absolute depending on the unconditional branch instruction, the information processing apparatus according to claim 1, wherein activating a dedicated function for branching processes the OS program comprises with transferring the operation mode from the application execution mode to the OS execution mode. 前記専用の関数は、サブルーチンをコールする関数、サブルーチン終了を制御する関数であり、OS実行モードからアプリケーション実行モードに復帰する為の専用の復帰命令と、サブルーチンを番号管理する為のエントリーテーブルと、アプリケーション実行モードに復帰するときの戻り番地を退避/復帰させる手段と、を更に備えることを特徴とする請求項記載の情報処理装置。The dedicated function is a function for calling a subroutine, a function for controlling the end of the subroutine, a dedicated return instruction for returning from the OS execution mode to the application execution mode, an entry table for managing the number of the subroutine, 4. The information processing apparatus according to claim 3 , further comprising means for saving / returning a return address when returning to the application execution mode. プログラム開発用ツールで作成したアプリケーションプログラムのオブジェクトを前記プログラム格納手段に格納する際に該アプリケーションプログラムのオブジェクトを前記オペランド属性付命令および一部の汎用命令に変換して前記プログラム格納手段に格納させるマシン語生成手段を更に有し、
前記OSプログラム及びマクロ関数は、専用のOS開発ツールにより、前記汎用命令として生成されて前記プログラム格納手段に格納され、
前記マシン語生成手段は、OS専用のハードウェア資源を制御する命令は生成できないことを特徴とする請求項記載の情報処理装置。
A machine for storing an application program object created by a program development tool into the program storage means by converting the application program object into the instruction with operand attribute and a part of general-purpose instructions. A word generation means;
The OS program and the macro function are generated as the general-purpose instruction by a dedicated OS development tool and stored in the program storage unit.
The machine language generating means, the information processing apparatus according to claim 1, wherein the instructions for controlling the hardware resources of the OS dedicated can not be generated.
アプリケーションレベルの転送命令およびビットシーケンス命令を行うオペランド属性付命令と、各種演算・OSレベルのデータ転送・各種ハードウェア制御を行うマイクロ命令である汎用命令とより成る統合命令コード体系を備え、
該オペランド属性付命令および一部の汎用命令により記述されるアプリケーションプログラムと、前記汎用命令により記述されるOSプログラムを格納するプログラム格納手段と、
該プログラム格納手段に格納されているアプリケーションプログラムまたはOSプログラムから順次フェッチした命令に対して、分岐制御手段により分岐制御を行うことで、該プログラム格納手段をアドレス制御して命令を順次読出し実行させる1階層のプログラム実行制御手段と、
該プログラム実行制御手段で読出した命令が前記オペランド属性付命令である場合該命令をマイクロプログラム制御方式で解釈/実行するマイクロプログラム制御処理手段と、
を有することを特徴とする情報処理装置。
It has an integrated instruction code system consisting of operand attributed instructions that perform application level transfer instructions and bit sequence instructions, and general instructions that are microinstructions that perform various operations, OS level data transfer, and various hardware controls .
An application program described by the operand attribute-added instruction and a part of general-purpose instructions, and a program storage means for storing an OS program described by the general-purpose instructions;
Branch control is performed by the branch control unit for instructions sequentially fetched from the application program or the OS program stored in the program storage unit, so that the program storage unit is address-controlled and instructions are sequentially read and executed 1 A hierarchy of program execution control means;
Microprogram control processing means for interpreting / executing the instruction by a microprogram control method when the instruction read by the program execution control means is the instruction with the operand attribute;
An information processing apparatus comprising:
前記マイクロプログラム中の命令であるマイクロ命令レベルのデータ転送命令中にモード切替用ビットを設け、該モード切替用ビットの値に応じてアプリケーションレベルのデータ転送モードと前記マイクロ命令レベルのデータ転送モードとを切替えることを特徴とする請求項記載の情報処理装置。The provided microinstruction level mode switching bit in the data transfer instruction is an instruction in the microprogram, according to the value of the mode switching bit and application-level data transfer mode and the microinstruction level the data transfer mode The information processing apparatus according to claim 6 , wherein the information processing apparatus is switched.
JP07476598A 1998-03-24 1998-03-24 Information processing device Expired - Lifetime JP3716604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07476598A JP3716604B2 (en) 1998-03-24 1998-03-24 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07476598A JP3716604B2 (en) 1998-03-24 1998-03-24 Information processing device

Publications (2)

Publication Number Publication Date
JPH11272462A JPH11272462A (en) 1999-10-08
JP3716604B2 true JP3716604B2 (en) 2005-11-16

Family

ID=13556714

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07476598A Expired - Lifetime JP3716604B2 (en) 1998-03-24 1998-03-24 Information processing device

Country Status (1)

Country Link
JP (1) JP3716604B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3669884B2 (en) * 1999-11-11 2005-07-13 富士通株式会社 Processing equipment
GB2501343A (en) * 2012-02-08 2013-10-23 Advanced Risc Mach Ltd Data processing apparatus and method using secure domain and less secure domain
US9477834B2 (en) 2012-02-08 2016-10-25 Arm Limited Maintaining secure data isolated from non-secure access when switching between domains
US9213828B2 (en) 2012-02-08 2015-12-15 Arm Limited Data processing apparatus and method for protecting secure data and program code from non-secure access when switching between secure and less secure domains
US9116711B2 (en) 2012-02-08 2015-08-25 Arm Limited Exception handling in a data processing apparatus having a secure domain and a less secure domain
US10210349B2 (en) 2012-02-08 2019-02-19 Arm Limited Data processing apparatus and method using secure domain and less secure domain
JP7230703B2 (en) * 2019-06-20 2023-03-01 オムロン株式会社 Control device

Also Published As

Publication number Publication date
JPH11272462A (en) 1999-10-08

Similar Documents

Publication Publication Date Title
US5430862A (en) Emulation of CISC instructions by RISC instructions using two pipelined stages for overlapped CISC decoding and RISC execution
JP2834837B2 (en) Programmable controller
US4514803A (en) Methods for partitioning mainframe instruction sets to implement microprocessor based emulation thereof
JPS6339931B2 (en)
US4562538A (en) Microprocessor having decision pointer to process restore position
JPH02173823A (en) Data processor
JPS62197830A (en) Data processing system
JPH01214932A (en) Data processor
JPH03158928A (en) Data processor
JPH03216776A (en) Integrated circuit device and microprocessor consisting of this circuit device
JP3716604B2 (en) Information processing device
US5742801A (en) Microprocessor to which additional instructions are added and instructions addition method thereof
JP2002215387A (en) Data processor provided with instruction translator, and memory interface device
US6012138A (en) Dynamically variable length CPU pipeline for efficiently executing two instruction sets
JPS645330B2 (en)
JPH0380336A (en) Operation intensifier for m byte order word cpu of double operating system computer and operation intensifier for register directive type architecture cpu
US5212779A (en) System for guarantee reexecution after interruption by conditionally used store buffer if microinstruction being executed is a memory write and last microinstruction
JPH0769806B2 (en) Data processing device
JP3716635B2 (en) Information processing apparatus and interrupt control method thereof
JPS6273333A (en) Emulation control system
JP2731618B2 (en) emulator
JP3147884B2 (en) Storage device and information processing device
JP3102399B2 (en) Data processing apparatus and method
JPH0225932A (en) Data processor
JPH0769805B2 (en) Data processing device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041207

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050412

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050613

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050712

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050809

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050822

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080909

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090909

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090909

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090909

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090909

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100909

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110909

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110909

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110909

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110909

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120909

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120909

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130909

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term