[go: up one dir, main page]

JP2006146757A - Register for debugging and data transfer method - Google Patents

Register for debugging and data transfer method Download PDF

Info

Publication number
JP2006146757A
JP2006146757A JP2004338511A JP2004338511A JP2006146757A JP 2006146757 A JP2006146757 A JP 2006146757A JP 2004338511 A JP2004338511 A JP 2004338511A JP 2004338511 A JP2004338511 A JP 2004338511A JP 2006146757 A JP2006146757 A JP 2006146757A
Authority
JP
Japan
Prior art keywords
register
data
pracc
address
debugging
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
JP2004338511A
Other languages
Japanese (ja)
Inventor
Akihiro Kobayashi
章宏 小林
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.)
Toshiba Corp
Kioxia Systems Co Ltd
Original Assignee
Toshiba Corp
Toshiba Memory Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Memory Systems Co Ltd filed Critical Toshiba Corp
Priority to JP2004338511A priority Critical patent/JP2006146757A/en
Publication of JP2006146757A publication Critical patent/JP2006146757A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a register for debugging and a data transfer method, capable of transferring data of continuous addresses in a debug memory space with a small number of clocks. <P>SOLUTION: Shift-out of data from a PrAcc register and an address register, and shift-in of the data to the PrAcc register and a data register are simultaneously executed. When a shifted-out value of the address register is an expected value, an instruction to execute writing of the shifted-in data into the data register and writing into the PrAcc register is used. By sequentially inputting the data acquired from the address next expected with the access and the PrAcc data controlling pending of processor access such that the debugging is successively executed as the shifted-in data, the data are sequentially acquired from the continuous addresses in the debug memory space, and are sequentially written in the data register. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、EJTAG方式のオンチップデバッグ回路に含まれるデバッグ用レジスタ、およびそのレジスタへのデータ転送方法に関する。   The present invention relates to a debugging register included in an EJTAG on-chip debugging circuit, and a data transfer method to the register.

マイクロプロセッサを組み込んだシステムのソフトウェア開発には、従来からICE(In-circuit Emulator)が幅広く用いられてきた。しかし、半導体の微細加工技術の進歩により、マイクロプロセッサの高速・大規模化、多様化が進み、CPUの周辺機能を取り込むいわゆる1チップ化が進展するにつれ、ICEもいっそう複雑になり、その開発はコストと時間がかかるようになった。また、CPUのライフサイクルが短くなる傾向もあり、従来型のICEでは市場の要求に応えることが難しくなってきた。   Conventionally, ICE (In-circuit Emulator) has been widely used for software development of a system incorporating a microprocessor. However, due to advances in semiconductor microfabrication technology, microprocessors have become faster, larger, and more diverse, and as so-called single-chip integration that incorporates CPU peripheral functions has progressed, ICE has become more complex, and its development has It became costly and time consuming. In addition, there is a tendency for the life cycle of the CPU to be shortened, and it has become difficult for conventional ICE to meet market demands.

そこで、これらの問題点を解決するために、マイクロプロセッサ自身にデバッグ機能を埋め込むオンチップデバッグ方式が提案されている(例えば、特許文献1参照。)。   In order to solve these problems, an on-chip debugging method in which a debugging function is embedded in the microprocessor itself has been proposed (see, for example, Patent Document 1).

このオンチップデバッグ方式の一つとしてEJTAG(Enhanced JTAG)方式がある。EJTAG方式は、バウンダリ・スキャン・テストに用いられているJTAG用テスト回路にデバッグ回路を追加して、マイクロプロセッサを組み込んだシステムのソフトウェアのデバッグを可能としたものである。   One of these on-chip debugging methods is the EJTAG (Enhanced JTAG) method. In the EJTAG method, a debug circuit is added to a JTAG test circuit used for a boundary scan test, thereby enabling debugging of software of a system incorporating a microprocessor.

このEJTAG方式によるオンチップデバッグを行う場合、図4に示すように、マイクロプロセッサ10に組み込んだEJTAGTAP(EJTAGテストアクセスポート)100とデバッグホスト20とをEJTAGプローブ30を介して接続する。これにより、デバッグホスト20とマイクロプロセッサ10との間でデバッグ制御用命令やデバッグに必要なデータの通信が行われる。   When performing on-chip debugging by the EJTAG method, as shown in FIG. 4, an EJTAGTAP (EJTAG test access port) 100 incorporated in the microprocessor 10 and a debug host 20 are connected via an EJTAG probe 30. As a result, a debug control instruction and data necessary for debugging are communicated between the debug host 20 and the microprocessor 10.

図5にEJTAGTAP100の概観を示す。   FIG. 5 shows an overview of EJTAGTAP100.

EJTAGTAP100には、テスト動作を制御するTAPコントローラ101と、デバッグ命令を書き込む命令レジスタ102と、複数のデータレジスタを有するデータレジスタ群103が含まれる。   The EJTAGTAP 100 includes a TAP controller 101 for controlling a test operation, an instruction register 102 for writing a debug instruction, and a data register group 103 having a plurality of data registers.

また、EJTAGTAP100には、デバッグホスト20と通信を行う端子として、テストクロック(TCK)、テストモード(TMS)、テストデータイン(TDI)、テストデータアウト(TDO)があり、オプションとしてテストリセット(TRST)を設けることができる。   In addition, the EJTAGTAP 100 has a test clock (TCK), a test mode (TMS), a test data in (TDI), and a test data out (TDO) as terminals for communicating with the debug host 20, and optionally a test reset (TRST). ) Can be provided.

データレジスタ群103には、デバッグメモリ空間のアドレスを指定するアドレスレジスタ1031と、アドレスレジスタ1031で指定したアドレスのデータをデバッグメモリ空間から転送して書き込むデータレジスタ1032と、プロセッサのリセットなどの制御を行うコントロールレジスタ1033が含まれる。どのデータレジスタが選択されるかは命令レジスタ102の値による。   The data register group 103 includes an address register 1031 for designating an address of the debug memory space, a data register 1032 for transferring and writing data at the address designated by the address register 1031 from the debug memory space, and control such as resetting of the processor. A control register 1033 is included. Which data register is selected depends on the value of the instruction register 102.

コントロールレジスタ1033には、PrAcc信号が書き込まれるPrAcc領域が含まれている。このPrAcc信号はプロセッサアクセスのペンディングを制御する。すなわち、PrAcc=1のときはプロセッサアクセスをペンディングし、PrAcc=0のときはプロセッサアクセスのペンディングを解除する。   The control register 1033 includes a PrAcc area where a PrAcc signal is written. This PrAcc signal controls the pending processor access. That is, when PrAcc = 1, processor access is pending, and when PrAcc = 0, processor access pending is released.

命令レジスタ102とデータレジスタ群103の各レジスタは、従来、それぞれシフトレジスタで構成されており、入力は入力端子TDIに共通に接続され、出力はセレクタ1034およびセレクタ104を介して出力端子TDOに接続されている。命令レジスタ102と複数のデータレジスタ群103のどのレジスタにデータが入力されるかは、TAPコントローラ101により制御される。   Conventionally, each register of the instruction register 102 and the data register group 103 is configured by a shift register, the input is commonly connected to the input terminal TDI, and the output is connected to the output terminal TDO via the selector 1034 and the selector 104. Has been. The TAP controller 101 controls which register of the instruction register 102 and the plurality of data register groups 103 receives data.

図6に、TAPコントローラ101の状態遷移図を示す。   FIG. 6 shows a state transition diagram of the TAP controller 101.

TAPコントローラ101の状態遷移はTMSの値によって制御され、各状態(ステート)における動作はTCKに同期している。   The state transition of the TAP controller 101 is controlled by the value of TMS, and the operation in each state (state) is synchronized with TCK.

図6において、Select-DR-ScanからUpdate-DR(DR:データレジスタ)に至る状態遷移は、データレジスタ群103の各レジスタに対するデータの読み書きの実行を表し、Select-IR-ScanからUpdate-IR(IR:インストラクションレジスタ)に至る状態遷移は、命令レジスタ102に対するデータの読み書きの実行を表す。   In FIG. 6, the state transition from Select-DR-Scan to Update-DR (DR: data register) represents the execution of reading / writing data from / to each register of the data register group 103, from Select-IR-Scan to Update-IR. A state transition to (IR: instruction register) represents execution of reading / writing of data with respect to the instruction register 102.

そこで、マイクロプロセッサ10がデバッグ状態になって、デバッグホスト20のデバッグメモリ空間から取得したデータを転送してデータレジスタ1032に書き込もうとする場合、コントロールレジスタ1033とアドレスレジスタ1031とデータレジスタ1032の3種類のレジスタの読み書きを制御する必要がある。そのため、読み書きするレジスタを切り替える際に命令レジスタ102へ書き込む命令コードを毎回書き換える必要がある。   Therefore, when the microprocessor 10 is in a debug state and data acquired from the debug memory space of the debug host 20 is transferred and written to the data register 1032, three types of control register 1033, address register 1031, and data register 1032 are used. It is necessary to control the reading and writing of registers. Therefore, it is necessary to rewrite the instruction code written to the instruction register 102 every time the register to be read / written is switched.

マイクロプロセッサ10がデバッグ状態になって、デバッグメモリ空間から取得したデータを転送してデータレジスタ1032に書き込もうとする場合、マイクロプロセッサ10がPrAcc=1にした後、各レジスタの読み書きが次のように行われる。   When the microprocessor 10 is in a debug state and data acquired from the debug memory space is to be transferred and written to the data register 1032, after the microprocessor 10 sets PrAcc = 1, reading / writing of each register is performed as follows: Done.

(1)PrAcc=1を確認するためのコントロールレジスタ1033の読み出し
(2)アドレスレジスタ選択命令の命令レジスタ102への書き込み
(3)アドレス値のアドレスレジスタ1031からの読み出し
(4)データレジスタ選択命令の命令レジスタ102への書き込み
(5)データのデータレジスタ1032への書き込み
(6)コントロールレジスタ選択命令の命令レジスタ102への書き込み
(7)デバッグホスト20からPrAcc=0をコントロールレジスタ1033へ書き込み
(1) Reading the control register 1033 for confirming PrAcc = 1 (2) Writing the address register selection instruction to the instruction register 102 (3) Reading the address value from the address register 1031 (4) Data register selection instruction Write to instruction register 102 (5) Write data to data register 1032 (6) Write control register selection instruction to instruction register 102 (7) Write PrAcc = 0 from debug host 20 to control register 1033

いま、アドレスレジスタ1031、データレジスタ1032およびコントロールレジスタ1033をそれぞれ32ビットとすると、Select-DR-ScanからUpdate-DRに至ってSelect-DR-Scanに戻る状態遷移にそれぞれ36クロックを要し、命令レジスタ102を8ビットとすると、Select-IR-ScanからUpdate-IRに至ってSelect-IR-Scanに戻る状態遷移に13クロックを要する。したがって、この場合、上述の(1)〜(7)の手順の実行に要するクロック数は、183(=36+13+36+13+36+13+36)となる。   If the address register 1031, the data register 1032 and the control register 1033 are 32 bits each, 36 clocks are required for the state transition from Select-DR-Scan to Update-DR and back to Select-DR-Scan. When 102 is 8 bits, 13 clocks are required for the state transition from Select-IR-Scan to Update-IR to return to Select-IR-Scan. Therefore, in this case, the number of clocks required to execute the above-described procedures (1) to (7) is 183 (= 36 + 13 + 36 + 13 + 36 + 13 + 36).

このように、デバッグ用に用いられる図5に示した従来のデータレジスタ群の構成では、デバッグのときにデバッグメモリ空間の連続するアドレスのデータを連続してデータレジスタへ転送する場合にも、上述の手順を繰り返し実行する必要があり、データの転送に多くのクロック数を要するという問題があった。
特開2004−206283号公報 (第4ページ、図1)
As described above, in the configuration of the conventional data register group shown in FIG. 5 used for debugging, the above-described case is possible even when data at consecutive addresses in the debug memory space is continuously transferred to the data register during debugging. There is a problem that it is necessary to repeatedly execute the above procedure, and a large number of clocks are required for data transfer.
JP 2004-206283 A (page 4, FIG. 1)

そこで、本発明の目的は、デバッグメモリ空間の連続するアドレスのデータの転送を少ないクロック数で行うことができるデバッグ用レジスタ、およびデータ転送方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a debug register and a data transfer method capable of transferring data at consecutive addresses in a debug memory space with a small number of clocks.

本発明の一態様によれば、EJTAG準拠のマイクロプロセッサに搭載されるデバッグ用レジスタであって、アドレスレジスタと、データレジスタと、プロセッサアクセスのペンディングを制御するPrAcc信号が格納される第1のPrAccレジスタと、前記PrAcc信号が格納される第2のPrAccレジスタと、前記PrAcc信号が書き込まれるPrAcc領域を有するコントロールレジスタとを具備することを特徴とするデバッグ用レジスタが提供される。   According to one aspect of the present invention, the first PrAcc is a debugging register mounted on an EJTAG-compliant microprocessor, which stores an address register, a data register, and a PrAcc signal that controls pending processor access. There is provided a debugging register comprising a register, a second PrAcc register in which the PrAcc signal is stored, and a control register having a PrAcc area in which the PrAcc signal is written.

また、本発明の別の一態様によれば、EJTAG準拠のマイクロプロセッサに搭載されるデバッグ用レジスタであって、パラレル入力およびパラレル出力機能を有するシフトレジスタと、パラレル入力およびパラレル出力機能を有してプロセッサアクセスのペンディングを制御するPrAcc信号が格納されるPrAccレジスタと、前記シフトレジスタからパラレル出力されたデータが書き込まれるアドレスレジスタと、前記シフトレジスタからパラレル出力されたデータが書き込まれるデータレジスタと、前記シフトレジスタおよび前記PrAccレジスタからパラレル出力されたデータが書き込まれるPrAccビット領域を有するコントロールレジスタとを具備し、前記アドレスレジスタおよび前記コントロールレジスタの前記PrAcc領域からパラレル出力されたデータが前記シフトレジスタおよび前記PrAccレジスタにパラレル入力されることを特徴とするデバッグ用レジスタが提供される。   According to another aspect of the present invention, there is provided a debugging register mounted on an EJTAG-compliant microprocessor, a shift register having parallel input and parallel output functions, and a parallel input and parallel output function. A PrAcc register for storing a PrAcc signal for controlling the pending of processor access, an address register to which data output in parallel from the shift register is written, a data register to which data output in parallel from the shift register is written, A control register having a PrAcc bit area into which data output in parallel from the shift register and the PrAcc register is written, and the Pr of the address register and the control register Debug register parallel output data from the cc area, characterized in that the input in parallel to the shift register and the PrAcc register is provided.

また、本発明の一態様によれば、デバッグ用レジスタとしてアドレスレジスタ、データレジスタおよびPrAccレジスタを備えるEJTAG準拠のマイクロプロセッサのデバッグ用レジスタへのデータの転送方法であって、アドレスレジスタおよびPrAccレジスタからのデータのシフトアウトとデータレジスタおよびPrAccレジスタへのデータのシフトインの同時実行、および前記シフトアウトした前記アドレスレジスタの値が予想した値であったときに前記シフトインしたデータのデータレジスタおよびPrAccレジスタへの書き込みの実行を行う命令を備え、デバッグメモリ空間の連続するアドレスから順次データを取得して前記データレジスタに順次書き込むときは前記命令を用い、前記命令を実行するときに、前記シフトインするデータとして、次にアクセスが予想されるアドレスから取得したデータと、デバッグが継続して実行されるようプロセッサアクセスのペンディングを制御するPrAccデータを入力することを特徴とするデータ転送方法が提供される。   According to another aspect of the present invention, there is provided a method for transferring data to a debug register of an EJTAG-compliant microprocessor having an address register, a data register, and a PrAcc register as debug registers, the method comprising: Data shift-out and data shift-in to the data register and the PrAcc register are simultaneously performed, and the data register and PrAcc of the shifted-in data when the value of the address register shifted out is an expected value. An instruction for executing a write to the register; when acquiring data sequentially from successive addresses in the debug memory space and sequentially writing to the data register, the instruction is used; A data transfer method is provided in which data acquired from an address that is expected to be accessed next and PrAcc data that controls pending processor access are input so that debugging can be continuously executed. Is done.

本発明によれば、1つの命令の実行だけでアドレスレジスタからのアドレス値の読み出しとデータレジスタへのデータの書き込みを連続して実行するので、少ないクロック数でデバッグメモリ空間の連続するアドレスのデータを連続してデータレジスタへ転送することができ、データ転送速度の向上を図ることができる。   According to the present invention, reading of the address value from the address register and writing of the data to the data register are continuously executed by executing only one instruction. Therefore, data at consecutive addresses in the debug memory space can be obtained with a small number of clocks. Can be continuously transferred to the data register, and the data transfer rate can be improved.

以下、本発明の実施例を図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施例1に係るデバッグ用レジスタの構成を示すブロック図である。   FIG. 1 is a block diagram illustrating a configuration of a debug register according to the first embodiment of the present invention.

デバッグ用レジスタを構成するデータレジスタ群1は、アドレスレジスタ11と、データレジスタ12と、コントロールレジスタ13と、第1のPrAccレジスタ11Aと、第2のPrAccレジスタ12Aとを含む。   The data register group 1 constituting the debug register includes an address register 11, a data register 12, a control register 13, a first PrAcc register 11A, and a second PrAcc register 12A.

アドレスレジスタ11、データレジスタ12およびコントロールレジスタ13は、それぞれシフトレジスタを形成し、入力は共通の入力端子に接続されている。この入力端子は、図5に示したEJTAGTAP100のTDIに接続される。   The address register 11, the data register 12, and the control register 13 form a shift register, and their inputs are connected to a common input terminal. This input terminal is connected to the TDI of the EJTAGTAP 100 shown in FIG.

アドレスレジスタ11の出力は第1のPrAccレジスタ11Aに接続されており、アドレスレジスタ11と第1のPrAccレジスタ11Aを連結させて1つのシフトレジスタとして動作させることができる。   The output of the address register 11 is connected to the first PrAcc register 11A, and the address register 11 and the first PrAcc register 11A can be connected to operate as one shift register.

データレジスタ12の出力は第2のPrAccレジスタ12Aに接続されており、データレジスタ12と第2のPrAccレジスタ12Aを連結させて1つのシフトレジスタとして動作させることができる。   The output of the data register 12 is connected to the second PrAcc register 12A, and the data register 12 and the second PrAcc register 12A can be connected to operate as one shift register.

アドレスレジスタ11の出力、データレジスタ12の出力、コントロールレジスタ13の出力、第1のPrAccレジスタ11Aの出力および第2のPrAccレジスタ12Aの出力はセレクタ14に接続されており、デバッグ命令の種類によりどのレジスタの出力が出力端子に出力されるかが決定される。出力端子は、図5に示したEJTAGTAP100のTDOに接続される。   The output of the address register 11, the output of the data register 12, the output of the control register 13, the output of the first PrAcc register 11A, and the output of the second PrAcc register 12A are connected to the selector 14, and depending on the type of debug instruction It is determined whether the output of the register is output to the output terminal. The output terminal is connected to the TDO of the EJTAGTAP 100 shown in FIG.

第1のPrAccレジスタ11Aおよび第2のPrAccレジスタ12Aには、プロセッサアクセスのペンディングを制御するPrAcc信号の値が書き込まれる。第1のPrAccレジスタ11AへのPrAcc信号の値の書き込みは、第1のPrAccレジスタ11Aをアドレスレジスタ11に連結させて、入力端子(TDI)からPrAcc信号の値をシフトインさせることによって行われる。同様に、第2のPrAccレジスタ12AへのPrAcc信号の値の書き込みは、第2のPrAccレジスタ12Aをデータレジスタ12に連結させて、入力端子(TDI)からPrAcc信号の値をシフトインさせることによって行われる。   In the first PrAcc register 11A and the second PrAcc register 12A, the value of the PrAcc signal for controlling the pending of the processor access is written. Writing the value of the PrAcc signal to the first PrAcc register 11A is performed by connecting the first PrAcc register 11A to the address register 11 and shifting in the value of the PrAcc signal from the input terminal (TDI). Similarly, the value of the PrAcc signal is written into the second PrAcc register 12A by connecting the second PrAcc register 12A to the data register 12 and shifting in the value of the PrAcc signal from the input terminal (TDI). Done.

コントロールレジスタ13にはPrAcc信号を書き込むPrAcc領域13Aがあり、マイクロプロセッサによるPrAcc信号値の書き込みが行われる。このPrAcc領域13Aに書き込まれたPrAcc信号値は、図6に示すTAPコントローラの状態の中のCapture-DRステートのときに第1のPrAccレジスタ11Aへ書き込まれる。また、第2のPrAccレジスタ12AをシフトインされたPrAcc信号値は、図6に示すTAPコントローラの状態の中のUpdate-DRステートのときにコントロールレジスタ13のPrAcc領域13Aに書き込まれる。   The control register 13 has a PrAcc area 13A in which the PrAcc signal is written, and the PrAcc signal value is written by the microprocessor. The PrAcc signal value written to the PrAcc area 13A is written to the first PrAcc register 11A in the Capture-DR state in the state of the TAP controller shown in FIG. The PrAcc signal value shifted in the second PrAcc register 12A is written to the PrAcc area 13A of the control register 13 in the Update-DR state in the TAP controller state shown in FIG.

マイクロプロセッサがデバッグ状態になって、デバッグホスト20のデバッグメモリ空間から取得したデータを転送して本実施例のデータレジスタ12に書き込む場合は、アドレスレジスタ11と第1のPrAccレジスタ11Aを連結し、データレジスタ12と第2のPrAccレジスタ12Aを連結し、TDIからPrAccの値を第1のPrAccレジスタ11Aあるいは第2のPrAccレジスタ12Aをシフトインすることによってプロセッサアクセスのペンディングを制御する。   When the microprocessor is in the debug state and the data acquired from the debug memory space of the debug host 20 is transferred and written to the data register 12 of this embodiment, the address register 11 and the first PrAcc register 11A are connected, The data register 12 and the second PrAcc register 12A are connected, and the processor access pending is controlled by shifting the value of PrAcc from TDI into the first PrAcc register 11A or the second PrAcc register 12A.

次に、図2のフローチャートを用いて、本実施例のデータレジスタ12にデバッグメモリ空間の連続するアドレスのデータを連続して書き込む方法を説明する。   Next, a method for continuously writing data at consecutive addresses in the debug memory space to the data register 12 of this embodiment will be described using the flowchart of FIG.

ここで、新たなデバッグ用命令として「ダウンロード命令」を設ける。この「ダウンロード命令」が命令レジスタにあるときは、図6に示すTAPコントローラの状態の中のShift-DR状態では、アドレスレジスタ11と第1のPrAccレジスタ11Aを連結した値がTDOからシフトアウト出力され、Update-DRステートでは、データレジスタ12と第2のPrAccレジスタ12Aを連結して構成したシフトレジスタシフトへTDIからシフトイン入力された値が書き込まれる。   Here, a “download instruction” is provided as a new debugging instruction. When this “download instruction” is in the instruction register, in the Shift-DR state in the state of the TAP controller shown in FIG. 6, the value obtained by connecting the address register 11 and the first PrAcc register 11A is output from TDO as a shift-out output. In the Update-DR state, the value shifted in from TDI is written to the shift register shift formed by connecting the data register 12 and the second PrAcc register 12A.

また、アドレスレジスタ11とデータレジスタ12は、それぞれ32ビットで構成されるものとする。   The address register 11 and the data register 12 are each composed of 32 bits.

デバッグメモリ空間の連続するアドレスのデータを連続してマイクロプロセッサへ転送する状況になると、まず、命令レジスタへ「ダウンロード命令」を書き込む(ステップS1)。   When it is in a situation where data at successive addresses in the debug memory space is continuously transferred to the microprocessor, a "download instruction" is first written to the instruction register (step S1).

次いで、TAPコントローラの制御により、Select-DR→Capture-DR→Shift-DR×32回を実行すると、TDOにはアドレスレジスタ11の値と第1のPrAccレジスタ11Aの値がシフトアウト出力され、TDIからはデータレジスタ12へのデータと第2のPrAccレジスタ12Aへ書き込む値としてPrAcc=0がシフトイン入力される(ステップS2)。このとき、データレジスタ12へ入力するデータとしては、アドレスが連続することを予想して次のアドレスに格納されているデータの値をTDIへ与える。   Next, when Select-DR → Capture-DR → Shift-DR × 32 times is executed under the control of the TAP controller, the value of the address register 11 and the value of the first PrAcc register 11A are shifted out to TDO, and TDI is output. Is shifted in and input as data to the data register 12 and PrAcc = 0 as a value to be written to the second PrAcc register 12A (step S2). At this time, as the data to be input to the data register 12, the value of the data stored at the next address is given to the TDI in anticipation of continuous addresses.

ここで、シフトアウトされたPrAcc信号の値を確認する(ステップS3)。このときシフトアウトされたPrAcc値は、マイクロプロセッサが書き込んだ値である。この値が‘1’であるときは、マイクロプロセッサがデバッグを要求しており、‘0’であるときは、マイクロプロセッサからのデバッグ要求が発生していないことを意味する。   Here, the value of the PrAcc signal shifted out is confirmed (step S3). The PrAcc value shifted out at this time is a value written by the microprocessor. When this value is “1”, the microprocessor requests debugging, and when it is “0”, it means that no debugging request is generated from the microprocessor.

そこで、シフトアウトされたPrAcc信号値が‘0’であるときは、さらにShift-DRを実行して、PrAcc=1をシフトインし(ステップS4)、Exit1-DRステートを経由してUpdate-DRステートへ遷移して(ステップS5)、第2のPrAccレジスタ12AへPrAcc=1を書き込んで(ステップS6)、ステップS2へ戻る。ただし、この第2のPrAccレジスタ12AへPrAcc=1を書き込む行為は、EJTAG仕様上は無視される。   Therefore, when the shifted PrAcc signal value is “0”, Shift-DR is further executed to shift in PrAcc = 1 (step S4), and Update-DR is passed through the Exit1-DR state. The state is changed (step S5), PrAcc = 1 is written to the second PrAcc register 12A (step S6), and the process returns to step S2. However, the act of writing PrAcc = 1 to the second PrAcc register 12A is ignored in the EJTAG specification.

一方、TDOから読み出されたPrAcc値が‘1’であるときは、同時にTDOから読み出されたアドレスレジスタ11の値が予想したアドレスと一致するかどうかを判定する(ステップS7)。   On the other hand, when the PrAcc value read from the TDO is “1”, it is simultaneously determined whether or not the value of the address register 11 read from the TDO matches the expected address (step S7).

TDOから読み出されたアドレスレジスタ11の値が予想したアドレスと一致したときは(YES)、ステップS2で既にデータレジスタ12へのデータとPrAcc=0を入力しているので、Exit1-DRステートを経由してUpdate-DRステートへ遷移し(ステップS8)、この遷移により、入力されたデータをデータレジスタ12へ書き込み、PrAcc=0をコントロールレジスタ13のPrAcc領域13Aに書き込む(ステップS9)。   When the value of the address register 11 read from the TDO matches the expected address (YES), since data to the data register 12 and PrAcc = 0 have already been input in step S2, the Exit1-DR state is changed. Then, the state transits to the Update-DR state (step S8). With this transition, the input data is written to the data register 12, and PrAcc = 0 is written to the PrAcc area 13A of the control register 13 (step S9).

コントロールレジスタ13のPrAcc領域13AにPrAcc=0が書き込まれると、プロセッサアクセスのペンディングが解除されて、マイクロプロセッサは、プログラムに記述された一定の処理を実行する。その処理の実行後、マイクロプロセッサが再びコントロールレジスタ13のPrAcc領域13AにPrAcc=1をセットすると、ステップS2における次の連続データの入力が実行される。   When PrAcc = 0 is written in the PrAcc area 13A of the control register 13, the pending processor access is released, and the microprocessor executes a certain process described in the program. After the execution of the process, when the microprocessor sets PrAcc = 1 in the PrAcc area 13A of the control register 13 again, the next continuous data input in step S2 is executed.

一方、もし、TDOから読み出されたPrAcc値が‘0’であるときは、連続データの終了と判断できるので、TDOから読み出されたアドレスレジスタ11の値に該当するアドレスに格納されているデータとPrAcc信号値としてPrAcc=0をTDIからシフトイン入力する(ステップS10)。   On the other hand, if the PrAcc value read from the TDO is “0”, it can be determined that the end of the continuous data is stored in the address corresponding to the value of the address register 11 read from the TDO. As a data and PrAcc signal value, PrAcc = 0 is shifted in from TDI (step S10).

続いて、Exit1-DRステートを経由してUpdate-DRステートへ遷移し(ステップS11)、シフトイン入力されたデータをデータレジスタ12へ書き込み、PrAcc=0をコントロールレジスタ13のPrAcc領域13Aに書き込んで(ステップS12)、「ダウンロード命令」の実行を終了する。   Subsequently, a transition is made to the Update-DR state via the Exit1-DR state (step S11), and the data shifted in is written to the data register 12, and PrAcc = 0 is written to the PrAcc area 13A of the control register 13. (Step S12), execution of the “download instruction” is terminated.

上述した方法によれば、「ダウンロード命令」を1回命令レジスタに書き込むだけで、デバッグメモリ空間の連続するアドレスのデータをデータレジスタへ連続して書き込むことができる。これにより、従来、アドレスレジスタとデータレジスタの切り替えのたびに命令レジスタへの命令コードの書き換えが必要だったのに対し、大幅に処理クロック数を減少させることができる。   According to the above-described method, it is possible to continuously write data at consecutive addresses in the debug memory space to the data register only by writing the “download instruction” once in the instruction register. As a result, the number of processing clocks can be significantly reduced while the instruction code in the instruction register must be rewritten every time the address register and the data register are switched.

例えば、1回のデータの転送に要するクロック数をTAPコントローラの状態遷移に沿って、各ステートの後の括弧の中に示すと次のようになる。   For example, the number of clocks required for one data transfer is shown in parentheses after each state along the state transition of the TAP controller as follows.

Select-DR(1)→Capture-DR(1)→Shift-DR(1)×32→Exit1-DR(1)→Update-DR(1)→Select-DR(1)となり、合計37クロックで済む。これは、従来、同じ処理に183クロックを要していたのに対して大幅な処理クロック数の減少であり、その分データの転送を高速に行うことができる。   Select-DR (1)-> Capture-DR (1)-> Shift-DR (1) x 32-> Exit1-DR (1)-> Update-DR (1)-> Select-DR (1). . This is a significant reduction in the number of processing clocks compared to the conventional processing requiring 183 clocks, and data transfer can be performed at a high speed.

図3は、本発明の実施例2に係るデバッグ用レジスタの構成を示すブロック図である。   FIG. 3 is a block diagram illustrating a configuration of a debug register according to the second embodiment of the present invention.

デバッグ用レジスタを構成するデータレジスタ群2は、シフトレジスタ20と、PrAccレジスタ20Aと、アドレスレジスタ21と、データレジスタ22と、コントロールレジスタ23とを含む。コントロールレジスタ23には、PrAcc信号の書き込み領域としてPrAcc領域23Aがある。   The data register group 2 constituting the debug register includes a shift register 20, a PrAcc register 20A, an address register 21, a data register 22, and a control register 23. The control register 23 has a PrAcc area 23A as a PrAcc signal write area.

本実施例では実施例1とは異なり、シフトレジスタ20のみが入力端子(TDI)に接続され、シフトレジスタ20にPrAccレジスタ20Aを連結したPrAccレジスタ20Aの出力、またはシフトレジスタ20単独の出力がセレクタ24で選択されて出力端子(TDO)に出力される。その選択はデバッグ命令の種類による。   In this embodiment, unlike the first embodiment, only the shift register 20 is connected to the input terminal (TDI), and the output of the PrAcc register 20A obtained by connecting the PrAcc register 20A to the shift register 20 or the output of the shift register 20 alone is the selector. 24 is selected and output to the output terminal (TDO). The selection depends on the type of debug instruction.

シフトレジスタ20およびPrAccレジスタ20Aは、それぞれパラレル入力機能およびパラレル出力機能を有する。シフトレジスタ20からパラレル出力されたデータは、データレジスタ22あるいはコントロールレジスタ23のいずれかに書き込まれる。ただし、コントロールレジスタ23のPrAcc領域23Aには、PrAccレジスタ20Aからパラレル出力されたPrAcc値を書き込むこともできる。   The shift register 20 and the PrAcc register 20A have a parallel input function and a parallel output function, respectively. Data output in parallel from the shift register 20 is written to either the data register 22 or the control register 23. However, the PrAcc value output in parallel from the PrAcc register 20A can be written in the PrAcc area 23A of the control register 23.

一方、アドレスレジスタ21、データレジスタ22、コントロールレジスタ23のいずれかから出力されたデータは、シフトレジスタ20へパラレル入力される。ただし、コントロールレジスタ23のPrAcc領域23Aから出力されたPrAcc値は、PrAccレジスタ20Aへパラレル入力される。   On the other hand, data output from any one of the address register 21, the data register 22, and the control register 23 is input in parallel to the shift register 20. However, the PrAcc value output from the PrAcc area 23A of the control register 23 is input in parallel to the PrAcc register 20A.

このような構成により、本実施例のアドレスレジスタ21、データレジスタ22、コントロールレジスタ23に対するシフトイン入力およびシフトアウト出力は、1つのシフトレジスタ20および1つのPrAccレジスタ20Aを用いて行うことができる。   With such a configuration, shift-in input and shift-out output to the address register 21, data register 22, and control register 23 of this embodiment can be performed using one shift register 20 and one PrAcc register 20A.

本実施例のデータレジスタ22にデバッグメモリ空間の連続するアドレスのデータを連続して書き込む場合、実施例1と同様、「ダウンロード命令」を新たに設ける。ただし、本実施例における「ダウンロード命令」は次のように機能する。   When data at consecutive addresses in the debug memory space is continuously written in the data register 22 of the present embodiment, a “download instruction” is newly provided as in the first embodiment. However, the “download instruction” in this embodiment functions as follows.

すなわち、本実施例において「ダウンロード命令」が命令レジスタにあるときは、TAPコントローラのCapture-DRステートでは、アドレスレジスタ21からパラレル出力されたデータをシフトレジスタ20へパラレル入力し、コントロールレジスタ23のPrAcc領域23Aから出力されたPrAcc値をPrAccレジスタ20Aへパラレル入力する。また、Shift-DRステートでは、Capture-DRステートで入力されたアドレス値とPrAcc値をTDOへシフトアウト出力すると同時に、TDIからデータレジスタに書き込むデータとPrAcc値をシフトイン入力する。さらに、Update-DRステートでは、シフトイン入力されたデータをデータレジスタ22へ書き込み、PrAcc値をコントロールレジスタ23のPrAcc領域23Aへ書き込む。   That is, in this embodiment, when the “download instruction” is in the instruction register, in the Capture-DR state of the TAP controller, the data output in parallel from the address register 21 is input in parallel to the shift register 20 and the PrAcc of the control register 23 is input. The PrAcc value output from the area 23A is input in parallel to the PrAcc register 20A. In the Shift-DR state, the address value and PrAcc value input in the Capture-DR state are shifted out to TDO, and at the same time, data to be written to the data register and PrAcc value are shifted in from TDI. Further, in the Update-DR state, the shift-in input data is written to the data register 22, and the PrAcc value is written to the PrAcc area 23A of the control register 23.

このような「ダウンロード命令」を用いて、図2に示したフローを実行することにより、本実施例においても実施例1と同様に、デバッグメモリ空間の連続するアドレスのデータを少ないクロック数でデータレジスタに書き込むことができる。   By executing the flow shown in FIG. 2 using such a “download instruction”, in this embodiment as well as in the first embodiment, data at consecutive addresses in the debug memory space is transferred with a small number of clocks. You can write to the register.

このような本実施例のデータレジスタ群の構成によれば、入力端子(TDI)に接続されるシフトレジスタは、アドレスレジスタ、データレジスタ、コントロールレジスタ共通に1個設けるだけでよく、回路構成を簡略化することができる。   According to the configuration of the data register group of this embodiment, only one shift register connected to the input terminal (TDI) is provided for the address register, the data register, and the control register, and the circuit configuration is simplified. Can be

本発明の実施例1に係るデバッグ用レジスタの構成を示すブロック図。1 is a block diagram showing a configuration of a debug register according to Embodiment 1 of the present invention. 本発明の実施例に係るデータ転送方法のフローを示すフローチャート。The flowchart which shows the flow of the data transfer method concerning the Example of this invention. 本発明の実施例2に係るデバッグ用レジスタの構成を示すブロック図。FIG. 9 is a block diagram illustrating a configuration of a debug register according to the second embodiment of the present invention. EJTAGを用いたデバッグシステムを示す図。The figure which shows the debugging system using EJTAG. EJTAG準拠のマイクロプロセッサのTAPの構成の例を示すブロック図。The block diagram which shows the example of a structure of TAP of the microprocessor based on EJTAG. EJTAG準拠のマイクロプロセッサのTAPコントローラの状態遷移図。The state transition diagram of the TAP controller of the microprocessor based on EJTAG.

符号の説明Explanation of symbols

1、2 データレジスタ群
11、21 アドレスレジスタ
12、22 データレジスタ
13、23 コントロールレジスタ
11A、12A、20A PrAccレジスタ
13A、23A PrAcc領域
14、24 セレクタ
20 シフトレジスタ
1, 2 Data register group 11, 21 Address register 12, 22 Data register 13, 23 Control register 11A, 12A, 20A PrAcc register 13A, 23A PrAcc area 14, 24 Selector 20 Shift register

Claims (5)

EJTAG準拠のマイクロプロセッサに搭載されるデバッグ用レジスタであって、
アドレスレジスタと、
データレジスタと、
プロセッサアクセスのペンディングを制御するPrAcc信号が格納される第1のPrAccレジスタと、
前記PrAcc信号が格納される第2のPrAccレジスタと、
前記PrAcc信号が書き込まれるPrAcc領域を有するコントロールレジスタと
を具備することを特徴とするデバッグ用レジスタ。
A debugging register mounted on an EJTAG compliant microprocessor,
An address register;
A data register;
A first PrAcc register storing a PrAcc signal that controls pending processor access;
A second PrAcc register in which the PrAcc signal is stored;
A debug register comprising a control register having a PrAcc area in which the PrAcc signal is written.
デバッグ用命令の種類により、前記アドレスレジスタと前記第1のPrAccレジスタは連結されて1つのシフトレジスタとして使用され、前記データレジスタと前記第2のPrAccレジスタは連結されて1つのシフトレジスタとして使用されることを特徴とする請求項1に記載のデバッグ用レジスタ。   Depending on the type of debug instruction, the address register and the first PrAcc register are connected and used as one shift register, and the data register and the second PrAcc register are connected and used as one shift register. The debugging register according to claim 1, wherein: EJTAG準拠のマイクロプロセッサに搭載されるデバッグ用レジスタであって、
パラレル入力およびパラレル出力機能を有するシフトレジスタと、
パラレル入力およびパラレル出力機能を有してプロセッサアクセスのペンディングを制御するPrAcc信号が格納されるPrAccレジスタと、
前記シフトレジスタからパラレル出力されたデータが書き込まれるアドレスレジスタと、
前記シフトレジスタからパラレル出力されたデータが書き込まれるデータレジスタと、
前記シフトレジスタおよび前記PrAccレジスタからパラレル出力されたデータが書き込まれるPrAccビット領域を有するコントロールレジスタと
を具備し、前記アドレスレジスタおよび前記コントロールレジスタの前記PrAcc領域からパラレル出力されたデータが前記シフトレジスタおよび前記PrAccレジスタにパラレル入力されることを特徴とするデバッグ用レジスタ。
A debugging register mounted on an EJTAG compliant microprocessor,
A shift register having parallel input and parallel output functions;
A PrAcc register having a parallel input and parallel output function and storing a PrAcc signal for controlling the pending of processor access;
An address register to which data output in parallel from the shift register is written;
A data register to which data output in parallel from the shift register is written;
A control register having a PrAcc bit area into which data output in parallel from the shift register and the PrAcc register is written, and data output in parallel from the PrAcc area in the address register and the control register A debugging register, wherein the PrAcc register is inputted in parallel.
デバッグ用命令の種類により、前記シフトレジスタと前記PrAccレジスタは連結されて1つのシフトレジスタとして使用されることを特徴とする請求項3に記載のデバッグ用レジスタ。   4. The debugging register according to claim 3, wherein the shift register and the PrAcc register are connected to be used as one shift register depending on a type of debugging instruction. デバッグ用レジスタとしてアドレスレジスタ、データレジスタおよびPrAccレジスタを備えるEJTAG準拠のマイクロプロセッサのデバッグ用レジスタへのデータの転送方法であって、
アドレスレジスタおよびPrAccレジスタからのデータのシフトアウトとデータレジスタおよびPrAccレジスタへのデータのシフトインの同時実行、および前記シフトアウトした前記アドレスレジスタの値が予想した値であったときに前記シフトインしたデータのデータレジスタおよびPrAccレジスタへの書き込みの実行を行う命令を備え、
デバッグメモリ空間の連続するアドレスから順次データを取得して前記データレジスタに順次書き込むときは前記命令を用い、
前記命令を実行するときに、前記シフトインするデータとして、次にアクセスが予想されるアドレスから取得したデータと、デバッグが継続して実行されるようプロセッサアクセスのペンディングを制御するPrAccデータを入力することを特徴とするデータ転送方法。
A method of transferring data to a debug register of an EJTAG compliant microprocessor comprising an address register, a data register, and a PrAcc register as debug registers,
Simultaneously shifting out data from the address register and the PrAcc register and shifting data into the data register and the PrAcc register, and shifting in when the value of the shifted out address register is the expected value An instruction to execute writing of data into the data register and the PrAcc register;
When sequentially acquiring data from successive addresses in the debug memory space and sequentially writing to the data register, use the instruction,
When executing the instruction, as the data to be shifted in, the data acquired from the address that is expected to be accessed next and the PrAcc data for controlling the pending of the processor access so that the debugging is continuously executed are input. A data transfer method characterized by the above.
JP2004338511A 2004-11-24 2004-11-24 Register for debugging and data transfer method Pending JP2006146757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004338511A JP2006146757A (en) 2004-11-24 2004-11-24 Register for debugging and data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004338511A JP2006146757A (en) 2004-11-24 2004-11-24 Register for debugging and data transfer method

Publications (1)

Publication Number Publication Date
JP2006146757A true JP2006146757A (en) 2006-06-08

Family

ID=36626340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004338511A Pending JP2006146757A (en) 2004-11-24 2004-11-24 Register for debugging and data transfer method

Country Status (1)

Country Link
JP (1) JP2006146757A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360325A (en) * 2011-09-26 2012-02-22 青岛海信信芯科技有限公司 Debugging method and device of register
US8677198B2 (en) 2009-03-04 2014-03-18 Alcatel Lucent Method and apparatus for system testing using multiple processors
US8719649B2 (en) 2009-03-04 2014-05-06 Alcatel Lucent Method and apparatus for deferred scheduling for JTAG systems
US8775884B2 (en) 2009-03-04 2014-07-08 Alcatel Lucent Method and apparatus for position-based scheduling for JTAG systems
CN114691520A (en) * 2022-04-15 2022-07-01 中电科申泰信息科技有限公司 Instruction programmable buffer area design system based on processor debugging framework

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8677198B2 (en) 2009-03-04 2014-03-18 Alcatel Lucent Method and apparatus for system testing using multiple processors
US8719649B2 (en) 2009-03-04 2014-05-06 Alcatel Lucent Method and apparatus for deferred scheduling for JTAG systems
US8775884B2 (en) 2009-03-04 2014-07-08 Alcatel Lucent Method and apparatus for position-based scheduling for JTAG systems
CN102360325A (en) * 2011-09-26 2012-02-22 青岛海信信芯科技有限公司 Debugging method and device of register
CN102360325B (en) * 2011-09-26 2017-06-23 青岛海信电器股份有限公司 Register adjustment method and device
CN114691520A (en) * 2022-04-15 2022-07-01 中电科申泰信息科技有限公司 Instruction programmable buffer area design system based on processor debugging framework
CN114691520B (en) * 2022-04-15 2024-08-23 中电科申泰信息科技有限公司 Instruction programmable buffer design system based on processor debugging architecture

Similar Documents

Publication Publication Date Title
EP1651971B1 (en) Test standard interfaces and architectures
US5812562A (en) Low cost emulation scheme implemented via clock control using JTAG controller in a scan environment
US6961872B2 (en) Microcomputer and debugging system
US7533315B2 (en) Integrated circuit with scan-based debugging and debugging method thereof
US9274169B2 (en) Asynchronous programmable JTAG-based interface to debug any system-on-chip states, power modes, resets, clocks, and complex digital logic
JP5536297B2 (en) Semiconductor integrated circuit and semiconductor integrated circuit test system supporting co-debugging function
JP2011069840A (en) Method for accessing two or more taps through single tap (test access port), and integrated circuit
JPH10143390A (en) Processing system with test mechanism
JP6297091B2 (en) Electronic system, system diagnostic circuit and operation method thereof
JP4805134B2 (en) Method and apparatus for scanning an internal latch of an integrated circuit and integrated circuit
KR101120854B1 (en) Asynchronous communication apparatus using jtag test data registers
JP2006146757A (en) Register for debugging and data transfer method
JP4450787B2 (en) Semiconductor integrated circuit device
JP2008304986A (en) Semiconductor integrated circuit
JP2006189368A (en) Test system
JP5623035B2 (en) Apparatus and method for extending the IEEE 1149.1 Joint Test Action Group standard to communicate with functional circuits of an integrated circuit
US20130238948A1 (en) Semiconductor integrated circuit
JP4122824B2 (en) Data transfer control circuit for nonvolatile storage device, rewrite circuit for nonvolatile storage device, and communication control device
JP5832535B2 (en) Improved at-speed test access port operation
JP4600134B2 (en) Multiprocessor system
JP2005190112A (en) Microcomputer and debug method therefor
JP2004038464A (en) Microcomputer with built-in debugging function
JP3972416B2 (en) Memory test pattern generation circuit
JP3698478B2 (en) Debug device
JP3339574B2 (en) Test circuits for integrated circuits