JP2002007156A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP2002007156A
JP2002007156A JP2000186613A JP2000186613A JP2002007156A JP 2002007156 A JP2002007156 A JP 2002007156A JP 2000186613 A JP2000186613 A JP 2000186613A JP 2000186613 A JP2000186613 A JP 2000186613A JP 2002007156 A JP2002007156 A JP 2002007156A
Authority
JP
Japan
Prior art keywords
program
update
debug
instruction
start address
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
JP2000186613A
Other languages
Japanese (ja)
Inventor
Yasuhiro Saegusa
保裕 三枝
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2000186613A priority Critical patent/JP2002007156A/en
Publication of JP2002007156A publication Critical patent/JP2002007156A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To instantaneously update the erroneous program area of a mask ROM without making it necessary to newly manufacture an LSI, or spending any excessive costs. SOLUTION: In a data register 13, the start address of the update area of a mask instruction ROM is set through DTI, TMS, and TCK being JTAG terminals in a debug event point register 14, and address break is set in a debug control register 15, and an update program is set in a debug instruction memory 16. When the execution of the instruction of a mask instruction ROM 31 under the control of a CPU core 30 reaches the front of start address of the update area, an update program is executed by a debug control part 20. When the update program is ended, the execution is started from the next program in the update area of the mask instruction ROM 31.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、JTAG端子を介
して内蔵されているデバッグ機能にアクセスし、マスク
ROMのプログラムを更新するマイクロプロセッサに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor for accessing a built-in debug function via a JTAG terminal and updating a program in a mask ROM.

【0002】[0002]

【従来の技術】CPUやDSP等のマイクロプロセッサ
では、大量生産時にはコスト削減が図れるため、メモリ
としてマスクROMを内蔵したマスクROM製品が使用
される。また、最近のマイクロプロセッサには、ICE
の代わりにデバッグ機能を内蔵し、国際標準規格IEE
E1149.1であるバウンダリスキャン(通称JTA
G)を使ってデバッグ機能にアクセスするものが増えて
いる。
2. Description of the Related Art In a microprocessor such as a CPU or a DSP, a mask ROM product having a built-in mask ROM is used as a memory because cost can be reduced during mass production. In addition, recent microprocessors include ICE
Built-in debugging function instead of the international standard IEEE
E1149.1 boundary scan (commonly known as JTA
The use of G) to access debug functions is increasing.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来技
術によるマスクROM製品の場合、LSI製造後にプロ
グラムに誤り(バグ)が発見されると、マスクROMの
部分を作り直すために、再度、LSIを製造し直さなけ
ればならない。このため、LSIの製造期間および製造
費が余計に発生してしまい、さらには、装置としての正
式なリリース時期が遅れ、装置コストにも影響を与える
結果となってしまっていた。
However, in the case of a mask ROM product according to the prior art, if an error (bug) is found in the program after manufacturing the LSI, the LSI is manufactured again in order to recreate the mask ROM portion. I have to fix it. For this reason, the manufacturing period and manufacturing cost of the LSI are unnecessarily increased, and the formal release time of the device is delayed, which also affects the device cost.

【0004】この発明は上述した事情に鑑みてなされた
もので、新たにLSIを製造する必要も無く、余計な費
用を掛けずに、しかも瞬時に、マスクROMの誤ったプ
ログラムエリアを更新することができるマイクロプロセ
ッサを提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and there is no need to manufacture a new LSI, and it is possible to instantaneously update an erroneous program area of a mask ROM without extra cost. It is an object of the present invention to provide a microprocessor capable of performing the following.

【0005】[0005]

【課題を解決するための手段】上述した問題点を解決す
るために、請求項1記載の発明では、プログラムが格納
されたマスク命令ROMと、該マスク命令ROMのプロ
グラムを実行するCPUコアと、JTAG端子を用いて
アクセス可能なデバッグ機能部とを備えるマイクロプロ
セッサにおいて、前記デバッグ機能部に、前記マスク命
令ROMの更新エリアのスタートアドレスと更新プログ
ラムとを設定する設定手段と、前記CPUコアによるマ
スク命令ROMのプログラム実行が、前記デバッグ機能
部に設定された、更新エリアのスタートアドレスの前ま
で達すると、前記デバッグ機能部に設定されている更新
プログラムを実行させ、更新プログラムが終了すると、
前記マスク命令ROMの更新エリアの次のプログラムか
ら実行させるデバッグ制御手段とを具備することを特徴
とする。
In order to solve the above-mentioned problems, according to the present invention, a mask instruction ROM storing a program, a CPU core for executing the program of the mask instruction ROM, A microprocessor having a debug function accessible using a JTAG terminal, a setting means for setting a start address of an update area of the mask instruction ROM and an update program in the debug function, and a mask by the CPU core. When the program execution of the instruction ROM reaches the start address of the update area set in the debug function unit, the update program set in the debug function unit is executed, and when the update program ends,
Debug control means for executing the next program in the update area of the mask instruction ROM.

【0006】また、請求項2記載の発明では、請求項1
記載のマイクロプロセッサにおいて、前記スタートアド
レスおよび前記更新プログラムは、前記JTAG端子か
ら供給されることを特徴とする。
Further, according to the invention described in claim 2, according to claim 1,
In the above described microprocessor, the start address and the update program are supplied from the JTAG terminal.

【0007】また、請求項3記載の発明では、請求項1
記載のマイクロプロセッサにおいて、セルフブートある
いはホストブートにより、外部からインストラクション
が設定可能な命令RAMを備え、前記デバッグ機能部が
更新プログラムを格納するのに十分な容量がない場合に
は、更新プログラムの一部を前記命令RAMに格納し、
更新プログラムが連続して実行されるようにアドレス設
定することを特徴とすることを特徴とする。
[0007] According to the third aspect of the present invention, the first aspect of the present invention.
The microprocessor according to any one of claims 1 to 3, further comprising an instruction RAM in which instructions can be externally set by self boot or host boot, and when the debug function unit does not have a sufficient capacity to store the update program, the Part in the instruction RAM,
The address is set so that the update program is executed continuously.

【0008】上述した問題点を解決するために、請求項
4記載の発明では、主にデジタル信号処理を行う第1の
プロセッサと、主に制御処理を行う第2のプロセッサ
と、前記第1のプロセッサにより実行されるプログラム
が格納されたマスク命令ROMと、JTAG端子を用い
てアクセス可能なデバッグ機能部とを備えるマイクロプ
ロセッサにおいて、前記第2のプロセッサの制御に従っ
て、前記マスク命令ROMの更新エリアのスタートアド
レスと更新プログラムとを生成する更新制御手段と、前
記更新制御手段により生成された、前記マスク命令RO
Mの更新エリアのスタートアドレスと更新プログラムと
を前記デバッグ機能部に設定する設定手段と、前記CP
Uコアによるマスク命令ROMのプログラム実行が、前
記デバッグ機能部に設定された、更新エリアのスタート
アドレスの前まで達すると、前記デバッグ機能部に設定
されている更新プログラムを実行させ、更新プログラム
が終了すると、前記マスク命令ROMの更新エリアの次
のプログラムから実行させるデバッグ制御手段とを具備
することを特徴とする。
In order to solve the above-mentioned problems, according to the invention of claim 4, the first processor which mainly performs digital signal processing, the second processor which mainly performs control processing, and the first processor In a microprocessor including a mask instruction ROM storing a program to be executed by a processor and a debug function unit accessible using a JTAG terminal, an update area of the mask instruction ROM is controlled according to control of the second processor. Update control means for generating a start address and an update program; and the mask instruction RO generated by the update control means.
Setting means for setting a start address of an M update area and an update program in the debug function unit;
When the program execution of the mask instruction ROM by the U core reaches the start address of the update area set in the debug function unit, the update program set in the debug function unit is executed, and the update program ends. Then, there is provided a debug control means for executing from the program next to the update area of the mask instruction ROM.

【0009】また、請求項5記載の発明では、請求項4
記載のマイクロプロセッサにおいて、前記JTAG端子
からの前記マスク命令ROMの更新エリアのスタートア
ドレスおよび更新プログラムと、前記更新制御手段から
の前記マスク命令ROMの更新エリアのスタートアドレ
スおよび更新プログラムとのいずれか一方を選択する選
択手段を具備し、前記設定手段は、前記選択手段により
選択された、前記マスク命令ROMの更新エリアのスタ
ートアドレスと更新プログラムとを前記デバッグ機能部
に設定することを特徴とする。
Further, according to the invention described in claim 5, according to claim 4,
Any one of a start address and an update program of the update area of the mask instruction ROM from the JTAG terminal, and a start address and an update program of the update area of the mask instruction ROM from the update control means. The setting means sets the start address and the update program of the update area of the mask instruction ROM selected by the selection means in the debug function unit.

【0010】この発明では、JTAG端子を通して、デ
バッグ機能部へマスク命令ROM31の更新エリア(プ
ログラムとして誤っている部分)のスタートアドレス
と、更新プログラムとを設定し、デバッグ制御手段によ
り、前記CPUコアによるマスク命令ROMのプログラ
ム実行が、前記デバッグ機能部に設定された、更新エリ
アのスタートアドレスの前まで達すると、前記デバッグ
機能部に設定されている更新プログラムを実行させ、更
新プログラムが終了すると、前記マスク命令ROMの更
新エリアの次のプログラムから実行させる。したがっ
て、新たにLSIを製造する必要も無く、余計な費用を
掛けずに、しかも瞬時に、マスクROMの誤ったプログ
ラムエリアを更新することが可能となる。
In the present invention, the start address of the update area of the mask instruction ROM 31 (the part incorrect as a program) and the update program are set in the debug function unit through the JTAG terminal, and the debug control means controls the CPU core. When the program execution of the mask instruction ROM reaches up to the start address of the update area set in the debug function unit, the update program set in the debug function unit is executed. The program is executed from the next program in the update area of the mask instruction ROM. Therefore, it is not necessary to manufacture a new LSI, and it is possible to update an incorrect program area of the mask ROM instantaneously without extra cost.

【0011】[0011]

【発明の実施の形態】以下、図面を用いて本発明の実施
の形態を説明する。 A.実施形態の構成 図1は、本発明の実施形態による全体の構成を示すブロ
ック図である。図において、TAPコントローラ10
は、JTAG端子であるTMSにモード信号S2、TC
Kにクロック信号S3が供給されることにより、命令レ
ジスタ11に制御信号S18を送出し、データレジスタ
13に制御信号S17を送出する。命令レジスタ11に
制御信号S18が供給されると、JTAG端子であるT
DIに供給されるデータ信号S1によるインストラクシ
ョンが設定される。命令デコーダ12は、命令レジスタ
11に設定されたインストラクションをデコードする。
データレジスタ13は、デコードされたインストラクシ
ョンに従って、所望のレジスタを選択する。データレジ
スタ13の中で選択されたレジスタには、TDIに供給
されるデータ信号S1によるデータが制御信号S17に
より設定される。CPUコア30、デバッグ制御部2
0、マスク命令ROM31、命令RAM32は、アドレ
ス/データバス33で接続されている。デバッグ制御部
20は、CPUコア30がマスク命令ROM31を実行
中に、データレジスタ13に設定されたブレーク条件、
プログラムを実行する。
Embodiments of the present invention will be described below with reference to the drawings. A. Configuration of Embodiment FIG. 1 is a block diagram showing an overall configuration according to an embodiment of the present invention. In the figure, the TAP controller 10
Are the mode signals S2 and TC to TMS which is the JTAG terminal.
When the clock signal S3 is supplied to K, the control signal S18 is transmitted to the instruction register 11 and the control signal S17 is transmitted to the data register 13. When the control signal S18 is supplied to the instruction register 11, the JTAG terminal T
An instruction based on the data signal S1 supplied to DI is set. The instruction decoder 12 decodes the instructions set in the instruction register 11.
The data register 13 selects a desired register according to the decoded instruction. In a register selected from among the data registers 13, data based on the data signal S1 supplied to the TDI is set by a control signal S17. CPU core 30, debug control unit 2
0, a mask instruction ROM 31, and an instruction RAM 32 are connected by an address / data bus 33. While the CPU core 30 is executing the mask instruction ROM 31, the debug control unit 20 sets the break condition set in the data register 13;
Execute the program.

【0012】B.実施形態の動作 次に、上述した実施形態の動作を説明する。ここで、図
2は、本実施形態の動作を説明するためのフローチャー
トである。また、図3は、タイミングチャートである。
マイクロプロセッサには、JTAGを利用したデバッグ
機能が内蔵されており、それはJTAG端子であるTD
I、TMS、TCKと、TAPコントローラ10、命令
レジスタ11、命令デコーダ12、データレジスタ1
3、デバッグ制御部20とを用いることにより実現され
る。JTAGは、国際標準規格IEEE1149.1で
定められたバウンダリスキャンの通称であり、デバッグ
機能はIEEE1149.1でデバイス設計者が独自に
決定できるように設けられたプライベート命令を使用す
る。命令レジスタ11のインストラクション設定、デー
タレジスタ13の選択およびデータ設定は、IEEE1
149.1に定められた手順およびインタフェースでT
DI、TMS、TCKを通して行われる。
B. Next, the operation of the above-described embodiment will be described. Here, FIG. 2 is a flowchart for explaining the operation of the present embodiment. FIG. 3 is a timing chart.
The microprocessor has a built-in debug function using JTAG, which is a TD which is a JTAG terminal.
I, TMS, TCK, TAP controller 10, instruction register 11, instruction decoder 12, data register 1
3. It is realized by using the debug control unit 20. JTAG is a common name of the boundary scan defined in the international standard IEEE1149.1, and the debug function uses a private instruction provided in IEEE1149.1 so that a device designer can independently determine it. The instruction setting of the instruction register 11, the selection of the data register 13, and the data setting are performed by the IEEE1.
T with the procedures and interfaces defined in 149.1
This is done through DI, TMS, and TCK.

【0013】マスク命令ROM31に、プログラムの誤
りが発見され、そのメモリエリアがXXアドレスからY
Yアドレスまでとする。まず、デバッグポイントイベン
トレジスタ14に更新しなければならないメモリエリア
のスタートアドレスXXを設定する(S1)。その手順
は、図3で示されるように、TDIにデータ信号S1
を、TMSにモード信号S2を、TCKにクロック信号
S3を供給することにより、命令レジスタ11にデバッ
グイベントポイントレジスタを選択するインストラクシ
ョン(例として20h)を、TAPコントローラ10か
らの制御信号S18により設定し、それが命令デコーダ
12によりデコードされ、データレジスタ13の中から
デバッグイベントポイントレジスタ14が選択される。
そして、デバッグポイントレジスタ14には、更新しな
ければならないメモリエリアのスタートアドレスXXが
ブレークアドレス値として制御信号S17により設定さ
れる。
A program error is found in the mask instruction ROM 31, and the memory area is changed from the XX address to the Y address.
Up to the Y address. First, a start address XX of a memory area to be updated is set in the debug point event register 14 (S1). The procedure is as shown in FIG.
By supplying the mode signal S2 to the TMS and the clock signal S3 to the TCK, an instruction (for example, 20h) for selecting the debug event point register is set in the instruction register 11 by the control signal S18 from the TAP controller 10. Are decoded by the instruction decoder 12, and the debug event point register 14 is selected from the data register 13.
Then, in the debug point register 14, the start address XX of the memory area to be updated is set as a break address value by the control signal S17.

【0014】同様にして、デバッグコントロールレジス
タ15にブレーク要因であるインストラクションアドレ
スブレークが設定され(S2)、デバッグインストラク
ションメモリ16に更新プログラムが設定される(S
3)。ここで、更新プログラムの容量は、XXアドレス
からYYアドレスまでの領域となるが、本来デバッグ用
であるデバッグインストラクションメモリ16には十分
なメモリ領域が確保されていない場合がある。デバッグ
インストラクションメモリ16の領域で足りる場合に
は、デバッグインストラクションメモリ16の最後尾の
インストラクションにYYの次のアドレスへのJUMP
命令を設定しておく。デバッグインストラクションメモ
リ16の領域で足りない場合には、バッグインストラク
ションメモリ16の最後尾のインストラクションに命令
RAM32のアドレスZZへのJUMP命令を設定して
おく。命令RAM32は、マスク命令ROM31に比べ
て小容量であるが、セルフブートあるいはホストブート
により外部からインストラクションを設定することがで
きる。ここでは、アドレスZZからの領域に予め更新プ
ログラムをブートしておく。命令RAM32にブートす
る更新プログラムの最後尾のインストラクションにアド
レスYYの次のアドレスへのJUMP命令を設定してお
く。
Similarly, an instruction address break which is a cause of a break is set in the debug control register 15 (S2), and an update program is set in the debug instruction memory 16 (S2).
3). Here, the capacity of the update program is an area from the XX address to the YY address, but there is a case where a sufficient memory area is not secured in the debug instruction memory 16 which is originally used for debugging. If the area of the debug instruction memory 16 is sufficient, the last instruction of the debug instruction memory 16 includes a JUMP to the address next to YY.
Set an instruction. If the area of the debug instruction memory 16 is not enough, a JUMP instruction to the address ZZ of the instruction RAM 32 is set in the last instruction of the bag instruction memory 16. The instruction RAM 32 has a smaller capacity than the mask instruction ROM 31, but instructions can be externally set by self boot or host boot. Here, the update program is booted in advance in the area from the address ZZ. A JUMP instruction to the address next to the address YY is set in the last instruction of the update program to be booted in the instruction RAM 32.

【0015】JTAGを通しての設定が終了すると、C
PUコア30は、アドレス/データバス30を通してマ
スク命令ROM31のプログラムを実行していく(S
4)。プログラムがアドレスXXの手前まで実行される
と、デバッグ制御部20によりインストラクションアド
レスブレークが発生し(S5)、デバッグインストラク
ションメモリ16に設定された更新プログラムが実行さ
れる(S6)。更新プログラムがデバッグインストラク
ションメモリ16の領域に収まっている場合には、デバ
ッグインストラクションメモリ16の最後尾のインスト
ラクション実行後、マスク命令ROM31のアドレスY
Yの次のアドレスからプログラムが実行される(S7,
S8)。一方、更新プログラムがデバッグインストラク
ションメモリ16の領域に収まっていない場合には、更
新プログラムは、デバッグインストラクションメモリ1
6から命令RAM32に渡り実行され、更新プログラム
が終了すると、マスク命令ROM31のアドレスYYの
次のアドレスからプログラムが実行される(S7,S
8)。
When the setting through JTAG is completed, C
The PU core 30 executes the program of the mask instruction ROM 31 through the address / data bus 30 (S
4). When the program is executed up to just before the address XX, an instruction address break occurs by the debug control unit 20 (S5), and the update program set in the debug instruction memory 16 is executed (S6). When the update program is stored in the area of the debug instruction memory 16, after the last instruction of the debug instruction memory 16 is executed, the address Y of the mask instruction ROM 31 is changed.
The program is executed from the address following Y (S7,
S8). On the other hand, if the update program does not fit in the area of the debug instruction memory 16, the update program
6, the program is executed from the address following the address YY of the mask instruction ROM 31 (S7, S7).
8).

【0016】C.他の実施形態 次に、本発明の他の実施形態について説明する。図4
は、本発明の他の実施形態における構成を示すブロック
図である。なお、図1に対応する部分には同一の符号を
付けて説明を省略する。本他の実施形態においては、主
にデジタル信号処理を行うDSPコア34と、マスタプ
ロセッサとして主に制御処理を行うメインCPU50と
が搭載された、すなわち1チップ上に複数のプロセッサ
コアが搭載されている場合を想定している。前述した実
施形態においては、更新プログラムは、外部からJTA
G端子を通して設定されたが、本他の実施形態では、メ
インCPU50がプログラム更新コントローラ54を制
御することにより行う。
C. Another Embodiment Next, another embodiment of the present invention will be described. FIG.
FIG. 9 is a block diagram showing a configuration according to another embodiment of the present invention. Note that the same reference numerals are given to portions corresponding to FIG. In this other embodiment, a DSP core 34 that mainly performs digital signal processing and a main CPU 50 that mainly performs control processing as a master processor are mounted, that is, a plurality of processor cores are mounted on one chip. Is assumed. In the above-described embodiment, the update program is provided by JTA from outside.
Although the setting is performed through the G terminal, in the present embodiment, the setting is performed by the main CPU 50 controlling the program update controller 54.

【0017】インストラクションブレークアドレスレジ
スタ51には、メインCPU50により、アドレス/デ
ータバス55を介して、マスク命令ROM31の更新し
なければならないメモリエリアのスタートアドレスが設
定される。更新プログラムスタートアドレスレジスタ5
2には、メインCPU50により、アドレス/データバ
ス55を介して、命令RAM32に予めブートされた更
新プログラムのスタートアドレスが設定される。セレク
タ40は、JTAG端子であるTMS、TCK、TDI
を介して外部から入力される信号S2、S3、S1と、
内部でプログラム更新コントローラ54から生成される
信号S56(信号S2に相当)、S57(信号S3に相
当)、S58(信号S1に相当)とのいずれか一方を、
外部端子MUX41から供給される選択信号により選択
する。TMS、TCK、TDIにJTAG方式エミュレ
ータを接続し、デバッグを行う場合には、TMS、TC
K、TDIを介して外部から供給される信号S2、S
3、S1を選択する。一方、DSPコア34およびメイ
ンCPU50が実動作中で、マスク命令ROMのあるプ
ログラムエリアを更新したい場合には、プログラム更新
コントローラ54で生成される信号S56、S57、S
58を選択する。セレクタ40により選択された信号S
42(信号S2または信号S56)、信号S43(信号
S3または信号S57)は、TAPコントローラ10
に、信号S44(信号S1または信号S58)は、命令
レジスタ11およびデータレジスタ13に供給される。
In the instruction break address register 51, a start address of a memory area of the mask instruction ROM 31 which must be updated is set by the main CPU 50 via an address / data bus 55. Update program start address register 5
In 2, the start address of the update program booted in advance in the instruction RAM 32 by the main CPU 50 via the address / data bus 55 is set. The selector 40 has JTAG terminals TMS, TCK, TDI
Signals S2, S3, S1 inputted from outside through
One of signals S56 (corresponding to signal S2), S57 (corresponding to signal S3), and S58 (corresponding to signal S1) generated internally from the program update controller 54 is
The selection is made by a selection signal supplied from the external terminal MUX41. When a JTAG emulator is connected to TMS, TCK, or TDI and debugging is performed, TMS, TC
Signals S2 and S externally supplied via K and TDI
3. Select S1. On the other hand, when the DSP core 34 and the main CPU 50 are in actual operation and it is desired to update a program area having a mask instruction ROM, the signals S56, S57, S57 generated by the program update controller 54 are generated.
Select 58. The signal S selected by the selector 40
42 (signal S2 or signal S56) and signal S43 (signal S3 or signal S57)
The signal S44 (the signal S1 or the signal S58) is supplied to the instruction register 11 and the data register 13.

【0018】セレクタ40がJTAG端子であるTM
S、TCK、TDIを介して供給される信号S2,S
3,S1を出力し、マスク命令ROM31の誤ったプロ
グラムエリアを更新する動作については、前述した実施
形態と同じであるので説明を省略する。以下では、プロ
グラム更新コントローラ54がJTAG信号に相当する
信号S56、S57、S58を用いて、マスク命令RO
M31の誤ったプログラムエリアを更新する動作につい
て説明する。
The selector 40 is a JTAG terminal TM
Signals S2, S supplied via S, TCK, TDI
3, S1 is output, and the operation of updating the incorrect program area of the mask instruction ROM 31 is the same as that of the above-described embodiment, and thus the description is omitted. Hereinafter, the program update controller 54 uses the signals S56, S57, and S58 corresponding to the JTAG signal to output the mask instruction RO.
The operation of updating the incorrect program area of M31 will be described.

【0019】メインCPU50は、アドレス/データバ
ス55を通してインストラクションブレークアドレスレ
ジスタ51に、マスク命令ROM31の更新しなければ
ならないメモリエリアのスタートアドレスを設定する。
同様に、更新プログラムスタートアドレスレジスタ52
に、命令RAM32に予めブートされた更新プログラム
のスタートアドレスを設定する。メインCPU50がア
ドレス/データバス55を通してスタートコマンドレジ
スタ53にアクセスすると、プログラム更新コントロー
ラ54では、JTAG信号である信号S56、S57、
S58が生成される。
The main CPU 50 sets the start address of the memory area of the mask instruction ROM 31 which needs to be updated in the instruction break address register 51 through the address / data bus 55.
Similarly, the update program start address register 52
In the instruction RAM 32, the start address of the pre-booted update program is set. When the main CPU 50 accesses the start command register 53 through the address / data bus 55, the program update controller 54 controls the signals S56, S57,
S58 is generated.

【0020】次に、セレクタ40により、プログラム更
新コントローラ54からの信号S56、S57、S58
が選択され、信号S56、S57が信号S42、S43
として、TAPコントローラ10に供給され、信号S5
8が信号S44として、命令レジスタ11およびデータ
レジスタ13に供給される。データレジスタ13では、
デバッグイベントポイントレジスタ14に更新しなけれ
ばならないメモリエリアのスタートアドレスが設定さ
れ、デバッグコントロールレジスタ15にインストラク
ションアドレスブレークが設定され、デバッグインスト
ラクションメモリ16に命令RAM32に予めブートさ
れた更新プログラムのスタートアドレスへのJUMP命
令が設定される。以下、前述した実施形態と同様の動作
となる。
Next, signals S56, S57, S58 from the program update controller 54 are selected by the selector 40.
Is selected, and the signals S56 and S57 are changed to the signals S42 and S43.
Is supplied to the TAP controller 10 and the signal S5
8 is supplied to the instruction register 11 and the data register 13 as a signal S44. In the data register 13,
The start address of the memory area to be updated is set in the debug event point register 14, the instruction address break is set in the debug control register 15, and the start address of the update program previously booted in the instruction RAM 32 is set in the debug instruction memory 16. Is set. Hereinafter, the operation is similar to that of the above-described embodiment.

【0021】上述した他の実施形態は、前述した実施形
態がチップの外部であるボード上にプログラムを更新す
るための制御ハードウェアを設ける必要があったのに対
し、複数のプロセッサコアを搭載しているチップにおい
ては、一方がマスタプロセッサとして制御することによ
り、外部ボード上に制御ハードウェアを設ける必要が無
く、任意にマスクROMの内容を更新できる。
In the above-described other embodiment, a control hardware for updating a program is required to be provided on a board outside the chip in the above-described embodiment, but a plurality of processor cores are mounted. In such a chip, by controlling one as a master processor, there is no need to provide control hardware on an external board, and the contents of the mask ROM can be arbitrarily updated.

【0022】[0022]

【発明の効果】以上説明したように、本発明によれば、
JTAGを利用して本来デバッグ機能として内蔵されて
いる機能ブロックをアクセスすることにより、大量生産
時にはコスト削減がはかれるマスクROMを内蔵したマ
イクロプロセッサにおいても、プログラムの誤り(バ
グ)に対し、新たにLSIを製造する必要も無く、余計
な費用を掛けずに、しかも瞬時にプログラムを更新でき
るという利点が得られる。また、JTAG機能としての
JTAG端子およびハードウェア資源は本来マイクロプ
ロセッサのオンチップデバッグ機能として内蔵されてい
るため、共有化が図れ、余分な端子、ハードウェアを設
ける必要がなく、共有化できない場合と比べ開発工数を
少なくすることができ、さらにはチップ単価を安くする
ことができるという利点が得られる。
As described above, according to the present invention,
By using JTAG to access a function block originally built as a debugging function, a microprocessor with a built-in mask ROM, which can reduce the cost during mass production, can be newly added to LSIs for program errors (bugs). It is possible to obtain the advantage that the program can be updated instantaneously without the need to manufacture the program and without any extra cost. Also, since the JTAG terminal and the hardware resources as the JTAG function are originally built in as the on-chip debug function of the microprocessor, sharing can be achieved, and there is no need to provide extra terminals and hardware, and the case where sharing is not possible. This has the advantage that the number of development steps can be reduced and the chip unit cost can be reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の実施形態による全体の構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing an overall configuration according to an embodiment of the present invention.

【図2】 本実施形態の動作を説明するためのフローチ
ャートである。
FIG. 2 is a flowchart for explaining the operation of the present embodiment.

【図3】 本実施形態の動作を説明するためのタイミン
グチャートである。
FIG. 3 is a timing chart for explaining the operation of the present embodiment.

【図4】 本発明の他の実施形態における構成を示すブ
ロック図である。
FIG. 4 is a block diagram illustrating a configuration according to another embodiment of the present invention.

【符号の説明】[Explanation of symbols]

10 TAPコントローラ(設定手段) 11 命令レジスタ(設定手段) 12 命令デコーダ(設定手段) 13 データレジスタ(デバッグ機能部) 14 デバッグイベントポイントレジスタ 15 デバッグコントロールレジスタ 16 デバッグインストラクションメモリ 20 デバッグ制御部(デバッグ制御手段) 30 CPUコア 31 マスク命令ROM 32 命令RAM 33 アドレス/データバス 34 DSPコア(第1のプロセッサ) 40 セレクタ(選択手段) 50 メインCPU(第2のプロセッサ) 51 インストラクションブレークアドレスレジスタ 52 更新プログラムスタートアドレスレジスタ 53 スタートコマンドレジスタ 54 プログラム更新コントローラ Reference Signs List 10 TAP controller (setting means) 11 Instruction register (setting means) 12 Instruction decoder (setting means) 13 Data register (debug function unit) 14 Debug event point register 15 Debug control register 16 Debug instruction memory 20 Debug control unit (debug control means) ) 30 CPU core 31 Mask instruction ROM 32 Instruction RAM 33 Address / data bus 34 DSP core (first processor) 40 Selector (selection means) 50 Main CPU (second processor) 51 Instruction break address register 52 Update program start address Register 53 Start command register 54 Program update controller

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 プログラムが格納されたマスク命令RO
Mと、該マスク命令ROMのプログラムを実行するCP
Uコアと、JTAG端子を用いてアクセス可能なデバッ
グ機能部とを備えるマイクロプロセッサにおいて、 前記デバッグ機能部に、前記マスク命令ROMの更新エ
リアのスタートアドレスと更新プログラムとを設定する
設定手段と、 前記CPUコアによるマスク命令ROMのプログラム実
行が、前記デバッグ機能部に設定された、更新エリアの
スタートアドレスの前まで達すると、前記デバッグ機能
部に設定されている更新プログラムを実行させ、更新プ
ログラムが終了すると、前記マスク命令ROMの更新エ
リアの次のプログラムから実行させるデバッグ制御手段
とを具備することを特徴とするマイクロプロセッサ。
1. A mask instruction RO in which a program is stored.
M and a CP for executing the program of the mask instruction ROM
A microprocessor including a U-core and a debug function unit accessible using a JTAG terminal; a setting unit configured to set a start address of an update area of the mask instruction ROM and an update program in the debug function unit; When the program execution of the mask instruction ROM by the CPU core reaches the start address of the update area set in the debug function unit, the update program set in the debug function unit is executed, and the update program ends. Then, a debug control means for executing the program from the program next to the update area of the mask instruction ROM is provided.
【請求項2】 前記スタートアドレスおよび前記更新プ
ログラムは、前記JTAG端子から供給されることを特
徴とする請求項1記載のマイクロプロセッサ。
2. The microprocessor according to claim 1, wherein the start address and the update program are supplied from the JTAG terminal.
【請求項3】 セルフブートあるいはホストブートによ
り、外部からインストラクションが設定可能な命令RA
Mを備え、 前記デバッグ機能部が更新プログラムを格納するのに十
分な容量がない場合には、更新プログラムの一部を前記
命令RAMに格納し、更新プログラムが連続して実行さ
れるようにアドレス設定することを特徴とすることを特
徴とする請求項1記載のマイクロプロセッサ。
3. An instruction RA whose instruction can be externally set by self boot or host boot.
M, when the debugging function unit does not have a sufficient capacity to store the update program, a part of the update program is stored in the instruction RAM, and the address is set so that the update program is continuously executed. 2. The microprocessor according to claim 1, wherein the setting is performed.
【請求項4】 主にデジタル信号処理を行う第1のプロ
セッサと、主に制御処理を行う第2のプロセッサと、前
記第1のプロセッサにより実行されるプログラムが格納
されたマスク命令ROMと、JTAG端子を用いてアク
セス可能なデバッグ機能部とを備えるマイクロプロセッ
サにおいて、 前記第2のプロセッサの制御に従って、前記マスク命令
ROMの更新エリアのスタートアドレスと更新プログラ
ムとを生成する更新制御手段と、 前記更新制御手段により生成された、前記マスク命令R
OMの更新エリアのスタートアドレスと更新プログラム
とを前記デバッグ機能部に設定する設定手段と、 前記CPUコアによるマスク命令ROMのプログラム実
行が、前記デバッグ機能部に設定された、更新エリアの
スタートアドレスの前まで達すると、前記デバッグ機能
部に設定されている更新プログラムを実行させ、更新プ
ログラムが終了すると、前記マスク命令ROMの更新エ
リアの次のプログラムから実行させるデバッグ制御手段
とを具備することを特徴とするマイクロプロセッサ。
4. A first processor for mainly performing digital signal processing, a second processor for mainly performing control processing, a mask instruction ROM in which a program executed by the first processor is stored, and a JTAG. A microprocessor having a debug function unit accessible using a terminal; an update control unit configured to generate a start address of an update area of the mask instruction ROM and an update program under control of the second processor; The mask instruction R generated by the control means;
Setting means for setting the start address of the update area of the OM and the update program in the debug function unit; and executing the program of the mask instruction ROM by the CPU core by setting the start address of the update area in the debug function unit. And debug control means for executing the update program set in the debug function section when the program reaches the previous time, and executing the program from the next program in the update area of the mask instruction ROM when the update program ends. And a microprocessor.
【請求項5】 前記JTAG端子からの前記マスク命令
ROMの更新エリアのスタートアドレスおよび更新プロ
グラムと、前記更新制御手段からの前記マスク命令RO
Mの更新エリアのスタートアドレスおよび更新プログラ
ムとのいずれか一方を選択する選択手段を具備し、 前記設定手段は、前記選択手段により選択された、前記
マスク命令ROMの更新エリアのスタートアドレスと更
新プログラムとを前記デバッグ機能部に設定することを
特徴とする請求項4記載のマイクロプロセッサ。
5. A start address of an update area of said mask instruction ROM from said JTAG terminal and an update program, and said mask instruction RO from said update control means.
Selecting means for selecting one of a start address of an update area of M and an update program, wherein the setting means comprises: a start address of an update area of the mask instruction ROM selected by the selection means; 5. The microprocessor according to claim 4, wherein (a) and (b) are set in the debug function unit.
JP2000186613A 2000-06-21 2000-06-21 Microprocessor Pending JP2002007156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000186613A JP2002007156A (en) 2000-06-21 2000-06-21 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000186613A JP2002007156A (en) 2000-06-21 2000-06-21 Microprocessor

Publications (1)

Publication Number Publication Date
JP2002007156A true JP2002007156A (en) 2002-01-11

Family

ID=18686744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000186613A Pending JP2002007156A (en) 2000-06-21 2000-06-21 Microprocessor

Country Status (1)

Country Link
JP (1) JP2002007156A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7454663B2 (en) 2003-10-31 2008-11-18 Tian Holdings, Llc Method and circuitry for debugging/updating ROM
US7570561B2 (en) 2004-05-25 2009-08-04 Bryan Tai Method for determining type of digital versatile discs
US7602684B2 (en) 2003-09-15 2009-10-13 Chun-Ta Chen Discriminating method of an optical disc device for ascertaining the format of a loaded optical disc
US7626907B2 (en) 2004-05-25 2009-12-01 Ricky Chang Method and apparatus for determining type of digital versatile disc
US7746745B2 (en) 2004-05-25 2010-06-29 Ricky Chang Method for determining the type of digital versatile disc
US7843786B2 (en) 2002-10-24 2010-11-30 Yi-Chung Chan Discrimination method of optical storage medium
US7995434B2 (en) 2003-10-31 2011-08-09 Tian Holdings, Llc Method and apparatus for generating absolute time in pregroove data
KR101502032B1 (en) * 2008-03-06 2015-03-12 삼성전자주식회사 Processor apparatus having secure performance

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7843786B2 (en) 2002-10-24 2010-11-30 Yi-Chung Chan Discrimination method of optical storage medium
US7602684B2 (en) 2003-09-15 2009-10-13 Chun-Ta Chen Discriminating method of an optical disc device for ascertaining the format of a loaded optical disc
US7454663B2 (en) 2003-10-31 2008-11-18 Tian Holdings, Llc Method and circuitry for debugging/updating ROM
CN100446128C (en) * 2003-10-31 2008-12-24 宇田控股有限公司 ROM circuit capable of debugging and updating and method of debugging and updating
US7995434B2 (en) 2003-10-31 2011-08-09 Tian Holdings, Llc Method and apparatus for generating absolute time in pregroove data
US7570561B2 (en) 2004-05-25 2009-08-04 Bryan Tai Method for determining type of digital versatile discs
US7626907B2 (en) 2004-05-25 2009-12-01 Ricky Chang Method and apparatus for determining type of digital versatile disc
US7746745B2 (en) 2004-05-25 2010-06-29 Ricky Chang Method for determining the type of digital versatile disc
KR101502032B1 (en) * 2008-03-06 2015-03-12 삼성전자주식회사 Processor apparatus having secure performance

Similar Documents

Publication Publication Date Title
US5974528A (en) Microcomputer with embedded flash memory having on-chip programming capability and method of programming data into the embedded flash memory
US6668339B1 (en) Microprocessor having a debug interruption function
JPH06231097A (en) Equipment and method for starting of multiprocessor system
JP2000332205A (en) Semiconductor integrated circuit with built-in processor
JPS6298437A (en) Microcomputer
JP2002007156A (en) Microprocessor
JPH07325711A (en) Rom program changing device
US7103759B1 (en) Microcontroller architecture supporting microcode-implemented peripheral devices
JP2878503B2 (en) Integrated circuit including standard cells, application cells, and test cells
US7124311B2 (en) Method for controlling processor in active/standby mode by third decoder based on instructions sent to a first decoder and the third decoder
JP3071044B2 (en) Test method for semiconductor integrated circuit with microcomputer
JP4467350B2 (en) Information processing system and timing adjustment method
JP3951371B2 (en) Watchdog timer and microcomputer
JPS61112248A (en) Logical large-scale integrated circuit with easy test
JP2704935B2 (en) Processor with test function
JP2003050713A (en) Circuit for testing core
JPH06324906A (en) Single chip microcomputer
JPH05180903A (en) Method and circuit for testing semiconductor integrated circuit device
JPH06222917A (en) Electronic device
JP2001352036A (en) Apparatus and method for initialization of semiconductor integrated circuit
JPS6041140A (en) Debugging device of read-only memory built in semiconductor integrated circuit
JPH0812624B2 (en) Data processor
JPH0793177A (en) Emulation chip and in-circuit emulator
JP2000222238A (en) In-circuit emulator and in-circuit emulation method
JP2004302727A (en) Operation check system of fpga

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040511

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040709

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050510