JP2005196437A - Processor and development support system - Google Patents

Processor and development support system Download PDF

Info

Publication number
JP2005196437A
JP2005196437A JP2004001652A JP2004001652A JP2005196437A JP 2005196437 A JP2005196437 A JP 2005196437A JP 2004001652 A JP2004001652 A JP 2004001652A JP 2004001652 A JP2004001652 A JP 2004001652A JP 2005196437 A JP2005196437 A JP 2005196437A
Authority
JP
Japan
Prior art keywords
branch
trace
signal
instruction
branch instruction
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
JP2004001652A
Other languages
Japanese (ja)
Inventor
Atsushi Ubukata
篤 生形
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004001652A priority Critical patent/JP2005196437A/en
Publication of JP2005196437A publication Critical patent/JP2005196437A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To realize a processor having high compression efficiency for program trace information, and a development support device. <P>SOLUTION: When a direct branch command of a CPU 100 is executed, a flag for condition satisfied/unsatisfied of the branch is shifted-in to be accumulated in a shift register 800 for branch flags, and further when the branch is realized, a branch "taken" counter 900 is incremented to accumulate past branch information. The accumulated branch information determines which the branch flag or the branch "taken" counter value is shorter by use of the current number of branch flags 821 and the branch "taken" counter value 901 to output the trace information. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、プログラム実行状態を外部で観測可能な情報処理装置(プロセッサ)及びそのプロセッサを用いた開発支援装置に関する。   The present invention relates to an information processing apparatus (processor) capable of observing a program execution state externally and a development support apparatus using the processor.

「トレース情報出力機能」は、プロセッサのプログラム実行状態を、外部のホストコンピュータ上で動作しているデバッガに出力する機能である。システムが何らかの異常動作を検出した場合に、蓄積されたトレース情報を用いることによって、その時点から遡った実行履歴をシステム開発者が確認し、その原因を特定できるようにする。
ところが、開発支援装置においては、プロセッサにトレース情報の出力を行なうためのピンを追加しなければならず、その本数や動作周波数(トレース情報出力のバンド幅)が制限される。また、トレース情報を蓄積するメモリ容量にも限界がある。そのため、限られたトレース出力バンド幅やトレースメモリ容量を用いて、最大限にその効果を発揮するためには、トレース情報の圧縮が必要となる。
The “trace information output function” is a function for outputting the program execution state of the processor to a debugger operating on an external host computer. When the system detects any abnormal operation, the accumulated trace information is used so that the system developer can confirm the execution history going back from that point and identify the cause.
However, in the development support apparatus, a pin for outputting trace information must be added to the processor, and the number and operating frequency (bandwidth of trace information output) are limited. There is also a limit to the memory capacity for storing trace information. Therefore, it is necessary to compress the trace information in order to maximize the effects using the limited trace output bandwidth and trace memory capacity.

従来のトレース情報の圧縮手法の一例として、いわゆる「分岐トレース」と呼ばれるトレース情報取得方法がある(たとえば非特許文献1)。分岐トレースでは、下記(1),(2)のルールに基づき、分岐発生毎に分岐に関する情報をチップ外部に出力する。その出力されたトレース情報を元に、外部のデバッガにおいて、ソースプログラムと照らし合わせながら解析することにより、全ての分岐先アドレスの情報がなくても、実行履歴が復元できる。
(1) ソースプログラムに明示的に分岐先アドレスが記述されている直接分岐の時には、分岐が実行されたことだけを示すメッセージ(Direct Branch Message)を出力
(2) ソースプログラムに分岐先アドレスが明示的に記述されておらず、実行時にそれが決定する間接分岐の時には、分岐先アドレスを含む分岐メッセージ(Indirect Branch Message)を出力
以上の原理に基づくプロセッサと実行履歴復元ソフトウェアを従来技術として挙げ、以下に図を参照しながら説明する。
As an example of a conventional technique for compressing trace information, there is a trace information acquisition method called “branch trace” (for example, Non-Patent Document 1). In the branch trace, based on the following rules (1) and (2), information about a branch is output to the outside of the chip every time a branch occurs. Based on the output trace information, an external debugger analyzes it against the source program, so that the execution history can be restored without any branch destination address information.
(1) When a direct branch whose branch destination address is explicitly described in the source program is output, a message (Direct Branch Message) indicating that the branch has been executed is output
(2) When the branch destination address is not explicitly described in the source program and an indirect branch is determined at the time of execution, a branch message (Indirect Branch Message) including the branch destination address is output. Processor based on the above principle The execution history restoration software will be described as a conventional technique, and will be described below with reference to the drawings.

図20は、従来のトレース情報を出力するプロセッサの構成を示している。   FIG. 20 shows a configuration of a processor that outputs conventional trace information.

CPU100は、直接分岐命令実行時の条件成立時には、直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”にする。直接分岐命令実行時の条件不成立時には、直接分岐命令実行信号102が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。間接分岐命令実行時の条件成立時には、間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”にする。間接分岐命令実行時の条件不成立時には、間接分岐命令実行信号103が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。割込みや例外を受理した時には、割込み実行信号105が”1”となり、直接分岐命令実行信号102、間接分岐命令実行信号103、分岐命令実行時の条件成立信号104の値は無視してもよい。   When the condition at the time of execution of the direct branch instruction is satisfied, the CPU 100 simultaneously sets the direct branch instruction execution signal 102 and the condition satisfaction signal 104 at the time of execution of the branch instruction to “1”. When the condition at the time of execution of the direct branch instruction is not satisfied, the direct branch instruction execution signal 102 is “1”, and the condition satisfaction signal 104 at the time of execution of the branch instruction is “0”. When the condition at the time of execution of the indirect branch instruction is satisfied, the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of execution of the branch instruction are simultaneously set to “1”. When the condition at the time of execution of the indirect branch instruction is not established, the indirect branch instruction execution signal 103 is “1”, and the condition establishment signal 104 at the time of execution of the branch instruction is “0”. When an interrupt or exception is accepted, the interrupt execution signal 105 becomes “1”, and the values of the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 at the time of branch instruction execution may be ignored.

トレースメッセージ/パケット制御ステートマシン(Type0)200は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令実行時の条件成立信号104、割込み実行信号105を受け取り、図21のトレースメッセージ/パケット制御ステートマシンのステート表に示すように、入力信号と内部状態からシーケンスを作り出し、MSEO[1:0]出力(Type0)201と、MDO[7:0]出力選択信号(Type0)202を生成する。MSEO[1:0]出力(Type0)201は、そのままトレース状態出力端子(MSEO[1:0])1010に出力される。   The trace message / packet control state machine (Type 0) 200 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, the condition establishment signal 104 when the conditional branch instruction is executed, and the interrupt execution signal 105 from the CPU 100. As shown in the state table of the trace message / packet control state machine, a sequence is created from the input signal and the internal state, and the MSEO [1: 0] output (Type0) 201 and the MDO [7: 0] output selection signal (Type0 ) 202 is generated. The MSEO [1: 0] output (Type0) 201 is output to the trace state output terminal (MSEO [1: 0]) 1010 as it is.

分岐taken+例外検出回路320は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令の条件成立信号104、割込み実行信号105を入力とし、直接分岐命令実行信号102と条件分岐命令の条件成立信号104の論理積、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積、並びに割込み実行信号105の3項の論理和をとったものであり、分岐が実行されることを意味する分岐taken+例外信号321を出力する。
分岐先アドレス更新検出回路310は、CPU100からの間接分岐命令実行信号103、条件分岐命令の条件成立信号104、割込み実行信号105を入力とし、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積、並びに割込み実行信号105の3項の論理和をとったものであり、アドレス出力が必要な分岐が実行されたことを意味する分岐先アドレス更新信号311を出力する。
The branch take + exception detection circuit 320 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, the conditional branch instruction condition establishment signal 104, and the interrupt execution signal 105 from the CPU 100 as inputs. The logical product of the branch instruction condition establishment signal 104, the logical product of the indirect branch instruction execution signal 103 and the conditional branch instruction condition establishment signal 104, and the logical sum of the three terms of the interrupt execution signal 105 are taken. A branch take + exception signal 321 signifying that it is executed is output.
The branch destination address update detection circuit 310 receives the indirect branch instruction execution signal 103, the condition establishment signal 104 of the conditional branch instruction, and the interrupt execution signal 105 from the CPU 100, and receives the indirect branch instruction execution signal 103 and the condition establishment signal of the conditional branch instruction. The logical product of 104 and the logical sum of the three terms of the interrupt execution signal 105 are taken, and a branch destination address update signal 311 is output, which means that a branch requiring address output has been executed.

シーケンシャル命令実行カウンタ(Type0)500は、CPU100からの命令完了信号101をカウントイネーブルに入力し、前記分岐taken+例外信号321によって同期クリアされる。シーケンシャル命令実行カウンタ(Type0)500のカウント値は、前記分岐taken+例外信号321によって、シーケンシャル命令実行カウンタ値保持手段(Type0)510にロードされ、トレース情報の出力に備えられる。   The sequential instruction execution counter (Type 0) 500 receives the instruction completion signal 101 from the CPU 100 as a count enable, and is synchronously cleared by the branch take + exception signal 321. The count value of the sequential instruction execution counter (Type0) 500 is loaded into the sequential instruction execution counter value holding means (Type0) 510 by the branch take + exception signal 321 to prepare for output of trace information.

分岐先アドレス保持手段600は、前記分岐先アドレス更新信号311がアサートされたとき、CPU100からの分岐先アドレス110を入力し保持する。   The branch destination address holding means 600 receives and holds the branch destination address 110 from the CPU 100 when the branch destination address update signal 311 is asserted.

MDO[7:0]出力マルチプレクサ(Type0)700は、ヘッダー用固定値”0x03”出力回路410の出力と、ヘッダー用固定値”0x04”出力回路420の出力と、シーケンシャル命令実行カウンタ値保持手段(Type0)510の出力と、分岐先アドレス保持手段600の出力を8ビット単位に分割した信号とを、7グループの選択される信号として入力し、MDO[7:0]出力選択信号(Type0)202によって7グループの内の1つを選択して、MDO[7:0]出力信号(Type0)701として出力する。MD0[7:0]出力信号(Type0)701は、そのままトレースデータ出力端子(MDO[7:0])に出力される。   The MDO [7: 0] output multiplexer (Type0) 700 includes a header fixed value “0x03” output circuit 410 output, a header fixed value “0x04” output circuit 420 output, and sequential instruction execution counter value holding means ( The output of Type 0) 510 and the signal obtained by dividing the output of branch destination address holding means 600 into 8-bit units are input as signals to be selected for 7 groups, and MDO [7: 0] output selection signal (Type 0) 202 To select one of the seven groups and output it as an MDO [7: 0] output signal (Type 0) 701. The MD0 [7: 0] output signal (Type0) 701 is output to the trace data output terminal (MDO [7: 0]) as it is.

図22には、図20のシステムが出力するトレースメッセージのIDであるTCODEの割り当てを示している。図23には、Program Trace, Direct Branch Messageのメッセージフォーマットを、図24には、Program Trace, Indirect Branch Messageのメッセージフォーマットを示している。それぞれ、ここでは説明していないトレース出力の基準クロックに同期してMDO[7:0]出力とMSEO[1:0]出力を変化させる。とりわけMSEO[1:0]は、メッセージ及びパケットの開始・終了を意味するので重要である。   FIG. 22 shows assignment of TCODE which is an ID of a trace message output by the system of FIG. FIG. 23 shows a message format of Program Trace and Direct Branch Message, and FIG. 24 shows a message format of Program Trace and Direct Branch Message. The MDO [7: 0] output and the MSEO [1: 0] output are changed in synchronization with the reference clock of the trace output not described here. MSEO [1: 0] is particularly important because it means the beginning and end of messages and packets.

図21のトレースメッセージ/パケット制御ステートマシンのステート表に示すように、直接分岐の条件成立(直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”)時にはIDLE状態→DIR_HEAD状態→DIR_ICNT状態→IDLE状態へと遷移し、MDO出力選択信号出力及びMSEO出力信号によって、図23のProgram Trace, Direct Branch Messageのメッセージフォーマットに示すようなシーケンス出力が得られる。間接分岐命令の条件成立(間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”)時、または、割込み発生(割込み実行信号105が”1”)時には、IDLE状態→IND_HEAD状態→IND_ICNT状態→IND_UADR0状態→IND_UADR1状態→IND_UADR2状態→IND_UADR3状態→IDLE状態と遷移し、図24のProgram Trace, Indirect Branch Messageのメッセージフォーマットに示すようなトレース出力が得られる。本来であれば、それぞれのシーケンスの間にも次の分岐命令が実行される可能性があり、それらを受け付けるように作られている必要があるが、説明を簡単にするために省略している。また、U-ADDRの長さは、上位アドレスが変化ない場合には、上位ビットを出力しなくてもよいプロトコルとなっているが、これも単純化のため、固定長32ビット出力する制御で説明している点に注意頂きたい。
図19に、このプロセッサを用いた開発支援装置の全体の構成図を示す。
As shown in the trace message / packet control state machine state table in FIG. 21, when the condition for direct branching is satisfied (when the direct branching instruction execution signal 102 and the branching instruction execution condition signal 104 are simultaneously “1”), the IDLE state → A transition is made from the DIR_HEAD state to the DIR_ICNT state to the IDLE state, and the sequence output shown in the message format of Program Trace and Direct Branch Message in FIG. 23 is obtained by the MDO output selection signal output and the MSEO output signal. When an indirect branch instruction condition is satisfied (the indirect branch instruction execution signal 103 and the condition establishment signal 104 at the time of branch instruction execution are simultaneously “1”) or when an interrupt occurs (the interrupt execution signal 105 is “1”), the IDLE state → Transition is made from IND_HEAD state → IND_ICNT state → IND_UADR0 state → IND_UADR1 state → IND_UADR2 state → IND_UADR3 state → IDLE state, and a trace output as shown in the message format of Program Trace and Indirect Branch Message in FIG. 24 is obtained. Originally, there is a possibility that the next branch instruction may be executed between each sequence, and it is necessary to be designed to accept them, but this is omitted for the sake of simplicity. . The length of U-ADDR is a protocol that does not need to output the upper bits if the upper address does not change, but this is also controlled by outputting a fixed length of 32 bits for simplicity. Please note the points explained.
FIG. 19 shows an overall configuration diagram of a development support apparatus using this processor.

プロセッサ1からのトレース状態信号1011、トレースデータ信号1021をトレース情報蓄積装置2が受け、トレースメモリ制御1210がトレースメモリ制御信号1211、トレースメモリ書込みデータ1212を制御することによって、トレースメモリ1230に対するメモリアクセスを制御し、トレース情報としてトレースメモリ1230に蓄積する。ホストコンピュータ3は、トレース情報蓄積装置2にトレースメモリ読み出し要求1301を出力し、トレースメモリ制御1210を介してトレースメモリにアクセスし、トレースメモリ出力1231を取得する。   The trace information storage device 2 receives the trace status signal 1011 and the trace data signal 1021 from the processor 1, and the trace memory control 1210 controls the trace memory control signal 1211 and the trace memory write data 1212, whereby memory access to the trace memory 1230 is performed. Are stored in the trace memory 1230 as trace information. The host computer 3 outputs a trace memory read request 1301 to the trace information storage device 2, accesses the trace memory via the trace memory control 1210, and acquires the trace memory output 1231.

次に、このように構成されたプロセッサ1からトレースデータを取得し、実行履歴を復元する様子を図26のプログラムを例にとりながら説明する。図26の0x50000000番地から実行した場合、(3)の直接分岐では、それまでにシーケンシャル命令実行数が2であるから、”PTDB I-CNT=2”が出力される。(6),(9)の直接分岐では、それ以前のシーケンシャル命令実行数はどちらも2であるが、まとめられて”PTDB I-CNT=2,I-CNT=2”が出力される。次の(12)では、not-takenであったため、(17)の間接分岐の出現まで、シーケンシャル命令実行数が持ち越され、I-CNT=7になり、また間接分岐がtakenであったため、”PTIB I-CNT=7,U-ADDR=0x50000300”が出力される。同様に(20)の”ret”命令は間接分岐のtakenとみなされるので、”PTIB I-CNT=2,U-ADDR=0x50000034”が出力される。このようにして取得されたトレース情報は図27のようになる。   Next, how the trace data is acquired from the processor 1 configured as described above and the execution history is restored will be described by taking the program of FIG. 26 as an example. When executed from the address 0x50000000 in FIG. 26, in the direct branch of (3), the number of sequential instruction executions is 2 so far, so “PTDB I-CNT = 2” is output. In the direct branch of (6) and (9), the number of sequential instruction executions before that is 2, but they are collectively output as “PTDB I-CNT = 2, I-CNT = 2”. In the following (12), because it was not-taken, the sequential instruction execution count was carried forward until the appearance of the indirect branch in (17), I-CNT = 7, and the indirect branch was taken. PTIB I-CNT = 7, U-ADDR = 0x50000300 ”is output. Similarly, since the “ret” instruction in (20) is regarded as an take of an indirect branch, “PTIB I-CNT = 2, U-ADDR = 0x50000034” is output. The trace information acquired in this way is as shown in FIG.

次に、図26のソースプログラムと図27のトレース情報が与えられた時にホストコンピュータ3が、図25に示したアルゴリズムに従って実行履歴を復元する手順を説明する。   Next, a description will be given of a procedure in which the host computer 3 restores the execution history according to the algorithm shown in FIG. 25 when the source program of FIG. 26 and the trace information of FIG. 27 are given.

ステップ2001で、IPは0x50000000番地、TPは0番地、ETPは4番地に設定される。   In step 2001, IP is set to address 0x50000000, TP is set to address 0, and ETP is set to address 4.

TP≠ETPなので2002はスキップし、TP=0のトレースメッセージは”PTDB I-CNT=2”であるので、ステップ2003、ステップ2004と進み、IP=0x50000000番地の命令"命令1",IP=0x50000004番地の命令”命令2”を表示し、ステップ2005でIP=0x50000008番地の命令”bra loop_A”を表示し、直接分岐先アドレスの0x50000014(loop_A)をIPに設定する。ステップ2006では、このメッセージのI-CNTパケットを終了したのでステップ2050に進み、TPをインクリメントする。   Since TP ≠ ETP, 2002 is skipped, and the trace message of TP = 0 is “PTDB I-CNT = 2”. Therefore, the process proceeds to step 2003 and step 2004, and the instruction “command 1” at IP = 0x50000000, IP = 0x50000004 The instruction “address 2” at the address is displayed, the instruction “bra loop_A” at the address IP = 0x50000008 is displayed at step 2005, and the direct branch destination address 0x50000014 (loop_A) is set to IP. In step 2006, since the I-CNT packet of this message is completed, the process proceeds to step 2050 and TP is incremented.

次のTP=1では、”TPDB I-CNT=2,I-CNT=2”を処理するが、TP≠ETPなので2002はスキップし、ステップ2003、ステップ2004へと進み、IP=0x50000014, IP=0x50000018の命令を表示し、ステップ2005で、”bne loop_A”を表示し、IPを再び0x50000014(loop_A)に設定する。I-CNTのパケットが2つあるので、もう一度同じループを繰り返し、ステップ2050でTPを2にインクリメントする。   At the next TP = 1, “TPDB I-CNT = 2, I-CNT = 2” is processed, but since TP ≠ ETP, 2002 is skipped, and the process proceeds to Step 2003 and Step 2004, where IP = 0x50000014, IP = The instruction of 0x50000018 is displayed, “bne loop_A” is displayed in step 2005, and the IP is set to 0x50000014 (loop_A) again. Since there are two I-CNT packets, the same loop is repeated once again, and TP is incremented to 2 in step 2050.

次のTP=2では、”PTIB I-CNT=7,U-ADDR=0x50000300”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2003でNへ進み、ステップ2013でYに進む。ステップ2014で、IP=0x50000014の”loop_A:命令3”から、IP=0x50000018の”命令4”、IP=0x5000001cの”bne loop_A”、IP=0x50000020の”命令5”、IP=0x50000024の”命令6”、IP=0x50000028の”命令7”、IP=0x5000002cの”mov Sub_C,a0”まで、順次表示する。続いてステップ2015で、IP=0x50000030の間接分岐命令”call (a0)”を表示し、ステップ2016で、IPをU-ADDRに示されるアドレス0x50000300に設定する。ステップ2050でTPを3にインクリメントする。   At the next TP = 2, “PTIB I-CNT = 7, U-ADDR = 0x50000300” is processed, but this is also TP ≠ ETP, so 2002 is skipped, proceeding to N in step 2003, proceeding to Y in step 2013 . In Step 2014, from “loop_A: Instruction 3” with IP = 0x50000014, “Instruction 4” with IP = 0x50000018, “bne loop_A” with IP = 0x5000001c, “Instruction 5” with IP = 0x50000020, “Instruction 6 with IP = 0x50000024” “Instruction 7” with IP = 0x50000028 and “mov Sub_C, a0” with IP = 0x5000002c are displayed in order. Subsequently, in step 2015, the indirect branch instruction “call (a0)” of IP = 0x50000030 is displayed, and in step 2016, IP is set to the address 0x50000300 indicated by U-ADDR. In step 2050, TP is incremented to 3.

次のTP=3では、”PTIB I-CNT=2,U-ADDR=0x5000034”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2003でNへ進み、ステップ2013でYに進む。ステップ2014で、IP=0x50000300の”Sub_C: 命令9”、IP=0x50000304の”命令10”まで、順次表示する。続いてステップ2015で、IP=0x50000308の間接分岐命令”ret” を表示し、ステップ2016で、IPをU-ADDRに示されるアドレス0x50000034に設定する。ステップ2050でTPを4にインクリメントする。
次のTP=4では、ステップ2002で、TP==ETPと判定されるので、実行履歴復元は終了する。このようにして得られた実行履歴を図28に示す。
IEEE-ISTO 5001(TM)-1999,”The Nexus 5001 Forum(TM) Standard for a Global Embedded Processor Debug Interface”
At the next TP = 3, “PTIB I-CNT = 2, U-ADDR = 0x5000034” is processed, but this is also TP ≠ ETP, so 2002 is skipped, proceeding to N in step 2003, proceeding to Y in step 2013 . In step 2014, “Sub_C: Command 9” with IP = 0x50000300 and “Command 10” with IP = 0x50000304 are sequentially displayed. Subsequently, in step 2015, the indirect branch instruction “ret” with IP = 0x50000308 is displayed, and in step 2016, IP is set to address 0x50000034 indicated in U-ADDR. In step 2050, TP is incremented to 4.
At the next TP = 4, it is determined in step 2002 that TP == ETP, so the execution history restoration ends. The execution history thus obtained is shown in FIG.
IEEE-ISTO 5001 (TM) -1999, “The Nexus 5001 Forum (TM) Standard for a Global Embedded Processor Debug Interface”

しかしながら従来技術には、トレース情報の圧縮率が低いという問題点がある。すなわち、従来技術においては、条件分岐命令の条件不成立がシーケンシャル命令実行にカウントされ、分岐(直接分岐または間接分岐)の条件成立(分岐の実行)の度に、シーケンシャル命令実行回数を出力しなければならない。また、1回のシーケンシャル命令実行回数の出力にトレース出力クロックの少なくとも1クロックかかっており、CPUの動作周波数とトレースクロックの比(トレース出力クロックは、通常CPUクロックの1/2,1/4など分周した周波数で、チップ外部に伝送可能な動作周波数が選ばれる)を考慮すれば、分岐命令が連続する場合など、トレース情報の発生レートに比べ、トレース情報の出力レートが低く、適当な容量のバッファを用意していても、すぐにトレース出力が不可能になってしまう。言い換えれば、実際のCPUの動作に比べ、トレース情報出力の圧縮率が低いということである。   However, the conventional technique has a problem that the compression rate of the trace information is low. In other words, in the prior art, the condition failure of the conditional branch instruction is counted in sequential instruction execution, and the sequential instruction execution count must be output every time the condition of branch (direct branch or indirect branch) is satisfied (branch execution). Don't be. In addition, it takes at least one trace output clock to output the number of sequential instruction executions, and the ratio between the CPU operating frequency and the trace clock (the trace output clock is usually 1/2, 1/4 of the CPU clock, etc.) If the operating frequency that can be transmitted to the outside of the chip is selected with the divided frequency), the output rate of the trace information is lower than the generation rate of the trace information, such as when branch instructions are continuous, and the appropriate capacity Even if the buffer is prepared, the trace output becomes impossible immediately. In other words, the compression rate of the trace information output is lower than the actual operation of the CPU.

このような問題点に鑑み、本願の発明は、高速なCPUの動作を外部で確実に捕捉可能な程度にトレース情報を高度に圧縮する手段を提供することが目的である。   In view of such problems, an object of the present invention is to provide means for highly compressing trace information to such an extent that high-speed CPU operations can be reliably captured externally.

上記課題に対しては、本願の請求項1、4の発明によって、分岐命令の条件不成立をシーケンシャル命令実行条件に含めず、CPUの分岐命令の条件が成立した時には成立ビットを、分岐が不成立の時は不成立ビットをシフトレジスタにシフトインし、そのシフトレジスタに蓄積した全ビットと有効ビット数情報をまとめた分岐状態メッセージを出力することにより解決する。   To solve the above problem, the invention according to claims 1 and 4 of the present application does not include the failure of the branch instruction in the sequential instruction execution condition, and sets the success bit when the CPU branch instruction condition is satisfied, and the branch is not satisfied. The problem is solved by shifting the unsuccessful bits into the shift register and outputting a branch status message that summarizes all the bits stored in the shift register and information on the number of valid bits.

さらに特定の条件におけるトレース情報圧縮率を上げるため、本願の請求項2、5の発明によって、CPUの分岐が連続して成立した時に、その成立回数を計数するカウンタの値を含む分岐takenカウントメッセージを出力することにより、課題解決を図る。   Further, in order to increase the trace information compression rate under a specific condition, the branch taken count message including the value of the counter for counting the number of establishments when the CPU branches are successively established according to the inventions of claims 2 and 5 of the present application. To solve the problem.

さらに、つねに最適な圧縮率のトレース情報を出力するため、本願の請求項3、6の発明によって、分岐状態メッセージと、分岐takenカウントメッセージのどちらが短いかを判断し、選択して出力することにより、課題解決を図る。   Further, in order to always output trace information with the optimum compression rate, according to the inventions of claims 3 and 6 of the present application, it is determined which one of the branch status message and the branch take count message is shorter, and is selected and output. , To solve the problem.

本発明の請求項1、4の発明に関わるプロセッサ及び開発支援装置によれば、分岐発生の度に旧来は1パケット要していたところが、パケットの中の1ビットで済むようになるため、その情報の圧縮率は約1/8と見積もれる。   According to the processor and the development support apparatus according to the first and fourth aspects of the present invention, since one packet is conventionally required every time a branch occurs, only one bit in the packet can be used. The compression ratio of information is estimated to be about 1/8.

さらに、本発明の請求項3、6の発明に関わるプロセッサ及び開発支援装置によれば、同じ分岐が連続するときには、さらに情報の圧縮率は1/32まで高めることができる。   Furthermore, according to the processor and the development support apparatus according to the third and sixth aspects of the present invention, when the same branch continues, the information compression rate can be further increased to 1/32.

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

図1は、本発明の第1の実施例におけるプロセッサの構成を示すブロック図である。
CPU100は、直接分岐命令実行時の条件成立時には、直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”にする。直接分岐命令実行時の条件不成立時には、直接分岐命令実行信号102が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。間接分岐命令実行時の条件成立時には、間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”にする。間接分岐命令実行時の条件不成立時には、間接分岐命令実行信号103が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。割込みや例外を受理した時には、割込み実行信号105が”1”となり、直接分岐命令実行信号102、間接分岐命令実行信号103、分岐命令実行時の条件成立信号104の値は無視してもよい。
FIG. 1 is a block diagram showing the configuration of the processor in the first embodiment of the present invention.
When the condition at the time of execution of the direct branch instruction is satisfied, the CPU 100 simultaneously sets the direct branch instruction execution signal 102 and the condition satisfaction signal 104 at the time of execution of the branch instruction to “1”. When the condition at the time of execution of the direct branch instruction is not satisfied, the direct branch instruction execution signal 102 is “1”, and the condition satisfaction signal 104 at the time of execution of the branch instruction is “0”. When the condition at the time of execution of the indirect branch instruction is satisfied, the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of execution of the branch instruction are simultaneously set to “1”. When the condition at the time of execution of the indirect branch instruction is not established, the indirect branch instruction execution signal 103 is “1”, and the condition establishment signal 104 at the time of execution of the branch instruction is “0”. When an interrupt or exception is accepted, the interrupt execution signal 105 becomes “1”, and the values of the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 at the time of branch instruction execution may be ignored.

トレースメッセージ/パケット制御ステートマシン(Type2)220は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令実行時の条件成立信号104、割込み実行信号105、分岐フラグカウンタ820からの分岐フラグカウンタ値821を受け取り、図2のトレースメッセージ/パケット制御ステートマシンのステート表に示すように、入力信号と内部状態からシーケンスを作り出し、MSEO[1:0]出力(Type2)221と、MDO[7:0]出力選択信号(Type2)222を生成する。MSEO[1:0]出力(Type2)221は、そのままトレース状態出力端子(MSEO[1:0])1010に出力される。   The trace message / packet control state machine (Type 2) 220 includes a direct branch instruction execution signal 102, an indirect branch instruction execution signal 103, a condition establishment signal 104 when executing a conditional branch instruction, an interrupt execution signal 105, and a branch flag counter 820. Branch flag counter value 821 is received, a sequence is generated from the input signal and the internal state, as shown in the state table of the trace message / packet control state machine in FIG. 2, and MSEO [1: 0] output (Type 2) 221 , MDO [7: 0] output selection signal (Type2) 222 is generated. The MSEO [1: 0] output (Type2) 221 is output to the trace state output terminal (MSEO [1: 0]) 1010 as it is.

分岐taken検出回路350は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令の条件成立信号104を入力とし、直接分岐命令実行信号102と条件分岐命令の条件成立信号104の論理積と、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積との2項の論理和をとったものであり、分岐が実行されることを意味する分岐taken信号351を出力する。   The branch take detection circuit 350 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 of the conditional branch instruction from the CPU 100, and receives the direct branch instruction execution signal 102 and the condition establishment signal of the conditional branch instruction. A branch take signal that is a logical sum of two terms of the logical product of 104, the logical product of the indirect branch instruction execution signal 103 and the conditional establishment instruction 104 of the conditional branch instruction, and means that the branch is executed 351 is output.

分岐先アドレス更新検出回路310は、CPU100からの間接分岐命令実行信号103、条件分岐命令の条件成立信104、割込み実行信号105を入力とし、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積、並びに割込み実行信号105の3項の論理和をとったものであり、アドレス出力が必要な分岐が実行されたことを意味する分岐先アドレス更新信号311を出力する。   The branch destination address update detection circuit 310 receives the indirect branch instruction execution signal 103, the condition establishment signal 104 of the conditional branch instruction, and the interrupt execution signal 105 from the CPU 100, and receives the indirect branch instruction execution signal 103 and the condition establishment signal of the conditional branch instruction. The logical product of 104 and the logical sum of the three terms of the interrupt execution signal 105 are taken, and a branch destination address update signal 311 is output, which means that a branch requiring address output has been executed.

分岐検出回路340は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、割込み実行信105を入力とし、それらの論理和を、分岐実行信号341として出力する。   The branch detection circuit 340 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the interrupt execution signal 105 from the CPU 100, and outputs a logical sum of them as a branch execution signal 341.

シーケンシャル命令実行カウンタ(Type2,3)530は、CPU100からの命令完了信号101をカウントイネーブルに入力し、前記分岐実行信号341によって同期クリアされる。シーケンシャル命令実行カウンタ(Type2,3)530のカウント値は、前記分岐実行信号341によって、シーケンシャル命令実行カウンタ値保持手段(Type2,3)540にロードされ、トレース情報の出力に備えられる。   The sequential instruction execution counter (Type 2, 3) 530 inputs the instruction completion signal 101 from the CPU 100 to the count enable, and is synchronously cleared by the branch execution signal 341. The count value of the sequential instruction execution counter (Type 2, 3) 530 is loaded into the sequential instruction execution counter value holding means (Type 2, 3) 540 by the branch execution signal 341, and is prepared for output of trace information.

分岐先アドレス保持手段600は、前記分岐先アドレス更新信号311がアサートされたとき、CPU100からの分岐先アドレス110を入力し保持する。   The branch destination address holding means 600 receives and holds the branch destination address 110 from the CPU 100 when the branch destination address update signal 311 is asserted.

分岐フラグカウンタ820は、前記分岐実行信号341をカウントイネーブルに入力し、前記分岐先アドレス更新信号311で同期クリアされるカウンタである。分岐フラグカウンタ値821は、ステートマシン220に供給され、またその下位3ビットは、前記分岐先アドレス更新信号311がアサートされるタイミングまたは、図示されていないが、ステートマシン220がBST_HEADステートに遷移するタイミングで、分岐フラグカウンタ値保持手段830にロードされる。   The branch flag counter 820 is a counter that receives the branch execution signal 341 to enable counting and is synchronously cleared by the branch destination address update signal 311. The branch flag counter value 821 is supplied to the state machine 220, and its lower 3 bits are the timing at which the branch destination address update signal 311 is asserted or the state machine 220 transitions to the BST_HEAD state although not shown. At the timing, it is loaded into the branch flag counter value holding means 830.

分岐フラグ用シフトレジスタ800は、前記分岐実行信号341をシフトイネーブルの信号に使い、分岐taken信号351をシフトインする。前記分岐先アドレス更新信号311がアサートされる時、分岐フラグ用シフトレジスタ800は同期クリアされるが、それ以前のフラグの値は、分岐フラグ保持手段810にロードされる。   The branch flag shift register 800 shifts in the branch take signal 351 by using the branch execution signal 341 as a shift enable signal. When the branch destination address update signal 311 is asserted, the branch flag shift register 800 is synchronously cleared, but the previous flag value is loaded into the branch flag holding means 810.

MDO[7:0]出力マルチプレクサ(Type2)720は、ヘッダー用固定値”0x38”出力回路430の出力と、ヘッダー用固定値”0x3a”出力回路450の出力と、シーケンシャル命令実行カウンタ値保持手段(Type2,3)540の出力と、分岐先アドレス保持手段600の出力を8ビット単位に分割した信号と、分岐フラグカウンタ値保持手段830の出力と分岐フラグ保持手段810の出力をマージして8ビット単位にアラインしなおした信号との、13グループの選択される信号として入力し、MDO[7:0]出力選択信号(Type2)222によって13グループの内の1つを選択して、MDO[7:0]出力信号(Type2)721として出力する。MD0[7:0]出力信号(Type2)721は、そのままトレースデータ出力端子(MDO[7:0])に出力される。   The MDO [7: 0] output multiplexer (Type 2) 720 includes an output of the header fixed value “0x38” output circuit 430, an output of the header fixed value “0x3a” output circuit 450, and sequential instruction execution counter value holding means ( Type 2, 3) 540 output, a signal obtained by dividing the output of the branch destination address holding means 600 in units of 8 bits, the output of the branch flag counter value holding means 830 and the output of the branch flag holding means 810 are merged to generate 8 bits. The signal is re-aligned as a unit and input as a signal to be selected for 13 groups, and one of the 13 groups is selected by the MDO [7: 0] output selection signal (Type 2) 222, and MDO [7 : 0] Output as an output signal (Type2) 721. The MD0 [7: 0] output signal (Type2) 721 is output as it is to the trace data output terminal (MDO [7: 0]).

図3には、図1のシステムが出力するトレースメッセージのIDであるTCODEの割り当てを示している。図4には、Program Trace, Branch Status Messageのメッセージフォーマットを、図5には、Program Trace, Branch Destination Address Messageのメッセージフォーマットを、図6には、Program Trace, Exception Messageのメッセージフォーマットを示している。それぞれ、ここでは説明していないトレース出力の基準クロックに同期してMDO[7:0]出力とMSEO[1:0]出力を変化させる。   FIG. 3 shows assignment of TCODE which is an ID of a trace message output by the system of FIG. 4 shows a message format of Program Trace and Branch Status Message, FIG. 5 shows a message format of Program Trace and Branch Destination Address Message, and FIG. 6 shows a message format of Program Trace and Branch Exception Message. . The MDO [7: 0] output and the MSEO [1: 0] output are changed in synchronization with the reference clock of the trace output not described here.

図2のトレースメッセージ/パケット制御ステートマシン(Type2)のステート表に示すように、直接分岐の条件成立(直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がフル(BFcount==31)の時には、IDLE状態→BST_HEAD状態→BST_NV状態→BST_BRF0→BST_BRF1→BST_BRF2→BST_BRF3→IDLE状態へと遷移し、MDO出力選択信号出力及びMSEO出力信号によって、図4のProgram Trace, Branch Status Messageのメッセージフォーマットに示すシーケンス出力が得られる。   As shown in the trace message / packet control state machine (Type2) state table in FIG. 2, when a direct branch condition is satisfied (the direct branch instruction execution signal 102 and the branch instruction execution condition satisfaction signal 104 are simultaneously "1") When the branch flag count value is full (BFcount == 31), transition from IDLE state → BST_HEAD state → BST_NV state → BST_BRF0 → BST_BRF1 → BST_BRF2 → BST_BRF3 → IDLE state, MDO output selection signal output and MSEO output signal Thus, the sequence output shown in the message format of Program Trace, Branch Status Message in FIG. 4 is obtained.

間接分岐命令の条件成立(間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がゼロ(BFcount==0)の時には、IDLE状態→BDA_HEAD状態→IND_UADR0状態→IND_UADR1状態→IND_UADR2状態→IND_UADR3状態→IDLE状態と遷移し、図5のProgram Trace, Branch Destination Address Messageのメッセージフォーマットに示すようなトレース出力が得られる。   When the condition of an indirect branch instruction is satisfied (the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of branch instruction execution are simultaneously “1”) and the branch flag count value is zero (BFcount == 0), the IDLE state → Transition is made from BDA_HEAD state → IND_UADR0 state → IND_UADR1 state → IND_UADR2 state → IND_UADR3 state → IDLE state, and a trace output as shown in the message format of Program Trace, Branch Destination Address Message in FIG. 5 is obtained.

間接分岐命令の条件成立(間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がゼロでない(BFcount!=0)の時には、先にPTBSTメッセージを出力してから、PTBDAメッセージを出力するように制御される。   When the condition of an indirect branch instruction is satisfied (the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of branch instruction execution are simultaneously “1”) and the branch flag count value is not zero (BFcount! = 0), Control to output PTBDA message after outputting PTBST message.

割込み発生(割込み実行信号105が”1”)時、かつ分岐フラグカウント値がゼロ(BFcount==0)の時には、IDLE状態→EXC_HEAD状態→EXC_ICNT状態→IND_UADR0状態→IND_UADR1状態→IND_UADR2状態→IND_UADR3状態→IDLE状態と遷移し、図6のProgram Trace, Exception Messageのメッセージフォーマットに示すようなトレース出力が得られる。   When an interrupt occurs (interrupt execution signal 105 is “1”) and the branch flag count value is zero (BFcount == 0), IDLE state → EXC_HEAD state → EXC_ICNT state → IND_UADR0 state → IND_UADR1 state → IND_UADR2 state → IND_UADR3 state → Transition to IDLE state and trace output as shown in the message format of Program Trace, Exception Message in FIG. 6 is obtained.

割込み発生(割込み実行信号105が”1”)時、かつ分岐フラグカウント値がゼロでない(BFcount!=0)の時には、先にPTBSTメッセージを出力してから、PTEXCメッセージを出力するように制御される。   When an interrupt occurs (interrupt execution signal 105 is “1”) and the branch flag count value is not zero (BFcount! = 0), the PTBST message is output first and then the PTEXC message is output. The

本来であれば、それぞれのシーケンスの間にも次の分岐命令が実行される可能性があり、それらを受け付けるように作られている必要があるが、説明を簡単にするために省略している。また、U-ADDRの長さは、上位アドレスが変化ない場合には、上位ビットを出力しなくてもよいプロトコルとなっているが、これも単純化のため、固定長32ビット出力する制御で説明している点に注意頂きたい。   Originally, there is a possibility that the next branch instruction may be executed between each sequence, and it is necessary to be designed to accept them, but this is omitted for the sake of simplicity. . The length of U-ADDR is a protocol that does not need to output the upper bits if the upper address does not change, but this is also controlled by outputting a fixed length of 32 bits for simplicity. Please note the points explained.

図19に、このプロセッサを用いた開発支援装置の全体の構成図を示す。   FIG. 19 shows an overall configuration diagram of a development support apparatus using this processor.

プロセッサ1からのトレース状態信号1011、トレースデータ信号1021をトレース情報蓄積装置2が受け、トレースメモリ制御1210がトレースメモリ制御信号1211、トレースメモリ書込みデータ1212を制御することによって、トレースメモリ1230に対するメモリアクセスを制御し、トレース情報としてトレースメモリ1230に蓄積する。ホストコンピュータ3は、トレース情報蓄積装置2にトレースメモリ読み出し要求1301を出力し、トレースメモリ制御1210を介してトレースメモリにアクセスし、トレースメモリ出力1231を取得する。(これは従来例と全く同じである。)
次に、このように構成されたプロセッサ1からトレースデータを取得し、実行履歴を復元する様子を図8のプログラムを例にとりながら説明する。図8の0x50000000番地から実行した場合、(17)の間接分岐の出現までの分岐のtaken/not-takenがシフトレジスタに蓄積され、”PTBST NV=4,BR-FLAG=0b0111”が出力され、その後(17)の間接分岐がtakenであったため、”PTBDA U-ADDR=0x50000300”が出力される。同様に(20)の”ret”命令は間接分岐のtakenとみなされるので、”PTBDA U-ADDR=0x50000034”が出力される。このようにして取得されたトレース情報は図9のようになる。
The trace information storage device 2 receives the trace status signal 1011 and the trace data signal 1021 from the processor 1, and the trace memory control 1210 controls the trace memory control signal 1211 and the trace memory write data 1212, whereby memory access to the trace memory 1230 is performed. Are stored in the trace memory 1230 as trace information. The host computer 3 outputs a trace memory read request 1301 to the trace information storage device 2, accesses the trace memory via the trace memory control 1210, and acquires the trace memory output 1231. (This is exactly the same as the conventional example.)
Next, how the trace data is acquired from the processor 1 configured as described above and the execution history is restored will be described by taking the program of FIG. 8 as an example. When executed from address 0x50000000 in FIG. 8, the taken / not-taken branch until the occurrence of the indirect branch of (17) is accumulated in the shift register, and “PTBST NV = 4, BR-FLAG = 0b0111” is output, After that, since the indirect branch of (17) was taken, “PTBDA U-ADDR = 0x50000300” is output. Similarly, since the “ret” instruction in (20) is regarded as an indirect branch take, “PTBDA U-ADDR = 0x50000034” is output. The trace information acquired in this way is as shown in FIG.

次に、図8のソースプログラムと図9のトレース情報が与えられた時にホストコンピュータ3が、図7に示したアルゴリズムに 従って実行履歴を復元する手順を説明する。   Next, a description will be given of the procedure in which the host computer 3 restores the execution history according to the algorithm shown in FIG. 7 when the source program of FIG. 8 and the trace information of FIG. 9 are given.

まず、ステップ2001で、IPは0x50000000番地、TPは0番地、ETPは3番地に設定される。次にTP≠ETPなので2002はスキップし、TP=0のトレースメッセージは”PTBST BR-FLAG=0b0111”であるので、ステップ2100、ステップ2101へと進み、IP=0x50000000番地の命令"命令1",IP=0x50000004番地の命令”命令2”を表示し、ステップ2102でIP=0x50000008番地の命令”bra loop_A”を表示し、直接分岐先アドレスの0x50000014番地(loop_A)をIPに設定する。ステップ2103では、分岐フラグの有効フラグはまだ残っているので、再度ステップ2101へ戻る。今度は、IP=0x50000014番地の命令”loop_A: 命令3”、IP=0x50000018番地の “命令4”を表示し、ステップ2102で、IP=0x5000001c番地の”bne loop_A”を表示し、分岐フラグが1であったので、IPに直接分岐先アドレス0x50000014番地(loop_A)を設定する。同様にIP=0x50000014からIP=0x5000001cを2回繰り返す。最後のIP=0x5000001c番地の”bne loop_A”では、対応する分岐フラグが”0”であるので、次の命令のアドレス0x50000020をIPに設定し、ステップ2103で有効フラグ数が終了したので、ステップ2050へ進み、TPをインクリメントする。
次のTP=1では、”PTBDA U-ADDR=0x50000300”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2100、ステップ2200でNへ進み、ステップ2300でYに進む。ステップ2301で、IP=0x50000020の”命令5”から、IP=0x50000024の”命令6”、IP=0x50000028の”命令7”、IP=0x5000002cの”mov Sub_C,a0”まで順次表示する。続いてステップ2302で、IP=0x50000030の間接分岐命令”call (a0)”を表示し、ステップ2303で、IPをU-ADDRに示されるアドレス0x50000300に設定する。ステップ2050でTPを2にインクリメントする。
First, in step 2001, IP is set to address 0x50000000, TP is set to address 0, and ETP is set to address 3. Next, since TP ≠ ETP, 2002 is skipped, and the trace message of TP = 0 is “PTBST BR-FLAG = 0b0111”. Therefore, the process proceeds to step 2100 and step 2101, and the instruction “instruction 1” at IP = 0x50000000 is entered. The instruction “instruction 2” at IP = 0x50000004 is displayed. In step 2102, the instruction “bra loop_A” at IP = 0x50000008 is displayed, and the direct branch destination address 0x50000014 (loop_A) is set to IP. In step 2103, since the branch flag valid flag still remains, the process returns to step 2101 again. This time, the instruction “loop_A: instruction 3” at IP = 0x50000014 is displayed, “instruction 4” at IP = 0x50000018 is displayed. In step 2102, “bne loop_A” at IP = 0x5000001c is displayed, and the branch flag is 1. Therefore, the branch destination address 0x50000014 (loop_A) is set directly in the IP. Similarly, IP = 0x50000014 to IP = 0x5000001c are repeated twice. In “bne loop_A” at the last IP = 0x5000001c, since the corresponding branch flag is “0”, the address 0x50000020 of the next instruction is set to IP, and the number of valid flags is ended in step 2103. Go to and increment TP.
At the next TP = 1, “PTBDA U-ADDR = 0x50000300” is processed, but since this is also TP ≠ ETP, 2002 is skipped, the process proceeds to N in steps 2100 and 2200, and proceeds to Y in step 2300. In step 2301, "instruction 5" with IP = 0x50000020, "instruction 6" with IP = 0x50000024, "instruction 7" with IP = 0x50000028, and "mov Sub_C, a0" with IP = 0x5000002c are sequentially displayed. Subsequently, in step 2302, the indirect branch instruction “call (a0)” of IP = 0x50000030 is displayed, and in step 2303, IP is set to the address 0x50000300 indicated by U-ADDR. In step 2050, TP is incremented to 2.

次のTP=2では、”PTBDA U-ADDR=0x5000034”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2100、ステップ2200でNへ進み、ステップ2300でYに進む。ステップ2301で、IP=0x50000300の”Sub_C: 命令9”、IP=0x50000304の”命令10”まで、順次表示する。続いてステップ2302で、IP=0x50000308の間接分岐命令”ret” を表示し、ステップ2303で、IPをU-ADDRに示されるアドレス0x50000034に設定する。ステップ2050でTPを3にインクリメントする。
次のTP=3では、ステップ2002で、TP==ETPと判定されるので、実行履歴復元は終了する。このようにして得られた実行履歴を図10に示す。
At the next TP = 2, “PTBDA U-ADDR = 0x5000034” is processed. Since this is also TP ≠ ETP, 2002 is skipped, and the process proceeds to N in steps 2100 and 2200, and proceeds to Y in step 2300. In step 2301, “Sub_C: Command 9” with IP = 0x50000300 and “Command 10” with IP = 0x50000304 are sequentially displayed. Subsequently, in step 2302, an indirect branch instruction “ret” with IP = 0x50000308 is displayed. In step 2303, IP is set to an address 0x50000034 indicated by U-ADDR. In step 2050, TP is incremented to 3.
At the next TP = 3, it is determined in step 2002 that TP == ETP, so the execution history restoration ends. The execution history thus obtained is shown in FIG.

この例で示したように、直接分岐命令の結果が従来1パケット要していたものを本発明では、PTBSTメッセージのBR-FLAGの1ビットにまで圧縮可能である。   As shown in this example, in the present invention, the result of the direct branch instruction that conventionally required one packet can be compressed to 1 bit of BR-FLAG of the PTBST message.

図11は、本発明の第2の実施例におけるプロセッサの構成を示すブロック図である。   FIG. 11 is a block diagram showing the configuration of the processor in the second embodiment of the present invention.

CPU100は、直接分岐命令実行時の条件成立時には、直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”にする。直接分岐命令実行時の条件不成立時には、直接分岐命令実行信号102が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。間接分岐命令実行時の条件成立時には、間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”にする。間接分岐命令実行時の条件不成立時には、間接分岐命令実行信号103が”1”であり、かつ、分岐命令実行時の条件成立信号104は”0”である。割込みや例外を受理した時には、割込み実行信号105が”1”となり、直接分岐命令実行信号102、間接分岐命令実行信号103、分岐命令実行時の条件成立信号104の値は無視してもよい。   When the condition at the time of execution of the direct branch instruction is satisfied, the CPU 100 simultaneously sets the direct branch instruction execution signal 102 and the condition satisfaction signal 104 at the time of execution of the branch instruction to “1”. When the condition at the time of execution of the direct branch instruction is not satisfied, the direct branch instruction execution signal 102 is “1”, and the condition satisfaction signal 104 at the time of execution of the branch instruction is “0”. When the condition at the time of execution of the indirect branch instruction is satisfied, the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of execution of the branch instruction are simultaneously set to “1”. When the condition at the time of execution of the indirect branch instruction is not established, the indirect branch instruction execution signal 103 is “1”, and the condition establishment signal 104 at the time of execution of the branch instruction is “0”. When an interrupt or exception is accepted, the interrupt execution signal 105 becomes “1”, and the values of the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 at the time of branch instruction execution may be ignored.

トレースメッセージ/パケット制御ステートマシン(Type3)230は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令実行時の条件成立信号104、割込み実行信号105、分岐フラグカウンタ820からの分岐フラグカウンタ値821、分岐takenカウンタ900からの分岐takenカウンタ値901を受け取り、図12のトレースメッセージ/パケット制御ステートマシン(Type3)のステート表に示すように、入力信号と内部状態からシーケンスを作り出し、MSEO[1:0]出力(Type3)231と、MDO[7:0]出力選択信号(Type3)232を生成する。MSEO[1:0]出力(Type3)231は、そのままトレース状態出力端子(MSEO[1:0])1010に出力される。   The trace message / packet control state machine (Type 3) 230 includes a direct branch instruction execution signal 102, an indirect branch instruction execution signal 103, a condition establishment signal 104 when executing a conditional branch instruction, an interrupt execution signal 105, and a branch flag counter 820. Branch flag counter value 821 and branch take counter value 901 from branch take counter 900 are received and sequenced from the input signal and internal state as shown in the trace message / packet control state machine (Type 3) state table of FIG. , MSEO [1: 0] output (Type3) 231 and MDO [7: 0] output selection signal (Type3) 232 are generated. The MSEO [1: 0] output (Type3) 231 is output to the trace state output terminal (MSEO [1: 0]) 1010 as it is.

分岐taken検出回路350は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令の条件成立信号104を入力とし、直接分岐命令実行信号102と条件分岐命令の条件成立信号104の論理積と、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積との2項の論理和をとったものであり、分岐が実行されることを意味する分岐taken信号351を出力する。   The branch take detection circuit 350 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 of the conditional branch instruction from the CPU 100, and receives the direct branch instruction execution signal 102 and the condition establishment signal of the conditional branch instruction. A branch take signal that is a logical sum of two terms of the logical product of 104, the logical product of the indirect branch instruction execution signal 103 and the conditional establishment instruction 104 of the conditional branch instruction, and means that the branch is executed 351 is output.

分岐not-taken検出回路330は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、条件分岐命令の条件成立信号104を入力とし、直接分岐命令実行信号102の否定と条件分岐命令の条件成立信号104の論理積と、間接分岐命令実行信号103の否定と条件分岐命令の条件成立信号104の論理積との2項の論理和をとったものであり、分岐が実行されないことを意味する分岐not-taken信号331を出力する。   The branch not-taken detection circuit 330 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the condition establishment signal 104 of the conditional branch instruction from the CPU 100 as inputs, and negates the direct branch instruction execution signal 102 and the conditional branch instruction. The logical product of the condition establishment signal 104 of the above, the negation of the indirect branch instruction execution signal 103, and the logical product of the condition establishment signal 104 of the conditional branch instruction, and the logical sum of the two terms. A meaning branch not-taken signal 331 is output.

分岐先アドレス更新検出回路310は、CPU100からの間接分岐命令実行信号103、条件分岐命令の条件成立信号104、割込み実行信号105を入力とし、間接分岐命令実行信号103と条件分岐命令の条件成立信号104の論理積、並びに割込み実行信号105の3項の論理和をとったものであり、アドレス出力が必要な分岐が実行されたことを意味する分岐先アドレス更新信号311を出力する。   The branch destination address update detection circuit 310 receives the indirect branch instruction execution signal 103, the condition establishment signal 104 of the conditional branch instruction, and the interrupt execution signal 105 from the CPU 100, and receives the indirect branch instruction execution signal 103 and the condition establishment signal of the conditional branch instruction. The logical product of 104 and the logical sum of the three terms of the interrupt execution signal 105 are taken, and a branch destination address update signal 311 is output, which means that a branch requiring address output has been executed.

分岐検出回路340は、CPU100からの直接分岐命令実行信号102、間接分岐命令実行信号103、割込み実行信号105を入力とし、それらの論理和を、分岐実行信号341として出力する。   The branch detection circuit 340 receives the direct branch instruction execution signal 102, the indirect branch instruction execution signal 103, and the interrupt execution signal 105 from the CPU 100, and outputs a logical sum of them as a branch execution signal 341.

シーケンシャル命令実行カウンタ(Type2,3)530は、CPU100からの命令完了信号101をカウントイネーブルに入力し、前記分岐実行信号341によって同期クリアされる。シーケンシャル命令実行カウンタ(Type2,3)530のカウント値は、前記分岐実行信号341によって、シーケンシャル命令実行カウンタ値保持手段(Type2,3)540にロードされ、トレース情報の出力に備えられる。   The sequential instruction execution counter (Type 2, 3) 530 inputs the instruction completion signal 101 from the CPU 100 to the count enable, and is synchronously cleared by the branch execution signal 341. The count value of the sequential instruction execution counter (Type 2, 3) 530 is loaded into the sequential instruction execution counter value holding means (Type 2, 3) 540 by the branch execution signal 341, and is prepared for output of trace information.

分岐先アドレス保持手段600は、前記分岐先アドレス更新信号311がアサートされたとき、CPU100からの分岐先アドレス110を入力し保持する。   The branch destination address holding means 600 receives and holds the branch destination address 110 from the CPU 100 when the branch destination address update signal 311 is asserted.

分岐フラグカウンタ820は、前記分岐実行信号341をカウントイネーブルに入力し、前記分岐先アドレス更新信号311で同期クリアされるカウンタである。分岐フラグカウンタ値821は、ステートマシン230に供給され、またその下位3ビットは、前記分岐先アドレス更新信号311がアサートされるタイミングまたは、図示されていないが、ステートマシン230がBST_HEADステートに遷移するタイミングで、分岐フラグカウンタ値保持手段830にロードされる。   The branch flag counter 820 is a counter that receives the branch execution signal 341 to enable counting and is synchronously cleared by the branch destination address update signal 311. The branch flag counter value 821 is supplied to the state machine 230, and the lower 3 bits thereof are the timing at which the branch destination address update signal 311 is asserted or the state machine 230 transitions to the BST_HEAD state although not shown. At the timing, it is loaded into the branch flag counter value holding means 830.

分岐フラグ用シフトレジスタ800は、前記分岐実行信号341をシフトイネーブルの信号に使い、分岐taken信号351をシフトインする。前記分岐先アドレス更新信号311がアサートされる時、分岐フラグ用シフトレジスタ800は同期クリアされるが、それ以前のフラグの値は、分岐フラグ保持手段810にロードされる。   The branch flag shift register 800 shifts in the branch take signal 351 by using the branch execution signal 341 as a shift enable signal. When the branch destination address update signal 311 is asserted, the branch flag shift register 800 is synchronously cleared, but the previous flag value is loaded into the branch flag holding means 810.

分岐takenカウンタ900は、前記分岐taken信号351をカウントイネーブルに入力し、前記分岐not-taken信号331で同期クリアされるカウンタである。分岐takenカウンタ値901は、ステートマシン230に供給される共に、前記分岐not-taken信号331がアサートされるタイミングで(これと人為的にロードする場合もありうるのを後で追加)、分岐takenカウンタ値保持手段910にロードされる。   The branch take counter 900 is a counter that receives the branch take signal 351 as a count enable and is synchronously cleared by the branch not-taken signal 331. The branch take counter value 901 is supplied to the state machine 230, and at the timing when the branch not-taken signal 331 is asserted (this may be added artificially later), the branch take is added. The counter value holding means 910 is loaded.

MDO[7:0]出力マルチプレクサ(Type3)730は、ヘッダー用固定値”0x38”出力回路430の出力と、ヘッダー用固定値”0x39”出力回路440の出力と、ヘッダー用固定値”0x3a”出力回路450の出力と、シーケンシャル命令実行カウンタ値保持手段(Type2,3)540の出力と、分岐先アドレス保持手段600の出力を8ビット単位に分割した信号と、分岐フラグカウンタ値保持手段830の出力と分岐フラグ保持手段810の出力をマージして8ビット単位に整列しなおした信号と、分岐takenカウンタ値保持手段910の出力との、15グループの選択される信号として入力し、MDO[7:0]出力選択信号(Type3)232によって15グループの内の1つを選択して、MDO[7:0]出力信号(Type3)731として出力する。MD0[7:0]出力信号(Type3)731は、そのままトレースデータ出力端子(MDO[7:0])に出力される。   The MDO [7: 0] output multiplexer (Type 3) 730 outputs the header fixed value “0x38” output circuit 430, the header fixed value “0x39” output circuit 440, and the header fixed value “0x3a” output. The output of the circuit 450, the output of the sequential instruction execution counter value holding means (Type 2, 3) 540, the signal obtained by dividing the output of the branch destination address holding means 600 into 8-bit units, and the output of the branch flag counter value holding means 830 And the output of the branch flag holding means 810 are merged and rearranged in units of 8 bits and the output of the branch taken counter value holding means 910 are input as 15 groups of selected signals, and MDO [7: 0] One of the 15 groups is selected by the output selection signal (Type 3) 232 and is output as an MDO [7: 0] output signal (Type 3) 731. The MD0 [7: 0] output signal (Type3) 731 is output as it is to the trace data output terminal (MDO [7: 0]).

図13には、図11のシステムが出力するトレースメッセージのIDであるTCODEの割り当てを示している。図4には、Program Trace, Branch Status Messageのメッセージフォーマットを、図5には、Program Trace, Branch Destination Address Messageのメッセージフォーマットを、図6には、Program Trace, Exception Messageのメッセージフォーマットを、図14には、Program Trace, Branch Taken Count Messageのメッセージフォーマットを示している。それぞれ、ここでは説明していないトレース出力の基準クロックに同期してMDO[7:0]出力とMSEO[1:0]出力を変化させる。   FIG. 13 shows assignment of TCODE which is an ID of a trace message output by the system of FIG. 4 shows a message format of Program Trace and Branch Status Message, FIG. 5 shows a message format of Program Trace and Branch Destination Address Message, FIG. 6 shows a message format of Program Trace and Branch Exception Message, and FIG. Shows the message format of Program Trace and Branch Taken Count Message. The MDO [7: 0] output and the MSEO [1: 0] output are changed in synchronization with the reference clock of the trace output not described here.

図12のトレースメッセージ/パケット制御ステートマシン(Type3)のステート表に示すように、直接分岐の条件成立(直接分岐命令実行信号102と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がフル(BFcount==31)の時には、IDLE状態→BST_HEAD状態→BST_NV状態→BST_BRF0→BST_BRF1→BST_BRF2→BST_BRF3→IDLE状態へと遷移し、MDO出力選択信号出力及びMSEO出力信号によって、図4のProgram Trace, Branch Status Messageのメッセージフォーマットに示すシーケンス出力が得られる。   As shown in the trace message / packet control state machine (Type 3) state table in FIG. 12, when a direct branch condition is satisfied (the direct branch instruction execution signal 102 and the condition satisfaction signal 104 at the time of branch instruction execution are simultaneously “1”). When the branch flag count value is full (BFcount == 31), transition from IDLE state → BST_HEAD state → BST_NV state → BST_BRF0 → BST_BRF1 → BST_BRF2 → BST_BRF3 → IDLE state, MDO output selection signal output and MSEO output signal Thus, the sequence output shown in the message format of Program Trace, Branch Status Message in FIG. 4 is obtained.

間接分岐命令の条件成立(間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がゼロ(BFcount==0)の時には、IDLE状態→BDA_HEAD状態→IND_UADR0状態→IND_UADR1状態→IND_UADR2状態→IND_UADR3状態→IDLE状態と遷移し、図5のProgram Trace, Branch Destination Address Messageのメッセージフォーマットに示すようなトレース出力が得られる。   When the condition of an indirect branch instruction is satisfied (the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of branch instruction execution are simultaneously “1”) and the branch flag count value is zero (BFcount == 0), the IDLE state → Transition is made from BDA_HEAD state → IND_UADR0 state → IND_UADR1 state → IND_UADR2 state → IND_UADR3 state → IDLE state, and a trace output as shown in the message format of Program Trace, Branch Destination Address Message in FIG. 5 is obtained.

間接分岐命令の条件成立(間接分岐命令実行信号103と分岐命令実行時の条件成立信号104を同時に”1”)時、かつ分岐フラグカウント値がゼロでない(BFcount!=0)の時には、先にPTBSTメッセージを出力してから、PTBDAメッセージを出力するように制御される。   When the condition of an indirect branch instruction is satisfied (the indirect branch instruction execution signal 103 and the condition satisfaction signal 104 at the time of branch instruction execution are simultaneously “1”) and the branch flag count value is not zero (BFcount! = 0), Control to output PTBDA message after outputting PTBST message.

割込み発生(割込み実行信号105が”1”)時、かつ分岐フラグカウント値がゼロ(BFcount==0)の時には、IDLE状態→EXC_HEAD状態→EXC_ICNT状態→IND_UADR0状態→IND_UADR1状態→IND_UADR2状態→IND_UADR3状態→IDLE状態と遷移し、図6のProgram Trace, Exception Messageのメッセージフォーマットに示すようなトレース出力が得られる。   When an interrupt occurs (interrupt execution signal 105 is “1”) and the branch flag count value is zero (BFcount == 0), IDLE state → EXC_HEAD state → EXC_ICNT state → IND_UADR0 state → IND_UADR1 state → IND_UADR2 state → IND_UADR3 state → Transition to IDLE state and trace output as shown in the message format of Program Trace, Exception Message in FIG. 6 is obtained.

割込み発生(割込み実行信号105が”1”)時、かつ分岐フラグカウント値がゼロでない(BFcount!=0)の時には、先にPTBSTメッセージを出力してから、PTEXCメッセージを出力するように制御される。   When an interrupt occurs (interrupt execution signal 105 is “1”) and the branch flag count value is not zero (BFcount! = 0), the PTBST message is output first and then the PTEXC message is output. The

本来であれば、それぞれのシーケンスの間にも次の分岐命令が実行される可能性があり、それらを受け付けるように作られている必要があるが、説明を簡単にするために省略している。また、U-ADDRの長さは、上位アドレスが変化ない場合には、上位ビットを出力しなくてもよいプロトコルとなっているが、これも単純化のため、固定長32ビット出力する制御で説明している点に注意頂きたい。   Originally, there is a possibility that the next branch instruction may be executed between each sequence, and it is necessary to be designed to accept them, but this is omitted for the sake of simplicity. . The length of U-ADDR is a protocol that does not need to output the upper bits if the upper address does not change, but this is also controlled by outputting a fixed length of 32 bits for simplicity. Please note the points explained.

図19に、このプロセッサを用いた開発支援装置の全体の構成図を示す。   FIG. 19 shows an overall configuration diagram of a development support apparatus using this processor.

プロセッサ1からのトレース状態信号1011、トレースデータ信号1021をトレース情報蓄積装置2が受け、トレースメモリ制御1210がトレースメモリ制御信号1211、トレースメモリ書込みデータ1212を制御することによって、トレースメモリ1230に対するメモリアクセスを制御し、トレース情報としてトレースメモリ1230に蓄積する。ホストコンピュータ3は、トレース情報蓄積装置2にトレースメモリ読み出し要求1301を出力し、トレースメモリ制御1210を介してトレースメモリにアクセスし、トレースメモリ出力1231を取得する。(これは従来例と全く同じである。)
次に、このように構成されたプロセッサ1からトレースデータを取得し、実行履歴を復元する様子を図16のプログラムを例にとりながら説明する。図16の0x50000000番地から実行した場合、(69)の条件分岐命令がnot-takenになるまで、分岐taken/not-takenのフラグがシフトレジスタに蓄積されると同時に、分岐takenカウント値がインクリメントされるが、分岐takenカウントメッセージを出力した方が符号効率が高いため、”PTBTCBR-TAKEN=22”が出力される。その後(78)の間接分岐がtakenであったため、分岐フラグのシフトレジスタに残っていたno-takenフラグを含む”BTBST BR-FLAG=0b0”が出力され、続いて、”PTBDA U-ADDR=0x50000300”が出力される。同様に(77)の”ret”命令は間接分岐のtakenとみなされるので、”PTBDA U-ADDR=0x50000034”が出力される。このようにして取得されたトレース情報は図17のようになる。
The trace information storage device 2 receives the trace status signal 1011 and the trace data signal 1021 from the processor 1, and the trace memory control 1210 controls the trace memory control signal 1211 and the trace memory write data 1212, whereby memory access to the trace memory 1230 is performed. Are stored in the trace memory 1230 as trace information. The host computer 3 outputs a trace memory read request 1301 to the trace information storage device 2, accesses the trace memory via the trace memory control 1210, and acquires the trace memory output 1231. (This is exactly the same as the conventional example.)
Next, how the trace data is acquired from the processor 1 configured as described above and the execution history is restored will be described by taking the program of FIG. 16 as an example. When executed from address 0x50000000 in FIG. 16, the branch take / not-taken flag is accumulated in the shift register and the branch take count value is incremented until the conditional branch instruction (69) becomes not-taken. However, since the code efficiency is higher when the branch taken count message is output, “PTBTCBR-TAKEN = 22” is output. After that, since the indirect branch of (78) was taken, “BTBST BR-FLAG = 0b0” including the no-taken flag remaining in the shift register of the branch flag is output, followed by “PTBDA U-ADDR = 0x50000300 "Is output. Similarly, since the “ret” instruction in (77) is regarded as an indirect branch take, “PTBDA U-ADDR = 0x50000034” is output. The trace information acquired in this way is as shown in FIG.

次に、図16のソースプログラムと図17のトレース情報が与えられた時にホストコンピュータ3が、図15に示したアルゴリズムに従って実行履歴を復元する手順を説明する。   Next, the procedure in which the host computer 3 restores the execution history according to the algorithm shown in FIG. 15 when the source program of FIG. 16 and the trace information of FIG. 17 are given will be described.

まず、ステップ2001で、IPは0x50000000番地、TPは0番地、ETPは4番地に設定される。次にTP≠ETPなので2002はスキップし、TP=0のトレースメッセージは”PTBTC BR-TAKEN=22”であるので、ステップ2400、ステップ2401へと進み、内部的には分岐フラグの集合0b11111111111111111111111に変換する。そしてステップ2101へ進み、IP=0x50000000番地の命令"命令1",IP=0x50000004番地の命令”命令2”を表示し、ステップ2102でIP=0x50000008番地の命令”bra loop_A”を表示し、直接分岐先アドレスの0x50000014番地(loop_A)をIPに設定する。ステップ2103では、分岐フラグの有効フラグはまだ残っているので、再度ステップ2101へ戻る。今度は、IP=0x50000014番地の命令”loop_A: 命令3”、IP=0x50000018番地の “命令4”を表示し、ステップ2102で、IP=0x5000001c番地の”bne loop_A”を表示し、分岐フラグが1であったので、IPに直接分岐先アドレス0x50000014番地(loop_A)を設定する。同様にIP=0x50000014からIP=0x5000001cを20回繰り返し、ステップ2103で有効フラグ数が終了したので、ステップ2050へ進み、TPをインクリメントする。   First, in step 2001, IP is set to address 0x50000000, TP is set to address 0, and ETP is set to address 4. Next, since TP ≠ ETP, 2002 is skipped, and the trace message of TP = 0 is “PTBTC BR-TAKEN = 22”, so the process proceeds to step 2400 and step 2401 and internally converted to the set of branch flags 0b11111111111111111111111 To do. Then, go to Step 2101, display the instruction “Instruction 1” at IP = 0x50000000, display the instruction “Instruction 2” at IP = 0x50000004, display the instruction “bra loop_A” at IP = 0x50000008 in Step 2102, and branch directly. Set the destination address 0x50000014 (loop_A) to IP. In step 2103, since the branch flag valid flag still remains, the process returns to step 2101 again. This time, the instruction “loop_A: instruction 3” at IP = 0x50000014 and “instruction 4” at IP = 0x50000018 are displayed. In step 2102, “bne loop_A” at IP = 0x5000001c is displayed and the branch flag is 1. Therefore, the branch destination address 0x50000014 (loop_A) is set directly in the IP. Similarly, IP = 0x50000014 to IP = 0x5000001c are repeated 20 times. Since the number of valid flags is completed in step 2103, the process proceeds to step 2050 and TP is incremented.

次のTP=1では、”PTBST BR-FLAG=0b0”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2400でNへ進み、ステップ2100でYへ進み、ステップ2101において、IP=0x50000014番地の”loop_A:命令3”、IP=0x500000018番地の”命令4”を表示し、ステップ2102において、IP=0x5000001c番地の”bne loop_A”を表示するが、分岐フラグが”0”なので、次の命令アドレス0x50000020をIPに設定し、ステップ2050へ進み、TPをインクリメントする。   At the next TP = 1, “PTBST BR-FLAG = 0b0” is processed, but since this is also TP ≠ ETP, 2002 is skipped, proceeding to N in step 2400, proceeding to Y in step 2100, and in step 2101 = 0x50000014 address "loop_A: Instruction 3", IP = 0x500000018 address "Instruction 4" is displayed, IP = 0x5000001c address "bne loop_A" is displayed, but the branch flag is "0" The next instruction address 0x50000020 is set to IP, the process proceeds to step 2050, and TP is incremented.

次のTP=2では、”PTBDA U-ADDR=0x50000300”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2400、ステップ2100、ステップ2200でNへ進み、ステップ2300でYに進む。ステップ2301で、IP=0x50000020の”命令5”から、IP=0x50000024の”命令6”、IP=0x50000028の”命令7”、IP=0x5000002cの”mov Sub_C,a0”まで順次表示する。続いてステップ2302で、IP=0x50000030の間接分岐命令”call (a0)”を表示し、ステップ2303で、IPをU-ADDRに示されるアドレス0x50000300に設定する。ステップ2050でTPを3にインクリメントする。   At the next TP = 2, “PTBDA U-ADDR = 0x50000300” is processed, but since this is also TP ≠ ETP, 2002 is skipped, proceeding to N in Step 2400, Step 2100, Step 2200, and proceeding to Y in Step 2300 . In step 2301, "instruction 5" with IP = 0x50000020, "instruction 6" with IP = 0x50000024, "instruction 7" with IP = 0x50000028, and "mov Sub_C, a0" with IP = 0x5000002c are sequentially displayed. Subsequently, in step 2302, the indirect branch instruction “call (a0)” of IP = 0x50000030 is displayed, and in step 2303, IP is set to the address 0x50000300 indicated by U-ADDR. In step 2050, TP is incremented to 3.

次のTP=3では、”PTBDA U-ADDR=0x5000034”を処理するが、これもTP≠ETPなので2002はスキップし、ステップ2400、ステップ2100、ステップ2200でNへ進み、ステップ2300でYに進む。ステップ2301で、IP=0x50000300の”Sub_C: 命令9”、IP=0x50000304の”命令10”まで、順次表示する。続いてステップ2302で、IP=0x50000308の間接分岐命令”ret” を表示し、ステップ2303で、IPをU-ADDRに示されるアドレス0x50000034に設定する。ステップ2050でTPを4にインクリメントする。   At the next TP = 3, “PTBDA U-ADDR = 0x5000034” is processed, but since this is also TP ≠ ETP, 2002 is skipped, proceeding to N in Step 2400, Step 2100, Step 2200, and proceeding to Y in Step 2300 . In step 2301, “Sub_C: Command 9” with IP = 0x50000300 and “Command 10” with IP = 0x50000304 are sequentially displayed. Subsequently, in step 2302, an indirect branch instruction “ret” with IP = 0x50000308 is displayed. In step 2303, IP is set to an address 0x50000034 indicated by U-ADDR. In step 2050, TP is incremented to 4.

次のTP=4では、ステップ2002で、TP==ETPと判定されるので、実行履歴復元は終了する。このようにして得られた実行履歴を図18に示す。   At the next TP = 4, it is determined in step 2002 that TP == ETP, so the execution history restoration ends. The execution history thus obtained is shown in FIG.

この例で示したように、直接分岐命令の結果が従来1パケット要していたものを本発明では、分岐takenが連続している場合で、かつ、PTBSTメッセージを出力するよりも短くなる場合にPTBTCメッセージを出力するように制御することで、どのような場合でも常に最高の圧縮効率を実現する。   As shown in this example, in the present invention, the result of the direct branch instruction that conventionally required one packet is used when the branch take is continuous and shorter than the PTBST message is output. By controlling to output PTBTC messages, the highest compression efficiency is always achieved in any case.

本発明にかかるプロセッサおよび開発支援装置は、プロセッサの動作を外部から解析、評価する手段として有用である。   The processor and the development support apparatus according to the present invention are useful as means for analyzing and evaluating the operation of the processor from the outside.

本発明の第1の実施例によるプロセッサの構成図The block diagram of the processor by 1st Example of this invention 本発明の第1の実施例のトレースメッセージ/パケット制御ステートマシンのステート表を示す図The figure which shows the state table of the trace message / packet control state machine of 1st Example of this invention 本発明の第1の実施例におけるトレースメッセージのTCODE定義を示す図The figure which shows TCODE definition of the trace message in 1st Example of this invention Program Trace, Branch Status Messageのメッセージフォーマットを示す図Diagram showing Message Format of Program Trace, Branch Status Message Program Trace, Branch Destination Address Messageのメッセージフォーマットを示す図Figure showing the message format of Program Trace, Branch Destination Address Message Program Trace, Exception Messageのメッセージフォーマットを示す図Diagram showing the message format of Program Trace and Exception Message 本発明の第1の実施例による実行履歴復元アルゴリズムを示す図The figure which shows the execution log restoration algorithm by 1st Example of this invention ソースプログラムの例と実行順番を示す図Diagram showing source program example and execution order 図8のプログラムを実行した時に取得されるトレース情報を示す図The figure which shows the trace information acquired when the program of FIG. 8 is executed 図8のプログラムと図9のトレース情報から復元された実行履歴を示す図The figure which shows the execution log | history restored | reconstructed from the program of FIG. 8, and the trace information of FIG. 本発明の第2の実施例によるプロセッサの構成図The block diagram of the processor by 2nd Example of this invention 本発明の第2の実施例のトレースメッセージ/パケット制御ステートマシンのステート表を示す図The figure which shows the state table | surface of the trace message / packet control state machine of 2nd Example of this invention. 本発明の第2の実施例におけるトレースメッセージのTCODE定義を示す図The figure which shows TCODE definition of the trace message in 2nd Example of this invention Program Trace, Branch Taken Count Messageのメッセージフォーマットを示す図Diagram showing Message Format of Program Trace, Branch Taken Count Message 本発明の第1の実施例による実行履歴復元アルゴリズムを示す図The figure which shows the execution log restoration algorithm by 1st Example of this invention ソースプログラムの例と実行順番を示す図Diagram showing source program example and execution order 図16のプログラムを実行した時に取得されるトレース情報を示す図The figure which shows the trace information acquired when the program of FIG. 16 is executed 図16のプログラムと図17のトレース情報から復元された実行履歴を示す図The figure which shows the execution history decompress | restored from the program of FIG. 16, and the trace information of FIG. 開発支援装置の構成図Configuration diagram of development support equipment 従来のプロセッサの構成図Configuration diagram of a conventional processor 従来のトレースメッセージ/パケット制御ステートマシンのステート表を示す図A diagram showing a state table of a conventional trace message / packet control state machine 従来のトレースメッセージのTCODE定義を示す図Figure showing the TCODE definition of a conventional trace message Program Trace, Direct Branch Messageのメッセージフォーマットを示す図Diagram showing Message Format of Program Trace, Direct Branch Message Program Trace, Indirect Branch Messageのメッセージフォーマットを示す図Diagram showing Message Format of Program Trace, Indirect Branch Message 従来の開発支援装置における実行履歴復元アルゴリズムを示す図The figure which shows the execution history restoration algorithm in the conventional development support device ソースプログラムの例と実行順番を示す図Diagram showing source program example and execution order 図26のプログラムを実行した時に取得されるトレース情報を示す図The figure which shows the trace information acquired when the program of FIG. 26 is performed 図26のプログラムと図27のトレース情報から復元された実行履歴を示す図The figure which shows the execution history decompress | restored from the program of FIG. 26, and the trace information of FIG.

符号の説明Explanation of symbols

1 プロセッサ
2 トレース情報蓄積装置
3 ホストコンピュータ
100 CPU
101 命令実行完了信号
102 直接分岐命令実行信号
103 間接分岐命令実行信号
104 条件分岐命令の条件成立信号
105 割込み実行信号
110 分岐先アドレス
200 トレースメッセージ/パケット制御ステートマシン(Type0)
201 MSEO[1:0]出力信号(Type0)
202 MDO[7:0]出力選択信号(Type0)
220 トレースメッセージ/パケット制御ステートマシン(Type2)
221 MSEO[1:0]出力信号(Type2)
222 MDO[7:0]出力選択信号(Type2)
230 トレースメッセージ/パケット制御ステートマシン(Type3)
231 MSEO[1:0]出力信号(Type3)
232 MDO[7:0]出力選択信号(Type3)
310 分岐先アドレス更新検出回路
311 分岐先アドレス更新信号
320 分岐taken+例外検出回路
321 分岐taken+例外信号
330 分岐not-taken検出回路
331 分岐not-taken信号
340 分岐実行検出回路
341 分岐実行信号
350 分岐taken検出回路
351 分岐taken信号
410 ヘッダー用固定値”0x03”出力回路
420 ヘッダー用固定値”0x04”出力回路
430 ヘッダー用固定値”0x38”出力回路
440 ヘッダー用固定値”0x39”出力回路
450 ヘッダー用固定値”0x3a”出力回路
460 ヘッダー用固定値”0x3b”出力回路
500 シーケンシャル命令実行カウンタ(Type0)
510 シーケンシャル命令実行カウンタ値保持手段(Type0)
530 シーケンシャル命令実行カウンタ(Type2,3)
540 シーケンシャル命令実行カウンタ(Type2,3)
600 分岐先アドレス保持手段
700 MDO[7:0]出力マルチプレクサ(Type0)
701 MDO[7:0]出力信号(Type0)
720 MDO[7:0]出力マルチプレクサ(Type2)
721 MDO[7:0]出力信号(Type2)
730 MDO[7:0]出力マルチプレクサ(Type3)
731 MDO[7:0]出力信号(Type3)
800 分岐フラグ用シフトレジスタ
810 分岐フラグ保持手段
820 分岐フラグカウンタ
821 分岐フラグカウンタ値
830 分岐フラグカウンタ値保持手段
900 分岐takenカウンタ
901 分岐takenカウンタ値
910 分岐takenカウンタ値保持手段
1010 トレース状態出力端子(MSEO[1:0])
1020 トレースデータ出力端子(MDO[7:0])
1011 トレース状態信号
1021 トレースデータ信号
1210 トレースメモリ制御手段
1211 トレースメモリ制御信号
1212 トレースメモリ書込みデータ
1230 トレースメモリ
1231 トレースメモリ読出しデータ
1301 トレースメモリ読出し要求
1 Processor 2 Trace Information Storage Device 3 Host Computer 100 CPU
101 Instruction execution completion signal 102 Direct branch instruction execution signal 103 Indirect branch instruction execution signal 104 Conditional branch instruction condition establishment signal 105 Interrupt execution signal 110 Branch destination address 200 Trace message / packet control state machine (Type 0)
201 MSEO [1: 0] output signal (Type0)
202 MDO [7: 0] output selection signal (Type0)
220 Trace message / packet control state machine (Type2)
221 MSEO [1: 0] output signal (Type2)
222 MDO [7: 0] output selection signal (Type2)
230 Trace message / packet control state machine (Type3)
231 MSEO [1: 0] output signal (Type3)
232 MDO [7: 0] output selection signal (Type3)
310 Branch destination address update detection circuit 311 Branch destination address update signal 320 Branch take + Exception detection circuit 321 Branch take + Exception signal 330 Branch not-taken detection circuit 331 Branch not-taken signal 340 Branch execution detection circuit 341 Branch execution signal 350 Branch take detection Circuit 351 Branch take signal 410 Fixed value “0x03” for header Output circuit 420 Fixed value for header “0x04” Output circuit 430 Fixed value for header “0x38” Output circuit 440 Fixed value for header “0x39” Output circuit 450 Fixed value for header "0x3a" output circuit 460 Fixed value for header "0x3b" output circuit 500 Sequential instruction execution counter (Type0)
510 Sequential instruction execution counter value holding means (Type 0)
530 Sequential instruction execution counter (Type 2, 3)
540 Sequential instruction execution counter (Type 2, 3)
600 Branch destination address holding means 700 MDO [7: 0] output multiplexer (Type 0)
701 MDO [7: 0] output signal (Type0)
720 MDO [7: 0] output multiplexer (Type2)
721 MDO [7: 0] output signal (Type2)
730 MDO [7: 0] output multiplexer (Type3)
731 MDO [7: 0] output signal (Type3)
800 Branch flag shift register 810 Branch flag holding means 820 Branch flag counter 821 Branch flag counter value 830 Branch flag counter value holding means 900 Branch take counter 901 Branch take counter value 910 Branch take counter value holding means 1010 Trace status output terminal (MSEO) [1: 0])
1020 Trace data output terminal (MDO [7: 0])
1011 Trace status signal 1021 Trace data signal 1210 Trace memory control means 1211 Trace memory control signal 1212 Trace memory write data 1230 Trace memory 1231 Trace memory read data 1301 Trace memory read request

Claims (6)

CPUと、前記CPUから得られる、分岐命令の実行信号と条件付分岐命令の条件成立信号を受け、条件成立した分岐命令実行の時には成立ビットを、条件成立していない分岐命令実行の時には不成立ビットを、シフトレジスタにシフトインし、前記シフトレジスタに蓄積した全ビットと有効ビット数情報をまとめた分岐状態メッセージを出力するトレース制御回路から構成されたことを特徴としたプロセッサ。 The CPU receives the execution signal of the branch instruction and the condition establishment signal of the conditional branch instruction obtained from the CPU, and the establishment bit when executing the branch instruction when the condition is satisfied, and the unestablishment bit when executing the branch instruction when the condition is not satisfied And a trace control circuit that outputs a branch state message that summarizes all the bits stored in the shift register and information on the number of valid bits. CPUと、前記CPUから得られる、分岐命令の実行信号と条件付分岐命令の条件成立信号を受け、条件成立した分岐命令実行の時にはインクリメントし、条件成立していない分岐命令実行の時にはクリアする分岐takenカウンタを有し、分岐takenカウント値を含む分岐takenカウントメッセージを出力するトレース制御回路から構成されたことを特徴としたプロセッサ。 Branch that receives the execution signal of the branch instruction and the condition establishment signal of the conditional branch instruction obtained from the CPU, increments when the branch instruction that satisfies the condition is executed, and clears when the branch instruction that does not satisfy the condition is executed A processor comprising a trace control circuit having a taken counter and outputting a branch take count message including a branch take count value. CPUと、前記CPUから得られる、分岐命令の実行信号と条件付分岐命令の条件成立信号を受け、条件成立した分岐命令実行の時には成立ビットを、条件成立していない分岐命令実行の時には不成立ビットを、シフトレジスタにシフトインし、前記シフトレジスタに蓄積した全ビットと有効ビット数情報をまとめた分岐状態メッセージを生成し、
条件成立した分岐命令実行の時にはインクリメントし、条件成立していない分岐命令実行の時にはクリアする分岐takenカウンタを有し、分岐takenカウント値を含む分岐takenカウントメッセージを生成し、前記分岐状態メッセージよりも、前記分岐takenカウントメッセージの方が短い符号となる場合には、前記分岐takenカウントメッセージを出力することを選択し、そうでない場合には、分岐状態メッセージを出力することを選択するトレース制御回路から構成されたことを特徴としたプロセッサ。
The CPU receives the execution signal of the branch instruction and the condition establishment signal of the conditional branch instruction obtained from the CPU, and the establishment bit when executing the branch instruction when the condition is satisfied, and the unestablishment bit when executing the branch instruction when the condition is not satisfied Is shifted into the shift register, and a branch state message is generated that summarizes all the bits accumulated in the shift register and the effective bit number information.
It has a branch take counter that is incremented when a branch instruction that satisfies the condition is executed, and that is cleared when a branch instruction that does not satisfy the condition is executed, and generates a branch take count message that includes a branch take count value. When the branch take count message has a shorter code, select to output the branch take count message; otherwise, from the trace control circuit that selects to output the branch status message. A processor characterized by being configured.
請求項1記載の分岐状態メッセージを入力し、トレース情報を蓄えるトレースメモリと、前記トレースメモリの内容を読み取り、CPUが実行したソースプログラムを用いて、実行履歴を復元する実行履歴復元プログラムを備えたコンピュータから構成された開発支援装置において、前記実行履歴復元プログラムは、前記トレースメモリ上のトレース情報を前記ソースプログラムの命令に順番に対応させつつ復元し、前記トレースメモリ上の分岐状態メッセージに遭遇した時には、分岐命令を分岐成立/不成立ビットに対応させ、成立ビットの場合には、分岐命令の分岐先に履歴復元ポイントを更新し、不成立ビットの場合には、分岐命令の次の命令に履歴復元ポイントを更新することを特徴とした開発支援装置。 A trace memory for inputting the branch status message according to claim 1 and storing trace information, and an execution history restoration program for reading the contents of the trace memory and restoring an execution history using a source program executed by the CPU. In the development support apparatus constituted by a computer, the execution history restoration program restored the trace information on the trace memory while corresponding to the instructions of the source program in order, and encountered a branch status message on the trace memory. Sometimes a branch instruction is made to correspond to a branch establishment / non-establishment bit. If it is an establishment bit, the history restoration point is updated at the branch destination of the branch instruction. Development support device characterized by updating points. 請求項2記載の分岐takenカウントメッセージを入力し、トレース情報を蓄えるトレースメモリと、前記トレースメモリの内容を読み取り、CPUが実行したソースプログラムを用いて、実行履歴を復元する実行履歴復元プログラムを備えたコンピュータから構成された開発支援装置において、前記実行履歴復元プログラムは、前記トレースメモリ上のトレース情報を前記ソースプログラムの命令に順番に対応させつつ復元し、前記トレースメモリ上の分岐takenカウントメッセージに遭遇した時には、分岐takenの繰り返し数を分岐成立ビットの列に翻訳し、分岐命令を分岐成立ビットに対応させ、成立ビットの場合には、分岐命令の分岐先に履歴復元ポイントを更新することを特徴とした開発支援装置。 A trace memory for storing the trace information by inputting the branch take count message according to claim 2, and an execution history restoring program for reading the contents of the trace memory and restoring the execution history using the source program executed by the CPU In the development support apparatus constituted by the computer, the execution history restoration program restores the trace information on the trace memory in order corresponding to the instructions of the source program, and generates a branch take count message on the trace memory. When it encounters, it translates the number of branch taken iterations into a sequence of branch establishment bits, associates the branch instruction with the branch establishment bit, and updates the history restoration point at the branch destination of the branch instruction in the case of the establishment bit. A development support device that is characterized. 請求項3記載の分岐状態メッセージまたは分岐takenカウントメッセージを入力し、トレース情報を蓄えるトレースメモリと、前記トレースメモリの内容を読み取り、CPUが実行したソースプログラムを用いて、実行履歴を復元する実行履歴復元プログラムを備えたコンピュータから構成された開発支援装置において、前記実行履歴復元プログラムは、前記トレースメモリ上のトレース情報を前記ソースプログラムの命令に順番に対応させつつ復元し、前記トレースメモリ上の分岐状態メッセージに遭遇した時には、分岐命令を分岐成立/不成立ビットに対応させ、前記トレースメモリ上の分岐takenカウントメッセージに遭遇した時には、分岐takenの繰り返し数を分岐成立ビットの列に翻訳し、分岐命令を分岐成立ビットに対応させ、成立ビットの場合には、分岐命令の分岐先に履歴復元ポイントを更新し、不成立ビットの場合には、分岐命令の次の命令に履歴復元ポイントを更新することを特徴とした開発支援装置。


An execution history which restores an execution history using a branch memory which inputs a branch status message or a branch take count message according to claim 3, stores trace information, reads the contents of the trace memory, and uses a source program executed by the CPU. In the development support apparatus constituted by a computer having a restoration program, the execution history restoration program restores the trace information on the trace memory while sequentially corresponding to the instructions of the source program, and branches on the trace memory. When the status message is encountered, the branch instruction is made to correspond to the branch establishment / non-establishment bit. When the branch take count message on the trace memory is encountered, the branch take repetition number is translated into a branch establishment bit string, and the branch instruction Correspond to the branch establishment bit, and Expediently, branches update the history restore point branch target instruction, if not satisfied bits, development support apparatus and updates the history restore point to the next instruction of the branch instruction.


JP2004001652A 2004-01-07 2004-01-07 Processor and development support system Pending JP2005196437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004001652A JP2005196437A (en) 2004-01-07 2004-01-07 Processor and development support system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004001652A JP2005196437A (en) 2004-01-07 2004-01-07 Processor and development support system

Publications (1)

Publication Number Publication Date
JP2005196437A true JP2005196437A (en) 2005-07-21

Family

ID=34817108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004001652A Pending JP2005196437A (en) 2004-01-07 2004-01-07 Processor and development support system

Country Status (1)

Country Link
JP (1) JP2005196437A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007323636A (en) * 2006-05-30 2007-12-13 Arm Ltd Reducing size of data stream produced during tracing instruction

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007323636A (en) * 2006-05-30 2007-12-13 Arm Ltd Reducing size of data stream produced during tracing instruction
GB2438699B (en) * 2006-05-30 2011-06-08 Advanced Risc Mach Ltd Reducing the size of a data stream produced during instruction tracing
JP2012160200A (en) * 2006-05-30 2012-08-23 Arm Ltd Reducing size of data stream produced during instruction tracing
JP2014220003A (en) * 2006-05-30 2014-11-20 エイアールエム リミテッド Reducing size of data stream produced during instruction tracing

Similar Documents

Publication Publication Date Title
JP4233893B2 (en) Instruction tracing in data processing systems.
JP3583937B2 (en) Information processing equipment
JP2009087343A (en) Technique for generating trace stream for data processing apparatus
US7673187B2 (en) Data processing apparatus and method for reducing trace bandwidth
WO2001093040A1 (en) Program counter trace system, program counter trace method, and semiconductor device
JP4846493B2 (en) Debug system and debug circuit
CN111158756B (en) Method and apparatus for processing information
JP2002304291A (en) Device and method for storing instruction set information
JP2513417B2 (en) Information processing device
JPH10303993A (en) Method for transmitting and receiving asynchronous serial data of digital signal processing processor
US8056088B1 (en) Using scan chains for context switching
JP6458626B2 (en) Debug circuit, semiconductor device, and debugging method
JP2005196437A (en) Processor and development support system
US20120311304A1 (en) Processor, computer product, compression apparatus, and compression method
US20120110307A1 (en) Compressed instruction processing device and compressed instruction generation device
JP6354489B2 (en) Debug circuit, semiconductor device, and debugging method
US20060107123A1 (en) Processor and development supporting apparatus
JP2878264B1 (en) Tracer device, trace data compression method, and compressed trace data reading method
CN111143218B (en) Log debugging method and device suitable for 5G embedded equipment and readable storage medium
US6954843B2 (en) Data driven information processor capable of internally processing data in a constant frequency irrespective of an input frequency of a data packet from the outside
US20030152111A1 (en) System for verifying operations of system LSI
JP2010086321A (en) Memory control system
JP3636702B2 (en) Programmable sequence control circuit
KR100647956B1 (en) Method for encoding and decoding a still photographic in mobile phone
CN116192897A (en) Development method and device of Internet of things component