JP2006221606A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2006221606A
JP2006221606A JP2005198741A JP2005198741A JP2006221606A JP 2006221606 A JP2006221606 A JP 2006221606A JP 2005198741 A JP2005198741 A JP 2005198741A JP 2005198741 A JP2005198741 A JP 2005198741A JP 2006221606 A JP2006221606 A JP 2006221606A
Authority
JP
Japan
Prior art keywords
exception
instruction
control unit
register
data processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005198741A
Other languages
Japanese (ja)
Inventor
Shinichi Shibahara
真一 芝原
Kiwamu Takada
究 高田
Kiichi Ozawa
基一 小沢
Makoto Ishikawa
誠 石川
征之 ▲児▼玉
Masayuki Kodama
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2005198741A priority Critical patent/JP2006221606A/en
Publication of JP2006221606A publication Critical patent/JP2006221606A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data processor capable of identifying whether a function to be deleted in the future or a function newly added or changed this time is used or not. <P>SOLUTION: In this data processor, a first control register (24) is used for holding of first information (SIFI) for selectively instructing to make execution of a part of instructions of an instruction set executable in the data processor impossible. An instruction decoder (22) executably decodes the part of instructions when the first information is a first value, decodes the part of instructions such that an exception factor code (ECCDI) distinguishable from the other exception factor can be generated when the first information is a second value, and makes an instruction execution procedure transit to execution of a prescribed exception processing program. When considering to coping with the next machine type, the second value is set to the first information, and software is executed, so that use of an instruction not supported in the future or use of an instruction added or changed this time can be detected by exception occurrence. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、データプロセッサにおける上位互換技術に関し、例えば機器組み込み制御用途のマイクロコンピュータに適用して有効な技術に関する。   The present invention relates to an upward compatibility technique in a data processor, and relates to a technique effective when applied to, for example, a microcomputer for device embedded control.

上位互換のマイクロコンピュータは、互換性保持のために下位マイクロコンピュータの命令セットや機能が利用可能にされる。しかしながら、互換性維持のためだけに過大な制御論理を搭載しなければならなかったり、データ処理の高速化が阻害されたりすることがある。マイクロコンピュータの上位互換に関し、特許文献1には上位互換を維持しつつ、汎用レジスタの数を増加させることができるデータ処理装置が開示される。すなわち、レジスタを指定するレジスタ指定情報を、2つの部分に分割する。この2つの部分を命令コードの基本単位上の別々の基本単位に配置する。一方の命令コードを省略可能とし、省略可能な命令コードを省略すると、制御部(CONT)は、所定レジスタ指定情報を暗黙的に想定してレジスタ選択動作を行う。これによれば、暗黙的に指定可能な汎用レジスタ(既存の汎用レジスタ)のみを使用していれば、省略可能の命令コードを省略できるから、命令コードを増加させることがない。少なくとも従来同等の汎用レジスタを使用する場合は、従来同等の命令コードでよい。命令コードを増加させないことよって、処理速度を低下させることがない。   In order to maintain compatibility, the upper compatible microcomputer can use the instruction set and functions of the lower microcomputer. However, an excessive control logic must be installed only for maintaining compatibility, and the speeding up of data processing may be hindered. With respect to upward compatibility of microcomputers, Patent Document 1 discloses a data processing apparatus capable of increasing the number of general-purpose registers while maintaining upward compatibility. That is, register designation information for designating a register is divided into two parts. These two parts are arranged in different basic units on the basic unit of the instruction code. If one instruction code is omissible and the omissible instruction code is omitted, the control unit (CONT) performs a register selection operation implicitly assuming predetermined register designation information. According to this, if only the implicitly-designable general-purpose register (existing general-purpose register) is used, the instruction code that can be omitted can be omitted, and the instruction code is not increased. If at least a conventional equivalent general-purpose register is used, a conventional equivalent instruction code may be used. By not increasing the instruction code, the processing speed is not reduced.

特開2001−202243号公報Japanese Patent Laid-Open No. 2001-202243

本発明者は将来の次期マイクロコンピュータに対して一部の機能に対する上位互換を取りやめる場合について検討した。取りやめ予定の機能についても現行ユーザの一部は使用している可能性がある。上位互換のマイクロコンピュータの場合、次期機種にも既存ソフトウェアを流用することがあるため、ユーザは次期機種採用までに、取りやめ予定の機能について使用していないことを確認する必要がある。取りやめ予定の機能を使用している場合はソフトウェアを修正することが必要になる。仮に、次期機種において既存機種の命令セットから一部の命令を削除した場合、次期機種において削除した命令を実行しようとすると通常は「不当命令」として例外処理の対象とされる。また、次期機種において既存機種のアドレス空間に対するユーザモードでの一部のエリアのアクセスを禁止した場合、当該アドレスをアクセスしようとすると「不当アクセス(アドレスエラー)」として、例外処理の対象とされる。全動作に対してそのような例外の発生を監視している訳ではないので、例外処理に対する設定によっては暴走することもある。システムの安定動作の観点からすれば、そのような例外処理の発生を極力抑えられるようにプログラムを修正することが望ましい。   This inventor examined the case where the upper compatibility with respect to a part of function was canceled with respect to a future next microcomputer. Some of the current users may be using the functions that are scheduled to be withdrawn. In the case of an upward compatible microcomputer, the existing software may be diverted to the next model, so the user needs to confirm that the function to be canceled is not used before the next model is adopted. If you are using features that you plan to withdraw, you will need to modify the software. If some instructions are deleted from the instruction set of the existing model in the next model, an attempt to execute the deleted instruction in the next model is usually made an exception processing target as an “illegal instruction”. In addition, if access to some areas in the user mode is prohibited for the address space of the existing model in the next model, attempting to access the address will be subject to exception processing as "illegal access (address error)" . Since the occurrence of such an exception is not monitored for all operations, a runaway may occur depending on the setting for exception handling. From the viewpoint of the stable operation of the system, it is desirable to modify the program so as to suppress the occurrence of such exception processing as much as possible.

しかしながら、従来のマイクロコンピュータは、下位側から流用する既存ソフトウェアに将来削除される予定の機能(非サポート機能)が利用されているかを容易に確認する機能がなかった。上記「不当命令」や「アドレスエラー」による例外では、既にサポートされていない機能を利用したか否かしか解らない。要するに、次期機種にて「非サポート」となる機能を利用しているか否かを識別可能とすることによって、非サポートになるまでの間にソフトウェアの修正を促す手段が備わっていない。   However, the conventional microcomputer does not have a function for easily confirming whether a function scheduled to be deleted in the future (unsupported function) is used in existing software diverted from the lower side. The exception due to the above “illegal instruction” or “address error” can only be determined whether a function that is not supported is used. In short, by making it possible to identify whether or not the next model uses a function that is “unsupported”, there is no means for prompting software modification before it becomes unsupported.

さらに、従来のマイクロコンピュータには、既存機種から新たに仕様変更された機能(言い換えると、新たに「サポート」とされた追加機能、又はサポート内容が変更された機能(以下、変更機能と称する))を利用しているかを容易に識別する手段が備わっていない。なお、サポート内容とは、マイクロコンピュータの仕様によって決まるものである。既存ソフトウェアを流用する場合、追加機能又は変更機能に関連した不具合が発生することが考えられるため、追加機能又は変更機能に関連した箇所が留意箇所となる。そのため、追加機能又は変更機能を利用しているか否かを識別することが重要となる。   Further, the conventional microcomputer has a function whose specification is newly changed from an existing model (in other words, an additional function which is newly “supported” or a function whose support content is changed (hereinafter referred to as a changed function). ) Are not easily identified. The support content is determined by the specifications of the microcomputer. When diverting existing software, it is conceivable that a defect related to the additional function or the change function may occur. Therefore, it is important to identify whether an additional function or a change function is used.

本発明の目的は、将来削除される予定の機能を利用したか否かを識別可能なデータプロセッサを提供することにある。   An object of the present invention is to provide a data processor capable of identifying whether or not a function scheduled to be deleted in the future is used.

本発明の別の目的は、上位互換のマイクロコンピュータに流用するソフトウェアに対して将来削除予定とされる機能の修正を促すことができるデータプロセッサを提供することにある。   Another object of the present invention is to provide a data processor capable of prompting correction of functions scheduled to be deleted in the future for software diverted to an upward compatible microcomputer.

本発明の更に別の目的は、追加機能又は変更機能を利用したか否かを識別可能なデータプロセッサを提供することにある。   Still another object of the present invention is to provide a data processor that can identify whether an additional function or a change function is used.

本発明の更に別の目的は、追加機能又は変更機能を有するマイクロコンピュータで既存ソフトウェアを流用するときに、追加機能又は変更機能による影響や不具合がないかどうかを容易に検証できるデータプロセッサを提供することにある。   Still another object of the present invention is to provide a data processor capable of easily verifying whether there is any influence or malfunction caused by an additional function or a change function when diverting existing software in a microcomputer having an additional function or a change function. There is.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

〔1〕命令の実行によって複数の機能をサポートするデータプロセッサは制御レジスタとデコーダを有し、前記制御レジスタは、データプロセッサが実現可能にする機能(サポートする機能)のうち一部の機能を使用不可能にすることを選択的に指示する指示情報の保持に利用され、前記デコーダは、前記サポート制御レジスタによって使用不可能とされた一部の機能を利用しようとする操作を検出して、その検出結果を保持させる。   [1] A data processor that supports a plurality of functions by executing an instruction has a control register and a decoder, and the control register uses a part of functions (supported functions) that can be realized by the data processor. The decoder is used to hold instruction information that selectively indicates disabling, and the decoder detects an operation that attempts to use a part of the function that is disabled by the support control register, and Hold the detection result.

前記一部の機能は、将来非サポートとされる可能性のある機能である。この場合には、ソフトウェア実行中に将来的に非サポートとされる機能の使用を検知するハードウェアを有するから、継続的に既存ソフトウェアを流用するユーザにソフトウェアの修正を促したり、次期機種にてトラブルが発生したときの問題切り分けに使用することができる。   Some of the functions are functions that may be unsupported in the future. In this case, because it has hardware that detects the use of functions that will be unsupported in the future during software execution, it will prompt users to continually divert existing software or modify the software in the next model. It can be used to isolate problems when trouble occurs.

また、前記一部の機能は、新たにサポートとされた追加機能、又はサポート内容が変更された機能(変更機能)である。この場合にも、ソフトウェア実行中に、新たにサポートとされた追加機能又は変更機能の使用を検知することができるから、追加機能又は変更機能による影響や不具合がないかどうかを容易に検証したり、トラブルが発生したときに、デバッグ箇所や留意箇所の特定に使用することができる。   The part of the functions is an additional function that is newly supported, or a function in which the support content is changed (change function). In this case as well, it is possible to detect the use of newly added or changed functions during software execution, so it is easy to verify whether there are any effects or defects caused by the added or changed functions. When a trouble occurs, it can be used to specify a debug part or a notice part.

〔2〕《特定の命令に対する非サポート》データプロセッサは、命令実行制御部及び例外制御部を有し、前記例外制御部は第1の制御レジスタ(24)を有し、前記第1の制御レジスタはデータプロセッサで実行可能な命令セットのうち一部の命令を実行不可能にすることを選択的に指示する第1の情報(SIFI)の保持に利用され、前記命令実行制御部は命令デコーダを有し、前記命令デコーダは、前記第1の情報が第1の値のとき前記一部の命令に対して実行可能なデコードを行い、前記第1の情報が第2の値のとき前記一部の命令に対して他の例外要因と区別可能な例外要因コードを生成可能なデコードを行うと共に命令実行を所定の例外処理プログラムの実行に遷移させる。   [2] << Unsupported for a specific instruction >> The data processor includes an instruction execution control unit and an exception control unit, and the exception control unit includes a first control register (24), and the first control register Is used to hold first information (SIFI) for selectively instructing that some instructions in the instruction set executable by the data processor are not executable, and the instruction execution control unit uses an instruction decoder. And the instruction decoder performs decoding that can be executed on the part of instructions when the first information is a first value, and the part when the first information is a second value. The instruction is decoded to generate an exception factor code that can be distinguished from other exception factors, and the instruction execution is shifted to the execution of a predetermined exception processing program.

前記一部の命令が例えば将来の非サポート命令であるとする。前記一部の命令が非サポート命令となる前は第1の情報に第1の値をセットしておけば当該一部の命令も正常に実行される。次期機種への対応を考慮する場合には前記第1の情報に第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる当該一部の命令の使用を例外の発生によって検知することができる。前記一部の命令が、今回追加又は変更された命令である場合も、当該命令の実行を同様に検知することができる。   Assume that the part of the instructions are, for example, future unsupported instructions. If the first value is set in the first information before the part of the instruction becomes a non-support instruction, the part of the instruction is normally executed. When considering compatibility with the next model, if the second value is set in the first information, the use of some of the instructions that will be unsupported in the future during software execution is an exception. It can be detected by occurrence. Even when some of the instructions are instructions that have been added or changed this time, the execution of the instructions can be detected in the same manner.

本発明の一つの具体的な形態では、前記命令実行制御部は中央処理装置であり、前記第1の制御レジスタは前記中央処理装置によってリード及びライト可能である。また、リセット時における外部端子の状態によって設定されてもよい。   In one specific form of the present invention, the instruction execution control unit is a central processing unit, and the first control register is readable and writable by the central processing unit. Further, it may be set according to the state of the external terminal at the time of reset.

本発明の別の具体的な形態では、前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する。   In another specific form of the present invention, the exception control unit has an exception factor register that holds an exception factor code, and the instruction execution control unit receives an instruction address held by a program counter when an exception occurs. It has a stack register to hold.

本発明の更に別の具体的な形態では、前記命令実行制御部は、前記所定の例外処理プログラムの実行に遷移することによって、前記例外要因コードとその例外要因となった命令アドレスを保存する制御が可能である。上記より、データプロセッサは、例外処理プログラムにて例外要因の履歴を保存できる。   In still another specific form of the present invention, the instruction execution control unit controls to store the exception factor code and the instruction address that caused the exception by transitioning to execution of the predetermined exception handling program. Is possible. As described above, the data processor can store the history of exception factors in the exception processing program.

本発明の更に別の具体的な形態では、前記命令実行制御部は、前記所定の例外処理プログラムの実行に遷移することによって、前記例外要因コードとその例外要因となった命令アドレスの保存を行った後、前記例外要因となった命令を実行して、前記所定の例外処理プログラムの実行を終わることが可能である。これにより、前記特定の命令を実行しようとしていることを検知するだけでなく、当該特定の命令を完全に実行することも保証できるようになる。   In still another specific form of the present invention, the instruction execution control unit saves the exception factor code and the instruction address that caused the exception by transitioning to execution of the predetermined exception handling program. After that, it is possible to finish the execution of the predetermined exception handling program by executing the instruction that caused the exception. This not only detects that the specific instruction is about to be executed, but also ensures that the specific instruction is completely executed.

〔3〕《特定アドレスエリアに対するアクセス非サポート》データプロセッサは、命令実行制御部、例外制御部及びバス制御部を有し、前記例外制御部は第1の制御レジスタ(24)を有し、前記第1の制御レジスタは、データプロセッサのアドレス空間の一部のアドレスに対するアクセスを不可能にすることを選択的に指示する第2の情報(SIFA)の保持に利用され、前記バス制御部はアドレスデコーダ(32)を有し、前記アドレスデコーダは、前記第2の情報が第1の値のとき前記一部のアドレスへのアクセス要求を許容し、前記第2の情報が第2の値のとき前記一部のアドレスへのアクセス要求に対してアドレスエラー信号(AERR)を生成し、前記命令実行制御部は、前記アドレスエラー信号に応答して、他の例外要因と区別可能な例外要因コードを生成して命令実行を所定の例外処理プログラムの実行に遷移させる。   [3] << No support for access to specific address area >> The data processor includes an instruction execution control unit, an exception control unit, and a bus control unit, and the exception control unit includes a first control register (24), The first control register is used for holding second information (SIFA) for selectively instructing to disable access to a part of addresses in the address space of the data processor, and the bus control unit has an address A decoder (32), wherein the address decoder permits an access request to the partial address when the second information is a first value, and when the second information is a second value. In response to an access request to the partial address, an address error signal (AERR) is generated, and the instruction execution control unit is responsive to the address error signal to distinguish from other exception factors. Generate exception code as possible to transition the instruction execution to the execution of the predetermined exception processing program.

前記一部のアドレスへのアクセスが例えば将来の非サポートアドレスであるとする。前記一部のアドレスへのアクセスが非サポートとなる前は第2の情報に第1の値をセットしておけば当該一部のアドレスへのアクセスも許容される。次期機種への対応を考慮する場合には前記第2の情報に第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートアドレスとされる当該一部アドレスへのアクセスを利用していることを例外の発生によって検知することができる。前記一部のアドレスについて今回アクセス可能にされ又はアクセス形態が変更された場合も、当該アドレスへのアクセスを同様にして検知できる。   Assume that the access to the partial address is, for example, a future unsupported address. Before the access to the partial address is not supported, if the first value is set in the second information, the access to the partial address is permitted. When considering the compatibility with the next model, if the second value is set in the second information, access to the partial address that will be a non-support address in the future during software execution is used. Can be detected by the occurrence of an exception. Even when the partial address is made accessible this time or the access form is changed, access to the address can be detected in the same manner.

本発明の一つの具体的な形態では、前記第1の制御レジスタによって選択的にアクセス不可能にすることを指示することが可能なアドレス空間はデータプロセッサの内部アドレス空間と外部アドレス空間の双方である。   In one specific form of the present invention, the address space that can be instructed to be selectively inaccessible by the first control register is both an internal address space and an external address space of the data processor. is there.

本発明の別の具体的な形態では、前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する。   In another specific form of the present invention, the exception control unit has an exception factor register that holds an exception factor code, and the instruction execution control unit receives an instruction address held by a program counter when an exception occurs. It has a stack register to hold.

〔4〕《特定の機能設定に対する非サポート》データプロセッサは、命令実行制御部、例外制御部、及び前記命令実行制御部により機能指定レジスタ(40)に設定された機能指定情報(FSIF)に応ずる機能が選択されるその他の機能ブロックを有し、前記例外制御部は第1の制御レジスタ(24)を有し、前記第1の制御レジスタは、前記機能制御情報による一部の所定の機能設定を不可能にすることを選択的に指示する第3の情報(SIFR)の保持に利用され、前記その他の機能ブロックはデコーダ(41)を有し、前記デコーダは、前記第3の情報が第1の値のとき前記機能指定レジスタへの前記一部の所定の機能の指定を許容し、前記第3の情報が第2の値のとき前記機能指定レジスタへの前記一部の所定の機能の指定に対してレジスタエラー信号(RERR)を生成し、前記命令実行制御部は、前記レジスタエラー信号に応答して、他の例外要因と区別可能な例外要因コードを生成して命令実行を所定の例外処理プログラムの実行に遷移させる。   [4] << Not supported for specific function setting >> The data processor responds to the instruction execution control unit, the exception control unit, and the function designation information (FSIF) set in the function designation register (40) by the instruction execution control unit. Other function blocks for selecting a function are included, the exception control unit has a first control register (24), and the first control register is a part of predetermined function setting by the function control information. The other functional block has a decoder (41), and the decoder has the third information (SIFR) for selectively instructing to disable the third information. When the value is 1, the designation of the part of the predetermined function to the function designation register is allowed. When the third information is the second value, the part of the predetermined function to the function designation register is allowed. Against specification A register error signal (RERR) is generated, and the instruction execution control unit generates an exception factor code that can be distinguished from other exception factors in response to the register error signal to execute the instruction execution of a predetermined exception processing program Transition to.

前記一部の所定機能が例えば将来の非サポート機能であるとする。前記一部の所定機能が非サポートとなる前は第3の情報に第1の値をセットしておけば当該一部の所定機能も利用される。次期機種への対応を考慮する場合には前記第3の情報に第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる当該一部の機能の使用を例外の発生によって検知することができる。前記一部の所定機能が、今回追加又は変更された機能である場合も、当該所定機能の使用を同様に検知することができる。   Assume that the predetermined functions are, for example, future unsupported functions. If the first value is set in the third information before the predetermined functions are not supported, the predetermined functions are also used. When considering support for the next model, if the second value is set in the third information, the use of some of the functions that will be unsupported in the future during software execution is an exception. It can be detected by occurrence. Even when some of the predetermined functions are functions added or changed this time, the use of the predetermined functions can be detected in the same manner.

本発明の一つの具体的な形態では、前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する。   In one specific form of the present invention, the exception control unit has an exception factor register that holds an exception factor code, and the instruction execution control unit receives an instruction address held by a program counter when an exception occurs. It has a stack register to hold.

〔5〕《特定の命令に対する非サポート》データプロセッサは、命令実行制御部及び例外制御部を有し、前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、データプロセッサで実行可能な命令セットのうち一部の命令を実行不可能にすることを選択的に指示する指示情報の保持に利用され、前記命令実行制御部はデコーダを有し、前記デコーダは、前記サポート制御レジスタによって実行不可能と指示された一部の命令をデコードしたとき、その所定の命令に固有の要因コードを生成して保持させる。   [5] << Not supported for specific instructions >> The data processor has an instruction execution control unit and an exception control unit, the exception control unit has a support control register, and the support control register can be executed by the data processor. The instruction execution control unit includes a decoder, and the decoder is controlled by the support control register. When a part of instructions instructed to be inexecutable is decoded, a factor code unique to the predetermined instruction is generated and held.

ソフトウェア実行中に将来的に非サポートとされる当該一部の命令の使用を要因コードに基づいて検知することができる。今回新たに追加又は変更された命令の実行についても同様に検知することができる。   Based on the factor code, it is possible to detect the use of some of the instructions that will be unsupported in the future during software execution. The execution of the newly added or changed instruction can be detected in the same manner.

〔6〕《特定アドレスエリアに対するアクセス非サポート》データプロセッサは、命令実行制御部、例外制御部及びバス制御部を有し、前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、データプロセッサのアドレス空間の一部に対するアクセスを不可能にすることを選択的に指示する指示情報の保持に利用され、前記バス制御部はデコーダを有し、前記デコーダは、前記サポート制御レジスタによって指示されたアクセス不可能なアドレスに対するアクセス要求を検出可能であり、前記命令実行制御部は、前記アクセス要求の検出に応答して、その要因に固有の要因コードを生成して保持させる。   [6] << Unsupported access to specific address area >> The data processor includes an instruction execution control unit, an exception control unit, and a bus control unit, the exception control unit includes a support control register, and the support control register includes: Used to hold instruction information for selectively instructing to disable access to a part of the address space of the data processor, the bus control unit has a decoder, and the decoder is instructed by the support control register In response to the detection of the access request, the instruction execution control unit generates and retains a factor code unique to the factor.

ソフトウェア実行中に将来的に非サポートアドレスとされる当該一部アドレスへのアクセスを利用していることを要因コードに基づいて検知することができる。一部のアドレスについて今回アクセス可能にされ又はアクセス形態が変更されたアドレスへのアクセスについても同様に検知することができる。   Based on the factor code, it can be detected that the access to the partial address which is assumed to be a non-support address in the future is used during software execution. Access to addresses that have been made accessible this time for some addresses or whose access form has been changed can be similarly detected.

〔7〕《特定の機能設定に対する非サポート》データプロセッサは、命令実行制御部、例外制御部及び前記命令実行制御部により機能制御レジスタに設定された制御情報に応ずる機能が選択されるその他の機能ブロックを有し、前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、前記機能制御レジスタに対する一部の制御情報の設定を不可能にすることを選択的に指示する指示情報の保持に利用され、前記その他の機能ブロックはデコーダを有し、前記デコーダは、前記サポート制御レジスタにより設定不可能と指示された一部の制御情報の設定を検出可能であり、前記命令実行制御部は、前記設定不可能と指示された一部の制御情報の設定の検出に応答して、その要因に固有の要因コードを生成して保持させる。   [7] << Not supported for specific function setting >> The data processor has an instruction execution control unit, an exception control unit, and other functions for which a function corresponding to the control information set in the function control register is selected by the instruction execution control unit. The exception control unit has a support control register, and the support control register is an instruction information for selectively instructing that setting of some control information to the function control register is disabled. The other functional block has a decoder, and the decoder can detect a setting of a part of control information instructed to be not set by the support control register, and the instruction execution control unit In response to detection of the setting of some control information instructed that the setting is impossible, a factor code specific to the factor is generated and held.

ソフトウェア実行中に将来的に非サポートとされる当該一部の機能の使用を要因コードに基づいて検知することができる。今回追加又は変更された機能の使用についても同様に検知することができる。   Based on the factor code, it is possible to detect the use of some of the functions that will be unsupported in the future during software execution. The use of the function added or changed this time can be detected in the same manner.

〔8〕《外部端子の機能設定に対する非サポート》データプロセッサは、状態に応じた機能設定に用いられる外部端子を有する。前記一部の機能は前記外部端子を用いて設定される機能である。   [8] << Not supported for function setting of external terminal >> The data processor has an external terminal used for function setting according to the state. The partial function is a function set using the external terminal.

上記より、モード端子などの外部端子を用いて、将来的に非サポートとされる動作モード等が設定されたことを検知することができる。同様に、今回新たに追加又は変更された動作モードが設定されたこと等についても検知することができる。   From the above, it is possible to detect that an operation mode or the like that will be unsupported in the future has been set using an external terminal such as a mode terminal. Similarly, it can also be detected that an operation mode newly added or changed this time is set.

〔9〕《外部インタフェースの機能設定に対する非サポート》データプロセッサは、外部と接続可能な外部インタフェース回路を有する。前記一部の機能は前記外部インタフェース回路を用いる制御機能である。   [9] << Non-support for external interface function setting >> The data processor has an external interface circuit connectable to the outside. The partial function is a control function using the external interface circuit.

上記より、ソフトウェア実行中に将来的に非サポートとされる特定のコマンドインタフェース機能等の使用を要因コードに基づいて検知することができる。同様に、今回新たに追加又は変更されたコマンドインタフェース機能が使用されたこと等についても検知することができる。   From the above, it is possible to detect the use of a specific command interface function or the like that will be unsupported in the future during software execution based on the factor code. Similarly, it can be detected that a command interface function newly added or changed this time is used.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

上位互換のマイクロコンピュータに流用するソフトウェアに対して将来削除予定とされる機能の修正を促すことができる。すなわち、将来削除される予定の機能を利用したか否かを識別することができる。   It is possible to urge modification of functions that are scheduled to be deleted in the future for software diverted to an upward compatible microcomputer. That is, it is possible to identify whether or not a function scheduled to be deleted in the future is used.

追加機能又は変更機能を有するマイクロコンピュータで既存ソフトウェアを流用するときに、追加機能又は変更機能が正常に動作しているかを容易に検証できる。すなわち、追加機能又は変更機能を利用したか否かを識別することができる。   When diverting existing software with a microcomputer having an additional function or a change function, it is possible to easily verify whether the additional function or the change function is operating normally. That is, it is possible to identify whether the additional function or the change function is used.

《マイクロコンピュータ》
図1にはマイクロコンピュータ(MCU)1が例示される。同図に示されるマイクロコンピュータ1は、特に制限されないが、公知の半導体集積回路製造技術によって単結晶シリコンのような1個の半導体基板に半導体集積回路として形成される。
<Microcomputer>
FIG. 1 illustrates a microcomputer (MCU) 1. The microcomputer 1 shown in the figure is not particularly limited, but is formed as a semiconductor integrated circuit on a single semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.

マイクロコンピュータ1は、命令実行制御部としての中央処理装置(CPU)2、キャッシュメモリ(CACH_MRY)3、データバス・アドレスバス等のバス制御を行うバスステートコントローラ(BSC)7、データ転送処理を行うダイレクトメモリアクセスコントローラ(DMAC)8、及び内部回路と外部回路の転送制御を行う外部バスインタフェース回路(EXBIF)9を有する。中央処理装置2とキャッシュメモリ3とは、アドレスバス(ABUS1)及びデータバス(DBUS1)等を含む第1内部バス16によって接続される。前記バスステートコントローラ7は、アドレスバス(ABUS2)とデータバス(DBUS2)等を含む第2内部バス17を介して、キャッシュメモリ3、ダイレクトメモリアクセスコントローラ(DMAC)8、及び外部バスインタフェース回路9に接続される。更に、バスステートコントローラ7は、アドレスバス(ABUS3)及びデータバス(DBUS3)などを含む周辺バス18を介して各種周辺回路に結合される。外部バスインタフェース回路9にはマイクロコンピュータ1の外部と内部とに接続された外部バス19が接続される。また図示はしないが、第2内部バスには中央処理装置2で実行可能なプログラムを格納可能なリード・オンリー・メモリ(ROM)、中央処理装置2のワーク領域として利用可能なランダム・アクセス・メモリ(RAM)等の各種メモリが接続されていてもよい。   The microcomputer 1 performs a data transfer process, a central processing unit (CPU) 2 as an instruction execution control unit, a cache memory (CACH_MRY) 3, a bus state controller (BSC) 7 for performing bus control such as a data bus / address bus, etc. A direct memory access controller (DMAC) 8 and an external bus interface circuit (EXBIF) 9 for controlling transfer between the internal circuit and the external circuit are included. The central processing unit 2 and the cache memory 3 are connected by a first internal bus 16 including an address bus (ABUS1) and a data bus (DBUS1). The bus state controller 7 is connected to the cache memory 3, the direct memory access controller (DMAC) 8, and the external bus interface circuit 9 via a second internal bus 17 including an address bus (ABUS2) and a data bus (DBUS2). Connected. Further, the bus state controller 7 is coupled to various peripheral circuits via a peripheral bus 18 including an address bus (ABUS3) and a data bus (DBUS3). An external bus 19 connected to the outside and the inside of the microcomputer 1 is connected to the external bus interface circuit 9. Although not shown, the second internal bus has a read-only memory (ROM) that can store a program that can be executed by the central processing unit 2, and a random access memory that can be used as a work area of the central processing unit 2. Various memories such as (RAM) may be connected.

更に、マイクロコンピュータ1は、電源端子Vcc及びグランド端子(回路の接地電位端子)GNDを有し、電源端子Vccはマイクロコンピュータ1内の各回路モジュールに対して動作電源を供給する。電源端子Vccから動作電源の供給が停止されると、中央処理装置2、キャッシュメモリ3等のマイクロコンピュータ1内の各回路モジュールへの動作電源の電源供給が断たれる。   Further, the microcomputer 1 has a power supply terminal Vcc and a ground terminal (circuit ground potential terminal) GND, and the power supply terminal Vcc supplies operating power to each circuit module in the microcomputer 1. When the operation power supply from the power supply terminal Vcc is stopped, the operation power supply to the circuit modules in the microcomputer 1 such as the central processing unit 2 and the cache memory 3 is cut off.

キャッシュメモリ3は、中央処理装置2で処理される命令を格納するための命令キャッシュ(ICACH)5、演算対象となるデータを格納するデータキャッシュ(DCACH)6、及びキャッシュメモリの制御を行うキャッシュコントローラ(CACH_CNT)4を含む。   The cache memory 3 includes an instruction cache (ICACH) 5 for storing instructions processed by the central processing unit 2, a data cache (DCACH) 6 for storing data to be operated, and a cache controller for controlling the cache memory (CACH_CNT) 4 is included.

マイクロコンピュータ1に含まれる周辺回路は、例えば、クロック・パルス・ジェネレータ(CPG)11、例外制御部としての割り込みコントローラ(INTC)12、シリアル通信インタフェース(SCI)13、リアル・タイム・クロック(RTC)14、タイマ・ユニット(TMU)15等とされる。また、図示はしないが、ランダム・アクセス・メモリ(RAM)や不揮発性メモリ(ROM、Flashメモリ等)が内蔵されていてもよい。   Peripheral circuits included in the microcomputer 1 include, for example, a clock pulse generator (CPG) 11, an interrupt controller (INTC) 12 as an exception control unit, a serial communication interface (SCI) 13, and a real time clock (RTC). 14, timer unit (TMU) 15 and the like. Although not shown, a random access memory (RAM) or a nonvolatile memory (ROM, flash memory, etc.) may be incorporated.

アドレスバス(ABUS4)とデータバス(DBUS4)等を含む外部バス19には、ランダム・アクセス・メモリ(RAM)や、リード・オンリー・メモリ(ROM)、フラッシュメモリ(Flash)などの外部メモリ(EXMRY)10、更に、特に図示はしないが、データの入出力装置、ディスプレイ装置等の周辺回路が接続される。   An external bus 19 including an address bus (ABUS4) and a data bus (DBUS4) includes an external memory (EXMRY) such as a random access memory (RAM), a read only memory (ROM), and a flash memory (Flash). 10) Further, although not particularly shown, peripheral circuits such as a data input / output device and a display device are connected.

中央処理装置2で実行される命令のアドレスは第1内部バス16を介してキャッシュメモリ3内の命令キャッシュ5に取り込まれる。命令キャッシュ5において当該アドレスに対応した命令が格納されている時は当該アドレスに対応した命令が中央処理装置2に転送され、転送された命令は中央処理装置2にフェッチされる。中央処理装置2内では、フェッチした命令を解読し、命令に応じてデータ演算処理等を行う。また、中央処理装置2でのデータ演算処理等に使用されるデータ用のアドレスは第1内部バス16を介してキャッシュメモリ3内のデータキャッシュ6に取り込まれる。データキャッシュ6において当該アドレスに対応したデータが格納されている時は当該アドレスに対応したデータが中央処理装置2に転送され、転送されたデータが中央処理装置2にフェッチされる。中央処理装置2は、フェッチしたデータをデータ演算処理等に用いる。中央処理装置2から供給されたアドレスに対応する命令またはデータがキャッシュメモリ3内に格納されていない場合、キャッシュコントローラ4の指示に従ってバスステートコントローラ7がメモリ10をアクセスし、それによって得られた命令やデータが、キャッシュメモリ3に格納されると共に中央処理装置2にフェッチされる。また、マイコロコンピュータが内部にメモリを有する場合には、内蔵メモリからアドレスに対応した命令またはデータを読み出しまたは書き込まれることが可能となる。   The address of the instruction executed by the central processing unit 2 is taken into the instruction cache 5 in the cache memory 3 via the first internal bus 16. When an instruction corresponding to the address is stored in the instruction cache 5, the instruction corresponding to the address is transferred to the central processing unit 2, and the transferred instruction is fetched to the central processing unit 2. In the central processing unit 2, the fetched instruction is decoded and data operation processing is performed in accordance with the instruction. Further, the data address used for the data operation processing in the central processing unit 2 is taken into the data cache 6 in the cache memory 3 via the first internal bus 16. When data corresponding to the address is stored in the data cache 6, the data corresponding to the address is transferred to the central processing unit 2, and the transferred data is fetched to the central processing unit 2. The central processing unit 2 uses the fetched data for data calculation processing and the like. When the instruction or data corresponding to the address supplied from the central processing unit 2 is not stored in the cache memory 3, the bus state controller 7 accesses the memory 10 according to the instruction of the cache controller 4, and the instruction obtained thereby And the data are stored in the cache memory 3 and fetched by the central processing unit 2. Further, when the Mikoro computer has a memory inside, it is possible to read or write instructions or data corresponding to addresses from the built-in memory.

前記マイクロコンピュータ1は、次期機種から一部の機能について上位互換を取りやめることが予定されているものを含む。将来上位互換を取りやめて非サポートとされる事項は、例えば(1)特定の命令に対する非サポート、(2)特定アドレスエリアに対するアクセス非サポート、(3)特定の機能設定に対する非サポート、(4)外部端子を用いて設定される機能の設定に対する非サポート、(5)外部インタフェース回路を用いる制御機能の使用に対する非サポート、の5種類とされる。マイクロコンピュータ1はソフトウェア実行中に将来的に非サポートとされる上記機能の使用を検知するハードウェアを有する。以下それらハードウェアについて詳細に説明する。   The microcomputer 1 includes those that are scheduled to cease upward compatibility for some functions from the next model. For example, (1) non-support for specific instructions, (2) non-support for access to specific address areas, (3) non-support for specific function settings, (4) There are five types: non-support for setting functions set using external terminals, and (5) non-support for use of control functions using an external interface circuit. The microcomputer 1 has hardware for detecting the use of the above function that will be unsupported in the future during software execution. The hardware will be described in detail below.

《特定の命令に対する非サポート》
図2には特定の命令を選択的に非サポートとする構成が例示される。ここではCPU2とINTC12が例示される。CPU2は、代表的に示された命令実行部(IEXEC)21、命令デコーダ(IDEC)22、スタックレジスタ(STCREG)23を有する。命令実行部21は、特に図示はしないが、複数の汎用レジスタ、命令レジスタ、プログラムカウンタ、演算器、シーケンス制御部などを有する。シーケンス制御部は割り込み要求や例外要求などに応答し、また、分岐命令に応答して、命令実行手順の制御を行う。命令デコーダ22は命令レジスタにフェッチされた命令を解読して制御信号を生成する。スタックレジスタ23は割り込みや例外発生時のプログラムカウンタの値を保持する。INTC12は割り込みや例外の発生に対し所定の優先順位に従って割り込み要求や例外要求をCPU2に与える。INTC12は制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24と例外要因レジスタ(ECFREG)25を有する。サポート制御レジスタ24はマイクロコンピュータ1の命令セットのうち一部の命令実行を不可能にすることを選択的に指示する命令サポート制御情報SIFIの保持に利用される。命令サポート制御情報SIFIはCPU2によるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。前記命令デコーダ22は、前記命令サポート制御情報SIFIが第1の値のとき前記一部の命令に対して実行可能なデコードを行い、前記命令サポート制御情報SIFIが第2の値のとき前記一部の命令に対して他の例外要因と区別可能な例外要因コードECCDIを生成可能なデコードを行うと共に制御信号ECPIによって命令実行手順を所定の例外処理プログラムの実行に遷移させる。例外処理プログラムとは例外処理ルーチン若しくは例外ハンドラを意味する。例外要因コードECCDIが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持される。例えば前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDIを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDIを外部メモリ10などに蓄積する処理を制御する。
<Not supported for specific instructions>
FIG. 2 illustrates a configuration in which specific instructions are selectively unsupported. Here, CPU2 and INTC12 are illustrated. The CPU 2 includes an instruction execution unit (IEXEC) 21, an instruction decoder (IDEC) 22, and a stack register (STCREG) 23 that are representatively shown. The instruction execution unit 21 includes a plurality of general-purpose registers, an instruction register, a program counter, a computing unit, a sequence control unit, and the like, although not particularly illustrated. The sequence control unit responds to an interrupt request, an exception request, etc., and controls the instruction execution procedure in response to a branch instruction. The instruction decoder 22 decodes the instruction fetched into the instruction register and generates a control signal. The stack register 23 holds the value of the program counter when an interrupt or exception occurs. The INTC 12 gives an interrupt request or an exception request to the CPU 2 in accordance with a predetermined priority for the occurrence of an interrupt or an exception. The INTC 12 includes a support control register (SCREG) 24 and an exception factor register (ECFREG) 25, which are representatively shown as control registers. The support control register 24 is used to hold instruction support control information SIFI that selectively instructs the execution of a part of the instruction set of the microcomputer 1 to be disabled. The instruction support control information SIFI can be written to the support control register 24 by register access by the CPU 2. The instruction decoder 22 performs executable decoding on the part of instructions when the instruction support control information SIFI is a first value, and the part when the instruction support control information SIFI is a second value. The instruction execution procedure is shifted to the execution of a predetermined exception processing program by the control signal ECPI while performing decoding capable of generating an exception factor code ECCI that can be distinguished from other exception factors. An exception handling program means an exception handling routine or exception handler. When the exception factor code ECCI is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the program counter at that time. For example, the exception processing program reads the value of the exception factor register 25 and displays the read exception factor code ECCI on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. The process of accumulating the exception cause code ECCI to be stored in the external memory 10 or the like is controlled.

ここで、前記一部の命令が将来の非サポート命令であるとする。前記一部の命令が非サポート命令となる前は命令サポート制御情報SIFIに第1の値をセットしておけば当該一部の命令も正常に実行される。次期機種への対応を考慮する場合には前記命令サポート制御情報SIFIに第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる当該一部の命令の使用を例外の発生によって検知することができる。また、例外要因レジスタ25は複数の例外要因コードECCDIを格納可能な構成となっていてもよい。   Here, it is assumed that the some instructions are future non-support instructions. If the first value is set in the instruction support control information SIFI before the part of the instruction becomes a non-support instruction, the part of the instruction is normally executed. When considering support for the next model, if the second value is set in the instruction support control information SIFI, the use of some of the instructions that will be unsupported in the future during software execution is an exception. Can be detected by the occurrence of. The exception factor register 25 may be configured to store a plurality of exception factor codes ECCI.

《特定アドレスエリアに対するアクセス非サポート》
図3には特定アドレスエリアに対してアクセス非サポートとする構成が例示される。ここではCPU2、INTC12、及びBSC7が例示される。CPU2は図2と同様に代表的に示された命令実行部(IEXEC)21、命令デコーダ(IDEC)22、スタックレジスタ(STCREG)23を有する。INTC12は図2と同様に制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24と例外要因レジスタ(ECFREG)25を有する。図3ではCPU2外部のBSC7で発生する例外事象について説明する関係上、例外要求制御部(ECCNT)31が図示されている。
《Access not supported for specific address area》
FIG. 3 illustrates a configuration in which access is not supported for a specific address area. Here, CPU2, INTC12, and BSC7 are illustrated. The CPU 2 includes an instruction execution unit (IEXEC) 21, an instruction decoder (IDEC) 22, and a stack register (STCREG) 23, which are representatively shown in FIG. The INTC 12 includes a support control register (SCREG) 24 and an exception factor register (ECFREG) 25, which are representatively shown as control registers, as in FIG. In FIG. 3, an exception request control unit (ECCNT) 31 is shown for the purpose of explaining an exception event occurring in the BSC 7 outside the CPU 2.

ここでは、前記サポート制御レジスタ24は、マイクロコンピュータ1のアドレス空間の一部のアドレスに対するアクセスを不可能にすることを選択的に指示するアドレスサポート制御情報SIFAの保持に利用される。アドレスサポート制御情報SIFAはCPU2によるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。BSC7はアドレスデコーダ(ADEC)32を有する。アドレスデコーダ(ADEC)32は、CPU2から出力されるアクセスアドレスAADRやアクセスストローブ信号ASRBなどを入力してデコードする。このアドレスデコーダ(ADEC)32は、前記アドレスサポート制御情報SIFAが第1の値のとき前記一部のアドレスへのアクセス要求を許容する。前記アドレスサポート制御情報SIFAが第2の値のとき前記一部のアドレスへのアクセス要求に対してアドレスエラー信号AERRを例外要求制御部31に供給する。例外要求制御部31はアドレスエラー信号AERRに応答して、例外要求信号EXREQによってCPU2に例外処理を要求する。これに応答するCPU2は、命令実行手順を所定の例外処理プログラムの実行に遷移すると共に、他の例外要因と区別可能な例外要因コードECCDAを生成して例外要因レジスタ25にセットする。例外要因コードECCDAが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持される。例えば前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDAを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDAを外部メモリ10などに蓄積する処理を制御する。   Here, the support control register 24 is used to hold address support control information SIFA that selectively instructs to disable access to some addresses in the address space of the microcomputer 1. The address support control information SIFA can be written to the support control register 24 by register access by the CPU 2. The BSC 7 has an address decoder (ADEC) 32. The address decoder (ADEC) 32 receives and decodes the access address AADR, the access strobe signal ASRB, etc. output from the CPU 2. The address decoder (ADEC) 32 permits an access request to the partial address when the address support control information SIFA is a first value. When the address support control information SIFA is a second value, an address error signal AERR is supplied to the exception request control unit 31 in response to an access request to the partial address. In response to the address error signal AERR, the exception request control unit 31 requests the CPU 2 for exception processing by the exception request signal EXREQ. In response to this, the CPU 2 shifts the instruction execution procedure to the execution of a predetermined exception processing program, generates an exception factor code ECCA that can be distinguished from other exception factors, and sets it in the exception factor register 25. When the exception factor code ECCA is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the program counter at that time. For example, the exception processing program reads the value of the exception factor register 25 and displays the read exception factor code ECCA on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. The process of accumulating the exception factor code ECCA in the external memory 10 or the like is controlled.

ここで、前記一部のアドレスへのアクセスが将来の非サポートアドレスであるとする。前記一部のアドレスへのアクセスが非サポートとなる前はアドレスサポート制御情報SIFAに第1の値をセットしておけば当該一部のアドレスへのアクセスも許容される。次期機種への対応を考慮する場合には前記アドレスサポート制御情報SIFAに第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートアドレスとされる当該一部アドレスへのアクセスを利用していることを例外の発生によって検知することができる。   Here, it is assumed that the access to the partial address is a future unsupported address. Before the access to the partial address becomes unsupported, if the first value is set in the address support control information SIFA, the access to the partial address is permitted. When considering the support for the next model, if the second value is set in the address support control information SIFA, access to the partial address that will be a non-support address in the future during software execution Use can be detected by the occurrence of an exception.

《特定の機能設定に対する非サポート》
図4には特定の機能設定に対して非サポートとする構成が例示される。ここではCPU2、INTC12、BSC7及びTMU15が代表的に例示される。CPU2は図2と同様に代表的に示された命令実行部(IEXEC)21、命令デコーダ(IDEC)22、スタックレジスタ(STCREG)23を有する。INTC12は図3と同様に制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24、例外要因レジスタ(ECFREG)25及び例外要求制御部(ECCNT)31を有する。前記TMU15は機能指定レジスタ(FREG)40に設定された機能指定情報FSIFに応ずる機能が選択される。例えば、タイマカウントアップや割込発生条件選択が行われる。
<Not supported for specific function settings>
FIG. 4 illustrates a configuration that is not supported for a specific function setting. Here, CPU2, INTC12, BSC7, and TMU15 are typically exemplified. The CPU 2 includes an instruction execution unit (IEXEC) 21, an instruction decoder (IDEC) 22, and a stack register (STCREG) 23, which are representatively shown in FIG. The INTC 12 includes a support control register (SCREG) 24, an exception factor register (ECFREG) 25, and an exception request control unit (ECCNT) 31, which are representatively shown as control registers, as in FIG. The TMU 15 selects a function corresponding to the function specifying information FSIF set in the function specifying register (FREG) 40. For example, timer count up or interrupt generation condition selection is performed.

ここでは、前記サポート制御レジスタ24は、前記機能指定情報FSIFによって設定可能な機能の一部の所定機能の設定を不可能にすることを選択的に指示する機能サポート制御情報SIFRの保持に利用される。機能サポート制御情報SIFRはCPU2によるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。前記TMU15はデコーダ(DEC)41を有する。前記デコーダ41は、前記機能サポート制御情報SIFRが第1の値のとき前記機能指定レジスタ40に対する前記一部の所定の機能の指定を許容し、前記機能サポート制御情報SIFRが第2の値のとき前記機能指定レジスタ40への前記一部の所定の機能の指定に対してレジスタエラー信号RERRを例外要求制御部31に供給する。例外要求制御部31はレジスタエラー信号RERRに応答して、例外要求信号EXREQによってCPU2に例外処理を要求する。これに応答するCPU2は、命令実行手順を所定の例外処理プログラムの実行に遷移すると共に、他の例外要因と区別可能な例外要因コードECCDRを生成して例外要因レジスタ25にセットする。例外要因コードECCDRが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持される。例えば前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDRを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDRを外部メモリ10などに蓄積する処理を制御する。   Here, the support control register 24 is used for holding the function support control information SIFR that selectively instructs the setting of a part of the functions that can be set by the function specifying information FSIF to be disabled. The The function support control information SIFR can be written to the support control register 24 by register access by the CPU 2. The TMU 15 has a decoder (DEC) 41. When the function support control information SIFR has a first value, the decoder 41 allows the predetermined function to be specified for the function specifying register 40, and when the function support control information SIFR has a second value. A register error signal RERR is supplied to the exception request control unit 31 in response to the designation of some of the predetermined functions to the function designation register 40. In response to the register error signal RERR, the exception request control unit 31 requests the CPU 2 for exception processing by the exception request signal EXREQ. In response to this, the CPU 2 shifts the instruction execution procedure to the execution of a predetermined exception processing program, generates an exception factor code ECCR distinguishable from other exception factors, and sets it in the exception factor register 25. When the exception factor code ECCR is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the program counter at that time. For example, the exception processing program reads the value of the exception factor register 25 and displays the read exception factor code ECCR on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. The process of accumulating the exception factor code ECCR to be stored in the external memory 10 or the like is controlled.

ここで、前記一部の所定機能例えば一部のタイマカウントアップ条件が将来の非サポート機能であるとする。前記一部の所定機能が非サポートとなる前は機能サポート制御情報SIFRに第1の値をセットしておけば当該一部の所定機能も利用される。次期機種への対応を考慮する場合には前記機能サポート制御情報SIFRに第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる当該一部の機能の使用を例外の発生によって検知することができる。   Here, it is assumed that some of the predetermined functions, for example, some timer count-up conditions are future non-support functions. If the first value is set in the function support control information SIFR before the predetermined functions are not supported, the predetermined functions are also used. When considering support for the next model, if the second value is set in the function support control information SIFR, the use of some of the functions that will be unsupported in the future during software execution is an exception. Can be detected by the occurrence of.

例外要因コードECCDRが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持されることによって、非サポートとされる命令または機能を格納される命令アドレスを特定することが可能となり、ユーザがその命令の使用を回避することにより、将来的な非サポートとする機能の使用を予め回避することが可能となる。   When the exception cause code ECCR is set in the exception cause register 25, the stack register 23 holds the instruction address FADR of the program counter at that time, thereby storing an instruction or function that is not supported. It is possible to specify the function, and by using the instruction by the user, it is possible to avoid the use of a function that will not be supported in the future.

《外部端子を用いて設定される機能に対する非サポート》
図5には特定の外部端子を用いて設定される機能の設定を選択的に非サポートとする構成が例示される。ここではCPU2、INTC12、及びマイクロコンピュータ1全体の機能設定を制御するシステム制御部(SYSCNT)45が例示される。CPU2は図2と同様に代表的に示された命令実行部(IEXEC)21、命令デコーダ(IDEC)22、スタックレジスタ(STCREG)23を有する。INTC12は図2と同様に制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24と例外要因レジスタ(ECFREG)25及び例外要求制御部(ECCNT)31を有する。前記システム制御部45は、モードデコーダ(MDEC)46を有する。このモードデコーダ46には、状態に応じた機能設定に用いられるモード端子MD0〜MD3を介して、機能設定を行うための制御信号が入力される。
<Not supported for functions set using external terminals>
FIG. 5 illustrates a configuration in which setting of functions set using a specific external terminal is selectively unsupported. Here, the CPU 2, the INTC 12, and the system control unit (SYSCNT) 45 that controls the function settings of the entire microcomputer 1 are exemplified. The CPU 2 includes an instruction execution unit (IEXEC) 21, an instruction decoder (IDEC) 22, and a stack register (STCREG) 23, which are representatively shown in FIG. The INTC 12 includes a support control register (SCREG) 24, an exception factor register (ECFREG) 25, and an exception request control unit (ECCNT) 31, which are representatively shown as control registers, as in FIG. The system control unit 45 has a mode decoder (MDEC) 46. The mode decoder 46 receives a control signal for setting the function via mode terminals MD0 to MD3 used for setting the function according to the state.

ここでは、前記サポート制御レジスタ24は、モード端子MD0〜MD3を用いて設定される機能のうち一部の所定機能を設定不可能にすることを選択的に指示する外部端子サポート制御情報SIFEの保持に利用される。外部端子サポート制御情報SIFEはCPU2によるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。   Here, the support control register 24 holds the external terminal support control information SIFE that selectively indicates that some of the predetermined functions among the functions set using the mode terminals MD0 to MD3 cannot be set. Used for The external terminal support control information SIFE can be written to the support control register 24 by register access by the CPU 2.

システム制御部45に含まれるモードデコーダ46は、上記モード端子MD0〜MD3から入力された制御信号をデコードし、このデコード結果を例えばモード設定信号48として周辺回路などに出力し、マイクロコンピュータ1全体のモード設定を指示する。このモードデコーダ46は、前記外部端子サポート制御情報SIFEが第1の値のとき前記一部の所定機能の設定要求を許容する。前記外部端子サポート制御情報SIFEが第2の値のとき前記一部の所定機能の設定要求に対して外部端子エラー信号EERRを例外要求制御部31に供給する。   A mode decoder 46 included in the system control unit 45 decodes the control signal input from the mode terminals MD0 to MD3, and outputs the decoded result to a peripheral circuit or the like as a mode setting signal 48, for example. Instruct mode setting. The mode decoder 46 allows the setting request for the part of predetermined functions when the external terminal support control information SIFE is a first value. When the external terminal support control information SIFE is a second value, an external terminal error signal EERR is supplied to the exception request control unit 31 in response to the setting request for some of the predetermined functions.

例外要求制御部31は外部端子エラー信号EERRに応答して、例外要求信号EXREQによってCPU2に例外処理を要求する。これに応答するCPU2は、命令実行手順を所定の例外処理プログラムの実行に遷移すると共に、他の例外要因と区別可能な例外要因コードECCDEを生成して例外要因レジスタ25にセットする。例外要因コードECCDEが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持される。例えば前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDEを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDEを外部メモリ10などに蓄積する処理を制御する。   In response to the external terminal error signal EERR, the exception request control unit 31 requests the CPU 2 for exception processing by the exception request signal EXREQ. In response to this, the CPU 2 shifts the instruction execution procedure to the execution of a predetermined exception processing program, generates an exception factor code ECCE that can be distinguished from other exception factors, and sets it in the exception factor register 25. When the exception factor code ECCE is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the program counter at that time. For example, the exception handling program reads the value of the exception factor register 25 and displays the read exception factor code ECCE on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. The processing for accumulating the exception factor code ECCE to be stored in the external memory 10 or the like is controlled.

ここで、前記一部の所定機能例えば一部の動作モードが将来の非サポート機能であるとする。前記一部の所定機能が非サポートとなる前は機能サポート制御情報SIFEに第1の値をセットしておけば当該一部の所定機能の設定も許容される。次期機種への対応を考慮する場合には前記機能サポート制御情報SIFEに第2の値をセットしておけば、モード端子MD0〜MD3などの外部端子を用いて、将来的に非サポートとされる動作モードが設定されたことを例外の発生によって検知することができる。   Here, it is assumed that some of the predetermined functions, for example, some of the operation modes are future unsupported functions. If the first value is set in the function support control information SIFE before the predetermined functions are not supported, the setting of the predetermined functions is allowed. When considering the compatibility with the next model, if the second value is set in the function support control information SIFE, it will be unsupported in the future using external terminals such as mode terminals MD0 to MD3. It can be detected by the occurrence of an exception that the operation mode has been set.

《外部インタフェース回路を用いる制御機能に対する非サポート》
図6には外部インタフェース回路を用いる制御機能の使用を選択的に非サポートとする構成が例示される。ここではCPU2、INTC12、インタフェース制御部(IFCNT)50、及び外部デバイス(EXDVC)60が例示される。CPU2は図2と同様に代表的に示された命令実行部(IEXEC)21、命令デコーダ(IDEC)22、スタックレジスタ(STCREG)23を有する。INTC12は図2と同様に制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24と例外要因レジスタ(ECFREG)25及び例外要求制御部(ECCNT)31を有する。インタフェース制御部50は図1の外部バスインタフェース回路9に対応する。インタフェース制御部50は外部バス19を介して外部デバイス60に接続される。前記インタフェース制御部50は前記バスステートコントローラ7による外部バスアクセス制御に従って外部バスサイクルの起動を制御する。その他に、ここでは、インタフェース制御部50は、外部から特定のアクセスコマンドを受け付けると、図示を省略するオンチップRAMに対する外部からのアクセスを許容するようになっている。図示を省略するオンチップRAMは例えば内部バスDBUS3,ABUS3に接続されている。
《Non-support for control function using external interface circuit》
FIG. 6 illustrates a configuration in which use of a control function using an external interface circuit is selectively unsupported. Here, the CPU 2, the INTC 12, the interface control unit (IFCNT) 50, and the external device (EXDVC) 60 are exemplified. The CPU 2 includes an instruction execution unit (IEXEC) 21, an instruction decoder (IDEC) 22, and a stack register (STCREG) 23, which are representatively shown in FIG. The INTC 12 includes a support control register (SCREG) 24, an exception factor register (ECFREG) 25, and an exception request control unit (ECCNT) 31, which are representatively shown as control registers, as in FIG. The interface control unit 50 corresponds to the external bus interface circuit 9 of FIG. The interface control unit 50 is connected to the external device 60 via the external bus 19. The interface control unit 50 controls the start of the external bus cycle according to the external bus access control by the bus state controller 7. In addition, when the interface control unit 50 accepts a specific access command from the outside, the interface control unit 50 permits access to the on-chip RAM (not shown) from the outside. An on-chip RAM (not shown) is connected to, for example, internal buses DBUS3 and ABUS3.

ここでは、前記サポート制御レジスタ24は、インタフェース回路を用いる制御機能のうち一部の所定機能例えば前記特定のアクセスコマンドに対する応答機能を使用不可能にすることを選択的に指示する外部デバイスサポート制御情報SIFDの保持に利用される。外部デバイスサポート制御情報SIFDはCPU2によるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。   Here, the support control register 24 is external device support control information for selectively instructing to disable a part of predetermined functions among the control functions using the interface circuit, for example, a response function to the specific access command. Used to hold SIFD. The external device support control information SIFD can be written to the support control register 24 by register access by the CPU 2.

このインタフェース制御部50は、前記外部デバイスサポート制御情報SIFDが第1の値のとき前記特定のアクセスコマンドに対する応答機能の使用要求を許容する。前記外部デバイスサポート制御情報SIFDが第2の値のとき前記特定のアクセスコマンドに対する応答機能の使用要求に対して外部デバイスエラー信号DERRを例外要求制御部31に供給する。   The interface control unit 50 allows a request to use a response function for the specific access command when the external device support control information SIFD is a first value. When the external device support control information SIFD is the second value, an external device error signal DERR is supplied to the exception request control unit 31 in response to a request for using a response function for the specific access command.

例外要求制御部31は外部デバイスエラー信号DERRに応答して、例外要求信号EXREQによってCPU2に例外処理を要求する。これに応答するCPU2は、命令実行手順を所定の例外処理プログラムの実行に遷移すると共に、他の例外要因と区別可能な例外要因コードECCDDを生成して例外要因レジスタ25にセットする。例外要因コードECCDDが例外要因レジスタ25にセットされるとき、スタックレジスタ23にはそのときのプログラムカウンタの命令アドレスFADRが保持される。例えば前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDDを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDDを外部メモリ10などに蓄積する処理を制御する。   In response to the external device error signal DERR, the exception request control unit 31 requests the CPU 2 for exception processing by the exception request signal EXREQ. In response to this, the CPU 2 shifts the instruction execution procedure to execution of a predetermined exception processing program, generates an exception factor code ECCD that can be distinguished from other exception factors, and sets it in the exception factor register 25. When the exception factor code ECCD is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the program counter at that time. For example, the exception processing program reads the value of the exception factor register 25 and displays the read exception factor code ECCDD on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. The process of accumulating the exception factor code ECCD to be stored in the external memory 10 or the like is controlled.

ここで、前記一部の所定機能例えば一部の特定のコマンドインタフェース機能が将来の非サポート機能であるとする。前記一部の所定機能が非サポートとなる前は機能サポート制御情報SIFDに第1の値をセットしておけば当該一部の所定機能の使用も許容される。次期機種への対応を考慮する場合には前記機能サポート制御情報SIFDに第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる特定のコマンドインタフェース機能などが利用されていることを例外の発生によって検知することができる。なお、上記一部の所定機能は、特定のコマンドインタフェース機能に限らず、例えばマイクロコンピュータ1がスレーブプロセッサであるとき、マスタプロセッサから与えられる特定の動作指示コマンドに対する応答機能であってもよい。   Here, it is assumed that some of the predetermined functions, for example, some specific command interface functions are future unsupported functions. If the first value is set in the function support control information SIFD before the predetermined functions are not supported, the use of the predetermined functions is permitted. When considering compatibility with the next model, if the second value is set in the function support control information SIFD, a specific command interface function that will be unsupported in the future during software execution is used. Can be detected by the occurrence of an exception. The predetermined functions are not limited to specific command interface functions, but may be a response function to specific operation instruction commands given from the master processor when the microcomputer 1 is a slave processor, for example.

上記マイクロコンピュータ1によれば、ソフトウェア実行中に将来的に非サポートとされる機能の使用や設定を検知するハードウェアを有するから、継続的に既存ソフトウェアを流用するユーザにソフトウェアの修正を促したり、次期機種にてトラブルが発生したときの問題切り分けに使用することができる。これにより、マイクロコンピュータのユーザには、そのハードウェアによって、将来的に非サポートとする機能を容易に検出できる手段を提供することができるから、次期マイクロコンピュータの設計では非サポート予定の機能を躊躇なく非サポートに変更することができ、互換性維持のためだけの過大な制御論理の搭載を止めるなどの設計のボトルネックを取り除くことができる。   According to the microcomputer 1, since it has hardware for detecting the use and setting of functions that will be unsupported in the future during software execution, it prompts the user who continuously diverts the existing software to modify the software. Can be used to isolate problems when trouble occurs in the next model. As a result, the microcomputer user can be provided with a means for easily detecting functions that will not be supported in the future by means of the hardware. Can be changed to unsupported, and design bottlenecks such as stopping the installation of excessive control logic just to maintain compatibility can be removed.

《スーパースカラによる特定の命令に対する非サポート》
図7にはCPUをスーパースカラとした場合に特定の命令を選択的に非サポートとする構成が例示される。ここではCPU2AとINTC12が例示される。CPU2Aは図2に示されたCPU2と異なり、内部に2系統のパイプライン制御系33A,33Bを有し、スーパースカラの構成を有する。即ち、CPU2Aは、命令デコーダ(IDEC)22Aと命令実行部(IEXEC)21Aとからなるパイプライン制御系33Aと、命令デコーダ22Bと命令実行部21Bとからなるパイプライン制御系33Bと、CPUリソース(CPURESC)34と、パイプライン制御部(PIPCNT)37と、命令シーケンス制御部(ISQCNT)70とを有する。CPURESC34は、演算器(ALU)35と、汎用レジスタ(GREG)36と、命令スタックレジスタ(STCREG)23とを有する。命令シーケンス制御部70は、命令発行制御部(IFCNT)71と、命令バッファ(IBUF)72とを有する。
《Not supported for specific instruction by superscalar》
FIG. 7 illustrates a configuration in which specific instructions are selectively unsupported when the CPU is a superscalar. Here, CPU 2A and INTC 12 are exemplified. Unlike the CPU 2 shown in FIG. 2, the CPU 2A has two pipeline control systems 33A and 33B inside, and has a superscalar configuration. That is, the CPU 2A includes a pipeline control system 33A including an instruction decoder (IDEC) 22A and an instruction execution unit (IEXEC) 21A, a pipeline control system 33B including an instruction decoder 22B and an instruction execution unit 21B, and CPU resources ( CPURESC) 34, pipeline control unit (PIPCNT) 37, and instruction sequence control unit (ISQCNT) 70. The CPURESC 34 includes an arithmetic unit (ALU) 35, a general-purpose register (GREG) 36, and an instruction stack register (STCREG) 23. The instruction sequence control unit 70 includes an instruction issue control unit (IFCNT) 71 and an instruction buffer (IBUF) 72.

INTC12は図2と同様に制御レジスタとして代表的に示されたサポート制御レジスタ(SCREG)24と例外要因レジスタ(ECFREG)25を有する。命令シーケンス制御部70は、命令のプリフェッチを制御する。命令フェッチは、命令フェッチバス38を介して前記キャッシュアレイ3から行う。命令シーケンス制御部70は、プリフェッチした命令を順次命令バッファ72に蓄積する。CPUリソース34は、必要に応じてオペランドフェッチや演算結果の書込みを行なうときはオペランドフェッチバス39を用いる。命令フェッチバス38及びオペランドフェッチバス39は、図1において内部バス16によって総称されている。命令発行制御部71は、命令バッファ72に蓄積された命令(INST)と命令アドレス(IA)を、命令デコーダ22A,22Bに並列に供給する。命令デコーダ22A,22Bによるデコード結果はパイプライン制御部37に与えられて、双方のパイプラインにおける命令実行の依存性等が判定される。命令デコーダ22A,22Bによるデコード結果等は命令実行部21A,21Bにも与えられている。命令実行部21A,21Bは、パイプライン制御部37による判定結果に従って、CPUリソース34を用いた並列的な命令実行又は直列的な命令実行を制御する。   The INTC 12 includes a support control register (SCREG) 24 and an exception factor register (ECFREG) 25, which are representatively shown as control registers, as in FIG. The instruction sequence control unit 70 controls instruction prefetching. Instruction fetch is performed from the cache array 3 via the instruction fetch bus 38. The instruction sequence control unit 70 sequentially stores the prefetched instructions in the instruction buffer 72. The CPU resource 34 uses the operand fetch bus 39 when performing operand fetch and operation result writing as required. The instruction fetch bus 38 and the operand fetch bus 39 are collectively referred to as the internal bus 16 in FIG. The instruction issuance control unit 71 supplies the instruction (INST) and the instruction address (IA) stored in the instruction buffer 72 to the instruction decoders 22A and 22B in parallel. The decoding results by the instruction decoders 22A and 22B are given to the pipeline control unit 37, and the dependency of instruction execution in both pipelines is determined. The decoding results and the like by the instruction decoders 22A and 22B are also given to the instruction execution units 21A and 21B. The instruction execution units 21 </ b> A and 21 </ b> B control parallel instruction execution or serial instruction execution using the CPU resource 34 according to the determination result by the pipeline control unit 37.

ここでは、前記サポート制御レジスタ24は、図2と同様に代表的に示された命令サポート制御情報SIFIの保持に利用される。命令サポート制御情報SIFIはCPU2Aによるレジスタアクセスでサポート制御レジスタ24に書き込み可能にされる。前記命令デコーダ22A,22Bは、前記命令サポート制御情報SIFIが第1の値のとき前記一部の命令に対して実行可能なデコードを行う。前記命令デコーダ22A,22Bは、前記命令サポート制御情報SIFIが第2の値のとき前記一部の命令に対して他の例外要因と区別可能な例外要因コードECCDIを生成し、命令実行手順を所定の例外処理プログラムの実行に遷移させる。例外要因コードECCDIは、例外要因レジスタ25にセットされる。   Here, the support control register 24 is used for holding the instruction support control information SIFI shown representatively as in FIG. The instruction support control information SIFI can be written to the support control register 24 by register access by the CPU 2A. The instruction decoders 22A and 22B perform decoding that can be executed on the part of instructions when the instruction support control information SIFI is a first value. The instruction decoders 22A and 22B generate an exception factor code ECCI that can be distinguished from other exception factors for the part of instructions when the instruction support control information SIFI is a second value, and determine an instruction execution procedure. Transition to the execution of the exception handling program. The exception factor code ECCI is set in the exception factor register 25.

また、例外要因コードECCDIが例外要因レジスタ25にセットされるとき、スタックレジスタ23には、先に例外を発生させた命令の命令アドレスFADRが保持される。その制御は、パイプライン制御部37が行う。前記例外処理プログラムは、例外要因レジスタ25の値をリードし、リードした例外要因コードECCDIを図示を省略するディスプレイに表示、或いは、スタックレジスタ23が保有する命令アドレスFADRと共に例外要因レジスタ25が保有する例外要因コードECCDIを外部メモリ10などに蓄積する処理を制御する。   Further, when the exception factor code ECCI is set in the exception factor register 25, the stack register 23 holds the instruction address FADR of the instruction that caused the exception first. The pipeline control unit 37 performs the control. The exception processing program reads the value of the exception factor register 25 and displays the read exception factor code ECCI on a display (not shown), or the exception factor register 25 holds the instruction address FADR held by the stack register 23. Controls the processing of accumulating the exception factor code ECCI in the external memory 10 or the like.

ここで、前記一部の命令が将来の非サポート命令であるとする。前記一部の命令が非サポート命令となる前は命令サポート制御情報SIFIに第1の値をセットしておけば当該一部の命令も正常に実行される。次期機種への対応を考慮する場合には前記命令サポート制御情報SIFIに第2の値をセットしておけば、ソフトウェア実行中に将来的に非サポートとされる当該一部の命令の使用を例外の発生によって検知することができる。なお、パイプライン制御系33A,33Bの2系統に供給された双方の命令が将来の非サポート命令である場合にも対処できるように、例外要因レジスタ25は、夫々パイプライン制御系33A,33B双方からの要因コードを保存可能になっている。この場合にスタックレジスタ23に格納される命令アドレスは、先に例外を発生させた命令の命令アドレスとされる。   Here, it is assumed that the some instructions are future non-support instructions. If the first value is set in the instruction support control information SIFI before the part of the instruction becomes a non-support instruction, the part of the instruction is normally executed. When considering support for the next model, if the second value is set in the instruction support control information SIFI, the use of some of the instructions that will be unsupported in the future during software execution is an exception. Can be detected by the occurrence of. It should be noted that the exception factor register 25 includes both the pipeline control systems 33A and 33B so as to cope with the case where both instructions supplied to the two systems of the pipeline control systems 33A and 33B are future unsupported instructions. The cause code from can be saved. In this case, the instruction address stored in the stack register 23 is the instruction address of the instruction that caused the exception first.

上記により、マイクロコンピュータ1にスーパースカラを適用した場合であっても、ソフトウェア実行中に将来的に非サポートとされる機能の使用を検知することができる。   As described above, even when a superscalar is applied to the microcomputer 1, it is possible to detect the use of a function that will not be supported in the future during software execution.

《例外処理プログラムにおける履歴保存及び実行》
図8には例外処理プログラムを含む非サポート対象の利用情報を抽出する手順が例示される。まず、CPU2は、マイクロコンピュータ1のパワーオン(電源投入)時に、スタートアップルーチンを起動する(S1)。このスタートアップルーチンにおいて、CPU2は、自身の初期設定や周辺モジュール11〜15などの初期設定を行い(S2)、サポート制御レジスタ24を例えば非サポートに設定する(S3)。次に、CPU2は、アプリケーションプログラムを実行する(S4)。このアプリケーションプログラムにおいて、CPU2は、非サポート命令をフェッチしてデコードすると(S5)、前述のハードウェアの構成により例外処理要求が発生される(S6)。
<< History saving and execution in exception handling program >>
FIG. 8 illustrates a procedure for extracting non-support target usage information including an exception handling program. First, the CPU 2 starts a startup routine when the microcomputer 1 is powered on (powered on) (S1). In this startup routine, the CPU 2 performs its own initial settings and initial settings of the peripheral modules 11 to 15 (S2), and sets the support control register 24 to non-support, for example (S3). Next, the CPU 2 executes an application program (S4). In this application program, when the CPU 2 fetches and decodes the unsupported instruction (S5), an exception handling request is generated by the hardware configuration described above (S6).

例外処理要求が発生されると、CPU2は、その例外処理要求と共に通知される例外要因コードに基づいて、例外に応じた分岐先が記されたベクタテーブルを参照する(S7)。例外要因が非サポート命令のデコードに基づくものであれば、ベクタテーブルで参照されたそれに対応する例外処理プログラムの実行に遷移する。別の要因であれば当該要因に応じた別の例外処理に遷移することになる(S8)。   When an exception handling request is generated, the CPU 2 refers to the vector table in which the branch destination corresponding to the exception is written based on the exception cause code notified together with the exception handling request (S7). If the exception factor is based on the decoding of the unsupported instruction, the process proceeds to the execution of the exception processing program corresponding to the reference in the vector table. If it is another factor, a transition is made to another exception process corresponding to the factor (S8).

非サポート命令に対する例外処理は、当該要因発生に関する記録処理(S9)と、非サポート命令の追認的実行処理(S13)とに大別される。ステップS9の処理において、CPU2は、スタックレジスタ23に格納した図示を省略するプログラムカウンタの値を、LEDなどの表示装置に表示し(S10)、さらに、例外要因レジスタ25に格納した例外要因コードを、LEDなどに表示する(S11)。次に、CPU2は、スタックレジスタ23や例外要因レジスタ25を、マイクロコンピュータ1のワーク領域とされる外部メモリ10に格納する(S12)。このように、CPU2は、所定の例外処理プログラムの実行に遷移して、ステップS9の処理を実行することにより、例外要因コードとその例外要因となった命令アドレスを保存する制御が可能となる。したがって、マイクロコンピュータ1は、例外処理プログラムにて例外要因の履歴を保存することができる。   Exception processing for an unsupported instruction is broadly divided into a recording process (S9) regarding the occurrence of the factor and a confirming execution process (S13) for the unsupported instruction. In the processing of step S9, the CPU 2 displays the value of the program counter (not shown) stored in the stack register 23 on a display device such as an LED (S10), and further displays the exception factor code stored in the exception factor register 25. Is displayed on the LED (S11). Next, the CPU 2 stores the stack register 23 and the exception factor register 25 in the external memory 10 as a work area of the microcomputer 1 (S12). As described above, the CPU 2 shifts to the execution of a predetermined exception processing program and executes the process of step S9, thereby enabling control to save the exception factor code and the instruction address that caused the exception factor. Therefore, the microcomputer 1 can store a history of exception factors using the exception processing program.

さらに、CPU2は、ステップS9の後に、例外要因命令を実行する(S13)。ステップS13の処理において、CPU2は、まず、ステップS3の処理で非サポートに設定されたサポート制御レジスタ24をサポートに設定する(S14)。次に、CPU2は、例えば外部メモリ10等を用いて例外要因命令を実行し(S15)、スタックレジスタ23が保持する値(スタック)を例外要因命令の次命令に更新する(S16)。その後、CPU2は、サポート制御レジスタ24を非サポートに設定し(S17)、上記した例外処理プログラムを終了させて、アプリケーションプログラムに復帰して、次命令など通常の処理を行う。このように、CPU2は、ステップS9の処理で例外要因コードとその例外要因となった命令アドレスの保存を行った後、ステップS13の処理を実行することにより、例外要因となった命令を実行して、所定の例外処理プログラムの実行を終わらせることが可能である。したがって、マイクロコンピュータ1は、特定の命令である例外要因命令を実行しようとしていることを検知するだけでなく、この例外要因命令を完全に実行することも保証できるようになる。   Further, after step S9, the CPU 2 executes an exception factor instruction (S13). In the process of step S13, the CPU 2 first sets the support control register 24 set to unsupported in the process of step S3 to support (S14). Next, the CPU 2 executes the exception factor instruction using, for example, the external memory 10 (S15), and updates the value (stack) held in the stack register 23 to the instruction next to the exception factor instruction (S16). Thereafter, the CPU 2 sets the support control register 24 to non-support (S17), terminates the exception handling program described above, returns to the application program, and performs normal processing such as the next instruction. As described above, after the CPU 2 saves the exception factor code and the instruction address that has caused the exception in the process of step S9, the CPU 2 executes the instruction that has caused the exception by executing the process of step S13. Thus, the execution of a predetermined exception handling program can be ended. Therefore, the microcomputer 1 not only detects that an exception factor instruction that is a specific instruction is to be executed, but also can guarantee that the exception factor instruction is completely executed.

ここで、マイクロコンピュータ1は、ステップS7の処理で、ベクタテーブルを参照する方式を用いたが、これに限られず、例外の要因に関係なく、一定のアドレスへジャンプした後、例外処理プログラムにて例外処理要因コードを解析し、対応したルーチンへジャンプする方式を適用してもよい。また、スタックレジスタ23は、スタックポインタが示すアドレスにプログラムカウンタの値を格納する方式を適用してもよい。さらに、マイクロコンピュータ1は、スタックレジスタ23や例外要因レジスタ25に格納された内容をLEDなどで表示するだけで、履歴を保存しないときには、ステップS12の処理を不要とすることができる。   Here, the microcomputer 1 uses the method of referring to the vector table in the process of step S7. However, the microcomputer 1 is not limited to this, and after jumping to a certain address regardless of the cause of the exception, the microcomputer 1 A method of analyzing the exception processing factor code and jumping to the corresponding routine may be applied. Further, the stack register 23 may apply a method of storing the value of the program counter at the address indicated by the stack pointer. Furthermore, the microcomputer 1 can display the contents stored in the stack register 23 and the exception factor register 25 with an LED or the like, and can eliminate the processing in step S12 when the history is not saved.

また、マイクロコンピュータ1は、非サポート対象の利用情報を抽出する手順として、非サポート対象の命令を実行する前に例外処理プログラムの実行に遷移するようにしたが、これに限られず、非サポート対象の命令を実行した後に、例外処理プログラムの実行に遷移するようにしてもよい。また、例外処理によってプログラム実行を中止しても良い。この場合には、CPU2は、ステップS9の処理を行った後に、直ちに例外処理プログラムを終了させればよい。   In addition, the microcomputer 1 transitions to the execution of the exception processing program before executing the unsupported instruction as a procedure for extracting the unsupported usage information. However, the microcomputer 1 is not limited to this and is not supported. After executing this instruction, the process may be shifted to the execution of the exception handling program. Further, the program execution may be stopped by exception processing. In this case, the CPU 2 may end the exception processing program immediately after performing the process of step S9.

《既存機種にて新たに「サポート」とされた追加機能又は変更機能》
以上の説明では、将来の非サポート予定機能に対する利用を検出可能とした。将来の非サポート予定機能を、今回からの追加機能又は変更機能として把握すれば、上記と同じ様に、データプロセッサ等において今回からサポートされた追加機能又は変更機能に対する利用の検出にも適用可能になる。以下この観点による適用例を説明する。ここで考える機能は、上記非サポートの場合と同様の、例えば(1)特定の命令に対するサポート、(2)特定アドレスエリアに対するアクセスサポート、(3)特定の機能設定に対するサポート、(4)外部端子を用いて設定される機能の設定に対するサポート、(5)外部インタフェース回路を用いる制御機能の使用に対するサポート、の5種類とされる。マイクロコンピュータ1はソフトウェア実行中に既存機種から新たに追加又は変更された上記機能の使用を検知するハードウェアを有する。それらハードウェアについては、非サポート対象の利用情報を抽出することを実現した上記ハードウェアと比べると、サポート制御レジスタ24に保持される各種サポート制御情報に対する定義付けを変更すればよく、それ以外の論理実装は略同様となる。
《Additional function or change function that is newly `` supported '' in existing models》
In the above description, it is possible to detect use of a future unsupported function. If future unsupported functions are grasped as additional functions or changed functions from now on, it can be applied to detection of use of additional or changed functions supported from now on in data processors, etc., as described above. Become. An application example from this viewpoint will be described below. The functions considered here are the same as in the case of non-support, for example: (1) support for specific instructions, (2) access support for specific address areas, (3) support for specific function settings, (4) external terminals There are five types of support: support for setting functions set by using (5) support for using control functions using an external interface circuit. The microcomputer 1 has hardware for detecting the use of the function newly added or changed from an existing model during software execution. For these hardware, the definition of various support control information held in the support control register 24 may be changed as compared with the above hardware that realizes the extraction of usage information to be unsupported. The logical implementation is almost the same.

《特定の命令に対するサポート》
一部の命令が今回新たに追加又は変更された命令であり、この命令の実行をサポートとする場合には、マイクロコンピュータ1において、図2に示すサポート制御レジスタ24に保持される命令サポート制御情報SIFIを、追加又は変更された命令のサポートを示す情報と定義付けすればよい。これにより、マイクロコンピュータ1は、当該一部の命令が今回追加又は変更された命令である場合も、当該命令の実行を、上記した将来の非サポート命令を実行するときと同様に検知することができる。また、マイクロコンピュータ1に図7に代表的に示されるスーパースカラであるCPU2Aを適用した場合でも、命令サポート制御情報SIFIを上記のように定義付けすることにより、今回追加又は変更された命令の実行を同様に検知することができる。
<< Support for specific instructions >>
In the case where some instructions are newly added or changed instructions this time and the execution of these instructions is supported, the instruction support control information held in the support control register 24 shown in FIG. SIFI may be defined as information indicating support for added or changed instructions. Thereby, the microcomputer 1 can detect the execution of the instruction in the same manner as when executing the future non-support instruction even when the partial instruction is an instruction that has been added or changed this time. it can. Even when the CPU 2A, which is a superscalar typically shown in FIG. 7, is applied to the microcomputer 1, the instruction support control information SIFI is defined as described above to execute the instruction added or changed this time. Can be detected in the same manner.

《特定アドレスエリアに対するアクセスサポート》
一部のアドレスについて今回アクセス可能にされ又はアクセス形態が変更され、上記追加又は変更に係るアドレスへのアクセスをサポートする場合には、マイクロコンピュータ1において、図3に示すアドレスサポート制御情報SIFAを、上記追加又は変更に係るエリアアドレスのサポートを示す情報と定義付けすればよい。これにより、マイクロコンピュータ1は、当該一部のアドレスが上記追加又は変更に係るアドレスである場合も、当該アドレスへのアクセスを、上記した将来の非サポートアドレスにアクセスするときと同様に検知することができる。
<< Access support for specific address areas >>
In the case where access is made for some addresses this time or the access form is changed and access to the address related to the addition or change is supported, the microcomputer 1 uses the address support control information SIFA shown in FIG. What is necessary is just to define with the information which shows the support of the area address which concerns on the said addition or change. Thereby, even when the partial address is an address related to the addition or change, the microcomputer 1 detects the access to the address in the same manner as when accessing the future non-support address described above. Can do.

《特定の機能設定に対するサポート》
一部の所定機能が今回追加又は変更された機能であり、この追加機能又は変更機能をサポートする場合には、マイクロコンピュータ1において、図4に示す機能サポート制御情報SIFRを、機能指定情報FSIFによって設定可能な機能を新たに追加又は変更した箇所のサポートを示す情報と定義付けすればよい。これにより、マイクロコンピュータ1は、当該一部の所定機能が今回追加又は変更された機能である場合も、当該所定機能の使用を、上記した将来の非サポート機能を使用するときと同様に検知することができる。
<Support for specific function settings>
When some of the predetermined functions are added or changed this time, and this additional or changed function is supported, in the microcomputer 1, the function support control information SIFR shown in FIG. What is necessary is just to define as the information which shows the support of the place which added or changed the function which can be set newly. Thereby, even when the predetermined function is a function that has been added or changed this time, the microcomputer 1 detects the use of the predetermined function in the same manner as when using the future non-support function described above. be able to.

《外部端子を用いて設定される機能に対するサポート》
モード端子などを用いて設定される動作モードなどの一部の機能が、今回追加又は変更された機能であり、この機能をサポートする場合には、マイクロコンピュータ1において、図5に示す外部端子機能サポート制御情報SIFEを、外部端子を用いて設定される機能を新たに追加又は変更した箇所のサポートを示す情報と定義付けすればよい。これにより、マイクロコンピュータ1は、例えば動作モードが今回追加又は変更された機能である場合も、この動作モードの設定を、上記した将来の非サポート機能を設定するときと同様に検知することができる。
<Support for functions set using external terminals>
Some functions such as an operation mode set using a mode terminal or the like are functions added or changed this time. When the function is supported, the microcomputer 1 has an external terminal function shown in FIG. The support control information SIFE may be defined as information indicating support at a location where a function set using an external terminal is newly added or changed. Thereby, the microcomputer 1 can detect the setting of this operation mode similarly to the case of setting the future non-support function described above even when the operation mode is a function added or changed this time, for example. .

《外部インタフェース回路を用いる制御機能に対するサポート》
外部インタフェース回路を用いる特定のコマンドインタフェース機能などの一部の機能が、今回追加又は変更された機能であり、この機能をサポートする場合には、マイクロコンピュータ1において、図6に示す外部デバイスサポート制御情報SIFDを、外部インタフェース回路を用いる制御機能を新たに追加又は変更した箇所のサポートを示す情報と定義付けすればよい。これにより、マイクロコンピュータ1は、例えばコマンドインタフェース機能が今回追加又は変更された制御機能である場合も、このコマンドインタフェース機能の使用を、上記した将来の非サポート機能を使用するときと同様に検知することができる。
《Support for control function using external interface circuit》
Some functions, such as a specific command interface function using an external interface circuit, are functions that have been added or changed this time. When this function is supported, the microcomputer 1 uses the external device support control shown in FIG. The information SIFD may be defined as information indicating support of a place where a control function using an external interface circuit is newly added or changed. Thereby, even when the command interface function is a control function that has been added or changed this time, for example, the microcomputer 1 detects the use of this command interface function in the same manner as when using the above-mentioned future non-support function. be able to.

即ち、上記マイクロコンピュータ1によれば、ソフトウェア実行中に、新たにサポートとされた追加機能又は変更機能の使用や設定を検知することができる。したがって、マイクロコンピュータ1は、追加機能又は変更機能による影響や不良具合がないかどうかを容易に検証したり、トラブルが発生したときに、デバッグ箇所や留意箇所の特定に使用することができる。   That is, according to the microcomputer 1, the use or setting of the newly added or changed function can be detected during software execution. Therefore, the microcomputer 1 can easily verify whether there is an influence or failure due to the additional function or the change function, or can be used for specifying a debug location or a notice location when a trouble occurs.

以上、本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   As mentioned above, although the invention made by this inventor was concretely demonstrated based on embodiment, it cannot be overemphasized that this invention is not limited to it and can be variously changed in the range which does not deviate from the summary.

例えば、以上の説明では非サポートの対象、又は新たにサポートとされた追加機能やサポート内容が変更された機能の対象を、一部の命令、特定アドレスアクセス、制御レジスタ設定、外部端子制御機能、バスインタフェース制御機能としたが、本発明はそれに限定されず適宜変更可能である。特定アドレスアクセスの非サポートの制御では、キャッシュメモリ3の命令キャッシュ(ICACH)5、データキャッシュ(DCACH)6を構成するキャッシュエントリをCPU2のアドレス空間にマッピングしてキャッシュエントリのパージやインバリデートなどを行うときのメモリ割付アクセスやキャッシュタグを用いた連想検索結果を用いる連想アクセスであってもよい。   For example, in the above description, some commands, specific address access, control register settings, external terminal control functions, non-support targets, or newly added support functions or functions whose support contents have been changed, Although the bus interface control function has been described, the present invention is not limited thereto and can be changed as appropriate. In non-supporting control of specific address access, the cache entries constituting the instruction cache (ICACH) 5 and data cache (DCACH) 6 of the cache memory 3 are mapped to the address space of the CPU 2 to purge or invalidate cache entries. It may be an associative access using a memory allocation access or an associative search result using a cache tag.

また、将来的に非サポートとする機能の検知には例外処理を利用したが、エミュレータモード時にはブレーク割り込みを発生されるようにしてもよい。要するに、将来的に非サポートとする機能の設定などをブレーク条件に設定する。また、将来的に非サポートとする機能の検知として、特別な非サポート例外を用意せず、出力端子を用いて通知したり、不当命令例外やアドレス例外とし、スタックより原因を解析して把握するようにしてもよい。本発明はマイクロコンピュータだけではなく、マイクロプロセッサ、アクセラレータ、システムLSIなどと称されるデータプロセッサに広く適用することができる。   In addition, exception processing is used to detect functions that will not be supported in the future, but a break interrupt may be generated in the emulator mode. In short, the functions that will not be supported in the future are set as break conditions. In addition, in order to detect functions that will not be supported in the future, special unsupported exceptions are not prepared, notifications are made using output terminals, illegal instruction exceptions and address exceptions are analyzed, and the cause is analyzed and understood from the stack. You may do it. The present invention can be widely applied not only to microcomputers but also to data processors called microprocessors, accelerators, system LSIs, and the like.

マイクロコンピュータのブロック図である。It is a block diagram of a microcomputer. 図1のマイクロコンピュータにおいて特定の命令を選択的に非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration in which specific instructions are selectively unsupported in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおいて特定アドレスエリアに対してアクセス非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration in which access to a specific address area is not supported in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおいて特定の機能設定に対して非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration that does not support a specific function setting in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおいて特定の外部端子を用いて設定される機能の設定を選択的に非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration in which setting of a function set by using a specific external terminal in the microcomputer of FIG. 1 is selectively unsupported. 図1のマイクロコンピュータにおいて外部インタフェース回路を用いる制御機能の使用を選択的に非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration in which use of a control function using an external interface circuit is selectively unsupported in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおいてCPUをスーパースカラとした場合に特定の命令を選択的に非サポートとする構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a configuration in which specific instructions are selectively unsupported when the CPU is a superscalar in the microcomputer of FIG. 1. マイクロコンピュータにより実行される例外処理プログラムを含む非サポート対象の利用情報を抽出する手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure which extracts the usage information of the non-support object containing the exception processing program run by a microcomputer.

符号の説明Explanation of symbols

1 マイクロコンピュータ
2 中央処理装置
3 キャッシュメモリ
6 データキャッシュメモリ
7 バスステートコントローラ
21 命令実行部(IEXEC)
22 命令デコーダ(IDEC)
23 スタックレジスタ(STCREG)
24 サポート制御レジスタ(SCREG)
25 例外要因レジスタ(ECFREG)
SIFI 命令サポート制御情報
ECCDI 例外要因コード
ECPI 制御信号
31 例外要求制御部(ECCNT)
SIFA アドレスサポート制御情報
32 アドレスデコーダ(ADEC)
33A,33B パイプライン制御系
34 CPUリソース(CPURESC)
35 演算器(ALU)
36 汎用レジスタ(GREG)
37 パイプライン制御部(PIPCNT)
AADR アクセスアドレス
ASRB アクセスストローブ信号
AERR アドレスエラー信号
ECCDA 例外要因コード
40 機能指定レジスタ(FREG)
FSIF 機能指定情報
SIFR 機能サポート制御情報
41 デコーダ(DEC)
45 システム制御部(SYSCNT)
46 モードデコーダ(MDEC)
MD0〜MD3 モード端子
RERR レジスタエラー信号
50 インタフェース制御部(IFCNT)
60 外部デバイス(EXDVC)
70 命令シーケンス制御部(ISQCNT)
71 命令発行制御部(IFCNT)
72 命令バッファ(IBUF)
DESCRIPTION OF SYMBOLS 1 Microcomputer 2 Central processing unit 3 Cache memory 6 Data cache memory 7 Bus state controller 21 Instruction execution part (IEXEC)
22 Instruction decoder (IDEC)
23 Stack register (STCREG)
24 Support control register (SCREG)
25 Exception factor register (ECFREG)
SIFI instruction support control information ECCI Exception cause code ECPI control signal 31 Exception request control unit (ECCNT)
SIFA address support control information 32 Address decoder (ADEC)
33A, 33B Pipeline control system 34 CPU resources (CPURESC)
35 Arithmetic Unit (ALU)
36 General-purpose register (GREG)
37 Pipeline Control Unit (PIPCNT)
AADR access address ASRB access strobe signal AERR address error signal ECCA Exception cause code 40 Function designation register (FREG)
FSIF function designation information SIFR function support control information 41 Decoder (DEC)
45 System control unit (SYSCNT)
46 Mode decoder (MDEC)
MD0 to MD3 Mode terminal RERR Register error signal 50 Interface controller (IFCNT)
60 External device (EXDVC)
70 Instruction sequence controller (ISQCNT)
71 Instruction issue control unit (IFCNT)
72 Instruction buffer (IBUF)

Claims (19)

命令の実行によって複数の機能をサポートするデータプロセッサであって、制御レジスタとデコーダを有し、
前記制御レジスタは、データプロセッサがサポートする機能のうち一部の機能を使用不可能にすることを選択的に指示する指示情報の保持に利用され、
前記デコーダは、前記制御レジスタによって使用不可能とされた一部の機能を利用しようとする操作を検出して、その検出結果を保持させる、データプロセッサ。
A data processor that supports a plurality of functions by executing an instruction, having a control register and a decoder,
The control register is used for holding instruction information for selectively instructing to disable some of the functions supported by the data processor;
The decoder is a data processor that detects an operation to use a part of functions that are disabled by the control register and holds the detection result.
命令実行制御部及び例外制御部を有するデータプロセッサであって、
前記例外制御部は第1の制御レジスタを有し、前記第1の制御レジスタはデータプロセッサで実行可能な命令セットのうち一部の命令を実行不可能にすることを選択的に指示する第1の情報の保持に利用され、
前記命令実行制御部は命令デコーダを有し、前記命令デコーダは、前記第1の情報が第1の値のとき前記一部の命令に対して実行可能なデコードを行い、前記第1の情報が第2の値のとき前記一部の命令に対して他の例外要因と区別可能な例外要因コードを生成可能なデコードを行うと共に命令実行を所定の例外処理プログラムの実行に遷移させる、データプロセッサ。
A data processor having an instruction execution control unit and an exception control unit,
The exception control unit has a first control register, and the first control register selectively instructs a part of an instruction set executable by the data processor to be non-executable. Used to hold information about
The instruction execution control unit includes an instruction decoder, and the instruction decoder performs decoding that can be executed on the part of instructions when the first information is a first value, and the first information is A data processor that performs decoding capable of generating an exception factor code that can be distinguished from other exception factors when the second value is set, and causes instruction execution to transition to execution of a predetermined exception processing program.
前記命令実行制御部は中央処理装置であり、前記第1の制御レジスタは前記中央処理装置によってリード及びライト可能である請求項2記載のデータプロセッサ。   3. The data processor according to claim 2, wherein the instruction execution control unit is a central processing unit, and the first control register is readable and writable by the central processing unit. 前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、
前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する請求項3記載のデータプロセッサ。
The exception control unit has an exception factor register that holds an exception factor code;
4. The data processor according to claim 3, wherein the instruction execution control unit includes a stack register that holds an instruction address held by a program counter when an exception occurs.
命令実行制御部、例外制御部及びバス制御部を有するデータプロセッサであって、
前記例外制御部は第1の制御レジスタを有し、前記第1の制御レジスタは、データプロセッサのアドレス空間の一部のアドレスに対するアクセスを不可能にすることを選択的に指示する第2の情報の保持に利用され、
前記バス制御部はアドレスデコーダを有し、前記アドレスデコーダは、前記第2の情報が第1の値のとき前記一部のアドレスへのアクセス要求を許容し、前記第2の情報が第2の値のとき前記一部のアドレスへのアクセス要求に対してアドレスエラー信号を生成し、
前記命令実行制御部は、前記アドレスエラー信号に応答して、他の例外要因と区別可能な例外要因コードを生成して命令実行を所定の例外処理プログラムの実行に遷移させる、データプロセッサ。
A data processor having an instruction execution control unit, an exception control unit, and a bus control unit,
The exception control unit has a first control register, and the first control register selectively instructs to disable access to a partial address in the address space of the data processor. Used to hold
The bus control unit includes an address decoder, and the address decoder permits an access request to the partial address when the second information is a first value, and the second information is a second value. An address error signal is generated in response to an access request to the partial address when
In response to the address error signal, the instruction execution control unit generates an exception factor code that can be distinguished from other exception factors, and transitions the instruction execution to the execution of a predetermined exception processing program.
前記第1の制御レジスタによって選択的にアクセス不可能にすることを指示することが可能なアドレス空間は、データプロセッサの内部アドレス空間と外部アドレス空間の双方である請求項5記載のデータプロセッサ。   6. The data processor according to claim 5, wherein the address space that can be instructed to be selectively inaccessible by the first control register is both an internal address space and an external address space of the data processor. 前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、
前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する請求項6記載のデータプロセッサ。
The exception control unit has an exception factor register that holds an exception factor code;
The data processor according to claim 6, wherein the instruction execution control unit has a stack register that holds an instruction address held by a program counter when an exception occurs.
命令実行制御部、例外制御部、及び前記命令実行制御部により機能指定レジスタに設定された機能指定情報に応ずる機能が選択されるその他の機能ブロックを有するデータプロセッサであって、
前記例外制御部は第1の制御レジスタを有し、前記第1の制御レジスタは、前記機能指定情報による一部の所定の機能設定を不可能にすることを選択的に指示する第3の情報の保持に利用され、
前記その他の機能ブロックはデコーダを有し、前記デコーダは、前記第3の情報が第1の値のとき前記機能指定レジスタへの前記一部の所定の機能の指定を許容し、前記第3の情報が第2の値のとき前記機能指定レジスタへの前記一部の所定の機能の指定に対してレジスタエラー信号を生成し、
前記命令実行制御部は、前記レジスタエラー信号に応答して、他の例外要因と区別可能な例外要因コードを生成して命令実行を所定の例外処理プログラムの実行に遷移させる、データプロセッサ。
A data processor having an instruction execution control unit, an exception control unit, and other functional blocks for selecting a function corresponding to the function designation information set in the function designation register by the instruction execution control unit;
The exception control unit includes a first control register, and the first control register selectively instructs to disable setting of some predetermined functions by the function designation information. Used to hold
The other functional block includes a decoder, and the decoder allows the predetermined function to be specified in the function specifying register when the third information is a first value, and the third information When the information is a second value, a register error signal is generated for the designation of the predetermined function to the function designation register;
In response to the register error signal, the instruction execution control unit generates an exception factor code that can be distinguished from other exception factors, and causes the instruction execution to transition to execution of a predetermined exception processing program.
前記例外制御部は、例外要因コードを保持する例外要因レジスタを有し、
前記命令実行制御部は、例外発生時にプログラムカウンタが保持している命令アドレスを保持するスタックレジスタを有する請求項8記載のデータプロセッサ。
The exception control unit has an exception factor register that holds an exception factor code;
9. The data processor according to claim 8, wherein the instruction execution control unit has a stack register that holds an instruction address held by a program counter when an exception occurs.
命令実行制御部及び例外制御部を有するデータプロセッサであって、
前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、データプロセッサで実行可能な命令セットのうち一部の命令を実行不可能にすることを選択的に指示する指示情報の保持に利用され、
前記命令実行制御部はデコーダを有し、前記デコーダは、前記サポート制御レジスタによって実行不可能と指示された一部の命令をデコードしたとき、その要因に固有の要因コードを生成して保持させる、データプロセッサ。
A data processor having an instruction execution control unit and an exception control unit,
The exception control unit has a support control register, and the support control register holds instruction information for selectively instructing that some instructions in the instruction set executable by the data processor are not executable. Used,
The instruction execution control unit includes a decoder, and when the decoder decodes a part of the instructions instructed to be impossible by the support control register, the decoder generates and holds a factor code specific to the factor. Data processor.
命令実行制御部、例外制御部及びバス制御部を有するデータプロセッサであって、
前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、データプロセッサのアドレス空間の一部に対するアクセスを不可能にすることを選択的に指示する指示情報の保持に利用され、
前記バス制御部はデコーダを有し、前記デコーダは、前記サポート制御レジスタによって指示されたアクセス不可能なアドレスに対するアクセス要求を検出可能であり、
前記命令実行制御部は、前記アクセス要求の検出に応答して、その要因に固有の要因コードを生成して保持させる、データプロセッサ。
A data processor having an instruction execution control unit, an exception control unit, and a bus control unit,
The exception control unit has a support control register, and the support control register is used for holding instruction information for selectively instructing to disable access to a part of the address space of the data processor;
The bus control unit includes a decoder, and the decoder can detect an access request for an inaccessible address designated by the support control register;
In response to detection of the access request, the instruction execution control unit generates and holds a factor code specific to the factor.
命令実行制御部、例外制御部及び前記命令実行制御部により機能制御レジスタに設定された制御情報に応ずる機能が選択されるその他の機能ブロックを有するデータプロセッサであって、
前記例外制御部はサポート制御レジスタを有し、前記サポート制御レジスタは、前記機能制御レジスタに対する一部の制御情報の設定を不可能にすることを選択的に指示する指示情報の保持に利用され、
前記その他の機能ブロックはデコーダを有し、前記デコーダは、前記サポート制御レジスタにより設定不可能と指示された一部の制御情報の設定を検出可能であり、
前記命令実行制御部は、前記設定不可能と指示された一部の制御情報の設定の検出に応答して、その要因に固有の要因コードを生成して保持させる、データプロセッサ。
A data processor having an instruction execution control unit, an exception control unit, and other functional blocks in which a function corresponding to control information set in a function control register is selected by the instruction execution control unit;
The exception control unit has a support control register, and the support control register is used for holding instruction information for selectively instructing that setting of some control information to the function control register is impossible,
The other functional block includes a decoder, and the decoder is capable of detecting a setting of a part of control information instructed to be not set by the support control register,
The instruction execution control unit generates and holds a factor code specific to the factor in response to detection of the setting of a part of the control information instructed that the setting is impossible.
状態に応じた機能設定に用いられる外部端子を有し、前記一部の機能は前記外部端子を用いて設定される機能である請求項1記載のデータプロセッサ。   The data processor according to claim 1, further comprising an external terminal used for setting a function according to a state, wherein the part of the function is a function set using the external terminal. 外部と接続可能な外部インタフェース回路を有し、前記一部の機能は前記外部インタフェース回路を用いる制御機能である請求項1記載のデータプロセッサ。   The data processor according to claim 1, further comprising an external interface circuit connectable to the outside, wherein the partial function is a control function using the external interface circuit. 前記命令実行制御部は、前記所定の例外処理プログラムの実行に遷移することによって、前記例外要因コードとその例外要因となった命令アドレスを保存する制御が可能である請求項2記載のデータプロセッサ。   3. The data processor according to claim 2, wherein the instruction execution control unit is capable of controlling the exception factor code and the instruction address that caused the exception cause by transitioning to execution of the predetermined exception handling program. 前記命令実行制御部は、前記所定の例外処理プログラムの実行に遷移することによって、前記例外要因コードとその例外要因となった命令アドレスの保存を行った後、前記例外要因となった命令を実行して、前記所定の例外処理プログラムの実行を終わることが可能な請求項15記載のデータプロセッサ。   The instruction execution control section executes the predetermined exception processing program, saves the exception cause code and the instruction address that caused the exception, and then executes the exception cause instruction. The data processor according to claim 15, wherein the execution of the predetermined exception handling program can be terminated. 前記一部の機能は、将来非サポートとされる可能性のある機能である請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the some functions are functions that may be unsupported in the future. 前記一部の機能は、新たにサポートとされた追加機能である請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the partial function is an additional function newly supported. 前記一部の機能は、サポート内容が変更された機能である請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the partial function is a function whose support content is changed.
JP2005198741A 2005-01-17 2005-07-07 Data processor Withdrawn JP2006221606A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005198741A JP2006221606A (en) 2005-01-17 2005-07-07 Data processor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005008734 2005-01-17
JP2005198741A JP2006221606A (en) 2005-01-17 2005-07-07 Data processor

Publications (1)

Publication Number Publication Date
JP2006221606A true JP2006221606A (en) 2006-08-24

Family

ID=36983882

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005198741A Withdrawn JP2006221606A (en) 2005-01-17 2005-07-07 Data processor

Country Status (1)

Country Link
JP (1) JP2006221606A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102576327A (en) * 2009-09-29 2012-07-11 国际商业机器公司 Enhanced monitor facility
CN102947794A (en) * 2010-06-24 2013-02-27 国际商业机器公司 Function virtualization facility for function query of a processor
JP2013535063A (en) * 2010-06-24 2013-09-09 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer-implemented method, computer system, and computer program for blocking certain instructions from being executed by a processor

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102576327A (en) * 2009-09-29 2012-07-11 国际商业机器公司 Enhanced monitor facility
JP2013506177A (en) * 2009-09-29 2013-02-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Improved monitor function implementation
CN102947794A (en) * 2010-06-24 2013-02-27 国际商业机器公司 Function virtualization facility for function query of a processor
JP2013534668A (en) * 2010-06-24 2013-09-05 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer-implemented method, computer system, and computer program for hiding selected installed functions of multi-function instructions
JP2013535063A (en) * 2010-06-24 2013-09-09 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer-implemented method, computer system, and computer program for blocking certain instructions from being executed by a processor
JP2015201227A (en) * 2010-06-24 2015-11-12 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method to be implemented in computer for hiding selected installed function among multi-function instructions, computer system, and computer program
CN102947794B (en) * 2010-06-24 2016-08-17 国际商业机器公司 Function virtualization facility for function for processor functional inquiry
US9851969B2 (en) 2010-06-24 2017-12-26 International Business Machines Corporation Function virtualization facility for function query of a processor
US10521231B2 (en) 2010-06-24 2019-12-31 International Business Machines Corporation Function virtualization facility for blocking instruction function of a multi-function instruction of a virtual processor
US10664269B2 (en) 2010-06-24 2020-05-26 International Business Machines Corporation Function virtualization facility for function query of a processor
US11086624B2 (en) 2010-06-24 2021-08-10 International Business Machines Corporation Function virtualization facility for blocking instruction function of a multi-function instruction of a virtual processor
US11188326B2 (en) 2010-06-24 2021-11-30 International Business Machines Corporation Function virtualization facility for function query of a processor
US11809870B2 (en) 2010-06-24 2023-11-07 International Business Machines Corporation Function virtualization facility for blocking instruction function of a multi-function instruction of a virtual processor

Similar Documents

Publication Publication Date Title
JP6006248B2 (en) Instruction emulation processor, method and system
US20080148022A1 (en) Marking registers as available for register renaming
US7752427B2 (en) Stack underflow debug with sticky base
JP2013250980A (en) Processor resource and execution protection methods and apparatus
JP5703378B2 (en) Alignment control
JP6005392B2 (en) Method and apparatus for routing
JP4766487B2 (en) Program alteration detection device
JP5451579B2 (en) Adaptive optimized compare / exchange operations
JP4893427B2 (en) Microcomputer system
US20140281465A1 (en) Dual Boot Panel SWAP Mechanism
WO2019133172A1 (en) Processor, method, and system for reducing latency in accessing remote registers
JP2006221606A (en) Data processor
KR19980079596A (en) Method and apparatus for implementing processor quiescent state in multiprocessor system
US6990569B2 (en) Handling problematic events in a data processing apparatus
JP2008140124A (en) Data processor
JP2006079230A (en) Semiconductor circuit device and runaway detecting method
JP2022520914A (en) Testing read-only memory using a memory-embedded self-test controller
JP2009042971A (en) Real time watch apparatus and method
JP3171615B2 (en) Data transfer retry control method
JP3762597B2 (en) Computer and its control method
JP2004199630A (en) Data processor
US9342359B2 (en) Information processing system and information processing method
JPH11203174A (en) State supervisory information processor
EP2028591A1 (en) Control method and computer system utilizing the same
JP2005063429A (en) Program debugging apparatus, program debugging method and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081007