[go: up one dir, main page]

JP2012079152A - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
JP2012079152A
JP2012079152A JP2010224736A JP2010224736A JP2012079152A JP 2012079152 A JP2012079152 A JP 2012079152A JP 2010224736 A JP2010224736 A JP 2010224736A JP 2010224736 A JP2010224736 A JP 2010224736A JP 2012079152 A JP2012079152 A JP 2012079152A
Authority
JP
Japan
Prior art keywords
debug
terminal unit
debugging
semiconductor device
debug terminal
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
Application number
JP2010224736A
Other languages
Japanese (ja)
Inventor
Akihiro Suzuki
晃広 鈴木
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2010224736A priority Critical patent/JP2012079152A/en
Publication of JP2012079152A publication Critical patent/JP2012079152A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

【課題】デバッグ端子部を介してのリバースエンジニアリングを防止できるようにする。
【解決手段】デバッグ端子部制御回路3は、CPU4で実行されたデバッグ用プログラムP1の中から有効化ルーチンR1を抽出し、該抽出した有効化ルーチンR1に基づいて、デバッグ端子部2で受信されるデバッグ入力信号S4をCPU4に入力するようにデバッグ端子部2を制御する。これにより、外部メモリ7aにデバッグ用プログラムP1が記憶されているときには、デバッグ端子部2が有効になってデバッグ入力信号S4がCPU4
に入力されるが、外部メモリ7aにデバッグ用プログラムP1が記憶されていないときには、デバッグ端子部2が無効になってデバッグ入力信号S4がCPU4に入力されない。この結果、出荷時にデバッグ端子部2を無効化することにより、デバッグ端子部2を介してのリバースエンジニアリングを防止できる。
【選択図】図1
An object of the present invention is to prevent reverse engineering via a debug terminal.
A debugging terminal unit control circuit extracts an enabling routine R1 from a debugging program P1 executed by a CPU 4, and receives the receiving at a debugging terminal unit 2 based on the extracted enabling routine R1. The debug terminal unit 2 is controlled so as to input the debug input signal S4 to the CPU 4. As a result, when the debug program P1 is stored in the external memory 7a, the debug terminal unit 2 is enabled and the debug input signal S4 is sent to the CPU 4
However, when the debug program P1 is not stored in the external memory 7a, the debug terminal unit 2 is disabled and the debug input signal S4 is not input to the CPU 4. As a result, it is possible to prevent reverse engineering via the debug terminal unit 2 by invalidating the debug terminal unit 2 at the time of shipment.
[Selection] Figure 1

Description

デバッグ端子を有するSoC(System on Chip)において、デバッグの利便性と、製品
出荷後の第三者によるデバッグ端子を介したリバースエンジニアリング防止とを両立させ
るようにした半導体装置に関するものである。
In a SoC (System on Chip) having a debug terminal, the present invention relates to a semiconductor device that achieves both debugging convenience and prevention of reverse engineering via a debug terminal by a third party after product shipment.

一般に、必要とされる一連の機能(システム)を1つの半導体チップ上に集積する集積
回路であるSoCをデバッグするために、このSoCにはデバッグ端子が設けられている
Generally, in order to debug a SoC that is an integrated circuit that integrates a series of required functions (systems) on one semiconductor chip, the SoC is provided with a debug terminal.

図6は、従来の半導体装置300の構成例を示すブロック図である。図6に示すように
、半導体装置300は、SoC1B及び外部メモリ7b等で構成される。SoC1Bは、
デバッグ端子部2B、CPU4、内部メモリ5及び機能回路6を備える。CPU4、内部
メモリ5、機能回路6及び外部メモリ7bは、SoC1B内に設けられたシステムバス1
0にそれぞれ接続され、システムバス10を介してデータ等のやり取りをする。
FIG. 6 is a block diagram illustrating a configuration example of a conventional semiconductor device 300. As shown in FIG. 6, the semiconductor device 300 includes a SoC 1B, an external memory 7b, and the like. SoC1B
A debug terminal unit 2B, a CPU 4, an internal memory 5 and a functional circuit 6 are provided. The CPU 4, the internal memory 5, the functional circuit 6 and the external memory 7b are a system bus 1 provided in the SoC 1B.
0 are connected to each other and exchange data and the like via the system bus 10.

CPU4は、外部からパワーオンリセット信号S1が入力されると、外部メモリ7bに
記憶された製品プログラムP2を読み出して実行する。パワーオンリセット信号S1は、
SoC1B内の各部に対するリセット信号であって、SoC1Bの電源投入直後の回路状
態を一定値に定めるための信号である。
When the power-on reset signal S1 is input from the outside, the CPU 4 reads and executes the product program P2 stored in the external memory 7b. The power-on reset signal S1 is
It is a reset signal for each part in the SoC 1B, and is a signal for setting the circuit state immediately after turning on the power of the SoC 1B to a constant value.

また、製品プログラムP2は、半導体装置300を動作させるためのプログラムである
。CPU4が製品プログラムP2を実行すると、例えば、内部メモリ5に記憶されている
機能回路6の動作に必要なデータを読み出して、所定のアルゴリズムを実行する。
The product program P2 is a program for operating the semiconductor device 300. When the CPU 4 executes the product program P2, for example, data necessary for the operation of the functional circuit 6 stored in the internal memory 5 is read and a predetermined algorithm is executed.

デバッグ端子部2Bは、CPU4の動作をSoC1Bの外部から制御したり観測したり
するためのデバッグ入力信号S4及びデバッグ出力信号S5を、図示しないデバッグ機器
等とやり取りするための端子である。
The debug terminal unit 2B is a terminal for exchanging a debug input signal S4 and a debug output signal S5 for controlling and observing the operation of the CPU 4 from the outside of the SoC 1B with a debug device (not shown).

図7は、従来のデバッグ端子部2Bの構成例を示す回路図である。図7に示すように、
デバッグ端子部2Bは、入力バッファ21B及び出力バッファ22Bを有する。入力バッ
ファ21B及び出力バッファ22Bには、上述の図示しないデバッグ機器が接続される。
デバッグ機器は、半導体装置300等の検証、評価、デバッグ及び障害解析等を行うとき
に、入力バッファ21B及び出力バッファ22Bと接続する。
FIG. 7 is a circuit diagram showing a configuration example of a conventional debug terminal unit 2B. As shown in FIG.
The debug terminal unit 2B includes an input buffer 21B and an output buffer 22B. The debug device (not shown) is connected to the input buffer 21B and the output buffer 22B.
The debug device is connected to the input buffer 21B and the output buffer 22B when performing verification, evaluation, debugging, failure analysis, and the like of the semiconductor device 300 and the like.

入力バッファ21Bは、デバッグ入力信号S4をデバッグ機器から受信して、CPU4
に入力する。出力バッファ22Bは、デバッグ出力信号S5をCPU4から受信して、デ
バッグ機器に出力する。
The input buffer 21B receives the debug input signal S4 from the debug device and receives the CPU 4
To enter. The output buffer 22B receives the debug output signal S5 from the CPU 4 and outputs it to the debug device.

このような構成により、デバッグ機器は、デバッグ端子部2Bを介してCPU4の動作
制御や状態の観測ができる。例えば、この観測は、製品プログラムP2のステップ実行、
内部メモリ5及び外部メモリ7bに記憶されている特定アドレスのデータの参照や書き換
え、CPU4内の図示しないレジスタ及び内部状態の参照や書き換え等である。
With such a configuration, the debug device can control the operation of the CPU 4 and observe the state via the debug terminal unit 2B. For example, this observation is performed by stepping the product program P2,
For example, reference and rewriting of data at a specific address stored in the internal memory 5 and the external memory 7b, and reference and rewriting of a register (not shown) and an internal state in the CPU 4 are performed.

これにより、半導体装置300は、デバッグ端子部2Bを用いることでSoC1B内外
の信号/状態を確認しながら製品プログラムP2を実行することにより、デバッグの作業
効率を向上させることができる。
Thereby, the semiconductor device 300 can improve the work efficiency of debugging by executing the product program P2 while confirming the signal / state inside and outside the SoC 1B by using the debug terminal unit 2B.

また、別の従来例として、特許文献1に、システムLSIのデバッグ方法について開示
されている。このデバッグ方法は、ICカードを用いて正規の使用者であることをシステ
ムLSIに認証させることにより、当該システムLSIをデバッグすることができるよう
にしたものである。
As another conventional example, Patent Document 1 discloses a method for debugging a system LSI. This debugging method allows the system LSI to be debugged by allowing the system LSI to authenticate that the user is an authorized user using an IC card.

特開2010−160765号公報JP 2010-160765 A

ところで、従来の半導体装置300によれば、デバッグの作業効率は向上するが、重要
な設計資産である製品プログラムP2やSoC1Bのハードウェアを、デバッグ端子部2
Bを用いることで第三者によって解析される可能性がある。即ち、デバッグ端子部2Bを
介したリバースエンジニアリングが可能である。
By the way, according to the conventional semiconductor device 300, the work efficiency of debugging is improved, but the hardware of the product program P2 and SoC1B, which are important design assets, is connected to the debug terminal unit 2.
By using B, there is a possibility of analysis by a third party. That is, reverse engineering is possible via the debug terminal 2B.

このようなリバースエンジニアリングを防止するために、製品プログラムP2を暗号化
することが考えられる。この場合、製品プログラムP2を直接解析されることが防止でき
るが、製品プログラムP2が暗号化されていてもCPU4が製品プログラムP2を実行す
るときには、暗号化された製品プログラムP2を復号してから実行するので、デバッグ端
子部2Bを介して製品プログラムP2の復号結果を得て、製品プログラムP2の動作やS
oC1Bのハードウェア構造等を解析されてしまう。
In order to prevent such reverse engineering, it is conceivable to encrypt the product program P2. In this case, it is possible to prevent the product program P2 from being directly analyzed, but even if the product program P2 is encrypted, when the CPU 4 executes the product program P2, the encrypted product program P2 is decrypted and executed. Therefore, the decoding result of the product program P2 is obtained via the debug terminal unit 2B, and the operation of the product program P2 and S
The hardware structure of oC1B is analyzed.

また、これを防止するために、デバッグ端子部2Bを搭載しないことが考えられる。こ
の場合、SoC1B内外の信号/状態を確認しながら製品プログラムP2を実行すること
ができないので、デバッグ作業が困難になるという問題がある。
In order to prevent this, it is conceivable that the debug terminal portion 2B is not mounted. In this case, since the product program P2 cannot be executed while checking the signal / state inside and outside the SoC 1B, there is a problem that debugging work becomes difficult.

更に、デバッグ端子部2Bを搭載する半導体装置とデバッグ端子部2Bを搭載しない半
導体装置との2つの品種の半導体装置を製造することが考えられる。例えば、デバッグ作
業をする際には、デバッグ端子部2Bを搭載する半導体装置を用い、デバッグ作業完了後
には、デバッグ端子部2Bを搭載する半導体装置のデバッグ結果を反映させた、デバッグ
端子部2Bを搭載しない半導体装置を顧客に出荷する。この場合、2つの品種を設計、製
造しなければならず、当該半導体装置の製造コストが増大してしまうという問題がある。
Further, it is conceivable to manufacture two types of semiconductor devices, a semiconductor device mounting the debug terminal portion 2B and a semiconductor device not mounting the debug terminal portion 2B. For example, when performing a debugging operation, a semiconductor device equipped with a debugging terminal portion 2B is used. After the debugging operation is completed, a debugging terminal portion 2B reflecting a debugging result of the semiconductor device equipped with the debugging terminal portion 2B is used. Ship semiconductor devices that are not installed to customers. In this case, two types must be designed and manufactured, which causes a problem that the manufacturing cost of the semiconductor device increases.

上述の特許文献1は、これらの問題を解決できるが、ICカードや認証回路等を用いて
いるので、更に製造コストが増大してしまうという問題がある。
Although the above-mentioned Patent Document 1 can solve these problems, there is a problem that the manufacturing cost further increases because an IC card or an authentication circuit is used.

そこで、本発明は、上述の課題を解決したものであって、デバッグの作業効率が向上し
、デバッグ端子部からプログラムの動作や当該半導体装置のハードウェア構造等を解析さ
れることを防止でき、かつ、製造コストを低減することができる半導体装置を提供するこ
とを目的とする。
Therefore, the present invention solves the above-described problems, improves the work efficiency of debugging, can prevent the operation of the program, the hardware structure of the semiconductor device and the like from being analyzed from the debug terminal unit, And it aims at providing the semiconductor device which can reduce manufacturing cost.

上述の課題を解決するために、本発明に係る半導体装置は、デバッグを実行するための
デバッグ入力信号を生成するデバッグ機器に接続され、該デバッグ機器によりデバッグさ
れる半導体装置において、デバッグ機器によって生成されたデバッグ入力信号を受信する
デバッグ端子部と、該デバッグ端子部を有効化させる有効化ルーチンを含むデバッグ用プ
ログラムが予め記憶されたメモリから当該デバッグ用プログラムを読み出して実行するプ
ロセッサと、該プロセッサで実行されたデバッグ用プログラムの中から有効化ルーチンを
抽出し、該抽出した有効化ルーチンに基づいて、デバッグ端子部で受信されるデバッグ入
力信号をプロセッサに入力するようにデバッグ端子部を有効化するデバッグ端子部制御部
とを備えることを特徴とするものである。
In order to solve the above-described problem, a semiconductor device according to the present invention is connected to a debug device that generates a debug input signal for executing debugging, and is generated by the debug device in the semiconductor device debugged by the debug device. A processor that reads a debug program from a memory in which a debug program including a debug terminal unit that receives the debug input signal and an enabling routine that enables the debug terminal unit is stored in advance, and the processor The enable terminal is extracted from the debug program executed in step 1, and the debug terminal is enabled so that the debug input signal received at the debug terminal is input to the processor based on the extracted enable routine. And a debug terminal control unit It is.

本発明に係る半導体装置によれば、デバッグを実行するためのデバッグ入力信号を生成
するデバッグ機器に接続され、該デバッグ機器によりデバッグされる。これを前提にして
、デバッグ端子部は、デバッグ機器によって生成されたデバッグ入力信号を受信する。プ
ロセッサは、デバッグ端子部を有効化させる有効化ルーチンを含むデバッグ用プログラム
が予め記憶されたメモリから当該デバッグ用プログラムを読み出して実行する。そして、
デバッグ端子部制御部は、プロセッサで実行されたデバッグ用プログラムの中から有効化
ルーチンを抽出し、該抽出した有効化ルーチンに基づいて、デバッグ端子部で受信される
デバッグ入力信号をプロセッサに入力するようにデバッグ端子部を有効化する。
The semiconductor device according to the present invention is connected to a debugging device that generates a debug input signal for executing debugging, and is debugged by the debugging device. Based on this assumption, the debug terminal unit receives a debug input signal generated by the debug device. The processor reads and executes the debugging program from a memory in which a debugging program including an enabling routine for enabling the debugging terminal unit is stored in advance. And
The debug terminal unit control unit extracts an activation routine from the debugging program executed by the processor, and inputs a debug input signal received by the debug terminal unit to the processor based on the extracted activation routine. Enable the debug terminal as follows.

これにより、メモリにデバッグ用プログラムが記憶されているときには、デバッグ端子
部が有効になってデバッグ入力信号がプロセッサに入力されるが、メモリにデバッグ用プ
ログラムが記憶されていないときには、デバッグ端子部が無効になってデバッグ入力信号
がプロセッサに入力されない。つまり、メモリにデバッグ用プログラムが記憶されている
か否かにより、当該半導体装置がデバッグ可能か否かが決定される。
Thus, when the debug program is stored in the memory, the debug terminal portion is enabled and the debug input signal is input to the processor. However, when the debug program is not stored in the memory, the debug terminal portion is Disabled and no debug input signal is input to the processor. That is, whether or not the semiconductor device can be debugged is determined depending on whether or not a debugging program is stored in the memory.

例えば、当該半導体装置を顧客に出荷する前には、デバッグ用プログラムが記憶された
メモリが搭載されていて、このメモリのデバッグ用プログラムによりデバッグ端子部が有
効になってデバッグが可能になる。そして、デバッグが完了したら、メモリに記憶されて
いるデバッグ用プログラムの代わりに当該半導体装置を動作させるための製品プログラム
を記憶させる。すると、デバッグ端子部が無効になり、当該半導体装置を顧客に出荷した
後、顧客によるデバッグが不可能になる。
For example, before shipping the semiconductor device to a customer, a memory in which a debugging program is stored is mounted, and the debugging terminal portion is enabled by the debugging program in the memory so that debugging can be performed. When the debugging is completed, a product program for operating the semiconductor device is stored instead of the debugging program stored in the memory. Then, the debug terminal portion becomes invalid, and after the semiconductor device is shipped to the customer, debugging by the customer becomes impossible.

本発明に係る半導体装置によれば、デバッグ時にデバッグ端子部を有効化することによ
り、デバッグ作業の利便性を向上させることができ、出荷時にデバッグ端子部を無効化す
ることにより、デバッグ端子部からプログラムの動作や当該半導体装置のハードウェア構
造等を解析されることを防止できる。そして、従来のように2品種の設計、製造をする必
要がなく、また、ICカードや認証回路等を用いないので、半導体装置の製造コストを低
減することができる。
According to the semiconductor device of the present invention, it is possible to improve the convenience of debugging work by enabling the debug terminal part at the time of debugging, and from the debug terminal part by invalidating the debug terminal part at the time of shipment. It is possible to prevent the program operation and the hardware structure of the semiconductor device from being analyzed. Then, it is not necessary to design and manufacture two types as in the prior art, and since no IC card or authentication circuit is used, the manufacturing cost of the semiconductor device can be reduced.

第1の実施の形態に係る半導体装置の構成例(デバッグ時)を示すブロック図である。1 is a block diagram illustrating a configuration example (during debugging) of a semiconductor device according to a first embodiment; 第1の実施の形態に係る半導体装置の構成例(出荷時)を示すブロック図である。It is a block diagram which shows the structural example (at the time of shipment) of the semiconductor device which concerns on 1st Embodiment. デバッグ端子部の構成例を示す回路図である。It is a circuit diagram which shows the structural example of a debug terminal part. デバッグ端子部制御回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a debug terminal part control circuit. 第2の実施の形態に係る半導体装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the semiconductor device which concerns on 2nd Embodiment. 従来の半導体装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional semiconductor device. 従来のデバッグ端子部の構成例を示す回路図である。It is a circuit diagram which shows the structural example of the conventional debug terminal part.

以下、図面を参照して、本発明に係る実施の形態の一例として、半導体装置について説
明する。
A semiconductor device will be described below as an example of an embodiment of the present invention with reference to the drawings.

<第1の実施の形態>
[半導体装置100の構成例]
図1及び図2に示すように、本実施の形態に係る半導体装置100は、SoC1及び外
部メモリ7a又は7bで構成される。SoC1は、デバッグ端子部2、デバッグ端子部制
御回路3、CPU4、内部メモリ5及び機能回路6を備え、それらが、1つの半導体基板
上に形成されている。また、SoC1は、外部よりパワーオンリセット信号S1が受信可
能であり、このパワーオンリセット信号S1により当該SoC1内の各部に対してリセッ
トが行われる。
<First Embodiment>
[Configuration Example of Semiconductor Device 100]
As shown in FIGS. 1 and 2, the semiconductor device 100 according to the present embodiment includes the SoC 1 and an external memory 7a or 7b. The SoC 1 includes a debug terminal unit 2, a debug terminal unit control circuit 3, a CPU 4, an internal memory 5, and a functional circuit 6, which are formed on one semiconductor substrate. Further, the SoC 1 can receive the power-on reset signal S1 from the outside, and each part in the SoC 1 is reset by the power-on reset signal S1.

デバッグ端子部2は、デバッグ端子部制御回路3及びCPU4に接続される。デバッグ
端子部制御回路3、CPU4、内部メモリ5、機能回路6及び外部メモリ7a,7bは、
システムバス10にそれぞれ接続され、システムバス10を介してデータ等のやり取りを
する。
The debug terminal unit 2 is connected to the debug terminal unit control circuit 3 and the CPU 4. The debug terminal unit control circuit 3, CPU 4, internal memory 5, functional circuit 6 and external memories 7a and 7b are
Each is connected to the system bus 10 and exchanges data and the like via the system bus 10.

外部メモリ7aは、デバッグ端子部2を有効化させる有効化ルーチンR1を含むデバッ
グ用プログラムP1(図1)を記憶し、外部メモリ7bは、SoC1を動作させるための
製品プログラムP2(図2)を記憶する。
The external memory 7a stores a debugging program P1 (FIG. 1) including an enabling routine R1 for enabling the debug terminal unit 2, and the external memory 7b stores a product program P2 (FIG. 2) for operating the SoC1. Remember.

デバッグ用プログラムP1は、SoC1の要求仕様機能を実現するのに必要な処理手順
、初期データ及びアルゴリズムの他、デバッグ作業用の試験プログラムと有効化ルーチン
R1とを含む。有効化ルーチンR1は、デバッグ端子部2のデバッグ端子機能を有効にす
るプログラムである。製品プログラムP2は、デバッグ用プログラムP1の一部と同様に
、SoC1の要求仕様機能を実現するのに必要な処理手順、初期データ及びアルゴリズム
等を含む。
The debug program P1 includes a test program for debugging work and an enabling routine R1, in addition to processing procedures, initial data, and algorithms necessary for realizing the required specification function of SoC1. The validation routine R1 is a program that validates the debug terminal function of the debug terminal unit 2. The product program P2 includes a processing procedure, initial data, an algorithm, and the like necessary for realizing the required specification function of the SoC 1, similarly to a part of the debugging program P1.

外部メモリ7aは、SoC1に着脱自在に取り付けられて、外部メモリ7bと交換可能
である。例えば、SoC1をデバッグする際には、デバッグ用プログラムP1が記憶され
た外部メモリ7aをSoC1に取り付ける。そして、SoC1のデバッグが完了したら、
外部メモリ7aを取り外して、製品プログラムP2が記憶された外部メモリ7bをSoC
1に取り付ける。
The external memory 7a is detachably attached to the SoC 1 and can be exchanged with the external memory 7b. For example, when debugging SoC1, the external memory 7a in which the debugging program P1 is stored is attached to the SoC1. And when SoC1 debugging is complete,
The external memory 7a is removed and the external memory 7b in which the product program P2 is stored is stored in the SoC.
Attach to 1.

デバッグ端子部2は、外部と接続する端子であり、例えば、デバッグを実行するための
デバッグ入力信号S4を生成するデバッグ機器と接続して、デバッグ入力信号S4をやり
取りする。また、デバッグを実行するためのデバッグ出力信号S5を生成するCPU4と
デバッグ出力信号S5をやり取りする。デバッグ入力信号S4及びデバッグ出力信号S5
は、CPU4の動作をデバッグ機器から制御/観測するための信号である。
The debug terminal unit 2 is a terminal connected to the outside. For example, the debug terminal unit 2 is connected to a debug device that generates a debug input signal S4 for executing debugging and exchanges the debug input signal S4. The debug output signal S5 is exchanged with the CPU 4 that generates the debug output signal S5 for executing debugging. Debug input signal S4 and debug output signal S5
Is a signal for controlling / observing the operation of the CPU 4 from the debug device.

このデバッグ入力信号S4及びデバッグ出力信号S5により、デバッグ機器は、例えば
、デバッグ用プログラムP1のステップ実行、内部メモリ5及び外部メモリ7aに記憶さ
れている特定アドレスのデータの参照や書き換え、CPU4内の図示しないレジスタ及び
内部状態の参照や書き換え等を行う。
With this debug input signal S4 and debug output signal S5, the debug device, for example, executes step execution of the debug program P1, references or rewrites data at a specific address stored in the internal memory 5 and the external memory 7a, Reference and rewrite of a register and an internal state (not shown) are performed.

CPU4は、プロセッサの一例であり、外部メモリ7aに記憶されているデバッグ用プ
ログラムP1又は外部メモリ7bに記憶されている製品プログラムP2を読み出して逐次
実行する。また、CPU4は、上述のように、デバッグ出力信号S5を生成してデバッグ
端子部2に出力する。
The CPU 4 is an example of a processor, and reads and sequentially executes the debugging program P1 stored in the external memory 7a or the product program P2 stored in the external memory 7b. Further, the CPU 4 generates the debug output signal S5 and outputs it to the debug terminal unit 2 as described above.

デバッグ端子部制御回路3は、デバッグ端子部制御部の一例であり、デバッグ端子部2
を制御するものである。例えば、デバッグ端子部制御回路3は、CPU4で実行されたデ
バッグ用プログラムP1の中から有効化ルーチンR1を抽出し、該抽出した有効化ルーチ
ンR1に基づいて、デバッグ端子部2で受信されるデバッグ入力信号S4をCPU4に入
力するようにデバッグ端子部2を有効化する。また、デバッグ端子部制御回路3は、抽出
した有効化ルーチンR1に基づいて、デバッグ端子部2で受信されるデバッグ出力信号S
5をデバッグ機器に出力するようにデバッグ端子部2を有効化する。
The debug terminal unit control circuit 3 is an example of the debug terminal unit control unit.
Is to control. For example, the debug terminal unit control circuit 3 extracts the validation routine R1 from the debugging program P1 executed by the CPU 4, and based on the extracted validation routine R1, the debug received by the debug terminal unit 2 The debug terminal unit 2 is validated so as to input the input signal S4 to the CPU 4. Also, the debug terminal unit control circuit 3 generates a debug output signal S received by the debug terminal unit 2 based on the extracted enabling routine R1.
The debug terminal 2 is enabled so that 5 is output to the debug device.

内部メモリ5は、CPU4及び機能回路6の動作に必要な一時的なデータを保持する。
なお、内部メモリ5は、CPU4が実行する製品プログラムP2の全部又は一部を記憶し
ても構わない。この場合、CPU4は、内部メモリ5に記憶された製品プログラムP2を
読み出して実行する。
The internal memory 5 holds temporary data necessary for the operation of the CPU 4 and the functional circuit 6.
The internal memory 5 may store all or part of the product program P2 executed by the CPU 4. In this case, the CPU 4 reads and executes the product program P2 stored in the internal memory 5.

機能回路6は、SoC1の要求仕様を実現するものである。上述のように、機能回路6
の動作に必要なデータが内部メモリ5に記憶されており、CPU4が当該データを読み出
して実行することで、機能回路6が動作する。本実施の形態では、SoC1に機能回路6
を1つだけ設けているが、これに限定されず、複数設けても構わない。
The functional circuit 6 realizes the required specifications of SoC1. As described above, the functional circuit 6
Data necessary for the above operation is stored in the internal memory 5, and the functional circuit 6 operates when the CPU 4 reads and executes the data. In the present embodiment, the functional circuit 6 is included in the SoC 1.
However, the present invention is not limited to this, and a plurality of them may be provided.

[デバッグ端子部2の構成例]
次に、デバッグ端子部2の構成例について説明する。図3に示すように、デバッグ端子
部2は、イネーブル付入力バッファ(以下、「入力バッファ21」という)及びイネーブ
ル付出力バッファ(以下、「出力バッファ22」という)を有する。入力バッファ21及
び出力バッファ22は、デバッグ端子部制御回路3、CPU4及び外部機器であるデバッ
グ機器に接続される。
[Configuration example of debug terminal unit 2]
Next, a configuration example of the debug terminal unit 2 will be described. As shown in FIG. 3, the debug terminal unit 2 includes an input buffer with enable (hereinafter referred to as “input buffer 21”) and an output buffer with enable (hereinafter referred to as “output buffer 22”). The input buffer 21 and the output buffer 22 are connected to the debug terminal unit control circuit 3, the CPU 4, and a debug device that is an external device.

入力バッファ21は、デバッグ端子部制御回路3から出力されるデバッグ端子部制御信
号S3により制御される。例えば、入力バッファ21は、デバッグ入力信号S4をデバッ
グ機器から受信する。このとき、入力バッファ21は、デバッグ端子部制御信号S3がHi
の時には、デバッグ入力信号S4を通過させてCPU4に入力し、デバッグ端子部制御信
号S3がLowの時には、デバッグ入力信号S4を遮断する。
The input buffer 21 is controlled by a debug terminal unit control signal S3 output from the debug terminal unit control circuit 3. For example, the input buffer 21 receives the debug input signal S4 from the debug device. At this time, the input buffer 21 indicates that the debug terminal control signal S3 is Hi.
In this case, the debug input signal S4 is passed and inputted to the CPU 4, and when the debug terminal control signal S3 is Low, the debug input signal S4 is cut off.

デバッグ機器は、デバッグ入力信号S4により、CPU4の動作制御、内部メモリ5及
び外部メモリ7aに記憶されている特定アドレスのデータ書き換え、CPU4内のレジス
タ及び内部状態の書き換えを、SoC1外部から行う。
The debug device performs operation control of the CPU 4, rewriting data of specific addresses stored in the internal memory 5 and the external memory 7a, and rewriting registers and internal states in the CPU 4 from the outside of the SoC 1 by a debug input signal S4.

出力バッファ22は、デバッグ端子部制御回路3から出力されるデバッグ端子部制御信
号S3により制御される。例えば、出力バッファ22は、デバッグ出力信号S5をCPU
4から受信する。このとき、出力バッファ22は、デバッグ端子部制御信号S3がHiの時
には、デバッグ出力信号S5を通過させてデバッグ機器に出力し、デバッグ端子部制御信
号S3がLowの時には、デバッグ出力信号S5を遮断する。
The output buffer 22 is controlled by a debug terminal unit control signal S3 output from the debug terminal unit control circuit 3. For example, the output buffer 22 sends the debug output signal S5 to the CPU.
4 is received. At this time, when the debug terminal control signal S3 is Hi, the output buffer 22 passes the debug output signal S5 and outputs it to the debug device. When the debug terminal control signal S3 is Low, the output buffer 22 cuts off the debug output signal S5. To do.

デバッグ機器は、デバッグ出力信号S5により、CPU4の状態観測、内部メモリ5及
び外部メモリ7aに記憶されている特定アドレスのデータ参照、CPU4内のレジスタ及
び内部状態の参照を、SoC1外部から行う。
The debug device uses the debug output signal S5 to monitor the state of the CPU 4, refer to the data of the specific address stored in the internal memory 5 and the external memory 7a, and refer to the registers and internal state in the CPU 4 from outside the SoC 1.

このように、デバッグ端子部2は、デバッグ端子部制御回路3が出力するデバッグ端子
部制御信号S3に基づいて、デバッグ入力信号S4及びデバッグ出力信号S5を通過/遮
断する。
Thus, the debug terminal unit 2 passes / cuts off the debug input signal S4 and the debug output signal S5 based on the debug terminal unit control signal S3 output from the debug terminal unit control circuit 3.

[デバッグ端子部制御回路3の構成例]
次に、デバッグ端子部制御回路3の構成例について説明する。図4に示すように、デバ
ッグ端子部制御回路3は、I/F31、アドレスデコーダ32、データデコーダ33及び
フリップフロップ34を有する。
[Configuration example of debug terminal control circuit 3]
Next, a configuration example of the debug terminal unit control circuit 3 will be described. As shown in FIG. 4, the debug terminal unit control circuit 3 includes an I / F 31, an address decoder 32, a data decoder 33, and a flip-flop 34.

I/F31は、CPU4から出力される各種信号をシステムバス10を介して受信する
。例えば、CPU4が外部メモリ7aからデバッグ用プログラムP1を読み出して実行し
、有効化ルーチンR1に基づく有効化信号S2をデバッグ端子部制御回路3に出力したと
き、I/F31は、この有効化信号S2を受信する。そして、I/F31は、受信した有
効化信号S2をアドレスデコーダ32及びデータデコーダ33に出力する。
The I / F 31 receives various signals output from the CPU 4 via the system bus 10. For example, when the CPU 4 reads out and executes the debugging program P1 from the external memory 7a and outputs the enabling signal S2 based on the enabling routine R1 to the debugging terminal unit control circuit 3, the I / F 31 receives the enabling signal S2. Receive. Then, the I / F 31 outputs the received enable signal S2 to the address decoder 32 and the data decoder 33.

I/F31にはアドレスデコーダ32及びデータデコーダ33が接続される。アドレス
デコーダ32及びデータデコーダ33は、I/F31からの有効化信号S2を受信し、該
受信した有効化信号S2に基づいてフリップフロップ34に書き込む値を決定する。
An address decoder 32 and a data decoder 33 are connected to the I / F 31. The address decoder 32 and the data decoder 33 receive the enable signal S2 from the I / F 31, and determine a value to be written in the flip-flop 34 based on the received enable signal S2.

アドレスデコーダ32及びデータデコーダ33にはフリップフロップ34が接続される
。フリップフロップ34は、デバッグ端子部制御信号S3を保持し、このデバッグ端子部
制御信号S3をデバッグ端子部2へ出力する。
A flip-flop 34 is connected to the address decoder 32 and the data decoder 33. The flip-flop 34 holds the debug terminal unit control signal S3 and outputs the debug terminal unit control signal S3 to the debug terminal unit 2.

フリップフロップ34は、アドレスデコーダ32及びデータデコーダ33に書き込まれ
た値に基づいて、デバッグ端子部制御信号S3をHi、即ち、デバッグ端子部2のデバッグ
端子機能を有効化する。
Based on the values written in the address decoder 32 and the data decoder 33, the flip-flop 34 activates the debug terminal unit control signal S3 Hi, that is, the debug terminal function of the debug terminal unit 2.

また、フリップフロップ34は、パワーオンリセット信号S1によりリセットされると
、デバッグ端子部制御信号S3をLow、即ち、デバッグ端子部2のデバッグ端子機能を無
効の状態にする。
Further, when the flip-flop 34 is reset by the power-on reset signal S1, the debug terminal unit control signal S3 is set to Low, that is, the debug terminal function of the debug terminal unit 2 is disabled.

このように、デバッグ端子部制御回路3は、CPU4が、特定のアドレスに特定のデー
タを書き込むことで、デバッグ端子部制御信号S3の値を変更するという動作を実現する
In this manner, the debug terminal unit control circuit 3 realizes an operation in which the CPU 4 changes the value of the debug terminal unit control signal S3 by writing specific data at a specific address.

[半導体装置100の動作例]
次に、半導体装置100の動作例について説明する。動作例の説明のために以下の(i)
〜(iv)を仮定する。
(i)アドレスデコーダ32は、値0x12345678をシステムバス10から入力されたときのみ
、フリップフロップ34に対して値書き込みを許可する。
(ii)データデコーダ33は、値0x9aをシステムバス10から入力されたときのみ、フリッ
プフロップ34の入力をHiにする。それ以外の値は、フリップフロップ34の入力をLow
にする。
(iii)フリップフロップ34は、アドレスデコーダ32から値書き込みを許可されたとき
のみ、入力値を取り込んでデバッグ端子部制御信号S3としてデバッグ端子部2に出力す
る。次の値取り込み許可まで、デバッグ端子部制御信号S3の値を保持する。
(iv)デバッグ用プログラムP1の有効化ルーチンR1の内容は、「アドレス0x12345678に
、値0x9aをライトする」という動作を実行するCPU4の命令コードとする。
[Operation Example of Semiconductor Device 100]
Next, an operation example of the semiconductor device 100 will be described. For the explanation of the operation example, the following (i)
Assume ~ (iv).
(i) The address decoder 32 permits the flip-flop 34 to write a value only when the value 0x12345678 is input from the system bus 10.
(ii) The data decoder 33 sets the input of the flip-flop 34 to Hi only when the value 0x9a is input from the system bus 10. For other values, flip-flop 34 input is set to Low.
To.
(iii) The flip-flop 34 takes in the input value and outputs it to the debug terminal unit 2 as the debug terminal unit control signal S3 only when value writing is permitted by the address decoder 32. The debug terminal control signal S3 is held until the next value fetching permission.
(iv) The content of the enabling routine R1 of the debugging program P1 is an instruction code of the CPU 4 that executes the operation “write value 0x9a to address 0x12345678”.

[デバッグ作業時の動作例]
まず、図1に示した半導体装置100のデバッグ作業時の動作例について説明する。半
導体装置100のデバッグ作業時では、有効化ルーチンR1を含むデバッグ用プログラム
P1が記憶された外部メモリ7aが搭載されていることを前提とする。
[Example of operation during debugging]
First, an operation example during the debugging operation of the semiconductor device 100 illustrated in FIG. 1 will be described. When the semiconductor device 100 is debugged, it is assumed that the external memory 7a in which the debugging program P1 including the validation routine R1 is stored is installed.

SoC1は、半導体装置100の電源投入時、パワーオンリセット信号S1が入力され
てリセット状態になる。このとき、フリップフロップ34もリセット状態であるため(図
4参照)、デバッグ端子部制御信号S3の値はLowであり、デバッグ端子部2のデバッグ
端子機能は無効の状態になっている。
When the semiconductor device 100 is powered on, the SoC 1 is reset by receiving the power-on reset signal S1. At this time, since the flip-flop 34 is also in the reset state (see FIG. 4), the value of the debug terminal unit control signal S3 is Low, and the debug terminal function of the debug terminal unit 2 is in an invalid state.

パワーオンリセット信号S1がLowのときをリセット状態とし、Hiのときを解除状態と
したとき、パワーオンリセット信号S1が解除状態にされると、CPU4は、外部メモリ
7aに記憶されているデバッグ用プログラムP1を読み込んで実行する。この過程で有効
化ルーチンR1がCPU4に実行されると、次の(1)〜(3)の動作順序でデバッグ端子部制
御信号S3の値がHiになり、デバッグ端子部2のデバッグ端子機能は有効の状態になる。
When the power-on reset signal S1 is in the reset state and when the power-on reset signal S1 is in the released state when the power-on reset signal S1 is in the released state, The program P1 is read and executed. When the enabling routine R1 is executed by the CPU 4 in this process, the value of the debug terminal control signal S3 becomes Hi in the following operation sequence (1) to (3), and the debug terminal function of the debug terminal 2 is It becomes valid.

(1)有効化ルーチンR1の、「アドレス0x12345678に、値0x9aをライトする」という命令
コードをCPU4が読み込む。
(2)CPU4は、デバッグ端子部制御回路3に対して、アドレス0x12345678に、値0x9aを
ライトする操作を実行する。
(3)フリップフロップ34にHiが書き込まれる。
(1) The CPU 4 reads the instruction code “write value 0x9a to address 0x12345678” of the activation routine R1.
(2) The CPU 4 executes an operation for writing the value 0x9a to the address 0x12345678 to the debug terminal unit control circuit 3.
(3) Hi is written into the flip-flop 34.

上述の状態でデバッグ端子部2にデバッグ機器が接続されていると、デバッグ作業を実
施することができる。
If a debug device is connected to the debug terminal unit 2 in the above-described state, a debug operation can be performed.

[出荷時の動作例]
次に、図2に示した半導体装置100の出荷時の動作について説明する。半導体装置1
00の出荷時では、半導体装置100のデバッグ作業が完了して、外部メモリ7aの代わ
りに有効化ルーチンR1を含まない製品プログラムP2が記憶された外部メモリ7bが搭
載されていることを前提とする。
[Example of operation at shipment]
Next, the operation at the time of shipment of the semiconductor device 100 shown in FIG. 2 will be described. Semiconductor device 1
At the time of shipment of 00, it is assumed that the debugging operation of the semiconductor device 100 is completed and the external memory 7b in which the product program P2 not including the activation routine R1 is stored is mounted instead of the external memory 7a. .

SoC1は、上述で説明したデバッグ作業時の形態と同様に、半導体装置100の電源
投入時、パワーオンリセット信号S1が入力されてリセット状態になる。このとき、デバ
ッグ端子部制御回路3のフリップフロップ34もリセット状態であるため、デバッグ端子
部制御信号S3の値はLowであり、デバッグ端子部2のデバッグ端子機能は無効の状態に
なっている。
As in the debugging operation described above, SoC1 is reset when the power-on reset signal S1 is input when the semiconductor device 100 is powered on. At this time, since the flip-flop 34 of the debug terminal unit control circuit 3 is also in the reset state, the value of the debug terminal unit control signal S3 is Low, and the debug terminal function of the debug terminal unit 2 is in an invalid state.

パワーオンリセット信号S1が解除状態にされると、CPU4は、外部メモリ7bに記
憶されている製品プログラムP2を読み込んで実行する。この製品プログラムP2の実行
では、デバッグ端子部制御信号S3がHiとなることはなく、デバッグ端子部2のデバッグ
端子機能は無効の状態を保持する。
When the power-on reset signal S1 is released, the CPU 4 reads and executes the product program P2 stored in the external memory 7b. In the execution of the product program P2, the debug terminal unit control signal S3 does not become Hi, and the debug terminal function of the debug terminal unit 2 holds an invalid state.

このような状態でデバッグ端子部2にデバッグ機器を接続しても、デバッグ作業や製品
プログラムP2及びSoC1のハードウェア等を解析することは不可能である。以上のよ
うに、半導体装置100は、デバッグ作業時と出荷時とは動作が異なる。
Even if a debugging device is connected to the debugging terminal unit 2 in such a state, it is impossible to analyze the debugging work and the hardware of the product program P2 and SoC1. As described above, the semiconductor device 100 operates differently at the time of debugging and at the time of shipment.

このように、第1の実施の形態に係る半導体装置100によれば、デバッグを実行する
ためのデバッグ入力信号S4を生成するデバッグ機器に接続され、このデバッグ機器によ
りデバッグされる。これを前提にして、デバッグ端子部2は、デバッグ機器によって生成
されたデバッグ入力信号S4を受信する。CPU4は、デバッグ端子部2を有効化させる
有効化ルーチンR1を含むデバッグ用プログラムP1が予め記憶された外部メモリ7aか
ら当該デバッグ用プログラムP1を読み出して実行する。そして、デバッグ端子部制御回
路3は、CPU4で実行されたデバッグ用プログラムP1の中から有効化ルーチンR1を
抽出し、該抽出した有効化ルーチンR1に基づいて、デバッグ端子部2で受信されるデバ
ッグ入力信号S4をCPU4に入力するようにデバッグ端子部2を有効化する。
As described above, the semiconductor device 100 according to the first embodiment is connected to the debug device that generates the debug input signal S4 for executing debugging, and is debugged by this debug device. On the premise of this, the debug terminal unit 2 receives the debug input signal S4 generated by the debug device. The CPU 4 reads and executes the debugging program P1 from the external memory 7a in which the debugging program P1 including the enabling routine R1 for enabling the debugging terminal unit 2 is stored in advance. Then, the debug terminal unit control circuit 3 extracts the validation routine R1 from the debug program P1 executed by the CPU 4, and based on the extracted validation routine R1, the debug terminal unit 2 receives the debug. The debug terminal unit 2 is validated so as to input the input signal S4 to the CPU 4.

これにより、外部メモリ7aにデバッグ用プログラムP1が記憶されているときには、
デバッグ端子部2が有効になってデバッグ入力信号S4がCPU4に入力されるが、外部
メモリ7aにデバッグ用プログラムP1が記憶されていないとき、例えば、製品プログラ
ムP2が記憶されている外部メモリ7bを搭載しているときには、デバッグ端子部2が無
効になってデバッグ入力信号S4がCPU4に入力されない。つまり、外部メモリ7aを
搭載しているか否か(デバッグ用プログラムP1が記憶されているか否か)により、当該
半導体装置100がデバッグ可能か否かが決定される。
Thus, when the debugging program P1 is stored in the external memory 7a,
When the debug terminal 2 is enabled and the debug input signal S4 is input to the CPU 4, but the debug program P1 is not stored in the external memory 7a, for example, the external memory 7b in which the product program P2 is stored is stored. When installed, the debug terminal section 2 is disabled and the debug input signal S4 is not input to the CPU 4. That is, whether or not the semiconductor device 100 can be debugged is determined by whether or not the external memory 7a is installed (whether or not the debugging program P1 is stored).

また、CPU4は、デバッグを実行するためのデバッグ出力信号S5を生成する。デバ
ッグ端子部2は、CPU4によって生成されたデバッグ出力信号S5を受信する。そして
、デバッグ端子部制御回路3は、抽出した有効化ルーチンR1に基づいて、デバッグ端子
部2で受信されたデバッグ出力信号S5をデバッグ機器に出力するようにデバッグ端子部
2を制御する。
Further, the CPU 4 generates a debug output signal S5 for executing debugging. The debug terminal unit 2 receives the debug output signal S5 generated by the CPU 4. Then, the debug terminal unit control circuit 3 controls the debug terminal unit 2 so as to output the debug output signal S5 received by the debug terminal unit 2 to the debug device based on the extracted enabling routine R1.

これにより、外部メモリ7aにデバッグ用プログラムP1が記憶されているときには、
デバッグ端子部2が有効になってデバッグ出力信号S5がデバッグ機器に出力されるが、
外部メモリ7aにデバッグ用プログラムP1が記憶されていないとき、例えば、製品プロ
グラムP2が記憶されている外部メモリ7bを搭載しているときには、デバッグ端子部2
が無効になってデバッグ出力信号S5がデバッグ機器に出力されない。
Thus, when the debugging program P1 is stored in the external memory 7a,
The debug terminal 2 is enabled and the debug output signal S5 is output to the debug device.
When the debug program P1 is not stored in the external memory 7a, for example, when the external memory 7b in which the product program P2 is stored is mounted, the debug terminal unit 2
Becomes invalid and the debug output signal S5 is not output to the debug device.

この結果、デバッグ作業時にデバッグ端子部2を有効化することにより、デバッグ作業
の利便性を向上させることができ、出荷時にデバッグ端子部2を無効化することにより、
デバッグ端子部2から製品プログラムP2の動作や当該半導体装置100のハードウェア
構造等を解析されることを防止できる(リバースエンジニアリングを防止できる)。そし
て、従来のように2品種の設計、製造をする必要がなく、また、ICカードや認証回路等
を用いないので、半導体装置の製造コストを低減することができる。
As a result, it is possible to improve the convenience of the debugging work by enabling the debug terminal part 2 at the time of debugging work, and by disabling the debugging terminal part 2 at the time of shipment,
Analysis of the operation of the product program P2 and the hardware structure of the semiconductor device 100 from the debug terminal unit 2 can be prevented (reverse engineering can be prevented). Then, it is not necessary to design and manufacture two types as in the prior art, and since no IC card or authentication circuit is used, the manufacturing cost of the semiconductor device can be reduced.

なお、本実施の形態では、デバッグ端子部の構成として、図3に示したイネーブル付バ
ッファを用いてデバッグ信号を遮断したが、これに限定されず、ANDゲートやORゲー
トを用いても良い。この場合、ロジックレベルをLow、又は、Hiに固定することでデバッ
グ端子機能を無効化することができる。
In the present embodiment, the debug signal is cut off using the enable buffer shown in FIG. 3 as the configuration of the debug terminal unit. However, the present invention is not limited to this, and an AND gate or an OR gate may be used. In this case, the debug terminal function can be invalidated by fixing the logic level to Low or Hi.

また、デバッグ端子部制御回路の構成として、図4に示したように、一箇所のアドレス
に1つの値をライトすることでデバッグ端子部制御信号の値を変更するようにしたが、こ
れに限定されず、一箇所のアドレスに複数回順番に値をライトすることでデバッグ端子部
制御信号の値を変更するようにしても良い。
In addition, as shown in FIG. 4, the debug terminal unit control circuit is configured to change the value of the debug terminal unit control signal by writing one value to one address, but this is not limitative. Instead, the value of the debug terminal unit control signal may be changed by sequentially writing the value to a single address multiple times.

更に、外部メモリの格納する製品プログラムは、暗号化されていても暗号化されていな
くても構わない。製品プログラムが暗号化されている場合、デバッグ端子部が無効である
ことから、第三者がSoC1上での復号処理、製品プログラムの処理手順、初期データ及
びアルゴリズムを解析することは不可能である。また、製品プログラムが暗号化されてい
ない場合、第三者により外部メモリから直接製品プログラムを読みされて解析される可能
性がある。しかし、製品プログラムには有効化ルーチンが含まれていないことからデバッ
グ端子部を有効化する手段を知られることはない。SoC用のプログラムの解析は、実施
のSoCで実行させてデバッグ端子を介したモニタを行わない限り困難である。
Furthermore, the product program stored in the external memory may or may not be encrypted. When the product program is encrypted, the debug terminal portion is invalid, so that it is impossible for a third party to analyze the decryption process on the SoC 1, the process procedure of the product program, the initial data, and the algorithm. . Further, when the product program is not encrypted, the product program may be directly read from the external memory and analyzed by a third party. However, since the activation routine is not included in the product program, no means for activating the debug terminal unit is known. The analysis of the SoC program is difficult unless it is executed by the SoC and monitored through the debug terminal.

<第2の実施の形態>
第2の実施の形態では、第1の実施の形態で説明した内部メモリ5にメモリライト端子
部8を設けて、内部メモリ5の内容を書き換え可能にした半導体装置200について説明
する。第1の実施の形態と同じ名称及び符号のものは同じ機能を有するので、その説明を
省略する。
<Second Embodiment>
In the second embodiment, a semiconductor device 200 in which the memory write terminal portion 8 is provided in the internal memory 5 described in the first embodiment and the contents of the internal memory 5 can be rewritten will be described. The same names and reference numerals as those of the first embodiment have the same functions, and thus description thereof is omitted.

図5に示すように、半導体装置200は、前述の第1の実施の形態で説明した外部メモ
リ7a,7bを備えず、SoC1Aのみで構成される。SoC1Aは、デバッグ端子部2
、デバッグ端子部制御回路3、CPU4、内部メモリ5、機能回路6及びメモリライト端
子部8を備える。
As shown in FIG. 5, the semiconductor device 200 does not include the external memories 7a and 7b described in the first embodiment and is configured only by the SoC 1A. SoC1A is a debug terminal 2
, A debug terminal unit control circuit 3, a CPU 4, an internal memory 5, a functional circuit 6, and a memory write terminal unit 8.

メモリライト端子部8は、外部接続可能な外部端子の一例であり、内部メモリ5に接続
される。メモリライト端子部8は、内部メモリ5に記憶されているプログラムを外部から
書き換え可能にする端子である。但し、メモリライト端子部8は、プログラムの読み出し
はできない。
The memory write terminal unit 8 is an example of an external terminal that can be externally connected, and is connected to the internal memory 5. The memory write terminal unit 8 is a terminal that enables the program stored in the internal memory 5 to be rewritten from the outside. However, the memory write terminal unit 8 cannot read the program.

デバッグ作業時に、メモリライト端子部8を介して有効化ルーチンR1を含むデバッグ
用プログラムP1を内部メモリ5に記憶させる。すると、CPU4は、内部メモリ5に記
憶されたデバッグ用プログラムP1を読み出して実行し、前述の半導体装置100の動作
と同様に、デバッグ端子部2を有効化にすることができる。
During debugging, a debugging program P1 including an enabling routine R1 is stored in the internal memory 5 via the memory write terminal unit 8. Then, the CPU 4 can read out and execute the debugging program P1 stored in the internal memory 5 and enable the debug terminal unit 2 in the same manner as the operation of the semiconductor device 100 described above.

また、製品出荷時に、メモリライト端子部8を介して有効化ルーチンR1を含まない製
品プログラムP2を内部メモリ5に記憶させる。すると、CPU4は、内部メモリ5に記
憶された製品プログラムP2を読み出して実行し、前述の半導体装置100の動作と同様
に、デバッグ端子部2の無効化を維持することができる。
At the time of product shipment, a product program P2 that does not include the activation routine R1 is stored in the internal memory 5 via the memory write terminal unit 8. Then, the CPU 4 can read and execute the product program P2 stored in the internal memory 5, and can maintain the invalidation of the debug terminal unit 2 in the same manner as the operation of the semiconductor device 100 described above.

このように、第2の実施の形態に係る半導体装置200によれば、内部メモリ5のプロ
グラムを書き換え自在なメモリライト端子部8を備えるので、前述の半導体装置100の
ように外部メモリ7a,7bの2種類のメモリを容易する必要が無くなり、また、外部メ
モリ7a,7b用のスペースを確保する必要が無くなり、半導体装置100に比べて製造
コストを低減することができる。
As described above, according to the semiconductor device 200 according to the second embodiment, the memory write terminal portion 8 in which the program of the internal memory 5 can be rewritten is provided, so that the external memories 7a and 7b as in the semiconductor device 100 described above. It is not necessary to facilitate the two types of memories, and it is not necessary to secure a space for the external memories 7a and 7b, so that the manufacturing cost can be reduced as compared with the semiconductor device 100.

1,1A,1B SoC
2 デバッグ端子部
3 デバッグ端子部制御回路
4 CPU
5 内部メモリ
6 機能回路
7a,7b 外部メモリ
8 メモリライト端子部
10 システムバス
21 イネーブル付入力バッファ
22 イネーブル付出力バッファ
31 I/F
32 アドレスデコーダ
33 データデコーダ
34 フリップフロップ
100,200 半導体装置
P1 デバッグ用プログラム
P2 製品プログラム
R1 有効化ルーチン
S1 パワーオンリセット信号
S2 有効化信号
S3 デバッグ端子部制御信号
S4 デバッグ入力信号
S5 デバッグ出力信号
1,1A, 1B SoC
2 Debug terminal section 3 Debug terminal section control circuit 4 CPU
DESCRIPTION OF SYMBOLS 5 Internal memory 6 Functional circuit 7a, 7b External memory 8 Memory write terminal part 10 System bus 21 Input buffer with enable 22 Output buffer with enable 31 I / F
32 Address decoder 33 Data decoder 34 Flip-flop 100,200 Semiconductor device P1 Debug program P2 Product program R1 Enable routine S1 Power-on reset signal S2 Enable signal S3 Debug terminal control signal S4 Debug input signal S5 Debug output signal

Claims (6)

デバッグを実行するためのデバッグ入力信号を生成するデバッグ機器に接続され、該デ
バッグ機器によりデバッグされる半導体装置において、
前記デバッグ機器によって生成されたデバッグ入力信号を受信するデバッグ端子部と、
該デバッグ端子部を有効化させる有効化ルーチンを含むデバッグ用プログラムが予め記
憶されたメモリから当該デバッグ用プログラムを読み出して実行するプロセッサと、
該プロセッサで実行されたデバッグ用プログラムの中から前記有効化ルーチンを抽出し
、該抽出した有効化ルーチンに基づいて、前記デバッグ端子部で受信されるデバッグ入力
信号を前記プロセッサに入力するように前記デバッグ端子部を有効化するデバッグ端子部
制御部とを備えることを特徴とする半導体装置。
In a semiconductor device that is connected to a debug device that generates a debug input signal for executing debugging and is debugged by the debug device,
A debug terminal unit for receiving a debug input signal generated by the debug device;
A processor that reads and executes a debugging program from a memory in which a debugging program including an activation routine for activating the debug terminal unit is stored in advance;
The enabling routine is extracted from the debugging program executed by the processor, and based on the extracted enabling routine, the debug input signal received at the debug terminal unit is input to the processor. A semiconductor device comprising: a debug terminal unit control unit that activates the debug terminal unit.
前記プロセッサは、デバッグを実行するためのデバッグ出力信号を生成し、
前記デバッグ端子部は、前記プロセッサによって生成されたデバッグ出力信号を受信し

前記デバッグ端子部制御部は、前記プロセッサで実行されたデバッグ用プログラムの中
から前記有効化ルーチンを抽出し、該抽出した有効化ルーチンに基づいて、前記デバッグ
端子部で受信されるデバッグ出力信号を前記デバッグ機器に出力するように前記デバッグ
端子部を有効化することを特徴とする請求項1に記載の半導体装置。
The processor generates a debug output signal for performing debugging;
The debug terminal unit receives a debug output signal generated by the processor,
The debug terminal unit control unit extracts the validation routine from a debugging program executed by the processor, and outputs a debug output signal received by the debug terminal unit based on the extracted validation routine. The semiconductor device according to claim 1, wherein the debug terminal unit is validated so as to be output to the debug device.
前記デバッグ端子部制御部は、
前記デバッグ用プログラムから抽出した有効化ルーチンに基づいて、前記デバッグ端子
部を有効化するためのデバッグ端子部制御信号を生成し、該生成したデバッグ端子部制御
信号を前記デバッグ端子部に出力することを特徴とする請求項1又は2に記載の半導体装
置。
The debug terminal unit control unit includes:
Based on an enabling routine extracted from the debugging program, generating a debug terminal part control signal for enabling the debug terminal part, and outputting the generated debug terminal part control signal to the debug terminal part The semiconductor device according to claim 1 or 2.
前記デバッグ端子部は、
前記デバッグ端子部制御部から前記デバッグ端子部制御信号を受信した場合に、前記デ
バッグ入力信号を前記プロセッサに入力し、及び/又は、前記デバッグ出力信号を前記デ
バッグ機器に出力することを特徴とする請求項1乃至3のいずれかに記載の半導体装置。
The debug terminal section is
When the debug terminal unit control signal is received from the debug terminal unit control unit, the debug input signal is input to the processor and / or the debug output signal is output to the debug device. The semiconductor device according to claim 1.
前記デバッグ端子部、前記プロセッサ及び前記デバッグ端子部制御部は、1つの半導体
基板上に形成され、
前記メモリは、前記半導体基板に着脱自在に取り付けられて、当該半導体装置を動作さ
せるための製品プログラムが記憶された製品メモリと交換可能であることを特徴とする請
求項1乃至4のいずれかに記載の半導体装置。
The debug terminal unit, the processor, and the debug terminal unit control unit are formed on one semiconductor substrate,
5. The memory according to claim 1, wherein the memory is detachably attached to the semiconductor substrate and can be exchanged for a product memory storing a product program for operating the semiconductor device. The semiconductor device described.
前記デバッグ端子部、前記プロセッサ、前記デバッグ端子部制御部及び前記メモリは、
1つの半導体基板上に形成され、
前記メモリには当該半導体装置を動作させるための製品プログラムが入力される外部接
続可能な外部端子が設けられ、
前記メモリは、記憶している前記デバッグ用プログラムを、前記外部端子に入力される
前記製品プログラムに書き換え自在であることを特徴とする請求項1乃至4のいずれかに
記載の半導体装置。
The debug terminal unit, the processor, the debug terminal unit control unit, and the memory are
Formed on one semiconductor substrate,
The memory is provided with an externally connectable external terminal to which a product program for operating the semiconductor device is input,
5. The semiconductor device according to claim 1, wherein the memory can rewrite the stored debugging program into the product program input to the external terminal. 6.
JP2010224736A 2010-10-04 2010-10-04 Semiconductor device Pending JP2012079152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010224736A JP2012079152A (en) 2010-10-04 2010-10-04 Semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010224736A JP2012079152A (en) 2010-10-04 2010-10-04 Semiconductor device

Publications (1)

Publication Number Publication Date
JP2012079152A true JP2012079152A (en) 2012-04-19

Family

ID=46239303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010224736A Pending JP2012079152A (en) 2010-10-04 2010-10-04 Semiconductor device

Country Status (1)

Country Link
JP (1) JP2012079152A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016076106A (en) * 2014-10-07 2016-05-12 セイコーエプソン株式会社 Semiconductor device and electronic equipment
US11357106B2 (en) 2020-08-31 2022-06-07 Kioxia Corporation Memory system
JP2022554255A (en) * 2019-10-28 2022-12-28 ザイリンクス インコーポレイテッド Subsystems for configuration, security, and management of adaptive systems

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016076106A (en) * 2014-10-07 2016-05-12 セイコーエプソン株式会社 Semiconductor device and electronic equipment
JP2022554255A (en) * 2019-10-28 2022-12-28 ザイリンクス インコーポレイテッド Subsystems for configuration, security, and management of adaptive systems
JP7617096B2 (en) 2019-10-28 2025-01-17 ザイリンクス インコーポレイテッド Subsystem for configuration, security, and management of adaptive systems
US11357106B2 (en) 2020-08-31 2022-06-07 Kioxia Corporation Memory system

Similar Documents

Publication Publication Date Title
JP5419776B2 (en) Semiconductor device and data processing method
US20090204823A1 (en) Method and apparatus for controlling system access during protected modes of operation
JP5752767B2 (en) Processor, method and system using multiple authenticated code modules
US8561170B2 (en) Processor and semiconductor device
US8239663B2 (en) System and method for maintaining the security of memory contents and computer architecture employing the same
JP2011210037A5 (en)
KR20090095843A (en) Processor apparatus having secure performance
CN102486755A (en) Memory protection unit and method for controlling access to memory device
JP2000122931A (en) Digital integrated circuit
JPH1091426A5 (en)
US20060259828A1 (en) Systems and methods for controlling access to secure debugging and profiling features of a computer system
US11734457B2 (en) Technology for controlling access to processor debug features
EP4379582B1 (en) Host-device interface for debug authentication
JP2012079152A (en) Semiconductor device
US7254720B1 (en) Precise exit logic for removal of security overlay of instruction space
US11281576B2 (en) Memory device
US20170262384A1 (en) Method for protecting memory against unauthorized access
CN114968117B (en) Memory protection system
US20090172414A1 (en) Device and method for securing software
JP5761880B2 (en) Automobile
JP2010021637A (en) Data processor
US7774758B2 (en) Systems and methods for secure debugging and profiling of a computer system
CN110275845B (en) Memory control method and device and electronic equipment
JP2010160765A (en) System lsi and debugging method thereof
JP5603993B2 (en) Electrical unit and data processing method