JP2006293824A - Semiconductor device - Google Patents
Semiconductor device Download PDFInfo
- Publication number
- JP2006293824A JP2006293824A JP2005115775A JP2005115775A JP2006293824A JP 2006293824 A JP2006293824 A JP 2006293824A JP 2005115775 A JP2005115775 A JP 2005115775A JP 2005115775 A JP2005115775 A JP 2005115775A JP 2006293824 A JP2006293824 A JP 2006293824A
- Authority
- JP
- Japan
- Prior art keywords
- access
- invalid
- debug
- product
- resource
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、内蔵メモリサイズや内蔵周辺回路にバリエーションをもつマイクロコントローラやマイクロコンピュータのシリーズ品において、そのベース品種によりソフトウエアデバッグ環境を提供する半導体装置に関する。 The present invention relates to a semiconductor device that provides a software debugging environment according to its base product in a series of microcontrollers and microcomputers having variations in built-in memory size and built-in peripheral circuits.
半導体デバイスベンダにおいては、マイクロコントローラやマイクロコンピュータ(以下、単にマイコンと呼ぶ)は通常、内蔵メモリサイズや内蔵周辺回路にバリエーションをもつシリーズ品として開発されることが多い。たとえば命令ROM内蔵品種シリーズでは、命令ROMにフラッシュメモリを使用する品種とマスクROMを使用する品種とがあり、さらにマスクROMのメモリサイズを変更した品種が用意される。 In semiconductor device vendors, microcontrollers and microcomputers (hereinafter simply referred to as microcomputers) are usually developed as series products with variations in built-in memory sizes and built-in peripheral circuits. For example, in the product series with a built-in instruction ROM, there are a product using a flash memory for the command ROM and a product using a mask ROM, and a product in which the memory size of the mask ROM is changed is prepared.
半導体デバイスユーザでのセット量産時には、コスト面からマスクROM品が適用されることが多い。 Mask ROM products are often applied from the standpoint of cost when mass production is performed by semiconductor device users.
また半導体デバイスユーザに対し、セットのソフトウエア開発やシステム評価を行うためのインサーキットエミュレータ(ICE)やオンボードデバッガなどの開発支援ツール(エミュレータともよぶ)が半導体デバイスベンダから提供される。開発支援ツールは、セットあるいはセット相当の配線基板などに実装されるエミュレーションチップと、このエミュレーションチップを制御しセット開発者とデバッグ情報をやり取りするデバッグホストからなっている。 In addition, semiconductor device vendors provide development support tools (also called emulators) such as an in-circuit emulator (ICE) and an on-board debugger for conducting software development and system evaluation of a set. The development support tool includes an emulation chip mounted on a set or a wiring board equivalent to the set, and a debug host that controls the emulation chip and exchanges debug information with the set developer.
半導体デバイスユーザは、エミュレーションチップを実装したセットやセット相当のプリント基板(以下、これを単にターゲットとよぶ)でソフトウエアを開発し、このソフトウエアをマスクROM化することでマスクROM品を入手し最終セットを量産する。 A semiconductor device user develops software on a set mounted with an emulation chip or a printed circuit board equivalent to the set (hereinafter simply referred to as a target), and obtains a mask ROM product by turning this software into a mask ROM. Mass-produce the final set.
しかしながらエミュレーションチップはシリーズ品のうち内蔵メモリサイズや周辺回路規模などが最大の品種をベースに作成もしくは兼用されることが多く、セット量産に適用されるマスクROM品種とは内蔵メモリサイズや周辺機能が必ずしも一致しないことがある。さらにエミュレーションチップのベースとなる品種もしくはエミュレーションチップを兼ねる品種は、シリーズのマスクROM品種と同時に開発されるのではなく先行して開発されることが多い。またこのエミュレーションチップのベースとなる品種は内蔵命令ROMがマスクROMではなく、セット先行生産の要求を満たすべくフラッシュメモリやEPROMとなっている場合がある。 However, emulation chips are often created or combined based on products with the largest built-in memory size and peripheral circuit scale among the series products, and the mask ROM types that are applied to set mass production are those with built-in memory size and peripheral functions. It may not always match. Furthermore, the type that is the base of the emulation chip or the type that also serves as the emulation chip is often developed in advance, not simultaneously with the series of mask ROM types. In addition, in the product type that is the base of this emulation chip, the built-in instruction ROM is not a mask ROM, but may be a flash memory or an EPROM to meet the requirements of set prior production.
すなわち、ターゲットと最終セットでは、そのソフトウエアを実行するマイコンの内蔵メモリサイズや周辺機能が必ずしも一致しないために、最終セットが正常動作しないことがある。 That is, the final set may not operate normally because the internal memory size and peripheral functions of the microcomputer executing the software do not always match between the target and the final set.
このような不具合を根本的に解消するには、内蔵メモリサイズや周辺機能の異なるマスクROM品種ごとにエミュレーションチップを作成しなくてはならず非常にコストがかかることになる。またエミュレーションチップはセットのソフトウエア開発に用いられることからマスクROM品種の開発に先立って作成されなくてはならず、ベンダでの工数が非常に増加することになる。 In order to solve such a problem fundamentally, it is necessary to create an emulation chip for each type of mask ROM having different built-in memory sizes and peripheral functions, which is very expensive. Also, since the emulation chip is used for software development of the set, it must be created prior to the development of the mask ROM type, which greatly increases the man-hours at the vendor.
上記のような事例の解決案として、内蔵周辺機能が異なるシリーズに対応する場合のエミュレータについては、特許文献1に開示されたものがある。この特許文献1で開示されている技術は、エミュレーションチップに品種識別レジスタを設けておき、エミュレータのパワーオンリセットのたびに品種識別レジスタに格納された品種コードに応じて周辺機能を選択的に活性化するものである。
しかしながら上記従来技術のように品種コードに応じて周辺機能を選択的に活性化したとしても、セット開発時に非活性な周辺機能に誤ってアクセスするソフトウエアが作成され、また該当品種コードのマスクROM品が入手できるまでにベース品種のフラッシュ品を先行生産に適用した場合、ベース品種で誤動作が発生する可能性がある。すなわち非活性な周辺機能に誤ってアクセスしたことを検知する手段がなく、ソフトウエア開発者に報知されないためにこのような問題が発生する。 However, even if peripheral functions are selectively activated according to the product code as in the prior art, software that erroneously accesses peripheral functions that are inactive during set development is created, and the mask ROM of the corresponding product code is created. If the flash product of the base product is applied to the pre-production before the product is available, malfunction may occur in the base product. That is, there is no means for detecting that an inactive peripheral function has been accessed by mistake, and this problem occurs because the software developer is not notified.
また上記従来技術ではROMやRAMなどのメモリサイズがベース品種にくらべマスクROMでは制限がある場合でも、同様な理由より制限されたメモリ領域への誤ったアクセスが検知されない問題がある。 Further, in the above prior art, there is a problem that erroneous access to the limited memory area is not detected for the same reason even when the memory size such as ROM and RAM is limited in the mask ROM compared to the base type.
さらに周辺機能がたとえば汎用シリアル回路でありシリアル資源がいくつか選択できるようになっているが、マスクROM化した際には適用セットが決定しているためにマスクROM品には回路簡素化のため専用シリアル回路を実装する場合には、この汎用シリアル回路全体を活性化するためにマスクROM品での制限が検出できない問題がある。 Furthermore, the peripheral function is, for example, a general-purpose serial circuit, and several serial resources can be selected. However, since the applicable set is determined when the mask ROM is used, the mask ROM product is designed to simplify the circuit. In the case of mounting a dedicated serial circuit, there is a problem that the restriction in the mask ROM product cannot be detected in order to activate the entire general-purpose serial circuit.
本発明の目的は、シリーズのベース品種を用いたエミュレーションチップを用い、ベース品種に比較しメモリサイズや周辺機能が制限されるマスクROM品用のソフトウエアを開発するエミュレータに関し、シリーズ品種のおのおのの半導体装置に対応するエミュレーションチップおよびデバッグ環境を早期かつ安価にデバッガユーザであるセット開発者に提供でき、さらには制限される資源への誤ったアクセスを検出することが可能となる半導体装置を提供することにある。 An object of the present invention relates to an emulator for developing software for a mask ROM product that uses an emulation chip using a base product of a series and whose memory size and peripheral functions are limited as compared to the base product. Provided is a semiconductor device capable of providing an emulation chip and a debugging environment corresponding to a semiconductor device to a set developer who is a debugger user at an early stage and at a low cost, and capable of detecting erroneous access to a limited resource. There is.
本発明の第1の半導体装置は、中央処理装置と複数の内部資源とを備え、複数のうちのいずれかの内部資源の領域および機能のいずれかもしくは両方にバリエーションをもつ複数品種からなるシリーズ品のうちの一の品種の半導体装置であって、外部のデバッグホストと通信するデバッグ情報入出力装置と、シリーズ品のうちの他の品種の品種情報を格納する品種情報格納領域とを設け、デバッグ情報入出力装置とデバッグホストとの接続時において品種情報格納領域に格納された品種情報に基づいて他の品種の動作を代行するようにしたことを特徴とする。 A first semiconductor device of the present invention includes a central processing unit and a plurality of internal resources, and is a series product composed of a plurality of products having variations in one or both of the area and function of any of the plurality of internal resources. A debug information input / output device that communicates with an external debug host, and a product information storage area that stores product information of other product types in the series product. When the information input / output device and the debug host are connected, the operation of another product is performed based on the product information stored in the product information storage area.
ここで、内部資源とは、半導体装置に内蔵されるメモリや周辺回路のことである。また、品種情報とは、各内部資源の有無もしくは有効アドレス範囲を表すものである。例えば、内蔵メモリであれば容量の違いにより、大容量品にくらべ、小容量品では上位にマッピングされた該当空間が無効になるので、このような無効空間/有効空間の情報が品種情報になる。 Here, the internal resource is a memory or a peripheral circuit built in the semiconductor device. The product type information represents the presence or absence of each internal resource or the effective address range. For example, in the case of a built-in memory, due to the difference in capacity, the corresponding space mapped at the upper level becomes invalid in a small-capacity product compared to a large-capacity product, so such invalid space / effective space information becomes product type information. .
また、第2の半導体装置は、第1の半導体装置において、デバッグ情報入出力装置とデバッグホストとの接続時において、デバッグ割込みにより起動され中央処理装置にて実行されるデバッグプログラムにより品種情報格納領域への品種情報の書き込みが行われることを特徴とする。 In addition, the second semiconductor device includes a product information storage area by a debug program that is activated by a debug interrupt and executed by the central processing unit when the debug information input / output device and the debug host are connected in the first semiconductor device. It is characterized in that the product information is written to the device.
また、第3の半導体装置は、第1の半導体装置において、デバッグ情報入出力装置とデバッグホストとの接続時において、起動直後に内蔵するシーケンサにより品種情報格納領域への品種情報の書き込みが行われることを特徴とする。 In the third semiconductor device, when the debug information input / output device and the debug host are connected to each other in the first semiconductor device, the product information is written into the product information storage area by a built-in sequencer immediately after startup. It is characterized by that.
また、第4の半導体装置は、第1〜第3の半導体装置において、他の品種は一の品種に比べていずれかの内部資源の領域が制限されており、デバッグ情報入出力装置とデバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し無視して動作することを特徴とする。 In addition, the fourth semiconductor device is the first to third semiconductor devices, and other types have limited internal resource areas compared to one type, and the debug information input / output device and the debug host. When a restricted internal resource is determined based on the product type information stored in the product type information storage area, and the central processing unit has access to write or read the restricted internal resource area This access is judged to be invalid access and is ignored.
また、第5の半導体装置は、第1〜第3の半導体装置において、他の品種は一の品種に比べていずれかの内部資源の領域が制限されており、デバッグ情報入出力装置とデバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、固定値の無効データを書き込みもしくは読み出すように動作することを特徴とする。 In addition, the fifth semiconductor device is the first to third semiconductor devices, and other types have limited internal resource areas compared to one type, and the debug information input / output device and the debug host. When a restricted internal resource is determined based on the product type information stored in the product type information storage area, and the central processing unit has access to write or read the restricted internal resource area This access is judged to be invalid access, and it operates to write or read fixed value invalid data.
また、第6の半導体装置は、第1〜第3の半導体装置において、他の品種は一の品種に比べていずれかの内部資源の領域が制限されており、デバッグ情報入出力装置とデバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、ランダムな無効データを書き込みもしくは読み出すように動作することを特徴とする。 In addition, the sixth semiconductor device is the first to third semiconductor devices, and the other resources are limited in the area of any internal resources as compared to the one product, and the debug information input / output device and the debug host. When a restricted internal resource is determined based on the product type information stored in the product type information storage area, and the central processing unit has access to write or read the restricted internal resource area This access is judged to be invalid access, and random invalid data is written or read.
また、第7の半導体装置は、第1〜第6の半導体装置において、他の品種は一の品種に比べていずれかの内部資源の領域が制限されており、デバッグ情報入出力装置とデバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、中央処理装置およびデバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作することを特徴とする。 Also, the seventh semiconductor device is the first to sixth semiconductor devices, and the other types have limited internal resource areas compared to the one type, and the debug information input / output device and the debug host When a restricted internal resource is determined based on the product type information stored in the product type information storage area, and the central processing unit has access to write or read the restricted internal resource area This access is determined to be invalid access, and operates to transmit invalid access detection information to one or both of the central processing unit and the debug information input / output device.
また、第8の半導体装置は、第1〜第7の半導体装置において、他の品種は一の品種に比べていずれかの内部資源の領域が制限されており、デバッグ情報入出力装置とデバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域を活性化するように中央処理装置から書き込みのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、中央処理装置およびデバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作することを特徴とする。 In addition, the eighth semiconductor device is the first to seventh semiconductor devices, and other types have limited internal resource areas compared to one type, and the debug information input / output device and the debug host When the connection is established, the restricted internal resource is determined based on the product information stored in the product information storage area, and the central processing unit has write access so as to activate the restricted internal resource region. If there is, it is determined that this access is an invalid access, and the operation is performed to transmit invalid access detection information to one or both of the central processing unit and the debug information input / output device.
本発明の第1の半導体装置によれば、外部のデバッグホストと通信するデバッグ情報入出力装置と、シリーズ品のうちの他の品種の品種情報を格納する品種情報格納領域とを設け、デバッグ情報入出力装置とデバッグホストとの接続時において品種情報格納領域に格納された品種情報に基づいて他の品種の動作を代行するようにしたことにより、シリーズ品種のおのおのの半導体装置に対応するエミュレーションチップおよびデバッグ環境を早期かつ安価にデバッガユーザであるセット開発者に提供可能である。 According to the first semiconductor device of the present invention, there is provided a debug information input / output device that communicates with an external debug host, and a product information storage area that stores product information of other products of the series, and includes debug information. Emulation chip corresponding to each semiconductor device of the series product type by performing the operation of other product types based on the product type information stored in the product type information storage area when connecting the I / O device and debug host In addition, it is possible to provide a debugging environment to a set developer who is a debugger user early and inexpensively.
本発明の第2の半導体装置によれば、デバッグホストとの接続時において、デバッグ割込みにより起動され中央処理装置にて実行されるデバッグプログラムにより品種情報格納領域への品種情報の書き込みが行われるので、デバッグホストから品種情報を送りこむことができ、多様なシリーズ品種に対応可能である。 According to the second semiconductor device of the present invention, when connecting to the debug host, the product information is written to the product information storage area by the debug program started by the debug interrupt and executed by the central processing unit. The product information can be sent from the debug host, and it can support various series products.
本発明の第3の半導体装置によれば、デバッグホストとの接続時において、起動直後に内蔵するシーケンサにより品種情報格納領域への品種情報の書き込みが行われるので、半導体装置上に品種情報格納領域とは別に設けられた不揮発性もしくは揮発性の情報格納領域に予め格納した品種情報をデバッグプログラムによらず書き込みを行うことができ、ユーザプログラム実行開始前からシリーズの他の品種の動作を代行することが可能である。 According to the third semiconductor device of the present invention, since the product information is written into the product information storage area by the built-in sequencer immediately after startup when connected to the debug host, the product information storage area on the semiconductor device. The product information stored in the nonvolatile or volatile information storage area provided separately can be written without using the debug program, and the operation of the other products in the series is performed before the start of the user program execution. It is possible.
本発明の第4の半導体装置によれば、デバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し無視して動作するので、シリーズの他の品種の動作を代行することができ、その品種でのユーザプログラムの振る舞いを再現することが可能である。 According to the fourth semiconductor device of the present invention, at the time of connection with the debug host, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is determined. When there is a write or read access from the central processing unit, this access is judged as invalid access and the operation is ignored, so that the operation of other products in the series can be performed on behalf of the user of that product type. It is possible to reproduce the behavior of the program.
本発明の第5の半導体装置によれば、デバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、固定値の無効データを書き込みもしくは読み出すように動作するので、シリーズの他の品種の動作を代行することができ、制限された内部資源へ誤ってアクセスするユーザプログラムの誤りを検出することが可能である。 According to the fifth semiconductor device of the present invention, at the time of connection with the debug host, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is determined. When there is a write or read access from the central processing unit to this, it is determined that this access is an invalid access, and it operates to write or read fixed-value invalid data. It is possible to detect errors in user programs that erroneously access restricted internal resources.
本発明の第6の半導体装置によれば、デバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、ランダムな無効データを書き込みもしくは読み出すように動作するので、シリーズの他の品種の動作を代行することができ、制限された内部資源へ誤ってアクセスするユーザプログラムの誤りを検出することが可能である。 According to the sixth semiconductor device of the present invention, at the time of connection with the debug host, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is determined. When there is a write or read access from the central processing unit, this access is judged to be invalid access, and random invalid data is written or read. It is possible to detect an error in a user program that erroneously accesses a limited internal resource.
本発明の第7の半導体装置によれば、デバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、中央処理装置およびデバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作するので、シリーズの他の品種の動作を代行することができ、制限された内部資源へ誤ってアクセスするユーザプログラムの誤りを検出することが可能である。 According to the seventh semiconductor device of the present invention, at the time of connection with the debug host, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is determined. When there is a write or read access from the central processing unit, this access is determined to be invalid access, and invalid access detection information is transmitted to one or both of the central processing unit and debug information input / output device. Since it operates, it is possible to perform operations of other varieties of the series, and it is possible to detect an error of a user program that erroneously accesses a limited internal resource.
本発明の第8の半導体装置によれば、デバッグホストとの接続時において、品種情報格納領域に格納された品種情報に基づいて制限された内部資源を判別し、この制限された内部資源の領域を活性化するように中央処理装置から書き込みのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、中央処理装置およびデバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作するので、シリーズの他の品種の動作を代行することができ、制限された内部資源を誤って活性化するユーザプログラムの誤りを検出することが可能である。 According to the eighth semiconductor device of the present invention, at the time of connection with the debug host, the restricted internal resource is determined based on the product information stored in the product information storage area, and the restricted internal resource area is determined. If there is a write access from the central processing unit so as to activate it, this access is judged as invalid access, and information on invalid access detection is transmitted to one or both of the central processing unit and debug information input / output device. Therefore, it is possible to perform the operations of other varieties of the series, and it is possible to detect an error of the user program that erroneously activates the limited internal resource.
(第1の実施形態)
本発明の第1の実施形態を図1〜5を用いて説明する。
(First embodiment)
A first embodiment of the present invention will be described with reference to FIGS.
図1は本発明の第1の実施形態のマイクロコントローラチップを示している。このマイクロコントローラチップ101は、シリーズのベース品種であり命令ROMとしてフラッシュメモリ(FlashROM103)を内蔵している。セット先行生産時などには内蔵フラッシュメモリ(103)にユーザプログラムを書き込み、最終セットに実装することが可能である。またこのマイクロコントローラチップ101はユーザプログラム開発のためのエミュレーションチップとして用いることも可能である。エミュレーションチップとして用いる場合には、セットもしくはセット相当の配線基板に実装されてデバッグホストと接続しデバッグ情報を入出力する。
FIG. 1 shows a microcontroller chip according to a first embodiment of the present invention. The
図2は図1に示したマイクロコントローラのベース品種とそのシリーズ展開品であるマスクROM品種AおよびBにおける、メモリサイズとそのアドレスアップ、周辺回路の有無と各々の制御レジスタのアドレスマップを示している。マスクROM品種AおよびBは命令ROMとしてマスクROMを内蔵しており、量産のおこなわれる最終セットに実装されるものである。 FIG. 2 shows the memory size, its address increase, the presence / absence of peripheral circuits, and the address map of each control register in the base type of the microcontroller shown in FIG. Yes. Mask ROM types A and B have a built-in mask ROM as an instruction ROM, and are mounted on a final set where mass production is performed.
図2に示すように、マスクROM品種Aはベース品種とメモリサイズ、周辺機能とそれらのアドレスマッピングが同一であるが、マスクROM品種Bは相違がある。すなわちマスクROM品種BはメモリサイズがROM,RAMとも半減しアドレスの若い側のみ有効領域であり、また周辺機能についても周辺回路Bが実装されていない。 As shown in FIG. 2, the mask ROM type A has the same base type, memory size, peripheral functions, and their address mapping, but the mask ROM type B differs. That is, the mask ROM type B has a memory size that is halved in both ROM and RAM, and is an effective area only on the younger address side, and no peripheral circuit B is mounted for peripheral functions.
図1に示すように、エミュレーションチップ兼用のベース品種のマイクロコントローラチップ101は、命令を実行することでチップ全体を制御するCPU102と、ユーザプログラムを格納しユーザプログラムの命令をCPU102に供給するFlashROM103と、CPU102とアクセス監視回路109によって制御され内部バス105を制御するバスコントローラ104と、内部バス105を介しCPU102からデータが入出力されるSRAM106と、内部に制御レジスタを備え内部バス105を介しCPU102から制御レジスタに値を設定されることで周辺機能の実行を制御される周辺回路A107および周辺回路B108と、バスコントローラ104を監視するアクセス監視回路109と、CPU102と接続しソフトウエアデバッグ時にデバッグ情報をデバッグホストに入出力するデバッグI/F110とを備える。
As shown in FIG. 1, a
アクセス監視回路109は、バスコントローラ104を介しマスクROM品種に応じた無効アドレス範囲データが書き込まれる無効アドレステーブル部111と、バスコントローラ104のアクセスしようとする対象アドレスと無効アドレステーブル部111に設定された無効アドレス範囲とを比較するアドレス比較部112とを備える。
The
アクセス監視回路109は、無効アドレステーブル部111に無効アドレス範囲データが書き込まれていない場合にはバスコントローラ104のアクセスを監視せずバスコントローラ104に作用せず、無効アドレス範囲データが書き込まれている場合にはバスコントローラ104のアクセスを監視する。
When the invalid address range data is not written in the invalid
アクセス監視回路109がバスコントローラ104のアクセスを監視し、アドレス比較部112での結果が、バスコントローラ104のアクセスしようとする対象アドレスが無効アドレス範囲外である場合、すなわち有効な領域へのアクセスであった場合にはこれを有効アクセスと判断しバスコントローラ104に作用せず、またバスコントローラ104のアクセスしようとする対象アドレスが無効アドレス範囲内である場合にはこれを無効アクセスと判定し、アクセスが書き込みの場合はこれを無視し対象アドレスへ書き込まないようバスコントローラ104に作用し、またアクセスが読み出しの場合には対象アドレスへの読み出しは行わずCPU102へは無効な読み出し値として固定値のall_0を返すようバスコントローラ104に作用する。
The
次にマイクロコントローラチップ101の動作を説明する。動作の一例としてマイクロコントローラチップ101のFlashROM103にユーザプログラムが書き込まれており、最終セットに実装されて最終セット上で動作している場合を図3のフロー図を用いて説明する。
Next, the operation of the
図3において、期間301はユーザプログラムの実行が開始されるまでの動作であり、マスクROMマイコンも同一の動作である。
In FIG. 3, a
期間302はユーザプログラムが周辺回路B108の制御レジスタのアドレスにwrite動作(書き込み動作)を行った場合であり、アクセス監視回路109には無効アドレス範囲データが書き込まれていないためアクセス監視をせず、このwrite動作は通常どおり実行されて周辺回路B108の制御レジスタに値が設定される。
A
期間303はユーザプログラムが内蔵SRAM106のアドレス0x00003000番地にread動作(読み出し動作)を行った場合であり、アクセス監視回路109には無効アドレス範囲データが書き込まれていないためアクセス監視をせず、このread動作は通常どおり実行されて内蔵SRAM106のアドレス0x00003000番地に格納されているデータがCPU102に返される。
マイクロコントローラチップ101の動作の次の例として、マイクロコントローラチップ101がエミュレーションチップとしてセットに実装されておりデバッグホストと接続されエミュレーションチップとして動作し、セット開発者がマスクROM品種A用のソフトウエア開発を行っている場合を図4のフロー図を用いて説明する。
As the next example of the operation of the
図4において、期間401はユーザプログラムの実行が開始されるまでの動作であり、マスクROMマイコンも同一の動作である。
In FIG. 4, a
期間402はユーザプログラム実行中にデバッグI/F110を通じデバッグホストからデバッグ割込みがかかっており、この期間において品種情報としてマスクROM品種Aの無効アドレス範囲データがデバッグホストよりデバッグI/F110およびCPU102を経由して送り込まれバスコントローラ104を介しアクセス監視回路109に書き込まれる。
During a
上記の品種情報とは、内部資源であるメモリや周辺回路の有無もしくは有効アドレス範囲を表すものである。例えば、内蔵メモリであれば容量の違いにより、大容量品にくらべ、小容量品では上位にマッピングされた該当空間が無効になるので、このような無効空間/有効空間の情報が品種情報になる。また、ROM品種Bのように、周辺回路Bが実装されていない場合では、この周辺回路Bのアドレスマッピングが無効という情報が品種情報になる。 The product type information represents the presence or absence of an internal resource such as a memory or a peripheral circuit, or an effective address range. For example, in the case of a built-in memory, due to the difference in capacity, the corresponding space mapped at the upper level becomes invalid in a small-capacity product compared to a large-capacity product, so such invalid space / effective space information becomes product type information. . Further, when the peripheral circuit B is not mounted as in the ROM type B, information that the address mapping of the peripheral circuit B is invalid becomes the type information.
ここでアクセス監視回路109は無効アドレス範囲データが書き込まれたので無効アドレステーブル部111にマスクROM品種Aの無効アドレス範囲が設定されバスコントローラ104の動作を監視する。
Here, since the invalid address range data is written, the
期間403はユーザプログラムが周辺回路B108の制御レジスタのアドレスにwrite動作を行った場合であり、アクセス監視回路109はアクセスを監視しているが、このwrite動作はマスクROM品種Aで有効なアドレスへのアクセスなのでアクセス監視回路109は有効アクセスと判断しバスコントローラ104に作用しないので、このwrite動作は通常どおり実行され周辺回路B108の制御レジスタに値が設定される。
The
期間404はユーザプログラムが内蔵SRAM106のアドレス0x00003000番地にread動作を行った場合であり、アクセス監視回路109はアクセスを監視しているが、このread動作はマスクROM品種Aで有効なアドレスへのアクセスなのでアクセス監視回路109は有効アクセスと判断しバスコントローラ104に作用しないので、このread動作は通常どおり実行され内蔵SRAM106のアドレス0x00003000番地に格納されているデータがCPU102に返される。
マイクロコントローラチップ101のエミュレーションチップ動作の次の例として、マイクロコントローラチップ101がエミュレーションチップとしてセットに実装されており、デバッグホストと接続され、セット開発者がマスクROM品種B用のソフトウエア開発を行っている場合を図5のフロー図を用いて説明する。
As the next example of the emulation chip operation of the
図5において、期間501はユーザプログラムの実行が開始されるまでの動作であり、マスクROMマイコンと同一の動作である。
In FIG. 5, a
期間502はユーザプログラム実行中にデバッグI/F110を通じデバッグホストからデバッグ割込みがかかっており、この期間において品種情報としてマスクROM品種Bの無効アドレス範囲データがデバッグホストよりデバッグI/F110およびCPU102を経由して送り込まれバスコントローラ104を介しアクセス監視回路109に書き込まれる。
During a
ここでアクセス監視回路109は無効アドレス範囲データが書き込まれたので無効アドレステーブル部111にマスクROM品種Bの無効アドレス範囲が設定されバスコントローラ104の動作を監視する。
Here, since the invalid address range data is written, the
期間503はユーザプログラムのデバッグが未完了なため誤って周辺回路B108の制御レジスタのアドレスにwrite動作を行った場合であり、アクセス監視回路109はアクセスを監視しており、このwrite動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路109は無効アクセスと判断しバスコントローラ104にwrite動作を実行しないように作用する。したがってこのwrite動作は無視され周辺回路B108の制御レジスタには値が設定されず初期状態のままとなる。
The
期間504はユーザプログラムのデバッグが未完了なため誤って内蔵SRAM106のアドレス0x00003000番地にread動作を行った場合であり、アクセス監視回路109はアクセスを監視しており、このread動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路109は無効アクセスと判断しバスコントローラ104にread動作を実行しないように作用する。したがってこのread動作は無視され内蔵SRAM106へはread動作が行われず、CPU102へは無効データが返される。
A
なお、有効アドレスへのアクセスの場合には、アクセス監視回路109は有効アクセスと判断しバスコントローラ104に作用せず、バスコントローラ104は通常どおり動作する。
In the case of accessing a valid address, the
以上のように動作することで、上記マイクロコントローラチップ101はベース品種としての動作をすることができ、エミュレーションチップとしてデバッグホストと接続している場合にはデバッグ割込みにより品種情報をアクセス監視回路109に設定することでマスクROM品種AもしくはBの機能を代行することができる。
By operating as described above, the
マスクROM品種Bの機能を代行している場合にはマスクROM品種Bと同じく無効アドレスへのwriteを無視し無効アドレスへのreadに対しては無効データを返すので、セットのソフトウエア開発者はマスクROM品種Bでのプログラムの振る舞いを知ることができ、量産セットにマスクROM品種を適用した際の不具合を事前に防止することが可能である。 If the function of the mask ROM type B is substituted, the write to the invalid address is ignored and the invalid data is returned for the read to the invalid address as with the mask ROM type B. It is possible to know the behavior of the program in the mask ROM type B, and it is possible to prevent in advance problems when the mask ROM type is applied to the mass production set.
なお上記の構成においては品種情報として無効アドレス範囲データをデバッグホストから転送するようにしたが、フラッシュメモリなどに不揮発に保持したり、チップ上に揮発的に品種情報を保持する手段を設けデバッグに先立ち品種情報を設定しておく構成としても同等の効果が得られる。 In the above configuration, invalid address range data is transferred from the debug host as product type information, but it is stored in a flash memory or the like in a non-volatile manner, or a means for holding product type information volatilely on the chip is provided for debugging. The same effect can be obtained even when the product information is set in advance.
また上記の構成においては品種により異なる無効アドレス範囲データを無効アドレステーブル部111に転送し格納するようにしたが、品番情報を転送し品番情報から無効アドレス範囲データをデコードする構成とすることも可能である。
In the above configuration, invalid address range data that varies depending on the product type is transferred and stored in the invalid
また上記の構成においては説明の簡略化のため、命令ROMおよびSRAMをそれぞれ1個ずつ、また周辺回路を2個搭載しているが、各要素が1つもしくは複数持つ構成や要素によっては搭載しない構成とすることも可能である。 In the above configuration, for simplicity of explanation, one instruction ROM and one SRAM and two peripheral circuits are mounted. However, depending on the configuration or elements each element has one or more, it is not mounted. A configuration is also possible.
また上記の構成においては無効データを固定値のall_0としたがその他の任意の固定値でも同等の効果が得られる。 In the above configuration, the invalid data is set to the fixed value all_0, but the same effect can be obtained with any other fixed value.
また上記の構成においては無効アクセスの際に対象アドレスへのread動作を行わないようにしたが、対象アドレスへのread動作を行いCPU102へは無効データを返す構成としてもよい。
Further, in the above configuration, the read operation to the target address is not performed at the time of invalid access, but the read operation to the target address may be performed and invalid data may be returned to the
また上記の構成においては無効アクセスの際に対象アドレスへのwrite動作を行わないようにしたが、対象アドレスへ固定値の無効データのwrite動作を行う構成としてもよい。 Further, in the above configuration, the write operation to the target address is not performed at the time of invalid access, but the configuration may be such that the write operation of fixed value invalid data to the target address is performed.
また上記の構成においてはユーザプログラムの実行開始後にデバッグホストからデバッグ割込みをかけて品種情報を転送しているが、ユーザプログラム実行前にデバッグホストよりデバッグ割込みをかけ品種情報を転送する構成にしてもよい。 In the above configuration, the product information is transferred from the debug host after the start of execution of the user program, but the product information is transferred from the debug host before execution of the user program. Good.
(第2の実施形態)
本発明の第2の実施形態を図6〜7を用いて説明する。
(Second Embodiment)
A second embodiment of the present invention will be described with reference to FIGS.
図6は本発明の第2の実施形態のマイクロコントローラチップを示している。このマイクロコントローラチップ601は、マイクロコントローラチップ101同様、シリーズのベース品種であり命令ROMとしてフラッシュメモリ(FlashROM603)を内蔵し、最終セットに実装することが可能であるとともに、ユーザプログラム開発のためのエミュレーションチップとして用いることも可能である。
FIG. 6 shows a microcontroller chip according to a second embodiment of the present invention. Like the
図6に示すように、エミュレーションチップ兼用のベース品種のマイクロコントローラチップ601は、バスコントローラ104の動作を監視するアクセス監視回路602と、ユーザプログラムを格納するユーザROM領域604とマスクROM品種の無効アドレス範囲データを格納する品種データ領域605を備えユーザプログラムの命令をCPU608に供給するFlashROM603と、FlashROM603の品種データ領域605に格納されている無効アドレス範囲データをアクセス監視回路602に自動転送するシーケンサ606と、デバッグホストとの接続状況をシーケンサ606に伝達し、CPU608と接続しソフトウエアデバッグ時にデバッグ情報をデバッグホストに入出力するデバッグI/F607と、シーケンサ606によりプログラムカウンタのカウント開始抑制を制御され、命令を実行することでチップ全体を制御するCPU608と、そのほかにマイクロコントローラチップ101と同様の構成要素(105、106、107、108)とを備える。
As shown in FIG. 6, the
シーケンサ606は、マイクロコントローラチップ601がデバッグホストに接続されている場合に起動し、ユーザプログラム実行開始までにFlashROM603の品種データ領域605に格納されている無効アドレス範囲データをアクセス監視回路602に転送する。
The
アクセス監視回路602は、シーケンサ606により内部バス105を介しマスクROM品種に応じた無効アドレス範囲が書き込まれる無効アドレステーブル部609と、バスコントローラ104のアクセスしようとするアドレスと無効アドレステーブル部609に設定された無効アドレス範囲と比較するアドレス比較部610とを備える。
The
アクセス監視回路602は、無効アドレステーブル部609に無効アドレス範囲データが書き込まれていない場合にはバスコントローラ104のアクセスを監視せずバスコントローラ104に作用せず、無効アドレス範囲データが書き込まれている場合にはバスコントローラ104のアクセスを監視する。
When the invalid address range data is not written in the invalid
アクセス監視回路602がバスコントローラ104のアクセスを監視し、アドレス比較部610での結果が、バスコントローラ104のアクセスしようとするアドレスが無効アドレス範囲外である場合、すなわち有効な領域へのアクセスであった場合にはこれを有効アクセスと判断しバスコントローラ104に作用せず、またバスコントローラ104のアクセスしようとするアドレスが無効アドレス範囲内である場合にはこれを無効アクセスと判定し、無効アドレスへの書き込みの場合はこれを無視し対象アドレスへ書き込まないようバスコントローラ104に作用し、また無効アドレスの読み出しの場合には対象アドレスへの読み出しは行わずCPU608へは無効な読み出し値として固定値のall_0を返すようバスコントローラ104に作用する。
The
次にマイクロコントローラチップ601の動作を説明する。マイクロコントローラチップ601のFlashROM603にユーザプログラムが書き込まれており、最終セットに実装されて最終セット上で動作している場合については、マイクロコントローラチップ101と同様である。
Next, the operation of the
マイクロコントローラチップ601のエミュレーションチップ動作の例として、マイクロコントローラチップ601がエミュレーションチップとしてセットに実装されており、デバッグホストと接続され、セット開発者が図2に示したマスクROM品種B用のソフトウエア開発を行っている場合を図7のフロー図を用いて説明する。なお、セットデバッグに先立ちFlashROM603の品種データ領域605にはマスクROM品種Bの品種情報がROMライタなどで書き込まれており、品種情報は不揮発に保持されている。
As an example of the emulation chip operation of the
図7において、期間701はユーザプログラムの実行が開始されるまでの動作であり、マイクロコントローラチップ601がデバッグホストと接続されていることがデバッグI/F607により検出されるため内部リセット解除直後にシーケンサ606が起動する。
In FIG. 7, a
期間702では、シーケンサ606の起動によりシーケンサ606は、CPU608のプログラムカウンタのカウント開始を抑制し、プログラムカウント抑制中にFlashROM603の品種データ領域605に格納されているマスクROM品種Bの無効アドレス範囲データを内部バス105を介し転送しアクセス監視回路602に書き込む。アクセス監視回路602は無効アドレス範囲データが書き込まれたのでマスクROM品種Bに応じた無効アドレス範囲が無効アドレステーブル部609に設定され、バスコントローラ104の動作を監視する。アクセス監視回路602への無効アドレス範囲データの転送が完了するとシーケンサ606はCPU608のプログラムカウンタのカウント開始抑制を解除するので、CPU608はユーザプログラムの実行を開始する。
In the
期間703はユーザプログラムのデバッグが未完了なため誤って周辺回路B108の制御レジスタのアドレスにwrite動作を行った場合であり、アクセス監視回路602はアクセスを監視しており、このwrite動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路602は無効アクセスと判断しバスコントローラ104にwrite動作を実行しないように作用する。したがってこのwrite動作は無視され周辺回路B108の制御レジスタには値が設定されず初期状態のままとなる。
The
期間704はユーザプログラムのデバッグが未完了なため誤って内蔵SRAM106のアドレス0x00003000番地にread動作を行った場合であり、アクセス監視回路602はアクセスを監視しており、このread動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路602は無効アクセスと判断しバスコントローラ104にread動作を実行しないように作用する。したがってこのread動作は無視され内蔵SRAM106へはread動作が行われず、CPU608へは無効データを返す。
The
なお、有効アドレスへのアクセスの場合には、アクセス監視回路602は有効アクセスと判断しバスコントローラ104に作用せずバスコントローラ104は通常どおり動作する。
In the case of accessing a valid address, the
以上のように動作することで、上記マイクロコントローラチップ601はベース品種としての動作をすることができ、エミュレーションチップとしてデバッグホストと接続している場合にはユーザプログラム実行前に自動で品種情報を設定するのでマスクROM品種AもしくはBの機能を代行することができる。
By operating as described above, the
マスクROM品種Bの機能を代行している場合にはマスクROM品種Bと同じく無効アドレスへのwriteを無視し無効アドレスへのreadに対しては無効データを返すので、セットのソフトウエア開発者はマスクROM品種Bでのプログラムの振る舞いを知ることができ、量産セットにマスクROM品種を適用した際の不具合を事前に防止することが可能である。 If the function of the mask ROM type B is substituted, the write to the invalid address is ignored and the invalid data is returned for the read to the invalid address as with the mask ROM type B. It is possible to know the behavior of the program in the mask ROM type B, and it is possible to prevent in advance problems when the mask ROM type is applied to the mass production set.
なお上記の構成においては品種情報をフラッシュメモリに不揮発に保持する構成としたが、揮発的に品種情報を保持する手段を備えシーケンサ606の起動前にデバッグホストから直接品種情報をこの保持手段に設定するようにしても同等の効果が得られる。
In the above configuration, the product information is stored in the flash memory in a nonvolatile manner. However, the product information is volatilely stored, and the product information is directly set from the debug host before the
また上記の構成においては品種により異なる無効アドレス範囲データを無効アドレステーブル部609に転送し格納するようにしたが、品番情報を転送し品番情報から無効アドレス範囲データをデコードする構成とすることも可能である。
In the above configuration, invalid address range data that differs depending on the product type is transferred and stored in the invalid
また上記の構成においては説明の簡略化のため、命令ROMおよびSRAMをそれぞれ1個ずつ、また周辺回路を2個搭載しているが、各要素が1つもしくは複数持つ構成や要素によっては搭載しない構成とすることも可能である。 In the above configuration, for simplicity of explanation, one instruction ROM and one SRAM and two peripheral circuits are mounted. However, depending on the configuration or elements each element has one or more, it is not mounted. A configuration is also possible.
また上記の構成においては無効データを固定値のall_0としたがその他の任意の固定値でも同等の効果が得られる。 In the above configuration, the invalid data is set to the fixed value all_0, but the same effect can be obtained with any other fixed value.
また上記の構成においては無効アクセスの際に対象アドレスへのread動作を行わないようにしたが、対象アドレスへのread動作を行いCPU608へは無効データを返す構成としてもよい。
In the above configuration, the read operation to the target address is not performed at the time of invalid access. However, the read operation to the target address may be performed and invalid data may be returned to the
また上記の構成においては無効アクセスの際に対象アドレスへのwrite動作を行わないようにしたが、対象アドレスへ固定値の無効データのwrite動作を行う構成としてもよい。 Further, in the above configuration, the write operation to the target address is not performed at the time of invalid access, but the configuration may be such that the write operation of fixed value invalid data to the target address is performed.
また上記の構成においてはデバッグホスト接続時の内部リセット解除後にシーケンサ606を起動しているが、デバッグホスト接続時の内部リセット解除前に内部リセットとは無関係にシーケンサ606を起動する構成にしてもよい。
In the above configuration, the
(第3の実施形態)
本発明の第3の実施形態を図8〜9を用いて説明する。
(Third embodiment)
A third embodiment of the present invention will be described with reference to FIGS.
図8は本発明の第3の実施形態のマイクロコントローラチップを示している。このマイクロコントローラチップ801は、マイクロコントローラチップ101同様、シリーズのベース品種であり命令ROMとしてフラッシュメモリ(FlashROM103)を内蔵し、最終セットに実装することが可能であるとともに、ユーザプログラム開発のためのエミュレーションチップとして用いることも可能である。
FIG. 8 shows a microcontroller chip according to a third embodiment of the present invention. Like the
図8に示すように、エミュレーションチップ兼用のベース品種のマイクロコントローラチップ801は、CPU102とアクセス監視回路803によって制御され内部バス105を制御するバスコントローラ802と、乱数発生器804を持ちバスコントローラ802の動作を監視するアクセス監視回路803と、そのほかにマイクロコントローラチップ101と同様の構成要素(102、103、105、106、107、108、110)とを備える。
As shown in FIG. 8, a
アクセス監視回路803は、乱数発生器804と、内部バス105を介しマスクROM品種に応じた無効アドレス範囲データが書き込まれる無効アドレステーブル部805と、バスコントローラ802のアクセスしようとするアドレスと無効アドレステーブル部805に設定された無効アドレス範囲とを比較するアドレス比較部806とを備える。
The
アクセス監視回路803は、無効アドレステーブル部805に無効アドレス範囲データが書き込まれていない場合にはバスコントローラ802のアクセスを監視せずバスコントローラ802に作用せず、無効アドレス範囲データが書き込まれている場合にはバスコントローラ802のアクセスを監視する。
When the invalid address range data is not written in the invalid
アクセス監視回路803がバスコントローラ802のアクセスを監視し、アドレス比較部806での結果が、バスコントローラ802のアクセスしようとするアドレスが無効アドレス範囲外である場合、すなわち有効な領域へのアクセスであった場合にはこれを有効アクセスと判断しバスコントローラ802に作用せず、またバスコントローラ802のアクセスしようとするアドレスが無効アドレス範囲内である場合にはこれを無効アクセスと判定し、無効アドレスへの書き込みの場合はこれを無視し対象アドレスへ書き込まないようバスコントローラ802に作用し、また無効アドレスの読み出しの場合には対象アドレスへの読み出しは行わず無効な読み出し値として内蔵する乱数発生器804が都度発生するランダムな値をCPU102へ返すようバスコントローラ802に作用する。
The
次にマイクロコントローラチップ801の動作を説明する。マイクロコントローラチップ801の内蔵フラッシュメモリにユーザプログラムが書き込まれており、最終セットに実装されて最終セット上で動作している場合については、マイクロコントローラチップ101と同様である。
Next, the operation of the
マイクロコントローラチップ801のエミュレーションチップ動作の例として、マイクロコントローラチップ801がエミュレーションチップとしてセットに実装されており、デバッグホストと接続され、セット開発者が図2に示したマスクROM品種B用のソフトウエア開発を行っている場合を図9のフロー図を用いて説明する。
As an example of the emulation chip operation of the
図9において、期間901はユーザプログラムの実行が開始されるまでの動作であり、マスクROMマイコンと同一の動作である。
In FIG. 9, a
期間902はユーザプログラム実行中にデバッグI/F110を通じデバッグホストからデバッグ割込みがかかっており、この期間において品種情報としてマスクROM品種Bの無効アドレス範囲データがデバッグホストよりデバッグI/F110およびCPU102を経由して送り込まれバスコントローラ802を介しアクセス監視回路803に書き込まれる。アクセス監視回路803は無効アドレス範囲データが書き込まれたのでマスクROM品種Bに応じた無効アドレス範囲が無効アドレステーブル部805に設定され、バスコントローラ802の動作を監視する。
During a
期間903はユーザプログラムのデバッグが未完了なため誤って周辺回路B108の制御レジスタのアドレスにwrite動作を行った場合であり、アクセス監視回路803はアクセスを監視しており、このwrite動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路803は無効アクセスと判断しバスコントローラ802にwrite動作を実行しないように作用する。したがってこのwrite動作は無視され周辺回路B108の制御レジスタには値が設定されず初期状態のままとなる。
A
期間904はユーザプログラムのデバッグが未完了なため誤って内蔵SRAM106のアドレス0x00003000番地にread動作を行った場合であり、アクセス監視回路803はアクセスを監視しており、このread動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路803は無効アクセスと判断しバスコントローラ802にread動作を実行しないように作用する。したがって内蔵SRAM106へはread動作が行われず、CPU102へは乱数発生器804の生成するランダム値が無効データとして転送される。
A
なお、有効アドレスへのアクセスの場合には、アクセス監視回路803は有効アクセスと判断しバスコントローラ802に作用せず、バスコントローラ802は通常どおり動作する。
In the case of accessing a valid address, the
以上のように動作することで、上記マイクロコントローラチップ801はベース品種としての動作をすることができ、エミュレーションチップとしてデバッグホストと接続している場合にはデバッグ割込みにより品種情報を転送することでマスクROM品種AもしくはBの機能を代行することができる。
By operating as described above, the
マスクROM品種Bの機能を代行している場合にはマスクROM品種Bと同じく無効アドレスへのwriteを無視し無効アドレスへのreadに対しては無効データとしてランダム値を返すので、セットのソフトウエア開発者はマスクROM品種Bでのプログラムの振る舞いを知ることができ、また無効なread動作をした場合には第1、第2の実施形態とは異なり対象アドレスからはランダム値が読み出されるように動作するのでプログラムミスを発見しやすくなり、量産セットにマスクROM品種を適用した際の不具合を事前に防止することが可能である。 If the function of the mask ROM type B is substituted, the write to the invalid address is ignored as in the mask ROM type B, and a random value is returned as invalid data for the read to the invalid address. The developer can know the behavior of the program in the mask ROM type B, and when an invalid read operation is performed, a random value is read from the target address unlike the first and second embodiments. Since it operates, it becomes easy to find a program error, and it is possible to prevent in advance problems when a mask ROM type is applied to a mass production set.
なお上記の構成においては品種情報として無効アドレス範囲データをデバッグホストから転送するようにしたが、フラッシュメモリなどに不揮発に保持したり、チップ上に揮発的に品種情報を保持する手段を設けデバッグに先立ち品種情報を設定しておく構成としても同等の効果が得られる。 In the above configuration, invalid address range data is transferred from the debug host as product type information, but it is stored in a flash memory or the like in a non-volatile manner, or a means for holding product type information volatilely on the chip is provided for debugging. The same effect can be obtained even when the product information is set in advance.
また上記の構成においては品種により異なる無効アドレス範囲データを無効アドレステーブル部805に転送し格納するようにしたが、品番情報を転送し品番情報から無効アドレス範囲データをデコードする構成とすることも可能である。
In the above configuration, invalid address range data that differs depending on the product type is transferred to and stored in the invalid
また上記の構成においては説明の簡略化のため、命令ROMおよびSRAMをそれぞれ1個ずつ、また周辺回路を2個搭載しているが、各要素が1つもしくは複数持つ構成や要素によっては搭載しない構成とすることも可能である。 In the above configuration, for simplicity of explanation, one instruction ROM and one SRAM and two peripheral circuits are mounted. However, depending on the configuration or elements each element has one or more, it is not mounted. A configuration is also possible.
また上記の構成においては無効アクセスの際に対象アドレスへのread動作を行わないようにしたが、対象アドレスへのread動作を行いCPU102へは無効データを返す構成としてもよい。
Further, in the above configuration, the read operation to the target address is not performed at the time of invalid access, but the read operation to the target address may be performed and invalid data may be returned to the
また上記の構成においては無効アクセスのwrite動作についてはwrite動作を無視するよう構成したが、乱数発生器804の生成するランダム値を書き込むよう構成してもよい。
In the above configuration, the write operation is ignored for the invalid access write operation, but the random value generated by the
また上記の構成においてはユーザプログラムの実行開始後にデバッグホストからデバッグ割込みをかけて品種情報を転送しているが、ユーザプログラム実行前にデバッグホストよりデバッグ割込みをかけ品種情報を転送する構成にしてもよい。 In the above configuration, the product information is transferred from the debug host after the start of execution of the user program, but the product information is transferred from the debug host before execution of the user program. Good.
また上記の構成においては品種情報の転送のためデバッグホストよりデバッグ割込みをかける構成としたが、第2の実施形態のごとくシーケンサを備える構成としてもよい。 In the above configuration, a debug interrupt is issued from the debug host for transferring the product type information. However, as in the second embodiment, a sequencer may be provided.
(第4の実施形態)
本発明の第4の実施形態を図10〜11を用いて説明する。
(Fourth embodiment)
A fourth embodiment of the present invention will be described with reference to FIGS.
図10は本発明の第4の実施形態のマイクロコントローラチップを示している。このマイクロコントローラチップ1001は、マイクロコントローラチップ101同様、シリーズのベース品種であり命令ROMとしてフラッシュメモリ(FlashROM103)を内蔵し、最終セットに実装することが可能であるとともに、ユーザプログラム開発のためのエミュレーションチップとして用いることも可能である。
FIG. 10 shows a microcontroller chip according to a fourth embodiment of the present invention. Like the
図10に示すように、エミュレーションチップ兼用のベース品種のマイクロコントローラチップ1001は、命令を実行することでチップ全体を制御するCPU1002と、バスコントローラ1006の動作を監視し無効アクセスのあった際にはCPU1002に無効アクセス検出割込みをかけるアクセス監視回路1003と、CPU1002によって制御され内部バス105を制御するバスコントローラ1006と、そのほかにマイクロコントローラチップ101と同様の構成要素(103、105、106、107、108、110)とを備える。
As shown in FIG. 10, the
アクセス監視回路1003は、バスコントローラ1006を介しマスクROM品種に応じた無効アドレス範囲データが書き込まれる無効アドレステーブル部1004と、バスコントローラ1006のアクセスしようとする対象アドレスと無効アドレステーブル部1004に設定された無効アドレス範囲とを比較するアドレス比較部1005とを備える。
The
アクセス監視回路1003は、無効アドレステーブル部1004に無効アドレス範囲データが書き込まれていない場合にはバスコントローラ1006のアクセスを監視せずCPU1002に作用せず、無効アドレス範囲データが書き込まれている場合にはバスコントローラ1006のアクセスを監視する。
The
アクセス監視回路1003がバスコントローラ1006を監視し、アドレス比較部1005での結果が、バスコントローラ1006のアクセスしようとする対象アドレスが無効アドレス範囲外である場合、すなわち有効な領域へのアクセスであった場合にはこれを有効アクセスと判断しCPU1002に作用せず、またバスコントローラ1006のアクセスしようとする対象アドレスが無効アドレス範囲内である場合にはこれを無効アクセスと判定し、CPU1002へは無効アクセス検出割込みをかけるように作用する。
The
次にマイクロコントローラチップ1001の動作を説明する。マイクロコントローラチップ1001のFlashROM103にユーザプログラムが書き込まれており、最終セットに実装されて最終セット上で動作している場合については、マイクロコントローラチップ101と同様である。
Next, the operation of the
マイクロコントローラチップ1001のエミュレーションチップ動作の例として、マイクロコントローラチップ1001がエミュレーションチップとしてセットに実装されており、デバッグホストと接続され、セット開発者が図2に示したマスクROM品種B用のソフトウエア開発を行っている場合を図11のフロー図を用いて説明する。
As an example of the emulation chip operation of the
図11において、期間1101はユーザプログラムの実行が開始されるまでの動作であり、マスクROMマイコンと同一の動作である。
In FIG. 11, a
期間1102はユーザプログラム実行中にデバッグI/F110を通じデバッグホストからデバッグ割込みがかかっており、この期間において品種情報としてマスクROM品種Bの無効アドレス範囲データがデバッグホストよりデバッグI/F110およびCPU1002を経由して送り込まれバスコントローラ1006を介しアクセス監視回路1003に書き込まれる。アクセス監視回路1003は無効アドレス範囲データが書き込まれたのでマスクROM品種Bに応じた無効アドレス範囲が無効アドレステーブル部1004に設定され、バスコントローラ1006の動作を監視する。
During the
期間1103はユーザプログラムのデバッグが未完了なため誤って周辺回路B108の制御レジスタのアドレスにwrite動作を行った場合であり、アクセス監視回路1003はアクセスを監視しており、このwrite動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路1003は無効アクセスと判断しCPU1002へ割込みをかけるように作用する。CPU1002は割込みがかかったため、デバッグI/F110を通じデバッグホストに無効アクセスの検出を通知する。
The
期間1104はユーザプログラムのデバッグが未完了なため誤って内蔵SRAM106のアドレス0x00003000番地にread動作を行った場合であり、アクセス監視回路1003はアクセスを監視しており、このread動作がマスクROM品種Bには実装されていない無効アドレスへのアクセスなのでアクセス監視回路1003は無効アクセスと判断しCPU1002へ割込みをかけるように作用する。CPU1002は割込みがかかったため、デバッグI/F110を通じデバッグホストに無効アクセスの検出を通知する。
The
なお、有効アドレスへのアクセスの場合には、アクセス監視回路1003は有効アクセスと判断しCPU1002に作用せず、CPU1002とデバッグI/F110は通常どおり動作する。
In the case of accessing a valid address, the
以上のように動作することで、上記マイクロコントローラチップ1001はベース品種としての動作をすることができ、エミュレーションチップとしてデバッグホストと接続している場合にはデバッグ割込みにより品種情報を転送することでマスクROM品種AもしくはBの機能を代行することができる。
By operating as described above, the
マスクROM品種Bの機能を代行している場合にはマスクROM品種Bと同じく無効アドレスへのwriteとreadに対しては、CPU1002へ割込みを発生するので無効アクセスの検出を通知でき、セットのソフトウエア開発者はマスクROM品種Bでのプログラムの不具合を早期に検出でき、量産セットにマスクROM品種を適用した際の不具合を事前に防止することが可能である。
When the function of the mask ROM type B is substituted, the write to and read from the invalid address is interrupted to the
なお上記の構成においては品種情報として無効アドレス範囲データをデバッグホストから転送するようにしたが、フラッシュメモリなどに不揮発に保持したり、チップ上に揮発的に品種情報を保持する手段を設けデバッグに先立ち品種情報を設定しておく構成としても同等の効果が得られる。 In the above configuration, invalid address range data is transferred from the debug host as product type information, but it is stored in a flash memory or the like in a non-volatile manner, or a means for holding product type information volatilely on the chip is provided for debugging. The same effect can be obtained even when the product information is set in advance.
また上記の構成においては品種により異なる無効アドレス範囲データを無効アドレステーブル部1004に転送し格納するようにしたが、品番情報を転送し品番情報から無効アドレス範囲データをデコードする構成とすることも可能である。
In the above configuration, invalid address range data that differs depending on the product type is transferred and stored in the invalid
また上記の構成においては説明の簡略化のため、命令ROMおよびSRAMをそれぞれ1個ずつ、また周辺回路を2個搭載しているが、各要素が1つもしくは複数持つ構成や要素によっては搭載しない構成とすることも可能である。 In the above configuration, for simplicity of explanation, one instruction ROM and one SRAM and two peripheral circuits are mounted. However, depending on the configuration or elements each element has one or more, it is not mounted. A configuration is also possible.
また上記の構成においては無効アドレスへのreadの際にCPU1002に割込みをかける構成としたが、割込み発生に加え対象アドレスへのread動作を行わないようにしたりもしくは対象アドレスへのread動作を行う構成としてもよい。
In the above configuration, the
また上記の構成においては無効アドレスへのwriteの際にCPU1002に割込みをかける構成としたが、割込み発生に加えwrite動作も行ったりwrite動作を無視したり第3の実施形態のごとく乱数発生器を備えておきランダム値を書き込むよう構成してもよい。
In the above configuration, the
また上記の構成においてはユーザプログラムの実行開始後にデバッグホストからデバッグ割込みをかけて品種情報を転送しているが、ユーザプログラム実行前にデバッグホストよりデバッグ割込みをかけ品種情報を転送する構成にしてもよい。 In the above configuration, the product information is transferred from the debug host after the start of execution of the user program, but the product information is transferred from the debug host before execution of the user program. Good.
また上記の構成においては品種情報の転送のためデバッグホストよりデバッグ割込みをかける構成としたが、第2の実施形態のごとくシーケンサを備える構成としてもよい。
また上記の構成では無効アクセス検出の際にCPU1002に割込みをかけCPU1002からデバッグI/F110に無効アクセスの検出を通知する構成としたが、無効アクセスの際にアクセス監視回路1003からデバッグI/F110に直接無効アクセスの検出を通知する構成としてもよい。
In the above configuration, a debug interrupt is issued from the debug host for transferring the product type information. However, as in the second embodiment, a sequencer may be provided.
In the above configuration, the
(第5の実施形態)
本発明の第5の実施形態を図12〜18を用いて説明する。
(Fifth embodiment)
A fifth embodiment of the present invention will be described with reference to FIGS.
図12は本発明の第5の実施形態のマイクロコントローラチップを示している。このマイクロコントローラチップ1201は、マイクロコントローラチップ101同様、シリーズのベース品種であり命令ROMとしてフラッシュメモリ(FlashROM103)を内蔵し、最終セットに実装することが可能であるとともに、ユーザプログラム開発のためのエミュレーションチップとして用いることも可能である。
FIG. 12 shows a microcontroller chip according to a fifth embodiment of the present invention. Like the
図12に示すように、エミュレーションチップ兼用のベース品種のマイクロコントローラチップ1201は、命令を実行することでチップ全体を制御するCPU1202と、内部に制御レジスタ1204と資源無効化レジスタ1205を備え内部バス105を介し制御レジスタ1204および資源無効化レジスタ1205に値を設定されることで制御される周辺回路A1203と、内部に制御レジスタ1207と資源無効化レジスタ1208を備え内部バス105を介し制御レジスタ1207および資源無効化レジスタ1208に値を設定されることで制御される周辺回路C1206と、CPU1202によって制御され内部バス105を制御するバスコントローラ1209と、そのほかにマイクロコントローラチップ101と同様の構成要素(103、105、106、110)とを備える。
As shown in FIG. 12, the
周辺回路A1203の資源無効化レジスタ1205は、初期値が0であり、資源無効化レジスタ1205の値が0のときは制御レジスタ1204に作用せず周辺回路A1203の資源を無効化せず周辺回路A1203へのバスアクセスを監視しないが、デバッグホスト接続時に資源無効化レジスタ1205に0以外の値が書き込まれると値に応じ制御レジスタ1204に作用し周辺回路A1203の資源の一部もしくは全てを無効化するとともに周辺回路A1203へのバスアクセスを監視する。
The
周辺回路A1203へのバスアクセスを監視している際に、周辺回路A1203の資源無効化レジスタ1205の設定に反して資源を有効化するようなバスアクセスがあった場合には無効アクセスと判断し、CPU1202へ無効アクセス検出割込みをかけるように作用する。
While monitoring the bus access to the
周辺回路C1206についても周辺回路A1203と同様である。 The peripheral circuit C1206 is similar to the peripheral circuit A1203.
図13は図12に示したマイクロコントローラのベース品種とそのシリーズ展開品であるマスクROM品種AおよびCにおける、メモリサイズと周辺回路の差異を示している。このマスクROM品種AおよびCは命令ROMとしてマスクROMを内蔵しており、量産のおこなわれる最終セットに実装されるものである。 FIG. 13 shows the difference in memory size and peripheral circuit between the base type of the microcontroller shown in FIG. 12 and the mask ROM types A and C which are the series development products. The mask ROM types A and C have a built-in mask ROM as an instruction ROM, and are mounted on a final set where mass production is performed.
図13に示すように、ベース品種はエミュレーションチップを兼ねており、マスクROM品種と比較し各周辺回路ごとに資源無効化レジスタを備えている。マスクROM品種Aはベース品種と比較し資源無効化レジスタを備えないこと以外はメモリサイズ、周辺機能が同一である。マスクROM品種Cはベース品種と比較し資源無効化レジスタを備えないこと以外にもメモリサイズ、周辺機能に相違がある。すなわちマスクROM品種CにおいてはメモリサイズがROM,RAMとも半減し、また周辺機能についても周辺回路Cの一部が実装されていない。 As shown in FIG. 13, the base type also serves as an emulation chip, and has a resource invalidation register for each peripheral circuit as compared with the mask ROM type. The mask ROM type A has the same memory size and peripheral functions as the base type, except that it does not have a resource invalidation register. The mask ROM type C is different from the base type in that it does not have a resource invalidation register, but has a difference in memory size and peripheral functions. That is, in the mask ROM type C, the memory size is reduced by half for both ROM and RAM, and a part of the peripheral circuit C is not mounted for peripheral functions.
周辺回路Cは、ベース品種およびマスクROM品種AにおいてはUARTとクロック同期シリアル機能のいずれかが制御レジスタのプロトコル選択ビットで選択可能な汎用シリアルであるが、マスクROM品種Cではクロック同期専用の回路構成となっている。すなわちマスクROM品種Cの周辺回路CではUARTが無効な資源となる。 The peripheral circuit C is a general-purpose serial in which either the UART or the clock synchronous serial function can be selected by the protocol selection bit of the control register in the base type and the mask ROM type A. It has a configuration. That is, the UART becomes an invalid resource in the peripheral circuit C of the mask ROM type C.
図14にベース品種およびマスクROM品種Aに実装されている周辺回路Cの制御レジスタを示す。この制御レジスタ1401はプロトコル選択ビット1402を備え、プロトコル選択ビット1402は初期値としてクロック同期シリアルを選択し、書換えが可能である。
FIG. 14 shows a control register of the peripheral circuit C mounted on the base type and the mask ROM type A. The
図15にマスクROM品種Cに実装されている周辺回路Cの制御レジスタを示す。この制御レジスタ1501はプロトコル選択ビット1502を備えるが、プロトコル選択ビット1502は初期値が固定でクロック同期シリアルを選択し、書換えできない。なお、マスクROM品種Cにおいてプロトコル選択ビット1502を書換えるアクセスがあった場合には、プロトコル選択ビット1502はこのアクセスを無視する。
FIG. 15 shows a control register of the peripheral circuit C mounted on the mask ROM type C. The
図16にベース品種とマスクROM品種AとマスクROM品種Cの、おのおのの周辺回路Cの動作をしめす。 FIG. 16 shows the operation of each peripheral circuit C of the base type, the mask ROM type A, and the mask ROM type C.
図16に示すようにベース品種とマスクROM品種Aにおいて、プロトコル選択ビット1502の初期値は0でありプロトコルとしてクロック同期シリアルを選択しているが、プロトコル選択ビット1502の値を1に書換えるアクセスがあった場合には、プロトコル選択ビット1502は1に書換えられプロトコルとしてUARTを選択する。
As shown in FIG. 16, in the base type and the mask ROM type A, the initial value of the
また図16に示すようにマスクROM品種Cにおいて、プロトコル選択ビット1502の初期値は0でありプロトコルとしてクロック同期シリアルを選択しているが、プロトコル選択ビット1502の値を1に書換えるアクセスがあった場合には、プロトコル選択ビット1502はこのアクセスを無視して0を保持しプロトコルとしてクロック同期シリアルを選択する。
As shown in FIG. 16, in the mask ROM type C, the initial value of the
図17にエミュレーション動作をおこなっているベース品種チップに品種ごとの情報を設定し、ベース品種もしくはマスクROM品種AもしくはマスクROM品種Cの動作をエミュレートする場合の周辺回路C1206の動作をしめす。 FIG. 17 shows the operation of the peripheral circuit C1206 when information for each product type is set in the base product chip performing the emulation operation and the operation of the base product, mask ROM product type A or mask ROM product type C is emulated.
図17に示すようにベース品種もしくはマスクROM品種Aの動作をエミュレートする際には、デバッグホストに接続し周辺回路C1206の資源無効化レジスタ1208に初期値と同じ0を書き込む。資源無効化レジスタ1208の値が0なのでエミュレーションチップの周辺回路C1206のプロトコル選択ビット1502は書換え可能であり、周辺回路C1206はプロトコル選択ビット1502の値に応じたプロトコルが選択される。
As shown in FIG. 17, when emulating the operation of the base type or the mask ROM type A, it is connected to the debug host, and the same 0 as the initial value is written in the
また図17に示すようにマスクROM品種Cの動作をエミュレートする際には、デバッグホストに接続し周辺回路C1206の資源無効化レジスタ1208を1に書換える。資源無効化レジスタ1208の値が1なのでエミュレーションチップの周辺回路C1206のプロトコル選択ビット1502は書換えできなくなり、周辺回路C1206はプロトコル選択ビット1502の値0に応じたクロック同期シリアルのプロトコルが選択される。さらに資源無効化レジスタ1208の値が1の場合にはエミュレーションチップの周辺回路C1206のプロトコル選択ビット1502は書換えできないが、これに反してマスクROM品種Cでは実装されないUARTのプロトコルを選択するようにプロトコル選択ビット1502の値を書き換えるアクセスがあった場合には、このアクセスを無視するとともに無効アクセスと判断し、CPU1202へ無効アクセス検出割込みをかけるように作用する。
As shown in FIG. 17, when emulating the operation of the mask ROM type C, the
次にマイクロコントローラチップ1201の動作を説明する。マイクロコントローラチップ1201の内蔵フラッシュメモリにユーザプログラムが書き込まれており、最終セットに実装されて最終セット上で動作している場合については、マイクロコントローラチップ101と同様である。
Next, the operation of the
マイクロコントローラチップ1201のエミュレーションチップ動作の例として、マイクロコントローラチップ1201がエミュレーションチップとしてセットに実装されており、デバッグホストと接続されセット開発者がマスクROM品種C用のソフトウエア開発を行っている場合を図18を用いて説明する。
As an example of the emulation chip operation of the
図18において、期間1801はユーザプログラムの実行が開始されるまでの動作でありマスクROMマイコンと同一の動作である。
In FIG. 18, a
期間1802はユーザプログラム実行中にデバッグI/F110を通じデバッグホストからデバッグ割込みがかかっており、この期間において品種情報としてマスクROM品種Cの無効資源データがデバッグホストよりデバッグI/F110およびCPU1202を経由して送り込まれバスコントローラ104を介し周辺回路A1203の資源無効化レジスタ1205と周辺回路C1206の資源無効化レジスタ1208に書き込まれる。
During a
図13に示したようにこのROMマスク品種Cにおいては周辺回路A1203はベース品種およびROMマスク品種Aの周辺回路Aと同一の機能を備えるので周辺回路A1203の全ての資源が有効であり、資源無効化レジスタ1205には品種情報としてマスクROM品種Cの無効資源データ「0」が書き込まれる。周辺回路A1203の資源無効化レジスタ1205の値は「0」であるので制御レジスタ1204に作用せず周辺回路A1203へのバスアクセスを監視せず、CPU1202には作用しない。
As shown in FIG. 13, in this ROM mask type C, the
また図13に示したようにこのROMマスク品種Cにおいては周辺回路C1206はベース品種およびROMマスク品種Aの周辺回路Cにくらべ制限があり周辺回路C1206のクロック同期シリアル機能のみ有効であるので、資源無効化レジスタ1208には品種情報としてマスクROM品種Cの無効資源データ「1」が書き込まれる。周辺回路C1206の資源無効化レジスタ1208の値は「1」であるので制御レジスタ1207に作用し周辺回路C1206へのバスアクセスを監視する。
Further, as shown in FIG. 13, in this ROM mask type C, the
期間1803はユーザプログラムのデバッグが未完了なため周辺回路C1206の制御レジスタ1207にwrite動作を行い、マスクROM品種Cでは制限される資源であるUARTを誤って有効化しようとしてプロトコル選択ビット1502を書き換える動作を行った場合であり、周辺回路C1206の資源無効化レジスタ1208は周辺回路C1206へのバスアクセスを監視しており、このwrite動作がマスクROM品種Cでは制限される資源であるUARTを有効化しようとするアクセスのため、周辺回路C1206の資源無効化レジスタ1208はこのアクセスを無効アクセスと判断し、CPU1202へ無効アクセス検出割込みを発生する。CPU1202は無効アクセス検出割込みがかかったため、デバッグI/F110を通じデバッグホストに無効アクセスの検出を通知する。
In
以上のように動作することで、上記マイクロコントローラチップ1201はベース品種としての動作をすることができ、エミュレーションチップとしてデバッグホストと接続している場合にはデバッグ割込みにより品種情報を転送することでマスクROM品種AもしくはCの動作を代行することができる。
By operating as described above, the
マスクROM品種Cの動作を代行している場合にはマスクROM品種Cでは制限される資源への無効なwriteアクセスに対しては、CPU1202へ割込みを発生するので無効アクセスの検出を通知でき、セットのソフトウエア開発者はマスクROM品種Cでのプログラムの不具合を早期に検出でき、量産セットにマスクROM品種を適用した際の不具合を事前に防止することが可能である。
When the operation of the mask ROM type C is performed on behalf, an invalid write access to a resource restricted in the mask ROM type C generates an interrupt to the
なお上記の構成においては品種情報として無効アドレス範囲データをデバッグホストから転送するようにしたが、フラッシュメモリなどに不揮発に保持したり、チップ上に揮発的に品種情報を保持する手段を設けデバッグに先立ち品種情報を設定しておく構成としても同等の効果が得られる。 In the above configuration, invalid address range data is transferred from the debug host as product type information, but it is stored in a flash memory or the like in a non-volatile manner, or a means for holding product type information volatilely on the chip is provided for debugging. The same effect can be obtained even when the product information is set in advance.
また上記の構成においては説明の簡略化のため、命令ROMおよびSRAMをそれぞれ1個ずつ、また周辺回路を2個搭載しているが、各要素が1つもしくは複数持つ構成や要素によっては搭載しない構成とすることも可能である。 In the above configuration, for simplicity of explanation, one instruction ROM and one SRAM and two peripheral circuits are mounted. However, depending on the configuration or elements each element has one or more, it is not mounted. A configuration is also possible.
また上記の構成においては品種設定により制限される資源を有効に設定するようなwriteの際にCPU1202に割込みをかける構成としたが、割込み発生に加えwrite動作も行ったりwrite動作を無視したり第3の実施形態のごとく乱数発生器を備えておきランダム値を書き込むよう構成してもよい。
In the above configuration, the
また上記の構成においてはユーザプログラムの実行開始後にデバッグホストからデバッグ割込みをかけて品種情報を転送しているが、ユーザプログラム実行前にデバッグホストよりデバッグ割込みをかけ品種情報を転送する構成にしてもよい。 In the above configuration, the product information is transferred from the debug host after the start of execution of the user program, but the product information is transferred from the debug host before execution of the user program. Good.
また上記の構成においては品種情報の転送のためデバッグホストよりデバッグ割込みをかける構成としたが、第2の実施形態のごとくシーケンサを備える構成としてもよい。 In the above configuration, a debug interrupt is issued from the debug host for transferring the product type information. However, as in the second embodiment, a sequencer may be provided.
また上記の構成では無効アクセス検出の際にCPU1202に割込みをかけCPU1202からデバッグI/F110に無効アクセスを通知する構成としたが、無効アクセスの際にデバッグI/F110に直接無効アクセスを通知する構成としてもよい。
In the above-described configuration, the
また上記の構成に加え、第1〜第4の実施形態のごとくアクセス監視回路を備え、無効アクセスの監視を行い無効アクセスを検出した場合には第1〜第4の実施形態のごとく動作する構成としてもよい。 Further, in addition to the above configuration, an access monitoring circuit is provided as in the first to fourth embodiments, and when invalid access is monitored and invalid access is detected, the configuration operates as in the first to fourth embodiments. It is good.
本発明にかかる半導体装置は、内蔵メモリサイズや内蔵周辺回路にバリエーションをもつマイクロコントローラやマイクロコンピュータのシリーズ品において、そのベース品種によりソフトウエアデバッグ環境を提供するエミュレーションチップ等として有用である。 The semiconductor device according to the present invention is useful as an emulation chip or the like for providing a software debugging environment depending on the base product in a series of microcontrollers and microcomputers having variations in built-in memory size and built-in peripheral circuit.
101:マイクロコントローラチップ
102:CPU
103:FlashROM
104:バスコントローラ
105:内部バス
106:SRAM
107:周辺回路A
108:周辺回路B
109:アクセス監視回路
110:デバッグI/F
111:無効アドレステーブル部
112:アドレス比較部
601:マイクロコントローラチップ
602:アクセス監視回路
603:FlashROM
604:ユーザROM領域
605:品種データ領域
606:シーケンサ
607:デバッグI/F
608:CPU
609:無効アドレステーブル部
610:アドレス比較部
801:マイクロコントローラチップ
802:バスコントローラ
803:アクセス監視回路
804:乱数発生器
805:無効アドレステーブル部
806:アドレス比較部
1001:マイクロコントローラチップ
1002:CPU
1003:アドレス監視回路
1004:無効アドレステーブル部
1005:アドレス比較部
1006:バスコントローラ
1201:マイクロコントローラチップ
1202:CPU
1203:周辺回路A
1204:制御レジスタ
1205:資源無効化レジスタ
1206:周辺回路C
1207:制御レジスタ
1208:資源無効化レジスタ
1209:バスコントローラ
1401:汎用シリアルの制御レジスタ
1402:プロトコル選択ビット
1501:クロック同期シリアルの制御レジスタ
1502:プロトコル選択ビット
101: Microcontroller chip 102: CPU
103: FlashROM
104: Bus controller 105: Internal bus 106: SRAM
107: Peripheral circuit A
108: Peripheral circuit B
109: Access monitoring circuit 110: Debug I / F
111: Invalid address table unit 112: Address comparison unit 601: Microcontroller chip 602: Access monitoring circuit 603: Flash ROM
604: User ROM area 605: Product data area 606: Sequencer 607: Debug I / F
608: CPU
609: Invalid address table unit 610: Address comparison unit 801: Microcontroller chip 802: Bus controller 803: Access monitoring circuit 804: Random number generator 805: Invalid address table unit 806: Address comparison unit 1001: Microcontroller chip 1002: CPU
1003: Address monitoring circuit 1004: Invalid address table unit 1005: Address comparison unit 1006: Bus controller 1201: Microcontroller chip 1202: CPU
1203: Peripheral circuit A
1204: Control register 1205: Resource invalidation register 1206: Peripheral circuit C
1207: Control register 1208: Resource invalidation register 1209: Bus controller 1401: General-purpose serial control register 1402: Protocol selection bit 1501: Clock synchronous serial control register 1502: Protocol selection bit
Claims (8)
外部のデバッグホストと通信するデバッグ情報入出力装置と、前記シリーズ品のうちの他の品種の品種情報を格納する品種情報格納領域とを設け、前記デバッグ情報入出力装置と前記デバッグホストとの接続時において前記品種情報格納領域に格納された品種情報に基づいて前記他の品種の動作を代行するようにしたことを特徴とする半導体装置。 A semiconductor device of one type of a series product comprising a plurality of types having a central processing unit and a plurality of internal resources and having variations in either or both of the internal resource area and function Because
A debug information input / output device that communicates with an external debug host and a product information storage area for storing product information of other products of the series are provided, and the debug information input / output device and the debug host are connected. 2. A semiconductor device according to claim 1, wherein an operation of the other product is performed on the basis of product information stored in the product information storage area.
前記デバッグ情報入出力装置と前記デバッグホストとの接続時において、前記品種情報格納領域に格納された品種情報に基づいて前記制限された内部資源を判別し、この制限された内部資源の領域へ前記中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し無視して動作することを特徴とする請求項1〜3のいずれかに記載の半導体装置。 The other resource has a limited area of any of the internal resources compared to the one product.
When the debug information input / output device and the debug host are connected, the restricted internal resource is determined based on the product information stored in the product information storage region, and the restricted internal resource region is transferred to the restricted internal resource region. 4. The semiconductor device according to claim 1, wherein when there is a write or read access from the central processing unit, the access is determined to be an invalid access and ignored.
前記デバッグ情報入出力装置と前記デバッグホストとの接続時において、前記品種情報格納領域に格納された品種情報に基づいて前記制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、固定値の無効データを書き込みもしくは読み出すように動作することを特徴とする請求項1〜3のいずれかに記載の半導体装置。 The other resource has a limited area of any of the internal resources compared to the one product.
When the debug information input / output device and the debug host are connected, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is centralized. 4. When there is a write or read access from a processing device, this access is determined to be invalid access, and operation is performed to write or read fixed value invalid data. The semiconductor device described.
前記デバッグ情報入出力装置と前記デバッグホストとの接続時において、前記品種情報格納領域に格納された品種情報に基づいて前記制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、ランダムな無効データを書き込みもしくは読み出すように動作することを特徴とする請求項1〜3のいずれかに記載の半導体装置。 The other resource has a limited area of any of the internal resources compared to the one product.
When the debug information input / output device and the debug host are connected, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is centralized. 4. When there is a write or read access from a processing device, this access is judged as an invalid access, and random invalid data is written or read out. Semiconductor device.
前記デバッグ情報入出力装置と前記デバッグホストとの接続時において、前記品種情報格納領域に格納された品種情報に基づいて前記制限された内部資源を判別し、この制限された内部資源の領域へ中央処理装置から書き込みもしくは読み出しのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、前記中央処理装置および前記デバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作することを特徴とする請求項1〜6のいずれかに記載の半導体装置。 The other resource has a limited area of any of the internal resources compared to the one product.
When the debug information input / output device and the debug host are connected, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is centralized. When there is a write or read access from the processing device, this access is determined to be invalid access, and invalid access detection information is transmitted to one or both of the central processing unit and the debug information input / output device. The semiconductor device according to claim 1, wherein the semiconductor device operates.
前記デバッグ情報入出力装置と前記デバッグホストとの接続時において、前記品種情報格納領域に格納された品種情報に基づいて前記制限された内部資源を判別し、この制限された内部資源の領域を活性化するように前記中央処理装置から書き込みのアクセスがあった場合にはこのアクセスを無効アクセスと判断し、前記中央処理装置および前記デバッグ情報入出力装置のいずれかもしくは両方に無効アクセス検出の情報を伝達するように動作することを特徴とする請求項1〜7のいずれかに記載の半導体装置。 The other resource has a limited area of any of the internal resources compared to the one product.
When the debug information input / output device and the debug host are connected, the restricted internal resource is determined based on the kind information stored in the kind information storage area, and the restricted internal resource area is activated. If there is a write access from the central processing unit, the access is determined as invalid access, and invalid access detection information is sent to one or both of the central processing unit and the debug information input / output device. The semiconductor device according to claim 1, wherein the semiconductor device operates to transmit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005115775A JP2006293824A (en) | 2005-04-13 | 2005-04-13 | Semiconductor device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005115775A JP2006293824A (en) | 2005-04-13 | 2005-04-13 | Semiconductor device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006293824A true JP2006293824A (en) | 2006-10-26 |
Family
ID=37414315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005115775A Pending JP2006293824A (en) | 2005-04-13 | 2005-04-13 | Semiconductor device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006293824A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008250373A (en) * | 2007-03-29 | 2008-10-16 | Toshiba Corp | Multiprocessor system |
US10761969B2 (en) | 2017-10-19 | 2020-09-01 | Samsung Electronics Co., Ltd. | Nonvolatile memory device and operation method thereof |
JP2021006960A (en) * | 2019-06-28 | 2021-01-21 | 株式会社アクセル | Memory controller and nonvolatile storage device |
US11256605B2 (en) | 2017-10-19 | 2022-02-22 | Samsung Electronics Co., Ltd. | Nonvolatile memory device |
-
2005
- 2005-04-13 JP JP2005115775A patent/JP2006293824A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8380933B2 (en) | 2007-03-20 | 2013-02-19 | Kabushiki Kaisha Toshiba | Multiprocessor system including processor cores and a shared memory |
JP2008250373A (en) * | 2007-03-29 | 2008-10-16 | Toshiba Corp | Multiprocessor system |
US10761969B2 (en) | 2017-10-19 | 2020-09-01 | Samsung Electronics Co., Ltd. | Nonvolatile memory device and operation method thereof |
US11256605B2 (en) | 2017-10-19 | 2022-02-22 | Samsung Electronics Co., Ltd. | Nonvolatile memory device |
JP2021006960A (en) * | 2019-06-28 | 2021-01-21 | 株式会社アクセル | Memory controller and nonvolatile storage device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0911735B1 (en) | Microprocessor test system | |
JPH011039A (en) | In-circuit emulator | |
US7913118B2 (en) | In-circuit debugging system and related method | |
CN100437485C (en) | System and method for configuring a computer system | |
JP2006293824A (en) | Semiconductor device | |
US7210064B2 (en) | Program controlled unit and method for debugging programs executed by a program controlled unit | |
JP4024026B2 (en) | Semiconductor device and evaluation device | |
TWI769399B (en) | Chip having debug memory interface and debug method thereof | |
JP2003263339A (en) | Debug function-incorporated microcomputer | |
US6560698B1 (en) | Register change summary resource | |
JP2005353020A (en) | Simulation system for computer program | |
WO2019169615A1 (en) | Method for accessing code sram, and electronic device | |
TWI794996B (en) | Apparatus and system for debugging solid state disk devices | |
JP4324149B2 (en) | Emulator and development support system using it | |
JPH0550016B2 (en) | ||
JP2005338892A (en) | Memory abnormal usage detecting device | |
JP2677043B2 (en) | Program development support device | |
JP3166667B2 (en) | Emulation microcomputer | |
JPH10247187A (en) | One-chip microcomputer | |
JPS63291135A (en) | Microcomputer developing device | |
JP2007323283A (en) | Card type computer, computer system and debug method | |
JP2007157060A (en) | Multiprocessor system, initiating method and program | |
JPH1021110A (en) | Emulator | |
JPH04296942A (en) | Microprocessor containing debugging function | |
JP2000132536A (en) | Computer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20061012 |