JPH0240734A - Program development support device - Google Patents
Program development support deviceInfo
- Publication number
- JPH0240734A JPH0240734A JP63190970A JP19097088A JPH0240734A JP H0240734 A JPH0240734 A JP H0240734A JP 63190970 A JP63190970 A JP 63190970A JP 19097088 A JP19097088 A JP 19097088A JP H0240734 A JPH0240734 A JP H0240734A
- Authority
- JP
- Japan
- Prior art keywords
- address
- program
- modified
- gate
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 claims abstract description 25
- 230000004048 modification Effects 0.000 claims description 23
- 238000012986 modification Methods 0.000 claims description 8
- 238000012937 correction Methods 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 14
- 238000011161 development Methods 0.000 description 6
- 238000009795 derivation Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000000034 method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、マイクロプロセッサの処理プログラム開発支
援装置に関し、特に処理プログラムの修正、実行を簡単
に行うことができる装置に関する。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a processing program development support device for a microprocessor, and more particularly to a device that can easily modify and execute a processing program.
従来の技術
マイクロプロセッサの開発過程には、CPUに所定の処
理を行うプログラムを実行させてCPUの動作状況を見
て、プログラムに不都合な点が生じた場合はデバッグを
行うことが必要となってくる。このような処理を行う従
来の装置のブロック図を第10図に示す。Conventional technology During the development process of microprocessors, it is necessary to have the CPU run a program that performs a specific process, check the operating status of the CPU, and debug if any problems occur with the program. come. A block diagram of a conventional device that performs such processing is shown in FIG.
本装置は、装置全体の制御を行うホストコンピュータ1
00と、所定の処理プログラムを実行させる対象となる
マイクロプロセッサ101 と、マイクロプロセッサ1
01が実行する命令を格納するコードメモリ106と、
処理対象のデータと結果を格納するデータメモリ107
とが、アドレスバス1000、データバス110を介し
て接続している。This device consists of a host computer 1 that controls the entire device.
00, a microprocessor 101 that is a target for executing a predetermined processing program, and a microprocessor 1
a code memory 106 that stores instructions to be executed by 01;
Data memory 107 for storing processing target data and results
are connected via an address bus 1000 and a data bus 110.
ホストコンピュータ100は、メモリアクセス権制御信
号124を用いてゲートA11l 、ゲートB112を
制御し、コードメモリ106とデータメモリ107とが
ホストコンピュータ100に接続するのか、マイクロプ
ロセッサ101に接続するのかを切り替える。また、ホ
ストコンピューター100は、リセット信号125を用
いてマイクロプロセッサ101がリセット状態かリセッ
ト解除状態であるかを指定する。The host computer 100 controls the gate A11l and the gate B112 using the memory access right control signal 124, and switches whether the code memory 106 and the data memory 107 are connected to the host computer 100 or the microprocessor 101. Further, the host computer 100 uses the reset signal 125 to specify whether the microprocessor 101 is in a reset state or a reset release state.
また、ホストコンピュータ100は、メモリアクセス権
制御信号124によりゲー) A11lを開くと共にゲ
ートB112を閉じ、マイクロプロセッサ101が実行
するプログラムをコードメモリ106に、処理対象のデ
ータをデータメモリ107にそれぞれロードする。また
、ホストコンピュータ100はマイクロプロセッサ10
1がプログラムを実行した後の結果をデータメモリ10
7から読み出す。In addition, the host computer 100 opens the gate A11l and closes the gate B112 using the memory access right control signal 124, and loads the program to be executed by the microprocessor 101 into the code memory 106 and the data to be processed into the data memory 107. . The host computer 100 also includes a microprocessor 10.
After 1 executes the program, the result is stored in the data memory 10.
Read from 7.
マイクロプロセッサ101に処理プログラムを実行させ
る場合は、まずホストコンピュータ100がコードメモ
リ106 とデータメモリ107にマイクロプロセッサ
101が実行するプログラムと処理対象データをそれぞ
れロードした後、メモリアクセス権制御信号124を切
り替えて、ゲー) ALIIを閉じゲートB112を開
いてマイクロプロセッサ101がメモリアクセスできる
ようにする。その後、リセット信号125を解除すると
、マイクロプロセッサ1’01はコードメモリ106中
の処理プログラムの実行を開始する。プログラム実行後
、ホストコンピュータ100 はリセット信号125を
アクティブにし、マイクロプロセッサ101が実行した
プログラムの結果を得ていた。To cause the microprocessor 101 to execute a processing program, the host computer 100 first loads the program to be executed by the microprocessor 101 and the data to be processed into the code memory 106 and data memory 107, respectively, and then switches the memory access right control signal 124. (game) Close ALII and open gate B112 to allow the microprocessor 101 to access the memory. Thereafter, when the reset signal 125 is released, the microprocessor 1'01 starts executing the processing program in the code memory 106. After executing the program, the host computer 100 activated the reset signal 125 and obtained the results of the program executed by the microprocessor 101.
発明が解決しようとする課題
マイクロプロセッサの処理プログラムの開発に限らず、
プログラムはその開発段階において、実際に実行させて
みてデバッグを行う過程が必要となることが大変多い。Problems to be solved by the invention are not limited to the development of processing programs for microprocessors;
During the development stage of a program, it is very often necessary to actually run it and debug it.
上述した従来の装置では、処理プログラムの修正が必要
となった場合、例えば第11図(a)の部分のプログラ
ムを同図(5)のプログラムに修正したいときのように
、修正されるプログラム(以下被修正プログラムという
)より修正プログラムのサイズ(バイト数)が増えた場
合には、被修正プログラム以降の部分のプログラム、す
なわち第11図(ハ)の場合ではro073H」(Hは
16進表現)以降のプログラムの再配置をするか、アセ
ンブルまたはコンパイルする以前のソースプログラムに
まで遡って修正を行う必要があったため、この作業に多
大な時間を消費しており非能率的であった。In the conventional apparatus described above, when it becomes necessary to modify the processing program, for example, when it is desired to modify the program in the part of FIG. 11(a) to the program in FIG. 11(5), the program to be modified ( If the size (number of bytes) of the modified program is larger than the modified program (hereinafter referred to as the modified program), then the program after the modified program, that is, ro073H in the case of Figure 11 (C) (H is hexadecimal representation) Since it was necessary to rearrange subsequent programs or go back and modify the source program before it was assembled or compiled, this work was time consuming and inefficient.
そこで、本発明の目的は、処理プログラム自体の変更を
行うことなく修正したいプログラムをホストコンピュー
タから修正コードメモリに入力するだけで目的の修正プ
ログラムを実行させることができるプログラム開発支援
装置を提供することである。SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a program development support device that can execute a desired modification program by simply inputting the program to be modified from a host computer into a modification code memory without changing the processing program itself. It is.
課題を解決するための手段
本発明のプログラム開発支援装置は、マイクロプロセッ
サが実行するプログラムの修正すべきアドレスを判別す
るアドレス判別部と、アドレス判別部からの制御信号に
より修正するプログラムのアドレスを出力する修正アド
レス生成部と、前記修正アドレス生成部がアドレス情報
を出力することによって実行される修正プログラムを格
納しておく修正コードメモリと目的の修正プログラムの
終了アドレスを検出して修正アドレス生成部からのアド
レス出力を禁止する終了アドレス検出部とを有している
。Means for Solving the Problems The program development support device of the present invention includes an address determining section that determines an address to be modified in a program executed by a microprocessor, and an address of the program to be modified based on a control signal from the address determining section. a modification address generation unit that stores a modification program that is executed when the modification address generation unit outputs address information; and a modification address generation unit that detects an end address of the target modification program and generates a modification address from the modification address generation unit. and an end address detection section that prohibits address output.
作用
以上のように、本発明によれば、従来のプログラム支援
開発装置にアドレス判別部と修正アドレス生成部と修正
コードメ舌すと終了アドレス検出部とを付加している。Effects As described above, according to the present invention, an address determination section, a modified address generation section, a modified code selection section, and an end address detection section are added to the conventional program support development apparatus.
かかる構成により、処理プログラム自体を直接修正する
ことなく、修正プログラムを修正コードメモリに格納す
る一方、本来のプログラムの修正部分のアドレスをアド
レス判別部により検出する。かくして、アドレス判別部
がプログラムの修正部分のアドレスを検出したとき、修
正コードメモリから修正プログラムを読み出して実行し
、その修正プログラムの終了を終了アドレス検出部で検
出して、元のプログラムに戻ることにより、処理プログ
ラム自体を直接修正することなく目的の修正したプログ
ラムを実行することができる。With this configuration, the modified program is stored in the modified code memory without directly modifying the processing program itself, while the address of the modified portion of the original program is detected by the address determination section. Thus, when the address discrimination section detects the address of the modified portion of the program, the modified program is read from the modified code memory and executed, and the end address detection section detects the end of the modified program and returns to the original program. This allows the target modified program to be executed without directly modifying the processing program itself.
実施例
次に添付図面を参照した本発明によるプログラム支援開
発装置の実施例を説明する。Embodiment Next, an embodiment of the program support development apparatus according to the present invention will be described with reference to the accompanying drawings.
実施例1
本発明によるプログラム支援開発装置の1つの実施例の
ブロック図を第1図に示す。同図において、装置全体の
制御を行うホストコンピュータ100と、マイクロプロ
セッサ101と、被修正プログラムの開始アドレスとマ
イクロプロセッサ101が実行する命令のアドレスとを
比較してアドレス判定信号120を出力するアドレス判
別部102と、修正プログラムのアドレス情報をアドレ
スバスB109に出力する修正アドレス生成部103と
、修正プログラムのコードを格納する修正コードメモリ
104と、修正プログラムの終了を検出する終了アドレ
ス検出部105と、被修正プログラムを含む処理プログ
ラムを格納するコードメモ1月06 と、処理対象デー
タや結果を格納するデータメモリ107とがアドレスバ
スAlO3、アドレスバスB109オヨヒデータパス1
10を介してそれぞれ接続している。Embodiment 1 A block diagram of one embodiment of a program support development apparatus according to the present invention is shown in FIG. In the figure, a host computer 100 that controls the entire device, a microprocessor 101, and an address determination unit that compares the start address of a program to be modified with the address of an instruction executed by the microprocessor 101 and outputs an address determination signal 120. 102, a modified address generation section 103 that outputs the address information of the modified program to the address bus B109, a modified code memory 104 that stores the code of the modified program, and an end address detection section 105 that detects the end of the modified program. The code memo January 06 that stores the processing program including the modified program and the data memory 107 that stores the processing target data and results are connected to the address bus AlO3, the address bus B109, and the Oyohi data path 1.
They are connected to each other via 10.
ここで修正コードメモリ104およびコードメモリ10
6はチップセレクト付きのメモリを用いる。Here, the modified code memory 104 and the code memory 10
6 uses a memory with chip select.
すなわち、コードメモリ106はアドレスが「0XXX
HJで選択され修正コードメモ!J 104はそれ以外
のアドレスで選択されるものとする。That is, the code memory 106 has an address “0XXX
Selected by HJ and modified code memo! It is assumed that J 104 is selected at an address other than that.
なお、アドレスAlO3とアドレスB109の間には第
1ゲート113が設定され、また修正アドレス生成部1
03とアドレスバスB109間には第2ゲート114が
が設定され、修正アドレスデータおよび通常のプログラ
ム実行時のアドレスデータのアドレスバスB109への
導出を制御する。Note that a first gate 113 is set between the address AlO3 and the address B109, and a first gate 113 is set between the address AlO3 and the address B109.
A second gate 114 is set between the address bus B109 and the address bus B109, and controls the derivation of the corrected address data and the address data during normal program execution to the address bus B109.
フリップフロップA117はアドレス判定信号120と
終了アドレス検出部105の出力信号である終了アドレ
ス検出信号126の状態によりフリップフロップ出力1
27を制御し、フリップフロップ8118はフリップフ
ロップ出力127を遅延した信号として第1ゲート制御
信号121を出力する。The flip-flop A117 outputs 1 depending on the state of the address determination signal 120 and the end address detection signal 126 which is the output signal of the end address detection section 105.
27, and the flip-flop 8118 outputs the first gate control signal 121 as a signal obtained by delaying the flip-flop output 127.
また、ホストコンピュータ100は、メモリアクセス権
制御信号124を用いてゲートA111およびゲー)B
112を制御し、コードメモリ106とデータメモリ1
07やその他のブロックが、ホストコンピュータ100
と接続するのか、マイクロプロセッサ101 と接続す
るのかを切り替える働きを持つほか、リセット信号12
5を用いて、マイクロプロセッサ101がリセット状態
かりセット解除状態であるかを指定する。In addition, the host computer 100 uses the memory access right control signal 124 to control the gate A111 and the gate B).
112, code memory 106 and data memory 1
07 and other blocks are connected to the host computer 100.
In addition to having the function of switching whether to connect to the microprocessor 101 or the microprocessor 101, the reset signal 12
5 is used to specify whether the microprocessor 101 is in a reset state or a set release state.
第2図は、第1図中のアドレス判別部102、修正アド
レス生成部103および終了アドレス検出部105の構
成を詳細に示したブロック図である。FIG. 2 is a block diagram showing in detail the configurations of address discriminator 102, corrected address generator 103, and end address detector 105 in FIG. 1.
アドレス判別部102は修正プログラムを挿入するアド
レス値より「IH」減算した値で初期化されるラッチA
201 と、ラッチA201とアドレスバスAlO3の
アドレス値を比較しアドレス判定信号120を出力する
コンパレータA200で構成されている。The address determination unit 102 is a latch A that is initialized with a value obtained by subtracting "IH" from the address value at which the correction program is inserted.
201, and a comparator A200 that compares the address values of the latch A201 and the address bus AlO3 and outputs an address determination signal 120.
また、修正アドレス生成部103は修正アドレス値を格
納しておく修正アドレスポインタ202と修正アドレス
ポインタ202のインクリメンタ203により構成され
ている。Further, the modified address generation unit 103 is composed of a modified address pointer 202 that stores a modified address value, and an incrementer 203 of the modified address pointer 202.
終了アドレス検出部105は修正プログラムの終了アド
レス値で初期化されるラッチB2O5と、ラッチB2O
5の値とアドレスバスBのアドレスデータとを比較し終
了アドレス検出信号126を出力するコンパレータB2
04とで構成されている。The end address detection unit 105 includes a latch B2O5 that is initialized with the end address value of the modified program, and a latch B2O.
Comparator B2 compares the value of 5 with the address data of address bus B and outputs the end address detection signal 126.
04.
第1図及び第2図に示すプログラム開発支援装置を用い
て、第3図(a)に示した被修正プログラムを含むコー
ドメモリ106内のプログラムを第3図(b)の修正プ
ログラムに代えて実行したときの動作について以下説明
する。Using the program development support device shown in FIGS. 1 and 2, the program in the code memory 106 including the modified program shown in FIG. 3(a) is replaced with the modified program shown in FIG. 3(b). The operation when executed will be explained below.
ただし本実施例においては、ラッチA201には修正プ
ログラムを挿入する修正開始アドレス値より「IH」が
減算された値のr006P HJが格納され、修正アド
レスポインタ202には修正プログラムが格納されてい
る先頭アドレス値rlooo HJが格納され、ラッチ
B2O5には修正プログラムの終了アドレス値r100
6HJが格納されているものとする。However, in this embodiment, the latch A201 stores r006PHJ, which is the value obtained by subtracting "IH" from the correction start address value at which the correction program is inserted, and the correction address pointer 202 stores the start address value at which the correction program is stored. The address value rlooo HJ is stored, and the end address value r100 of the correction program is stored in the latch B2O5.
It is assumed that 6HJ is stored.
まず、ホストコンビニータ100よりコードメモリ10
6 とデータメモリ107 に処理プログラムと処理対
象データとを゛それぞれロードしておき、第3図(5)
の修正プログラムを修正コードメモIJ104に書きこ
む。その後、ホストコンビニータ100がメモリアクセ
ス権制御信号124を切り替えて、ゲー) A11lを
閉じゲー)B112を開きリセット信号125を解除す
ることにより、マイクロプロセッサ101はコードメモ
リ106内に格納されている第3図(a)のroooo
HJから始まるプログラムの実行を開始する。First, from the host combinator 100, the code memory 10
6 and the data memory 107 respectively, load the processing program and the data to be processed, respectively, as shown in FIG. 3 (5).
Write the modified program to the modified code memo IJ104. Thereafter, the host combinator 100 switches the memory access right control signal 124, closes the game) A11l, opens the game) B112, and releases the reset signal 125, thereby causing the microprocessor 101 to read the memory access right control signal 124 stored in the code memory 106. roooo in Figure 3 (a)
Start execution of the program starting from HJ.
これ以降の説明は、第4図および第5図も参照しながら
説明する。第4図は修正プログラムのアドレス出力開始
時にふけるアドレスバスAlO3、アドレスバスB10
9、アドレス判定信号120、第1ゲート制御信号12
1、第2ゲート制御信号122、アドレス変化信号12
3、終了アドレス検出信号126、フリップフロップA
の出力127のタイミングチャートであり、第5図は修
正プログラムのアドレス出力終了時におけるアドレスバ
スB109、アドレス判定信号120、第1ゲート制御
信号121、第2ゲート制御信号122、アドレス変化
信号123、終了アドレス検出信号126、フリップフ
ロップAの出力127のタイミングチャートである。The following description will be made with reference to FIGS. 4 and 5. Figure 4 shows the address bus AlO3 and address bus B10 used when the address output of the correction program starts.
9, address determination signal 120, first gate control signal 12
1, second gate control signal 122, address change signal 12
3. End address detection signal 126, flip-flop A
5 is a timing chart of the output 127 of the correction program, and FIG. 5 shows the address bus B 109, address judgment signal 120, first gate control signal 121, second gate control signal 122, address change signal 123, and end at the end of address output of the modification program. 3 is a timing chart of the address detection signal 126 and the output 127 of flip-flop A.
プログラムの開始により、マイクロプロセッサ101は
アドレスバスAlO3にアドレス情報r0000 HJ
を出力するが、このアドレス情報はコンパレータA20
0でラッチA2旧の初期値ro06F HJと比較され
る。この場合、両者の値は一致しないのでアドレス判定
信号120は「0」となり、第1ゲート制御信号121
は「0」、第2ゲート制御信号122は「1」になるの
で第1ゲート113は開き第2ゲート114は閉じてい
るためマイクロプロセッサ101はコードメモリ106
内のプログラムを実行する。At the start of the program, the microprocessor 101 transfers address information r0000 HJ to the address bus AlO3.
This address information is output by comparator A20.
0 and is compared with the old initial value ro06FHJ of latch A2. In this case, since the two values do not match, the address judgment signal 120 becomes "0", and the first gate control signal 121
is "0" and the second gate control signal 122 is "1", so the first gate 113 is open and the second gate 114 is closed, so the microprocessor 101 reads the code memory 106.
Execute the program within.
以降ro06FHJまで同様に順次実行して行くが、次
のアドレスr006F HJがアドレスバスAlO3に
出力されると、ラッチA201に格納されている値と一
致するためコンパレータA200はアドレス判定信号1
20を「1」にして出力し、フリップフロップA117
がセットされる。引続きマイクロプロセッサ101が次
のアドレスを出力するタイミングで第1ゲート制御信号
121が「1」となるため、第2ゲート制御信号122
は「0」になり第1ゲート113は閉じ第2ゲート11
4は開く。よって、修正アドレスポインタ202に格納
されていたアドレスデータr1000 HJがアドレス
バスB109に出力され、修正コードメモリ104中の
プログラムのオペコードがフェッチされる。From then on, execution continues in the same way up to ro06FHJ, but when the next address r006FHJ is output to the address bus AlO3, the comparator A200 outputs the address judgment signal 1 because it matches the value stored in the latch A201.
20 is set to "1" and output, flip-flop A117
is set. Subsequently, the first gate control signal 121 becomes "1" at the timing when the microprocessor 101 outputs the next address, so the second gate control signal 122 becomes "1".
becomes "0", the first gate 113 is closed, and the second gate 11
4 opens. Therefore, the address data r1000HJ stored in the modified address pointer 202 is output to the address bus B109, and the operation code of the program in the modified code memory 104 is fetched.
さらに次のアドレス変化信号123の立ち上がりにより
インクリメンタ203は修正アドレスポインタ202の
値を更新し、そのアドレスデータ「1001H」がアド
レスバスB109に出力される。マイクロプロセッサ1
01は、以降r1004HJまで同様に修正コードメモ
リ104内のプログラムを実行する。Furthermore, upon the next rise of the address change signal 123, the incrementer 203 updates the value of the modified address pointer 202, and the address data "1001H" is output to the address bus B109. microprocessor 1
01 similarly executes the program in the modified code memory 104 up to r1004HJ.
ここで、目的の修正プログラム「BB」、「00」、「
CO」、「53」、「9D」が終了した直後に本来の処
理プログラムのアドレスに復帰するためのブランチ命令
を付加しておく。すなわち、修正プログラムのアドレス
r1005 HJ、r1006 HJに内容「6B」、
rFO」 (JMP 0073 H)を挿入しておく。Here, select the desired hotfix program "BB", "00", "
A branch instruction is added to return to the original processing program address immediately after completion of "CO", "53", and "9D". In other words, the address r1005 HJ and r1006 HJ of the modification program have content "6B",
rFO” (JMP 0073 H).
これにより、第2ゲート114よりアドレスr1006
HJがアドレスバスB109に出力されると終了アド
レス検出部105中のコンパレータB204によってラ
ッチB2O5に格納されているアドレス値’1006
HJとブランチ命令の終了アドレスとを比較し、修正プ
ログラム終了検出信号126を「1」にすることにより
フリップフロップA117はリセットされ、引続きマイ
クロプロセッサ101が次のアドレスを出力するタイミ
ングで第1ゲート制御信号121は「0」となる。これ
により第1ゲート113は開き第2ゲート114は閉じ
るため修正アドレスデータがアドレスバスB109に出
力されるのを禁止して、マイクロプロセッサ101がブ
ランチ命令実行によって出力したアドレスに従いコード
メモリ106のr0073 HJからの処理プログラム
の実行に制御を戻す。As a result, the address r1006 is input from the second gate 114.
When HJ is output to the address bus B109, the comparator B204 in the end address detection unit 105 selects the address value '1006 stored in the latch B2O5.
By comparing HJ with the end address of the branch instruction and setting the modified program end detection signal 126 to "1", the flip-flop A117 is reset, and the first gate control is subsequently performed at the timing when the microprocessor 101 outputs the next address. The signal 121 becomes "0". As a result, the first gate 113 opens and the second gate 114 closes, thus prohibiting the modified address data from being output to the address bus B109, and r0073 HJ of the code memory 106 according to the address output by the microprocessor 101 by executing the branch instruction. Returns control to execution of the processing program from.
以上説明したハードウェア構成によって処理プログラム
自体を変更することなく簡単に修正プログラムを実行す
ることが可能になる。The hardware configuration described above makes it possible to easily execute a modification program without changing the processing program itself.
実施例2
本発明の第2の実施例について説明する。なお、本実施
では複数箇所(三箇所)の修正を行う場合について説明
する。Example 2 A second example of the present invention will be described. Note that in this implementation, a case will be explained in which corrections are made at multiple locations (three locations).
全体の構成は第1図と同じであるが、アドレス判別部1
02と修正アドレス生成部103 と終了アドレス検出
部105に違いがある。まずこの点から説明する。The overall configuration is the same as that in Figure 1, except for the address discrimination section 1.
02 and the modified address generation section 103 and end address detection section 105 are different. First, let me explain this point.
第6図は本実施例におけるアドレス判別部102と修正
アドレス生成部103′の構成図であり、また第7図は
本実施例における終了アドレス検出部の構成図である。FIG. 6 is a block diagram of the address discrimination section 102 and modified address generation section 103' in this embodiment, and FIG. 7 is a block diagram of the end address detection section in this embodiment.
第6図においてアドレス判別部102は、修正プログラ
ムを挿入する各アドレス値より「IH」を減算した値を
書き込んだラッチ1−A604、ラッチ1−B605、
ラッチ1−C606と、各ラッチのアドレス値の導出を
制御するゲー)1−A600、ゲート1−B601、ゲ
ート1−C602と各ラッチより導出される値とアドレ
スバス1−AlO3に出力されるアドレス情報とを比較
するコンパレータA200と、各ゲートの開閉を制御す
るゲート制御信号A620 、ゲート制御信号B621
、ゲート制御信号C622を出力するゲート制御カウ
ンタ603とで構成されている。また修正アドレス生成
部103は、修正プログラムの各開始アドレス値を格納
しておくラッチ2−A607、ラッチ2−8608、ラ
ッチ2− C609と各ラッチのアドレス値の導出を制
御するゲート2−A610、ゲート2−8611、ゲー
ト2−C612と修正アドレスポインタ202と、修正
アドレスポインタ202のインクリメンタ203とで構
成されている。In FIG. 6, the address determination unit 102 stores latches 1-A 604, 1-B 605, and latches 1-A 604 and 1-B 605 in which values obtained by subtracting "IH" from each address value into which a modification program is to be inserted are written.
Latch 1-C606, gate 1-A600 that controls the derivation of the address value of each latch, gate 1-B601, gate 1-C602, the values derived from each latch, and the address output to address bus 1-AlO3. A comparator A200 that compares the information, and a gate control signal A620 and a gate control signal B621 that control the opening and closing of each gate.
, and a gate control counter 603 that outputs a gate control signal C622. The modified address generation unit 103 also includes a latch 2-A607, a latch 2-8608, and a latch 2-C609 that store each start address value of the modified program, and a gate 2-A610 that controls derivation of the address value of each latch. It is composed of a gate 2-8611, a gate 2-C612, a modified address pointer 202, and an incrementer 203 for the modified address pointer 202.
また、第7図において終了アドレス検出部105は各修
正プログラムの終了アドレス値が格納されているラッチ
3−A704、ラッチ3−B705、ラッチ3− C7
06と各ラッチのアドレス値の導出を制御するゲート3
−A701、ゲート3− B702、ゲー)3−C70
3と各ラッチより導出される値とアドレスバス1−81
09 に出力されるアドレス情報とを比較し終了アドレ
ス検出信号126を出力するコンパレータB204とで
構成されている。Further, in FIG. 7, the end address detection unit 105 stores the end address values of each modification program in latch 3-A704, latch 3-B705, and latch 3-C7.
06 and gate 3 that controls the derivation of the address value of each latch.
-A701, Gate 3- B702, Gate) 3-C70
3, values derived from each latch, and address bus 1-81
09 and a comparator B204 that outputs an end address detection signal 126 by comparing the address information outputted at 09.
第6図及び第7図に示したプログラム開発支援装置を用
いて、第8図(a)に示す被修正プログラムを同図(b
)に示す修正プログラムに変更して実行させたときの動
作について以下説明する。Using the program development support apparatus shown in FIGS. 6 and 7, the modified program shown in FIG.
The following describes the operation when the modified program shown in ) is changed and executed.
ただし本実施においては、ラッチ1−A604、ラッチ
1− B605、ラッチ1− C606には、それぞれ
roolF HJ、roOFF HJ、r03FF H
Jが格納され、またラッチ2− A607、ラッチ2−
8608、ラッチ2−C609には修正プログラムの先
頭アドレス値として、それぞれ[1000HJ、「20
00 HJ、r3000 HJが格納され、またラッチ
3− A704、ラッチ3− B705、ラッチ3−C
706、に修正プログラムの終了アドレス値としてそれ
ぞれr1004 HJ、r2005 HJ、r3003
HJが格納されているものとする。However, in this implementation, latch 1-A604, latch 1-B605, and latch 1-C606 have roolF HJ, roOFF HJ, and r03FF H, respectively.
J is stored, and latch 2-A607, latch 2-
8608 and latch 2-C609 have [1000HJ and "20
00 HJ, r3000 HJ are stored, and latch 3-A704, latch 3-B705, latch 3-C
706, r1004 HJ, r2005 HJ, r3003 as the end address values of the modified program, respectively.
It is assumed that HJ is stored.
さきの実施例と同様にまず、ホストコンピュータ100
よりコードメモリ106 とデータメモリ 107に処
理プログラムと処理対象データとをそれぞれロードし、
第8図0))の修正プログラムを修正コードメモリ10
4に書きこむ。その後、ホストコンピュータ100がメ
モリアクセス権制御信号124を切り替えて、ゲー)A
lllを閉じゲー) B112を開きリセット信号12
5を解除することにより、マイクロプロセッサ101は
コードメモリ106内に格納されている、第9図(a)
のroooo HJから始まるプログラムの実行を開始
する。同時に、リセット信号125によりゲート制御カ
ウンタ603の値は「0」に初期化され、ゲート制御信
号A620のみ「1」となり、ゲー) 1−A600
、ゲート2− A610、ゲー)3−A701が開かれ
、各ラッチの初期値が導出される。As in the previous embodiment, first, the host computer 100
Load the processing program and data to be processed into the code memory 106 and data memory 107, respectively,
Figure 8 0)) Corrected code memory 10
Write in 4. Thereafter, the host computer 100 switches the memory access right control signal 124 to
(close game) open B112 and reset signal 12
5, the microprocessor 101 executes the code stored in the code memory 106, as shown in FIG. 9(a).
Start executing the program starting from roooo HJ. At the same time, the value of the gate control counter 603 is initialized to "0" by the reset signal 125, and only the gate control signal A620 becomes "1", so that the value of the gate control counter 603 is initialized to "1".
, Gate 2-A610, Gate 3-A701 are opened, and the initial value of each latch is derived.
プログラムの開始により、マイクロプロセッサ101は
、アドレスバス−A108 にアドレス情報r0000
HJを出力するが、このアドレス情報はコンパレータ
ーA200によりラッチ1−A604から導出された値
ro01F HJと比較される。この場合一致しないの
でアドレス判定信号120は「0」、第1ゲート制御信
号121は「口」、第2ゲート制御信号122は「1」
になるので、第1ゲート113は開き第2ゲート114
は閉じる。よってマイクロプロセッサ101 はコード
メモリ106内のプログラムを実行する。At the start of the program, the microprocessor 101 sends address information r0000 to the address bus-A108.
HJ, this address information is compared by comparator A200 with the value ro01F HJ derived from latch 1-A604. In this case, since they do not match, the address judgment signal 120 is "0", the first gate control signal 121 is "mouth", and the second gate control signal 122 is "1".
Therefore, the first gate 113 is opened and the second gate 114 is opened.
closes. Thus, microprocessor 101 executes the program in code memory 106.
以降ro01F HJまで同様に順次実行して行く。Thereafter, the process is sequentially executed in the same manner up to ro01F HJ.
次のアドレス’0OIF HJがアドレスバス−A10
8に出力されると、アドレス値が一致するためコンパレ
ータA200はアドレス判定信号120を「1」にして
出力するため、フリップフロップA117はセットされ
る。引続きマイクロプロセッサ101が次のアドレスを
出力するタイミングで第1ゲート制御信号121は「l
」、第2ゲート制御信号122は「0」になるから、第
1ゲート113は閉じて第2ゲート114は開くため修
正アドレスポインタ202からアドレスデータr100
0HJがアドレスバス−B109に導出され、修正コー
ドメモリ104内のプログラムのオペコードがフェッチ
される。さらに次のアドレス変化信号123の立ち上が
りでインクリメンタ203は修正アドレスポインタ20
2の値を変更し、更新されたアドレス値rlooI H
Jがアドレスバス−8109に出力される。マイクロプ
ロセッサ101はこれ以降rlo04HJまで同様に修
正コードメモ’J 104内のプログラムを実行する。Next address '0OIF HJ is address bus-A10
Since the address values match, the comparator A200 sets the address determination signal 120 to "1" and outputs it, so the flip-flop A117 is set. Subsequently, the first gate control signal 121 becomes "l" at the timing when the microprocessor 101 outputs the next address.
", the second gate control signal 122 becomes "0", so the first gate 113 is closed and the second gate 114 is opened, so the address data r100 is transferred from the corrected address pointer 202.
0HJ is routed to address bus-B 109 and the opcode of the program in modified code memory 104 is fetched. Furthermore, at the next rising edge of the address change signal 123, the incrementer 203 changes the address pointer 20 to the corrected address pointer 20.
Change the value of 2 and update the address value rlooIH
J is output to address bus -8109. From now on, the microprocessor 101 similarly executes the program in the modified code memo 'J 104 up to rlo04HJ.
ブランチ命令の最終アドレスr1004HJがアドレス
バス−8109に出力されると、アドレスバス−810
9のアドレスデータと終了アドレス検出部105中のラ
ッチ3− A704の値とが一致するので、終了アドレ
ス検出信号126は「1」となるため、フリップフロッ
プ117 はリセットされ、修正プログラムのアドレス
情報がアドレスバス−A108に導出されるのを禁止す
ることによりコードメモリ106のr0022 HJか
らの処理プログラムの実行に制御を戻し、次の修正プロ
グラムを挿入するアドレスになるまで、すなわちアドレ
スroOFF HJまでコードメモリ106中のプログ
ラムを順次実行する。When the final address r1004HJ of the branch instruction is output to the address bus-8109, the address bus-810
Since the address data of 9 and the value of latch 3-A704 in the end address detection section 105 match, the end address detection signal 126 becomes "1", so the flip-flop 117 is reset and the address information of the correction program is Control is returned to the execution of the processing program from r0022 HJ of the code memory 106 by inhibiting it from being routed to the address bus A108 until the next modification program insertion address is reached, i.e. until address roOFF HJ. The programs in 106 are executed sequentially.
なお、ゲート制御カウンタ603の値は、第1ゲート制
御信号121の立ち下がりにより値を更新され、次に修
正されるプログラムの開始アドレス、修正プログラムの
先頭アドレス、修正プログラムの終了アドレスが格納さ
れているラッチからのアドレス値の導出を制御するゲー
ト制御信号B621は「1」となる。The value of the gate control counter 603 is updated at the fall of the first gate control signal 121, and the start address of the program to be modified next, the start address of the modification program, and the end address of the modification program are stored. The gate control signal B621 that controls derivation of the address value from the latch becomes "1".
これ以降、コードメモリ106のアドレスrQQFF
HJ、r03FF HJにおいてもマイクロプロセッサ
101は上述の場合と同様に、修正プログラムおよび処
理プログラムの実行を行う。From now on, address rQQFF of code memory 106
HJ, r03FF Also in HJ, the microprocessor 101 executes the modification program and processing program in the same way as in the above case.
本発明を用いることにより、複数箇所のプログラムの修
正が必要な場合でも、簡単にプログラムの修正およ、び
実行が可能となる。By using the present invention, even if a program needs to be modified at multiple locations, the program can be easily modified and executed.
発明の詳細
な説明したように、本発明は従来のプログラム開発装置
にアドレス判別部と修正アドレス生成部と修正コードメ
モリと終了アドレス検出部とを付加することによって処
理プログラム自体を直接修正することなく、目的の修正
プログラムを実行することができる効果がある。As described in detail, the present invention adds an address determination unit, a modified address generation unit, a modified code memory, and an end address detection unit to a conventional program development apparatus, thereby allowing processing programs to be developed without directly modifying the processing program itself. , the effect is that you can run the desired fix.
第1図は、本発明によるプログラム開発支援装置の実施
例のブロック図、
第2図は、本発明によるプログラム開発支援装置の第1
実施例にふけるアドレス判別部と修正アドレス生成部と
終了アドレス検出部の詳細なブロック図、
第3図は、本発明によるプログラム開発支援装置の第1
実施例を使用してのプログラム開発における被修正プロ
グラムと修正プログラムの配置例を示す図、
第4図は、本発明によるプログラム開発支援装置の第1
実施例を使用してのプログラム開発例での修正プログラ
ムのアドレス出力開始時の各部のタイミングチャート、
第5図は、第4図に示す例における修正プログラムのア
ドレス出力終了時における各部のタイミングチャート、
第6図は、本発明によるプログラム開発支援装置の第2
の実施例におけるアドレス判別部と修正アドレス生成部
の詳細なブロック図、
第7図は、本発明によるプログラム開発支援装置の第2
の実施例における終了アドレス検出部の構成図、
第8図は、本発明によるプログラム開発支援装置の第2
実施例を使用してのプログラム開発における被修正プロ
グラムと修正プログラムの配置例を示す図、
第9図は、本発明によるプログラム開発支援装置の第2
実施例を使用してのプログラム開発例での各部のタイミ
ングチャート、
第10図は、従来のプログラム開発支援装置のブロック
図、
第11図は、従来のプログラム開発支援装置の使用して
のプログラムの修正の一例を示す図である。
〔主な参照番号〕
100 ・・・ホストコンビ二一夕、101 ・・
・マイクロプロセッサ、102 ・・・アドレス判別
部、
103 ・・・修正アドレス生成部、104 ・・
・修正コードメモリ、
105 ・・・終了アドレス検出部、106 ・・
・コードメモリ、
107 ・・・データメモリ、
108 ・・・アドレスバスA1
109 ・・・アドレスバスB1
110 ・・・データバス、
111 ・・・ゲートA1
112 ・・・ゲートB1
113 ・・・第1ゲート、
114 ・・・第2ゲート、
117、iia ・・・フリップ70ツブ、200
・・・コンパレータA1
201 ・・・ラッチAl
2O2・・・修正アドレスポインタ、
203 ・・・インクリメンタ、
204 ・・・コンパレータB1
2O3・・・ラッチB1
600.601.602 ・・・ゲート603 ・
・・ゲート制御カウンタ、604.605.606.6
07.608.609・・・ラッチ610、611.6
12.701.702.703・・・・ゲート704.
705.706・・・ラッチ
1000・・・アドレスバス。FIG. 1 is a block diagram of an embodiment of the program development support device according to the present invention, and FIG. 2 is a block diagram of a first embodiment of the program development support device according to the present invention.
FIG. 3 is a detailed block diagram of the address discrimination unit, modified address generation unit, and end address detection unit according to the embodiment.
FIG. 4 is a diagram showing an example of the arrangement of a modified program and a modified program in program development using the embodiment.
5 is a timing chart of each part at the start of address output of the modified program in the example of program development using the embodiment; FIG. 5 is a timing chart of each part at the end of address output of the modified program in the example shown in FIG. 4; FIG. 6 shows the second part of the program development support device according to the present invention.
FIG. 7 is a detailed block diagram of the address discrimination section and the corrected address generation section in the embodiment of the present invention.
FIG. 8 is a block diagram of the end address detection unit in the embodiment of the present invention.
FIG. 9 is a diagram showing an example of the arrangement of a modified program and a modified program in program development using the embodiment.
10 is a block diagram of a conventional program development support device. FIG. 11 is a diagram of a program using a conventional program development support device. It is a figure which shows an example of a correction. [Main reference numbers] 100...Host combination Niichiyo, 101...
-Microprocessor, 102...Address determination section, 103...Modified address generation section, 104...
・Correction code memory, 105...End address detection unit, 106...
-Code memory, 107...Data memory, 108...Address bus A1 109...Address bus B1 110...Data bus, 111...Gate A1 112...Gate B1 113...First Gate, 114...Second gate, 117, IIA...Flip 70 tube, 200
... Comparator A1 201 ... Latch Al 2O2 ... Modified address pointer, 203 ... Incrementer, 204 ... Comparator B1 2O3 ... Latch B1 600.601.602 ... Gate 603
...Gate control counter, 604.605.606.6
07.608.609...Latch 610, 611.6
12.701.702.703...Gate 704.
705.706...Latch 1000...Address bus.
Claims (1)
きプログラムの開始アドレスを判別するアドレス判別部
と、前記アドレス判別部からの制御信号により修正プロ
グラムのアドレス情報を出力する修正アドレス生成部と
、前記修正アドレス生成部から出力されるアドレス情報
によって実行される修正プログラム・コードを格納して
おく修正コードメモリと、該修正プログラムの終了アド
レスを検出して修正アドレス生成部からのアドレス情報
の出力を禁止する終了アドレス検出部とを有するプログ
ラム開発支援装置。an address determining section that determines a start address of a program to be modified in a program executed by a microprocessor; a modified address generating section that outputs address information of the modified program in response to a control signal from the address determining section; and the modified address generating section. a modification code memory that stores a modification program code executed by address information output from the modification program; and an end address detection unit that detects the end address of the modification program and prohibits output of address information from the modification address generation section. A program development support device having a section.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63190970A JPH0240734A (en) | 1988-07-30 | 1988-07-30 | Program development support device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63190970A JPH0240734A (en) | 1988-07-30 | 1988-07-30 | Program development support device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0240734A true JPH0240734A (en) | 1990-02-09 |
Family
ID=16266707
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63190970A Pending JPH0240734A (en) | 1988-07-30 | 1988-07-30 | Program development support device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0240734A (en) |
-
1988
- 1988-07-30 JP JP63190970A patent/JPH0240734A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6915416B2 (en) | Apparatus and method for microcontroller debugging | |
| KR930016880A (en) | Electronic device and its fixing information | |
| US12340233B2 (en) | Method for operating application program, terminal device and computer-readable storage medium | |
| US7752427B2 (en) | Stack underflow debug with sticky base | |
| KR100206887B1 (en) | CPI to prevent program malfunction | |
| US6957367B2 (en) | System and method for controlling activity of temporary files in a computer system | |
| US4870573A (en) | Microcomputer capable of testing execution of a program with no branch | |
| Breuer et al. | Avoiding hardware aliasing: Verifying RISC machine and assembly code for encrypted computing | |
| JPH0240734A (en) | Program development support device | |
| JPH07182170A (en) | Microprocessor | |
| US8458790B2 (en) | Defending smart cards against attacks by redundant processing | |
| KR20250050896A (en) | Non-operation-compatible command | |
| US11132305B1 (en) | Automatic static region generation for memory protection units (MPUs) | |
| US6785806B1 (en) | Bios having macro/effector pairs for hardware initialization | |
| JPH05216721A (en) | Electronic computer | |
| Brodeur et al. | tBPF: Testing Berkeley Packet Filter Programs Using User Mode Linux | |
| KR950005523B1 (en) | Step Run Processing Method of Programmable Logic Controller | |
| EP1221096A1 (en) | Method and apparatus for modifying microinstructions in a static memory device | |
| Kicinski et al. | Xdp hardware offload: Current work, debugging and edge cases | |
| Kosakai et al. | Compiling C programs into a strongly typed assembly language | |
| Mullen et al. | Peek: A formally verified peephole optimization framework for x86 | |
| Breuer et al. | Avoiding Hardware Aliasing | |
| JPH02103643A (en) | Interruption generation circuit for debug | |
| JPS63163543A (en) | Information processor | |
| JPH0367340A (en) | Simulator |